1

I am a bit lost in the result that this table is generating, seeming that the horizontal lines seem to render incompletely. Any ideas what could be causing this? Thank you.

enter image description here

{\renewcommand{\arraystretch}{1.5}%
\begin{table}[]
\centering
\scriptsize
\begin{tabularx}{\linewidth}{|>{\centering\arraybackslash}m{.6cm}|>{\centering\arraybackslash}m{1.4cm}|>{\centering\arraybackslash}m{1.8cm}|>{\centering\arraybackslash}m{1.3cm}|c|c|c|c|c|c|>{\centering\arraybackslash}m{.6cm}|c|}
\hline
 & \multicolumn{3}{c|}{\textbf{INPUTS}} & \multicolumn{8}{c|}{\textbf{OUTPUTS}}\\ \hline
 & V1 & V2 & V3 & V1 & I1 & V2 & I2 & V3 & I3 & V4 & I4 \\ \hline
PS 1 & 200V AC, 400 Hz & 115V AC, 400 Hz & - & +5V & 1A & +15V & 1.5A & -15V & 1.5A & - & - \\ \hline
PS 2 & - & 115V AC,    50-400 Hz (3 Phase) & 200-300V DC & - & - & - & - & - & - & +96V & 0.2A \\ \hline
PS 3 & 220V AC, 50-400 Hz (1 Phase) & 115V AC,    50-400 Hz (1,2 \& 3 Phase) & 200-300V DC & +5V & 50A & - & - & - & - & - & - \\ \hline
PS 4 & - & - & 28V DC $\pm$ 12V & - & - & +15V & 3.5A & -15V & 3.5A & 26V AC, 400Hz & 3A \\ \hline
PS 5 & 220V AC, 50-400 Hz (1 Phase) & 115V AC,    50-400 Hz (1,2 \& 3 Phase) & 200-300V DC & - & - & +15V & 3.5A & -15V & 3.5A & - & - \\ \hline
\end{tabularx}
\end{table}}
3
  • 4
    Clearly your table is too wide and overflows into the margin. You can try using a smaller fontsize for this table and reduce the value of \tabcolsep to, say, 3pt of the paper?(default is 6pt). What is your document class and the format of the paper?
    – Bernard
    Aug 20 '20 at 23:06
  • Thanks @Bernard ! It seems it did the trick half-way. Nevertheless, now the horizontal lines seem to still go until the end of the column (as you mentioned before, previously they also ended at that same lenght) imgur.com/a/Fgo3lSZ Aug 20 '20 at 23:16
  • Anyway, \scriptsize is really very small. Perhaps you should consider swapping rows and columns: you could then use a larger font size, making the table more readable, and with a more sensible width. I don't think tabularx is necessary here 'anyway, you have no X column, and you can have multiline standard cells if you load makecell.
    – Bernard
    Aug 20 '20 at 23:33
2

enter image description here

(red lines indicate text borders)

  • you not provide any information about page layout in your document, so we can only guessing
  • In above image of table is assumed, that page layout is defined by default values of geometry package
  • Using tabularx table environment require that at least one column had to be X or types derived from it:
\documentclass{article}
\usepackage{geometry}
\usepackage{tabularx}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{table}
\centering
\footnotesize
\renewcommand{\arraystretch}{1.5}
\setlength\tabcolsep{3pt}
\begin{tabularx}{\linewidth}{|M{7mm}|
                              M{13mm}|
                              M{25mm}|
                              M{13mm}|
                              C|C|C|C|C|C|M{12mm}|C|}
\hline
 & \multicolumn{3}{c|}{\textbf{INPUTS}} & \multicolumn{8}{c|}{\textbf{OUTPUTS}}\\ \hline
 & V1 & V2 & V3 & V1 & I1 & V2 & I2 & V3 & I3 & V4 & I4 \\ \hline
PS 1 & 200V AC, 400 Hz & 115V AC, 400 Hz & - & +5V & 1A & +15V & 1.5A & $-15$V & 1.5A & - & - \\ \hline
PS 2 & - & 115V AC,    50-400 Hz (3 Phase) & 200-300V DC & - & - & - & - & - & - & +96V & 0.2A \\ \hline
PS 3 & 220V AC, 50-400 Hz (1 Phase) & 115V AC,    50-400 Hz (1,2 \& 3 Phase) & 200-300V DC & +5V & 50A & - & - & - & - & - & - \\ \hline
PS 4 & - & - & 28V DC $\pm$ 12V & - & - & +15V & 3.5A & $-15$V & 3.5A & 26V AC, 400Hz & 3A \\ \hline
PS 5 & 220V AC, 50-400 Hz (1 Phase) & 115V AC,    50-400 Hz (1,2 \& 3 Phase) & 200-300V DC & - & - & +15V & 3.5A & $-15$V & 3.5A & - & - \\ \hline
\end{tabularx}
    \end{table}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.