0

I know this may have been answered previously, but I'm trying to use the suggestions that were given to no effect. The solutions I tried are from this last post: How to adjust a table to fit on page and here: Shrink table to fit on a page, or keep it as it is

I'd welcome any advice. I even tried changing the paper orientation to landscape.

\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\textbf{Article Info} & \textbf{Study Size} & \textbf{RV EDV} & \textbf{RV ESV} & \textbf{LV EDV} & \textbf{LV ESV} \\ \hline
ASO Guidelines: Cardiac Chamber Quantification. Citation: "Age-, Body Size-, and Sex-Specific Reference Values for Right Ventricular Volumes and Ejection Fraction by Three-Dimensional Echocardiography" & 540 & \begin{tabular}[c]{@{}l@{}}Men: 35-87 mL/m2\\ Women: 32-74 mL/m2\end{tabular} & \begin{tabular}[c]{@{}l@{}}Men: 10-44 mL/m2\\ Women: 8-36 mL/m2\end{tabular} & \begin{tabular}[c]{@{}l@{}}Men: 34-74 mL/m2\\ Women: 29-61 mL/m2\end{tabular} & \begin{tabular}[c]{@{}l@{}}Men: 11-31 mL/m2\\ Women: 8-24 mL/m2\end{tabular} \\ \hline
Reference right ventricular systolic and diastolic function normalized to age, gender and body surface area from steady-state free precession cardiovascular magnetic resonance. Table 2 and 3. Stratified by age. & 120 & \begin{tabular}[c]{@{}l@{}}Men: a) 20-29 y/o: 91 b) 30 - 39 y/o: 88 c) 40 - 49 y/o: 85 d) 50 - 59 y/o : 82 e) 60 - 69 y/o: 79 f) 70 - 79 y/o: 75\\ \\ Women: a) 20-29 y/o: 84 b) 30 - 39 y/o: 80 c) 40 - 49 y/o: 76 d) 50 - 59 y/o : 72 e) 60 - 69 y/o: 68 f) 70 - 79 y/o: 64\end{tabular} & \begin{tabular}[c]{@{}l@{}}Men: a) 20-29 y/o: 35 b) 30 - 39 y/o: 33 c) 40 - 49 y/o: 30 d) 50 - 59 y/o : 28 e) 60 - 69 y/o: 25 f) 70 - 79 y/o: 23\\ \\ Women: a) 20-29 y/o: 32 b) 30 - 39 y/o: 30 c) 40 - 49 y/o: 27 d) 50 - 59 y/o : 24 e) 60 - 69 y/o: 21 f) 70 - 79 y/o: 19\end{tabular} & Not measured in this study & Not measured in this study \\ \hline
Reference Values for Real Time Three-Dimensional Echocardiography–Derived Left Ventricular Volumes and Ejection Fraction: Review and Meta-Analysis of Currently Available Studies. Table 2 & 2806 & Not measured in this study & Not measured in this study & \begin{tabular}[c]{@{}l@{}}Men: 54.3 mL/m2\\ \\ Women: 49.0 mL/m2\end{tabular} & \begin{tabular}[c]{@{}l@{}}Men: 20.8 mL/m2\\ \\ Women: 17.3 mL/m2\end{tabular} \\ \hline
\end{tabular}
\end{table}

Thank you all in advance!

2

I am sure, your question is a duplicate. There are already some hints in the comments.

Nevertheless: if you intend to have a table that is spread with its overall width to a given dimension (say \paperwidth), you'd better use the tabularx-package.

You set up your table by using l, c and r-columns. All these column identifiers have in common, that the width of the column will increase, if you put more text into a given cell. That is: The content of the cell won't be wrapped into several lines. This finally results in the width of the table growing and growing wider and finally not fitting on the paper any more.

You can prevent this by calculating the width of the columns yourself. In that case, you need to replace the l, cor r-column-identifier by a p{width}-identifier. Width is the width for the column, you have calculated (or guessed) by yourself.

If you want to define the overall width of the table, you could use the package tabularx. In that case, you can use the \begin{tabularx}{width}. The table will have than the desired width. It also comes with a new column-identifier X(capital X). This is much the same as a p{width}-identifier. The only difference is, that LaTeX now calculates the width of the column. It will be adapted, so that the table will fit your desired table width.

Here is an example, how to make this table work. I must confess, I am not a biologist or medical expert. To me, it appears, as if your table still needs some polish and extra work, to make it work perfect. For example, I think, the term

ml/m2

in your code is some kind of unit. Maybe you'll have to typeset it as

$\frac{\mbox{ml}}{\mbox{m}^2}

in order to get the representation correct?

Another hint: take a look at the third column denoted "RV EDV". I have no idea, what you are talking of, as I am not an expert (as said above). But to me, it looks like you are presenting some kind of measured dose, which is presented in terms of mL/m2. Instead of repeatedly inserting the unit "ml/m2" on each value, it would make more sense, to indicate the used unit in the table head and leave it off in the rest of the column.

I used the sidewaystable-environment instead of the regular table-environment, in order to rotate your table and make it a landscape kind of table. Thus you gain more "width" (in fact height) for the content of your table.

The sidewaystable comes from the package rotating. It also enables the command \rotatebox which I used, to save again some precious column width on the second column, by rotating the table head of that column by 90° and making the column somewhat smaller.

In order to save typing, I defined some new columns. Please refer to the array package manual for the usage of that command.

In case it misinterpreted the given data of your example, you can easily change the definition of my new environment subtable, to correct my errors. I thought, that the presented data is a range of ages and the measured doses, am I right?

As your table is read line by line, from left to right, don't use vertical lines. There is enough white space present, to clearly tell apart one column from the next. Vertical lines stop you from reading from left to right. Avoid them!

I enabled package booktabs to use those nice looking horizontal lines. See the manual for further explanations. Here is the WE

\documentclass[a4paper,draft]{article}

\usepackage[utf8]{luainputenc}
\usepackage{booktabs}           % for better lines in tables
\usepackage{rotating}           % rotating a cell title
\usepackage{tabularx}           % for variable p-column widths
\usepackage{ragged2e}           % for better line wrappings

%% define new column types.  A column type "T" for title usage and a
%% "L" column of variable width but with flush left text.
\newcolumntype{T}{>{\footnotesize} c} % the title line is not the
                                % major content of the table.
                                % Therefore, make it smaller and
                                % center it.
\newcolumntype{L}{>{\RaggedRight\arraybackslash} X} % use a X-column
                                % but instead of justified text, make
                                % it ragged right.
\newcolumntype{M}[1]{>{\RaggedRight\arraybackslash} p{#1}} % same as
                                % above, but this time, define the
                                % width of the column yourself by #1

%% The following two definitions come in handy, when putting some more
%% tabulars into the main table.
\newcolumntype{N}{@{} >{$}c<{$} c @{}}%
\newenvironment{subtab}[1]{%
  #1:\newline%
  \begin{tabular}{N}%
    \multicolumn{1}{@{}T!{}}{Age}%
    & \multicolumn{1}{T@{}}{Dose}\\}{%
 \end{tabular}}%


\begin{document}
\begin{sidewaystable}
  \centering
  \caption{My caption}
  \label{my-label}
  \begin{tabularx}{\linewidth}{@{} M{4.8cm} M{0.7cm} *{4}{L} @{}}
    \toprule
    \multicolumn{1}{@{}T}{Article Info} 
    & \multicolumn{1}{T}{\rotatebox{90}{Study Size}}
    & \multicolumn{1}{T}{RV EDV}
    & \multicolumn{1}{T}{RV ESV}
    & \multicolumn{1}{T}{LV EDV}
    & \multicolumn{1}{T@{}}{LV ESV} \\
    \midrule
    ASO Guidelines: Cardiac Chamber Quantification. Citation: ``Age-,
    Body Size-, and Sex-Specific Reference Values for Right
    Ventricular Volumes and Ejection Fraction by Three-Dimensional
    Echocardiography'' 
    & 540 
    & Men:\newline
      $35 \ldots{} 87$ mL/m2\newline 
      Women:\newline 
      $32 \ldots{} 74$ mL/m2
    & Men: \newline 
      $10 \ldots{} 4$4 mL/m2\newline 
      Women: \newline
      $8 \ldots{} 3$6 mL/m2
    & Men: \newline
      $34 \ldots{} 7$4 mL/m2\newline 
      Women: \newline
      $29 \ldots{} 6$1 mL/m2 
    & Men: \newline
      $11 \ldots{} 3$1 mL/m2\newline 
      Women: \newline
      $8 \ldots{} 2$4 mL/m2 \\
    Reference right ventricular systolic and diastolic function
    normalized to age, gender and body surface area from steady-state
    free precession cardiovascular magnetic resonance. Table 2 and
    3. Stratified by age.  
    & 120 
    & \begin{subtab}{Men}
      20 \ldots{} 29 & 91 \\
      30 \ldots{} 39 & 88 \\
      40 \ldots{} 49 & 85 \\
      50 \ldots{} 59 & 82 \\
      60 \ldots{} 69 & 79 \\
      70 \ldots{} 79 & 75 \\
      \end{subtab}
    \begin{subtab}{Women}
      20 \ldots{} 29 & 84 \\
      30 \ldots{} 39 & 80 \\
      40 \ldots{} 49 & 76 \\
      50 \ldots{} 59 & 72 \\
      60 \ldots{} 69 & 68 \\
      70 \ldots{} 79 & 64  
    \end{subtab}
    & \begin{subtab}{Men}
        20 \ldots{} 29 & 35 \\
        30 \ldots{} 39 & 33 \\
        40 \ldots{} 49 & 30 \\
        50 \ldots{} 59 & 28 \\
        60 \ldots{} 69 & 25 \\
        70 \ldots{} 79 & 23
      \end{subtab}
    \newline
    \begin{subtab}{Women}
      20 \ldots{} 29 & 32 \\
      30 \ldots{} 39 & 30 \\
      40 \ldots{} 49 & 27 \\
      50 \ldots{} 59 & 24 \\
      60 \ldots{} 69 & 21 \\
      70 \ldots{} 79 & 19 
      \end{subtab}
    & Not measured in this study 
    & Not measured in this study \\
    Reference Values for Real Time Three-Dimensional
    Echocardiography–Derived Left Ventricular Volumes and Ejection
    Fraction: Review and Meta-Analysis of Currently Available
    Studies. Table 2  
    & 2806 
    & Not measured in this study 
    & Not measured in this study 
    & Men:\newline
      54.3 mL/m2\newline 
      Women: \newline
      49.0 mL/m2 
    & Men: \newline
      20.8 mL/m2\newline
      Women: \newline
      17.3 mL/m2 \\
    \bottomrule
  \end{tabularx}
\end{sidewaystable}
\end{document}

And this is the result:

enter image description here

  • 1
    Thank you so much! I learned a lot from your answer too! I've never created a table in LaTex, but I've used it for just text editing and everyone I've worked with has been impressed by how clean the document looks. Thanks for your explanation, and I'll be incorporating those tips into my work from now on. – user2977350 Jan 8 '17 at 18:20

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