2

I'm using the book class and fancyhdr in TexMaker and I want to use a rotated table which will eventually take up one whole page. The largest problem is the header line as my table will overlap with it but if possible I would also like the margins to be removed/modified if the table becomes to long. I don't really want the table to run over two pages, I only want this to be applied to the single page and I would like to keep the page numbering if possible.

\documentclass[a4paper,11pt,openany]{book}
\usepackage{fancyhdr} 
\usepackage[graphicx]{realboxes}
\usepackage{varwidth}
\usepackage{array,booktabs}

\pagestyle{fancyplain}
\fancyhead[L]{}
\fancyhead[R]{}
\fancyhead[C]{}
\fancyfoot[L]{}
\fancyfoot[R]{}
\fancyfoot[C]{Page \thepage\ of \pageref{LastPage}}

\begin{document}
\newcolumntype{L}{>{\centering\arraybackslash}m{3cm}}
\begin{table}[htb]
\centering
 \rotatebox{90}{%
   \begin{varwidth}{\textheight}
      \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
       \hline
        \bfseries  Lead Author & \bfseries pH Sensitive &  & &  \bfseries Laser & \bfseries Intensity &  \bfseries pH & \bfseries pH & \bfseries Functionalisation\\        
       \bfseries \& Reference & \bfseries Molecule &\bfseries Nanoparticle & \bfseries SPR & \bfseries Wavelength & \bfseries Ratio & \bfseries Range & \bfseries Sensitivity & \bfseries Process \\
         \hline \hline         
        C.Talley & pMBA & (50 - 80nm) & -  & 632.8nm & $\frac{1430}{1590}$ & 4.4 - 11.2 &1&Lots and lots and lots and lots of text here \\       
        \hline
       \end{tabular}
        \caption{My caption lorem ipsum}\label{tab_b}
    \end{varwidth}}
\end{table}
\end{document}
0
2

Would this be close to what you need. the proposed solution uses \newgeometry from geometry package to remove the margin, but keep the bottom margin for page number. Here lastpage package is added for the correct page numbering.

enter image description here

Code

\documentclass[a4paper,11pt,openany]{book}
\usepackage{fancyhdr} 
\usepackage[graphicx]{realboxes}
\usepackage{varwidth}
\usepackage{geometry}
\usepackage{lastpage}
\usepackage{array,booktabs}

\pagestyle{fancyplain}
\fancyhead[L]{}
\fancyhead[R]{}
\fancyhead[C]{}
\fancyfoot[L]{}
\fancyfoot[R]{}
\fancyfoot[C]{Page \thepage\ of \pageref{LastPage}}

\begin{document}
\newgeometry{left=0cm, right=0cm,top=0cm,bottom=1.5cm}
\fancyhfoffset[E,O]{0pt}
\newcolumntype{L}{>{\centering\arraybackslash}m{3cm}}
\begin{table}[htb]
\centering
 \rotatebox{90}{%
   \begin{varwidth}{\textheight}
      \begin{tabular}{|c|c|c|c|c|c|c|c|c|}
       \hline
        \bfseries  Lead Author & \bfseries pH Sensitive &  & &  \bfseries Laser & \bfseries Intensity &  \bfseries pH & \bfseries pH & \bfseries Functionalisation\\        
       \bfseries \& Reference & \bfseries Molecule &\bfseries Nanoparticle & \bfseries SPR & \bfseries Wavelength & \bfseries Ratio & \bfseries Range & \bfseries Sensitivity & \bfseries Process \\
         \hline \hline         
        C.Talley & pMBA & (50 - 80nm) & -  & 632.8nm & $\frac{1430}{1590}$ & 4.4 - 11.2 &1&Lots and lots and lots and lots of text here \\       
        \hline
       \end{tabular}
    \end{varwidth}
}
\end{table}
\end{document}
2
  • Excellent, that seems to work perfectly thank you Mar 11 '14 at 9:35
  • Glad I can help.
    – Jesse
    Mar 11 '14 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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