Graphics, Figures & TablesLaTeX Help for Statistics in Medicine

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
manasi2580
Posts: 1
Joined: Mon Jan 26, 2015 4:29 pm

LaTeX Help for Statistics in Medicine

Post by manasi2580 »

Hello, I am trying to debug my code for documentclass simauth that I need for my article to be published in Statistics in Medicine. There are few items I need help with:

1) Table formatting. I am trying to use this code for formatting table using "table" package according to journal standards:

Code: Select all

\begin{table}[ht]
\begin{center}
\begin{tabular}[b]{|cccccc|}\hline%\hline
 \rowcolor{lightgray}\multicolumn{6}{|c|}{\textbf{ Table Number} Table Title}\\
 col1 & col2 & col3 & col4 & col5 & col6 \\\hline
...
 \end{tabular}
\end{center}\end{table}
This does provide the format, but it doesn't perform the automatic numbering of the tables. I wanted to be able to have the caption for the table be automatically created with the appropriate table numbering as well as be within a grey box with the table format according to the journal (http://onlinelibrary.wiley.com/journal/ ... )1097-0258).

2) Figures: I have figures in eps format that is also giving my complilation issues when using "graphicx, psfrag, espf" packages. Here's the code I am using:

Code: Select all

\begin{figure}[ht]
\begin{center}
\includegraphics[scale=0.8]{figurename}
 \label{figurelabel}
 \setlength{\abovecaptionskip}{15pt plus 3pt minus 2pt}
 \caption{Figure Title}
\end{center}
\end{figure}

Thank you!

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

LaTeX Help for Statistics in Medicine

Post by Johannes_B »

Hi and welcome, to get tabular material automatically numbered, use the caption command that can be found in any simple introductin to LaTeX.

Code: Select all

\documentclass{article}
\usepackage{booktabs}
\usepackage{mwe}
\begin{document}
\begin{table}
\centering
\caption[position=above]{This is the caption that describes the table}
\begin{tabular}{cc}
\toprule
Main & head \\
\midrule
body & more body \\
Statistic & medicine\\
\bottomrule
\end{tabular}
\end{table}
\blindtext
\begin{figure}
\centering
\includegraphics{example-image}
\caption{That is the caption describing the image}
\end{figure}
\end{document}

The issue with graphics: What do you mean by having issues? A modern and up to date distribution can handle eps images. On an older system you have to run latex in DVI-mode.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply