Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

it's been awhile since I last used LaTex to produce some document. Right now I'm trying to help my wife with producing PhD thesis. And I ran into a problem with a quite big table. I've never used rotated table and found sidewaystable environment that could work for me. But the content is still too big to fit on the page and I'm affraid that she doesn't allow me to break the table on multiple pages.

Here is the output:

output

The code for producing table is as follows:

    \begin{sidewaystable}

\miniscule

\rowcolors{1}{gray!25}{white}
\begin{tabular} {llllll}



\toprule
\rowcolor{gray!50}

\textbf{Combination sand fly - Leishmania}   & \textbf{Infective dose for sand flies}   &\textbf{Used method}   & \parbox{3.5cm}{ \textbf{Size of total prefeeding load}\\
(promastigotes/midgut)}
   &\textbf{No. Promastigotes transmitted
per fly}
   &\textbf{\% of transmitting flies}   \\
\midrule

\parbox{4cm}{\emph{P. papatasi - L. Major}\\ \textbf{\citep{War86}}} & $2\times10^6$ promastigotes/ml & \parbox{2cm}{{forced feeding by microcapillaries}} & unknown & \parbox{3cm}{range 0--1000 \\ 80\% females 1--100 \\ 20\% females 100--1000 \\ 5\% more than 1000 } &   11.4--35\%\\

\addlinespace


\parbox{4cm}{\emph{L. longipalpis - L. mexicana}\\ \textbf{\citep{Rog04}}} & $2\times10^6$ amastigotes/ml & \parbox{2cm}{{artificial feeding through membrane}} & unknown & \parbox{3cm}{1086* \\ (86-96\%  metacyclic promastigotes) } &   unknown\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum}\\ \textbf{\citep{Rog10}}} & $2\times10^6$ amastigotes/ml & \parbox{2cm}{{artificial feeding through membrane}} & \parbox{3cm}{$1.06\times10^4 \pm 2.1\times10^4$ \\(35\% metacyclic promastigotes)} & \parbox{3cm}{$457\pm122*$ \\ (95\%  metacyclic promastigotes) } &   unknown\\

\addlinespace
\parbox{4cm}{\emph{P. duboscqi - L. major}\\ \textbf{\citep{Kim08}}} & $4\times10^6$ amastigotes/ml & \parbox{2cm}{{natural feeding on mouse ears}} & $1\times10^4 – 1\times10^5$ & \parbox{3cm}{range 0--100000 \\ 75\% females 600 and less \\ 25\% females more than 1000 } &   19.26\%\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum chagasi}\\ \textbf{\citep{Sec12}}} & $4\times10^6$ promastigotes/ml & \parbox{2cm}{{natural feeding on mouse ears}} & $1\times10^4$ & \parbox{3cm}{1002 \\ range 10--10000 \\ 75\% less than 300 } &   unknown\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum dermotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $8\times10^4$ & \parbox{3cm}{1127/13** \\ range 10--11100 } &   58\%\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum viscerotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $1.5\times10^5$ & \parbox{3cm}{104*/24**\\ range 0--1250} &   14.5\%\\

\addlinespace
\parbox{4cm}{\emph{L. perniciosus   - L. infantum dermotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $5\times10^5$ & \parbox{3cm}{2350*/29**\\ range 0--42000} &   65\%\\

\addlinespace
\parbox{4cm}{\emph{L. perniciosus - L. infantum viscerotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $6.6\times10^4$ & \parbox{3cm}{88*/28** \\ range 0--500} &   33\%\\


\bottomrule
\end{tabular}
\medskip
\tiny

  $^*$ an average dose of transmitted parasites per sand fly \\
  $^{**}$ median of transmitted parasites per sand fly


\caption[table caption]{Table description}\label{rotfloat2}




 \end{sidewaystable}

For the side note I'm using memoir class. I'm also having problem with coloring the rows. Most notably the header contains white margins.

Any advice or help with tuning the table is much appreciated.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

An easy solution would be to use p{1.5cm} instead of l for the last column and change the title from % of transmitting flies to transmitting flies (%). From what I can test it here, this makes the table small enough for one page and only changes the appearance of the table in a very small way.

For removing the ugly white space of the toprule and midrule (and bottomrule has it too but you can't see it against the white background) you can use specialrule.

For instance, \toprule becomes \specialrule{1pt}{0pt}{0pt} and \midrule becomes \specialrule{0.5pt}{0pt}{0pt}

Note that the first argument specifies the thickness of the line and the second and third argument specifying no space around the line. Note that it might cause problems with text in the cell "touching" the lines, but you can remove this by increasing the space within the cell.

The code would be:

\begin{sidewaystable}

\miniscule

\rowcolors{1}{gray!25}{white}
\begin{tabular} {lllllp{1.5cm}}
\specialrule{1pt}{0pt}{0pt}
\rowcolor{gray!50}

\textbf{Combination sand fly - Leishmania}   & \textbf{Infective dose for sand flies}   &\textbf{Used method}   & \parbox{3.5cm}{ \textbf{Size of total prefeeding load}\\
(promastigotes/midgut)}
   &\textbf{No. Promastigotes transmitted
per fly}
   &\textbf{transmitting flies (\%)} \\
\specialrule{0.5pt}{0pt}{0pt}

\parbox{4cm}{\emph{P. papatasi - L. Major}\\ \textbf{\citep{War86}}} & $2\times10^6$ promastigotes/ml & \parbox{2cm}{{forced feeding by microcapillaries}} & unknown & \parbox{3cm}{range 0--1000 \\ 80\% females 1--100 \\ 20\% females 100--1000 \\ 5\% more than 1000 } &   11.4--35\%\\

\addlinespace


\parbox{4cm}{\emph{L. longipalpis - L. mexicana}\\ \textbf{\citep{Rog04}}} & $2\times10^6$ amastigotes/ml & \parbox{2cm}{{artificial feeding through membrane}} & unknown & \parbox{3cm}{1086* \\ (86-96\%  metacyclic promastigotes) } &   unknown\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum}\\ \textbf{\citep{Rog10}}} & $2\times10^6$ amastigotes/ml & \parbox{2cm}{{artificial feeding through membrane}} & \parbox{3cm}{$1.06\times10^4 \pm 2.1\times10^4$ \\(35\% metacyclic promastigotes)} & \parbox{3cm}{$457\pm122*$ \\ (95\%  metacyclic promastigotes) } &   unknown\\

\addlinespace
\parbox{4cm}{\emph{P. duboscqi - L. major}\\ \textbf{\citep{Kim08}}} & $4\times10^6$ amastigotes/ml & \parbox{2cm}{{natural feeding on mouse ears}} & $1\times10^4 – 1\times10^5$ & \parbox{3cm}{range 0--100000 \\ 75\% females 600 and less \\ 25\% females more than 1000 } &   19.26\%\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum chagasi}\\ \textbf{\citep{Sec12}}} & $4\times10^6$ promastigotes/ml & \parbox{2cm}{{natural feeding on mouse ears}} & $1\times10^4$ & \parbox{3cm}{1002 \\ range 10--10000 \\ 75\% less than 300 } &   unknown\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum dermotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $8\times10^4$ & \parbox{3cm}{1127/13** \\ range 10--11100 } &   58\%\\

\addlinespace
\parbox{4cm}{\emph{L. longipalpis - L. infantum viscerotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $1.5\times10^5$ & \parbox{3cm}{104*/24**\\ range 0--1250} &   14.5\%\\

\addlinespace
\parbox{4cm}{\emph{L. perniciosus   - L. infantum dermotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $5\times10^5$ & \parbox{3cm}{2350*/29**\\ range 0--42000} &   65\%\\

\addlinespace
\parbox{4cm}{\emph{L. perniciosus - L. infantum viscerotropic }\\ \textbf{\citep{Mai11}}} & $1\times10^7$ promastigotes/ml & \parbox{2cm}{{natural feeding on whole mouse}} & $6.6\times10^4$ & \parbox{3cm}{88*/28** \\ range 0--500} &   33\%\\


\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\medskip
\tiny

  $^*$ an average dose of transmitted parasites per sand fly \\
  $^{**}$ median of transmitted parasites per sand fly

\caption[table caption]{Table description}\label{rotfloat2}
 \end{sidewaystable}
share|improve this answer
    
Thanks for the tips. It's looking better now, but as you mentioned there is another problem of text "touching" the lines. I thought that \renewcommand{\arraystretch}{1.5} should do the trick but it doesn't affect the output at all, which is strange. link –  user25937 Feb 14 '13 at 19:44
    
Nice. I forgot about p{} columns. –  Ian Thompson Feb 14 '13 at 20:36
    
@user25937: Try the following, for fixing it for the top row you can use the \extrarowheight parameter. In the preamble you can add \setlength{\extrarowheight}{4.5pt}. Note that this requires \usepackage{array}. This solves the problem of the header row, but not the second row for some reason. However, since the second row is white you can simply do \specialrule{0.5pt}{0pt}{2pt} for the midrule and it will fix your problem! –  Mythio Feb 15 '13 at 7:29
    
Thanks for the tips. I recreated the table again using the example in the link And it looks much better. Also I found a better alternative for parbox (pbox) with specifying rather maximum width then the fixed width. –  user25937 Feb 19 '13 at 7:58

You could save some space by breaking the headings in the last two columns over two lines, using

\textbf{\parbox{70pt}{No. Promastigotes \\ transmitted per fly}}

and

\textbf{\parbox{40pt}{\% of transmitting flies}}

Maybe you should also consider introducing some abbreviations, especially 'p' for 'promastigotes' and 'a' for 'amastigotes', since there are many instances of these words.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.