Graphics, Figures & TablesHow to fit/contain a table within a page in achemso settings

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
satish2414
Posts: 3
Joined: Thu Nov 03, 2016 5:09 am

How to fit/contain a table within a page in achemso settings

Post by satish2414 »

Hi all, the MWE is presented below. I was wondering how to bring the whole table within the page.

Code: Select all

\documentclass[journal=jpccck,manuscript=article]{achemso}
\usepackage[T1]{fontenc}   
\usepackage{caption}
\usepackage{booktabs}
\DeclareCaptionLabelFormat{myformat}{#1~S#2}
\captionsetup{labelformat=myformat}

\title{Sample Title}
\begin{document}

\begin{table}
\centering
\caption{Sample caption} 
\begin{tabular}{cccccccc}
\hline
\textbf{Category} & \textbf{Category} & \textbf{Category } & \textbf{Category} & \textbf{Category} & \textbf{ Category } & \textbf{ Category } & \textbf{Category} \\  
\hline
& & & & & & &
\end{tabular}
\label{tab:all-data}
\end{table}
\end{document}
Thank you for your help.

Recommended reading 2024:

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

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

satish2414
Posts: 3
Joined: Thu Nov 03, 2016 5:09 am

How to fit/contain a table within a page in achemso settings

Post by satish2414 »

Resizebox did the trick.

Code: Select all

\begin{table*}
\resizebox{\columnwidth}{!}{%
....
}
\end{table*}
Post Reply