Skip to content

Instantly share code, notes, and snippets.

@VinACE
Last active November 28, 2020 19:04
Show Gist options
  • Save VinACE/fe39811bc9f457792d39ed6cba3bfcf7 to your computer and use it in GitHub Desktop.
Save VinACE/fe39811bc9f457792d39ed6cba3bfcf7 to your computer and use it in GitHub Desktop.
Latex_tables
https://tex.stackexchange.com/questions/345379/table-in-two-column
@AhmedArif - I've provided an addendum to address your follow-up comment. The only changes to the code I posted initially is to switch from a table to a table* environment and to use \textwidth instead of \columnwidth in the first argument of tabular*
\begin{table*}[b]
\centering
% \footnotesize
\caption{Year Wise Treatment Frequencies}
\label{tab:freq}
\caption*{\footnotesize
This table provides the frequencies
}
\begin{tabular*}{\linewidth}{S @{\extracolsep{\fill}}
*{4}{S[group-separator = {,},
group-minimum-digits = 4
]}}
\toprule
{Year} & {Nones} & {Option 1} & {Option 2} & {Total} \\
\midrule
2001 & 126 & 16 & 2 & 144 \\
2002 & 114 & 9 & 4 & 127 \\
2003 & 115 & 7 & 1 & 123 \\
2004 & 114 & 6 & 4 & 124 \\
2005 & 104 & 5 & 8 & 117 \\
2006 & 96 & 3 & 6 & 105 \\
2007 & 93 & 2 & 4 & 99 \\
2008 & 93 & 2 & 2 & 97 \\
2009 & 85 & 2 & 11 & 98 \\
2010 & 83 & 0 & 7 & 90 \\
2011 & 74 & 0 & 12 & 86 \\
\midrule
Total & 1097 & 52 & 61 & 1210 \\
\bottomrule
\end{tabular*}
\end{table*}
\lipsum
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment