I learnt Latex last month and am trying to write a large document with it. I have managed the text and figures, but not tables. Although my table is centered, I would like my caption to begin along with the first cell of the table rather than the full left indent like a normal paragraph.
I also have many footnotes which pertain to the whole table rather than specific parts of the table. I tried using \tablefootnote, but no text seems to appear. Also, I don't want the numbers, just the text.
\documentclass[a4paper, oneside]{book}
\usepackage[left=35mm, right=15mm, top=20mm, bottom=15mm]{geometry}
\usepackage{setspace}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{float}
\usepackage{tabularx}
\usepackage{amssymb}
\usepackage{booktabs} % For \toprule, \midrule and \bottomrule
\usepackage{pgfplotstable} % Generates table from .csv
\usepackage{longtable} %Allows multi-page tables
\usepackage{rotating} %Allows for single page landscape using \sidewaystable{}
\usepackage{pdflscape} %Allows for landscape
\usepackage{multirow} %Allows for merging across rows
\usepackage{tablefootnote}
\usepackage{footnote}
\begin{document}
\begin{table}[h!]
\begin{center}
\caption{Proximate phenolic and carbohydrate content}
\label{Table4}
\begin{tabular}{c c c c c c c}
\toprule
&\multicolumn{2}{c}{\textbf{Leaf}}& &\multicolumn{2}{c}{\textbf{Roots}}\\
\cline{2-3}\cline{5-6}
\textbf{Plant} & \textbf{Colour} & \textbf{Density} & &\textbf{Colour} & \textbf{Density}\\
\midrule
Sample1&26.1$\pm$0.7$^{c}$ &172.3$\pm$9.0& & 25.5$\pm$6.8$^{b}$&83.7$\pm$4.5$^{a}$\\
Sample2&53.9$\pm$2.0$^{d}$&129.5$\pm$3.2& &29.4$\pm$4.8$^{b}$&11.7$\pm$1.8\\
Sample3&32.5$\pm$3.2$^{c}$&163.3$\pm$6.5& &96.8$\pm$18.1&64.4$\pm$1.3\\
Sample4&54.2$\pm$2.3$^{d}$&82.6$\pm$7.5& &28.9$\pm$3.0$^{b}$&35.7$\pm$1.2\\
Sample5&28.4$\pm$3.9$^{c}$&172.1$\pm$6.3& &26.9$\pm$5.1$^{b}$&78.8$\pm$2.8$^{a}$\\
Sample6&50.0$\pm$2.0$^{d}$&112.3$\pm$5.3& &54.1$\pm$5.7&48.1$\pm$7.1\\
\bottomrule
\end{tabular}
\end{center}
\footnotesize{Values expressed in \%(mg.mg$^{-1}$)}\\
\footnotesize{Values with same superscript are statistically similar (OW-ANOVA,p \textless 0.01)}\\
\footnotesize{NSP=Non-starch polysaccahride}
\end{table}
\end{document}
I tried to be clever, but didn't work for the second caption:
\begin{table}[h!]
\begin{center}
\caption{Proximate phenolic and carbohydrate content}
\label{Table4}
\begin{tabular}{c c c c c c c}
\toprule
&\multicolumn{2}{c}{\textbf{Leaf}}& &\multicolumn{2}{c}{\textbf{Roots}}\\
\cline{2-3}\cline{5-6}
\textbf{Plant} & \textbf{Colour} & \textbf{Density} & &\textbf{Colour} & \textbf{Density}\\
\midrule
Sample1&26.1$\pm$0.7$^{c}$ &172.3$\pm$9.0& & 25.5$\pm$6.8$^{b}$&83.7$\pm$4.5$^{a}$\\
Sample2&53.9$\pm$2.0$^{d}$&129.5$\pm$3.2& &29.4$\pm$4.8$^{b}$&11.7$\pm$1.8\\
Sample3&32.5$\pm$3.2$^{c}$&163.3$\pm$6.5& &96.8$\pm$18.1&64.4$\pm$1.3\\
Sample4&54.2$\pm$2.3$^{d}$&82.6$\pm$7.5& &28.9$\pm$3.0$^{b}$&35.7$\pm$1.2\\
Sample5&28.4$\pm$3.9$^{c}$&172.1$\pm$6.3& &26.9$\pm$5.1$^{b}$&78.8$\pm$2.8$^{a}$\\
Sample6&50.0$\pm$2.0$^{d}$&112.3$\pm$5.3& &54.1$\pm$5.7&48.1$\pm$7.1\\
\bottomrule
\end{tabular}
\end{center}
\begin{tabular}
\footnotesize{Values expressed in \%(mg.mg$^{-1}$)}\\
\footnotesize{Values with same superscript are statistically similar (OW-ANOVA,p \textless 0.01)}\\
\footnotesize{NSP=Non-starch polysaccahride}
\end{tabular}
\end{table}
Would this solution work in landscape format? I have tables of that variety as well
tablenotes
environment from thethreeparttable
?. Table notes are displayed direclty underneath the table.threeparttable
also ensures the caption is as wide as the table.\%(mg.mg$^{-1}$
supposed to be? Is(mg.mg$^{-1}
supposed to be equal to mg/mg?