Graphics, Figures & TablesChemstyle package and table captions

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ChemistKatie
Posts: 14
Joined: Wed Sep 01, 2010 4:47 pm

Chemstyle package and table captions

Post by ChemistKatie »

Hi,

I am trying to get the captions of my tables below the actual table. I am using the \usepackage{chemstyle} as I need to write chemical equations. However, this makes the table captions go above the table and I do not want this to happen.

This is a table without the chemstyle package:

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,12pt]{report}
\usepackage[singlelinecheck=false,font=footnotesize,format=plain,labelfont=bf,up,textfont=up,belowskip=-15pt,aboveskip=0pt,tableposition=bottom]{caption}
\usepackage{multirow}
\begin{document}
\begin{table}[ht]
\begin{tabular}{p{1.5cm}p{1.5cm}|p{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}|}
\cline{3-7}
& & \multicolumn{5}{|c|}{\textbf{Percentage (\%)}}\\
\hline
\multicolumn{1}{|c}\textbf{Sample} & \textbf{pH} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{H3PO2} & \textbf{H3PO3}\\
\hline
\multicolumn{1}{|c}{a} & 2 & 27 & 64 & 3 & 1 & 4\\
\multicolumn{1}{|c}{b} & 4 & 4 & 55 & 0 & 38 & 3\\
\multicolumn{1}{|c}{c} & 6 & 0 & 13 & 0 & 85 & 2\\
\multicolumn{1}{|c}{d} & 10 & 0 & 0 & 0 & 99 & 1\\
\hline
\end{tabular}
\caption[Comparing the percentage composition of the HPG system when synthesised at different pH ranging from pH\,2-10]{Comparing the percentage composition of the HPG system when synthesised at different pH ranging from pH\,2-10. The percentage yield of each product was calculated by integration of the signal for that specific product relative to other signals of the
$^{31}$P\,NMR (D2O, 300\,K, 121.49\,MHz) and reported to the nearest whole integer.$^{31}$P\,NMR spectra (D2O, 300\,K, 121.49\,MHz)$^{31}$P\,NMR spectra (D2O, 300\,K, 121.49\,MHz) and reported to the nearest whole integer.}
\label{glypHtab}
\end{table}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The caption is below the table.

With the usepackage{chemstyle}

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,12pt]{report}
\usepackage[singlelinecheck=false,font=footnotesize,format=plain,labelfont=bf,up,textfont=up,belowskip=-15pt,aboveskip=0pt,tableposition=bottom]{caption}
\usepackage{multirow}
%\usepackage{chemstyle}
\begin{document}
\begin{table}[ht]
\begin{tabular}{p{1.5cm}p{1.5cm}|p{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}p{1.5cm}|}
\cline{3-7}
& & \multicolumn{5}{|c|}{\textbf{Percentage (\%)}}\\
\hline
\multicolumn{1}{|c}\textbf{Sample} & \textbf{pH} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{H3PO2} & \textbf{H3PO3}\\
\hline
\multicolumn{1}{|c}{a} & 2 & 27 & 64 & 3 & 1 & 4\\
\multicolumn{1}{|c}{b} & 4 & 4 & 55 & 0 & 38 & 3\\
\multicolumn{1}{|c}{c} & 6 & 0 & 13 & 0 & 85 & 2\\
\multicolumn{1}{|c}{d} & 10 & 0 & 0 & 0 & 99 & 1\\
\hline
\end{tabular}
\caption[Comparing the percentage composition of the HPG system when synthesised at different pH ranging from pH\,2-10]{Comparing the percentage composition of the HPG system when synthesised at different pH ranging from pH\,2-10. The percentage yield of each product was calculated by integration of the signal for that specific product relative to other signals of the
$^{31}$P\,NMR (D2O, 300\,K, 121.49\,MHz) and reported to the nearest whole integer.$^{31}$P\,NMR spectra (D2O, 300\,K, 121.49\,MHz)$^{31}$P\,NMR spectra (D2O, 300\,K, 121.49\,MHz) and reported to the nearest whole integer.}
\label{glypHtab}
\end{table}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Caption is above the table. Any help on how to sort this would be appreciated.

Please let me know if you need anymore information.

Katie

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Chemstyle package and table captions

Post by josephwright »

This is detailed in the documentation: see the section "Captions above floats". Most publishers put captions above tables, which is why chemstyle does.
Joseph Wright
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Chemstyle package and table captions

Post by sommerfee »

Since the chemstyle package uses the floatrow package, the answer could be found within the floatrow package documentation:

Code: Select all

\floatsetup[table]{style=plain}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ChemistKatie
Posts: 14
Joined: Wed Sep 01, 2010 4:47 pm

Re: Chemstyle package and table captions

Post by ChemistKatie »

All sorted!

Thanks!
Post Reply