0

I'm trying to fit a very wide table on one page. Landscape does not do the trick and latex is cutting off half of my columns. Also...I'm having trouble to define the first S-Column (Cases) separately from the other 22 columns to specify, that decimals do not need to be displayed in that column.

\documentclass[10pt,ngerman,english]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{geometry}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{pdflscape}
\usepackage{multirow,booktabs,setspace,caption}
\usepackage{tikz}
\usepackage{soul}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{float}

\pagestyle{empty}

\DeclareCaptionLabelSeparator*{spaced}{\[2ex]} \captionsetup[table]{textfont=it,format=plain,justification=justified, singlelinecheck=false,labelsep=spaced,skip=0pt} \captionsetup[figure]{labelsep=period,labelfont=it,justification=justified, singlelinecheck=false,font=doublespacing}

\begin{document}

\sisetup{detect-mode, tight-spacing = true, group-digits = false, input-signs = + -, input-open-uncertainty = , input-close-uncertainty = , round-mode = places, table-number-alignment = center, round-precision = 2, add-integer-zero = true}

\begin{landscape} \begin{table} \setlength\extrarowheight{2pt} \centering \begin{tabular}{l{23}{S[table-format=3.2, table-space-text-post={}]}} \hline & \multicolumn{1}{c}{Cases}& \multicolumn{1}{c}{\textit{M}}& \multicolumn{1}{c}{\textit{SD}}& \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} & \multicolumn{1}{c}{(6)} & \multicolumn{1}{c}{(7)} & \multicolumn{1}{c}{(8)} & \multicolumn{1}{c}{(9)} & \multicolumn{1}{c}{(10)} & \multicolumn{1}{c}{(11)} & \multicolumn{1}{c}{(12)} & \multicolumn{1}{c}{(13)} & \multicolumn{1}{c}{(14)} & \multicolumn{1}{c}{(15)} & \multicolumn{1}{c}{(16)} & \multicolumn{1}{c}{(17)} & \multicolumn{1}{c}{(18)} & \multicolumn{1}{c}{(19)} & \multicolumn{1}{c}{(20)} \ \hline D & 856 & .5 &.5 \ A& 856 & .5 &.5 &.29* \ I& 856 & .5 &.5 & .17*** &.22*** \ C & 856 & .5 &.5& .03 & .02 & .12*** \ O & 856 & .5 &.5& .10** & .20*** & .13*** & .15*** \ A & 856 & .5 &.5 & -.03 & .00 & .09** & .17*** & .24*** \ C & 856 & .5 &.5 & -.08* & -.05 & -.10** & -.24*** & -.06 & -.09* & -.51*** & -.49*** & -.54*** & -.35*** & -.37*** & -.32*** & -.47*** & -.46*** & -.42*** & -.42*** & -.45*** & -.47*** & -.10** & .01 \ \hline \end{tabular} \end{table} \end{landscape}

\end{document}

Thanks in advance for any help.

Bernard
  • 271,350
Jan
  • 45
  • Regarding the second part of your question: \begin{tabular}{l S[table-format=3] *{2}{S[table-format=1.2]} *{20}{S[table-format=-1.2,table-space-text-post={***}]}} should work. (The table will howeverr still be wider than the available space.) – leandriis Feb 01 '21 at 21:53
  • Also, you can remove \multicolumn{1}{c} (e.g., {1)} instead of \multicolumn{1}{c}{(1)}.) in the column headers. Contents in a set of {} insid an S type column are horizontally centered by default.Apart from that, I really doubt you will be able to fit that many columns onto a single page while still keeping an a least somewhat readable font size. Probably, you could split up your table into tso parts? – leandriis Feb 01 '21 at 21:54

0 Answers0