Graphics, Figures & TablesTable format

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bezza
Posts: 4
Joined: Wed Jul 11, 2012 10:42 am

Table format

Post by bezza »

Dear all,
Many thanks in advance for reading this. I'm having some problems with the formatting of a table. The code below produces the cited reference one line below all other definitions. However, when the reference is "None" it remains on the same line.

Any ideas why this would happen? Tried a few things that I had thought of but no luck.

Cheers,

Bez

Code: Select all

\begin{table}[!h]
\caption{General parameters and values}
\vskip 0.1cm
\centering 
\begin{tabular}{p{1.8cm} p{6.1cm} p{2.6cm} p{3.2cm}}
\hline
Parameter & Definition (units) & Parameter & Reference \\ [0.5ex]
\hline 
$N$ & Number & 25 & \cite{ref12006} \\ 
$\beta$ & Infection rate & $1.67 \times 10^{-3}$ & None \\
$\gamma$ & Recovery rate (day$^{-1}$) & $\frac{1}{26}$ & \cite{ref2008effects}, \cite{ref2003longitudinal}  \\ [1ex]
\hline
\end{tabular}
\label{parameters} 
\end{table}
Last edited by Stefan Kottwitz on Wed Jul 11, 2012 1:13 pm, edited 1 time in total.

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Table format

Post by Stefan Kottwitz »

Hi Bezza,

we don't have your .bib file for testing.

So I just can guess that your last column is not wide enough for the cited references to fit in. Try wo make it wider to check that. If the reference cannot be hyphenated, inserting \hspace{0pt} can help, just because TeX doesn't hyphenate the first word in a paragraph (box).

Stefan
LaTeX.org admin
bezza
Posts: 4
Joined: Wed Jul 11, 2012 10:42 am

Re: Table format

Post by bezza »

Hi Stefan,

Sorted! Many thanks for your help!

Bezza
Post Reply