我正在使用TexMaker 中的book
类fancyhdr
,我想使用一个旋转的表格,它最终会占据一整页。最大的问题是标题行,因为我的表格会与它重叠,但如果可能的话,如果表格变得太长,我还希望删除/修改边距。我真的不希望表格超过两页,我只希望将其应用于单页,如果可能的话,我想保留页码。
\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}
答案1
这是否接近您的需要。建议的解决方案使用\newgeometry
fromgeometry
包来删除边距,但保留页码的底部边距。此处lastpage
添加了包以实现正确的页码编号。
代码
\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}