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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10397
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