Tabelas - Mesclar células verticais - Limitar linha horizontal

455 views
Skip to first unread message

Thamires Silva

unread,
Dec 19, 2017, 10:58:38 PM12/19/17
to Latex-br
Caros,

No código abaixo preciso que as duas primeiras células superiores esquerda sejam mescladas. Como podem ver, o alfa já está centralizado, contudo não consigo retirar a linha que está por cima do alfa. Há alguma forma de eu limitar o \hline?

%PREAMBULO:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{array}

% TABELA

\begin{table*}[!ht]
  \centering
  \onehalfspacing
  \caption{Coeficientes aerodinâmicos - Estudo analítico vs CFD}
  \vspace{.2cm}
    \begin{tabular}{ >{\centering\arraybackslash}m{1.2cm} | >{\centering\arraybackslash}m{2.1cm} | >{\centering\arraybackslash}m{2.1cm} | >{\centering\arraybackslash}m{2.1cm} | >{\centering\arraybackslash}m{2.1cm} | >{\centering\arraybackslash}m{2.1cm} | >{\centering\arraybackslash}m{2.1cm} @{}m{0pt}@{}} \hline
    \multirow {2}{*}{\textbf{$\alpha$}} & \multicolumn{3}{c|}{\textbf{C\textsubscript{L} da aeronave}} & \multicolumn{3}{c}{\textbf{C\textsubscript{D} da aeronave}} \\ \hline   
    & \textbf{Analítico} & \textbf{XFLR5{\textsuperscript{\textregistered}}} & {\textbf{Desvio}} & \textbf{Analítico} & \textbf{XFLR5{\textsuperscript{\textregistered}}} & {\textbf{Desvio}} \\ \hline
    1°    & 4 & 5 & 6 & 7 & 8 & 9 \\
    2º    & 4 & 5 & 6 & 7 & 8 & 9 \\
    3º & & 4 & 5 & 6 & 7 & 8 & 9 \\ \hline
    \end{tabular} \\
  \label{tab:6}
       \vspace{.2cm}
          \footnotesize{Fonte: Autores (2017)}
\end{table*}

Eduardo M KALINOWSKI

unread,
Dec 20, 2017, 5:43:47 AM12/20/17
to late...@googlegroups.com
On qua, 20 dez 2017, Thamires Silva wrote:

> Há alguma forma de eu limitar o \hline?

Sim, \cline{inicio-fim}, p. ex. \cline{2-3}.

--
Eduardo M KALINOWSKI
edu...@kalinowski.com.br


Emílio Kavamura

unread,
Dec 22, 2017, 8:29:48 AM12/22/17
to Latex-br


\begin{table*}[!ht]
  \centering
  \onehalfspacing
  \caption{Coeficientes aerodinâmicos - Estudo analítico vs CFD}
  \vspace{.2cm}

    \begin{tabular}{
    >{\centering\arraybackslash}m{1.2cm} |
    *{5}{>{\centering\arraybackslash}m{2.1cm} |}    % uma forma de compactar a notação de de formatação repetida em várias colunas

>{\centering\arraybackslash}m{2.1cm} @{}m{0pt}@{}} \hline
    \multirow {2}{*}{\textbf{$\alpha$}} & \multicolumn{3}{c|}{\textbf{C\textsubscript{L} da aeronave}} & \multicolumn{3}{c}{\textbf{C\textsubscript{D} da aeronave}} \\ \cline{2-7}
    & \textbf{Analítico} & \textbf{XFLR5{\textsuperscript{\textregistered}}} & {\textbf{Desvio}} & \textbf{Analítico} & \textbf{XFLR5{\textsuperscript{\textregistered}}} & {\textbf{Desvio}} \\ \hline
    1º    & 4 & 5 & 6 & 7 & 8 & 9 \\   %simbolo está diferente...

    2º    & 4 & 5 & 6 & 7 & 8 & 9 \\
    3º    & 4 & 5 & 6 & 7 & 8 & 9 \\ \hline % tinha um & a mais

    \end{tabular} \\
  \label{tab:6}
       \vspace{.2cm}
          \footnotesize{Fonte: Autores (2017)}
\end{table*}




Emílio Kavamura

unread,
Dec 22, 2017, 8:37:56 AM12/22/17
to Latex-br
mais um comentário,

um jeito de mudar o espaçamento entre linhas pode ser o comando:

\renewcommand{\arraystretch}{1.25}

no lugar do \onehalfspacing

Thamires Silva

unread,
Dec 22, 2017, 3:57:20 PM12/22/17
to Latex-br
Eduardo, obrigada pela ajuda. Deu certo.

Thamires Silva

unread,
Dec 22, 2017, 4:05:27 PM12/22/17
to Latex-br
Sou grata pelas dicas, Emílio. 

*{5}{>{\centering\arraybackslash}m{2.1cm} |} Disso eu não sabia. Irá me ajudar bastante na construção de tabelas.
º Realmente eu não tinha reparado nisso. Obrigada.
& 4 & ficou incorreto na hora que copiei para cá. No documento original está certo. Ainda assim agradeço a ajuda.


Em sexta-feira, 22 de dezembro de 2017 11:29:48 UTC-2, Emílio Kavamura escreveu:

Thamires Silva

unread,
Dec 22, 2017, 4:08:18 PM12/22/17
to Latex-br
Obrigada pela dica.
Reply all
Reply to author
Forward
0 new messages