1

I'm having trouble adjusting the table on the page. The table is looking like this: enter image description here

\begin{table}[htb!]
\begin{tabular}{cccccc}
\multicolumn{2}{c}{Conexão do Transformador} & \multicolumn{2}{c}{Banco de Transformadores 
 Monofasico} & \multicolumn{2}{c}{Transformador Trifásico}     \\\hline
 Primário               & Secundário          & Chaveamento Simultâneo     & Chaveamento 
 Sequencial     & Chaveamento Simultâneo & Chaveamento Sequencial \\\hline
 Y (Aterrado)           & $\Delta$ ou Y          & 26 x normal...             & 26 x normal 
 ...            & 13 x normal...         & 14.5 x normal\\
 Y (Aterrado)           & $\Delta$               & 26 x normal...             & 29 x normal...             
 & 13 x normal...         & 14.5 x normal...       \\
 Y                      & $\Delta$ ou Y          & 20 x normal...             & 20 x normal...             
 & 11 x normal...         & 11 x normal...         \\
 Y                      & $\Delta$               & 20 x normal...             & 20 x normal...             
 & 11 x normal...         & 11 x normal...         \\
 $\Delta$                 & $\Delta$ ou Y          & 20* x normal...            & 30+ x 
 normal...            & 15.5 x normal... ++    & 15.5 x normal...       \\
 $\Delta$                  & $\Delta$               & 20* x normal...            & 30+ x 
 normal...            & 15.5+ x normal...    & 15.5+ x normal...\\\hline      
 \end{tabular}
 \end{table}enter code here

I'm using the following compiler: pt.overleaf.com/latex/templates/pcall-tcc/dywydszxydqd. And the document class is abntex2

2
  • Please make your code snippet minimally compilable. E.g., which documenht class do you employ? Which packages relevant for tabular material do you load? How wide is the textblock?
    – Mico
    Feb 1, 2022 at 22:39
  • 1
    I'm using the following compiler: pt.overleaf.com/latex/templates/pcall-tcc/dywydszxydqd The document class is abntex2
    – Dragnovith
    Feb 1, 2022 at 22:46

1 Answer 1

1

You need to introduce line breaks in almost all header cells.

In the following example, I've omitted all instances of ... since I have absolutely no idea that they're supposed to do.

enter image description here

\documentclass[
    % -- opções da classe memoir --
    12pt,       % tamanho da fonte
    openright,  % capítulos começam em pág ímpar (insere página vazia caso preciso)
    twoside,    % para impressão em verso e anverso. Oposto a oneside
    a4paper,    % tamanho do papel. 
    % -- opções do pacote babel --
    english,    % idioma adicional para hifenização
    brazil      % o último idioma é o principal do documento
    ]{abntex2}
\usepackage{booktabs} % for \toprule, \midrule, \bottomrule, \cmidrule, and \addlinespace macros

\begin{document}

\begin{table}[htb!]
\setlength\tabcolsep{0pt}
%\small % <-- optional
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} cccccc }
\toprule
\multicolumn{2}{c}{Conexão do} & 
\multicolumn{2}{c}{Banco de} & 
\multicolumn{2}{c}{Transformador} \\
\multicolumn{2}{c}{Transformador} & 
\multicolumn{2}{c}{Transformadores } &
\multicolumn{2}{c}{Trifásico} \\
\cmidrule{1-2} \cmidrule{3-4} \cmidrule{5-6}
Primário  & Secundário & Chaveamento & Chaveamento & Chaveamento & Chaveamento  \\
          &            & Simultâneo  & Sequencial  & Simultâneo  & Sequencial   \\
\midrule
 Y (Aterrado) & $\Delta$ ou Y & 26$\times$normal & 26$\times$normal & 13$\times$normal & 14.5$\times$normal \\
 Y (Aterrado) & $\Delta$      & 26$\times$normal & 29$\times$normal & 13$\times$normal & 14.5$\times$normal \\
\addlinespace
 Y            & $\Delta$ ou Y & 20$\times$normal & 20$\times$normal & 11$\times$normal &   11$\times$normal \\
 Y            & $\Delta$      & 20$\times$normal & 20$\times$normal & 11$\times$normal &   11$\times$normal \\
\addlinespace
 $\Delta$     & $\Delta$ ou Y & 20*$\times$normal& 30+$\times$normal& 15.5$\times$normal  & 15.5$\times$normal \\
 $\Delta$     & $\Delta$      & 20*$\times$normal& 30+$\times$normal& 15.5+$\times$normal & 15.5+$\times$normal\\
\bottomrule      
\end{tabular*}
\end{table}

\end{document}
1
  • 1
    Ahh ok, I tried to use the linebreak but it was giving error. I was doing it wrong. The (...) is because the word continues, I would put the continuation in the table caption. Thank you very much!
    – Dragnovith
    Feb 1, 2022 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .