这张空白页是从哪里来的?

这张空白页是从哪里来的?

这个 LaTeX 文档应该有一页(或两页,我现在使用的是\lipsum)A4 纵向页面,后面跟着一页 A4 横向页面。但是,在包含内容的页面之前有一个空白的横向页面,我不知道它是从哪里来的。这是怎么回事?

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage[a4paper, bottom=1cm]{geometry}
\usepackage{pdflscape}
\usepackage{lipsum}
\pagenumbering{gobble}
\begin{document}
\title{Test Document with Wide Table}
\date{1st December 2020}
\author{TRiG}
\maketitle

\section*{This is a document}

\lipsum

\newgeometry{,hmargin=3cm,vmargin=5cm,landscape}
\begin{landscape}

\subsection*{Column Details}
\noindent\begin{tabular}{| l | l l p{14cm} |}
\hline
A & Stock Code & Mandatory & Some text here \\
\hline
B & Supplier Code & Optional & This is long text. \\
\hline
C & Manufacturer Code & Optional & \\
\hline
D & Alternative Code & Optional & This is even longer text. \\
\hline
E & EAN Code & Optional & This is further text. \\
\hline
F & Product Name & Mandatory & \\
\hline
G & Brand Name & Mandatory & \\
\hline
H & Summary & Optional & This should be yet more text. \\
\hline
I & Spotlight & Optional & \\
\hline
J & Price & Mandatory & \\
\hline
K & Recommended Retail Price & Optional & \\
\hline
L & Cost Price & Optional &  \\
\hline
M & VAT Rate & Mandatory & \\
\hline
N & Description & Optional & \\
\hline
O & Specifications & Optional & \\
\hline
P & Display & Mandatory & Permitted values: Visible, Hidden, Blocked \\
\hline
Q & Available for Purchase & Mandatory & Permitted values: Yes, No \\
\hline
R & Link & Optional & This should be a full URL to a location with more product information (e.g., a YouTube video). \\
\hline
S--AB & Categories 1 to 10 & Optional & Category 1 is mandatory. \\
\hline
AC--AL & Images 1 to 10 & Optional & These are the names of associated image files, in order. \\
\hline
AM--AV & Files 1 to 10 & Optional & These are the names of associated PDF documents, in order. \\
\hline
AW & Stock Amount & Mandatory & The permitted values are any number (including zero, for ``out of stock''), or the letter ``U'' for ``stock not tracked (uncounted)''. \\
\hline
AX & Product Weight & Optional & \\
\hline
AY & Source Supplier & Optional & \\
\hline
AZ & Product Unique & Optional & Required if there's a Variant Name in the following column. \\
\hline
BA & Variant Name & Optional & \\
\hline
\end{tabular}

\end{landscape}

\end{document}

如果能减少表格上的缩进就更好了,但那只是小事。

答案1

您的表格太大,无法放在一页上,因此它会被推到下一页。

除了考虑@ulrike Fisher的评论之外,您还可以进行newgeometry相应的设置:

\documentclass[12pt]{article}
\usepackage{libertine}
\usepackage[a4paper]{geometry}
\usepackage{pdflscape}
\usepackage{lipsum}
\pagenumbering{gobble}

\begin{document}
\title{Test Document with Wide Table}
\date{1st December 2020}
\author{TRiG}
\maketitle

\section*{This is a document}

\lipsum*

\newgeometry{hmargin=2cm,vmargin=1cm} % increase area of text
    \begin{landscape}
\subsection*{Column Details}
\vfil\centering%
\begin{tabular}{| l | l l p{14cm} |}
    \hline
A & Stock Code & Mandatory & Some text here \\
\hline
B & Supplier Code & Optional & This is long text. \\
\hline
C & Manufacturer Code & Optional & \\
\hline
D & Alternative Code & Optional & This is even longer text. \\
\hline
E & EAN Code & Optional & This is further text. \\
\hline
F & Product Name & Mandatory & \\
\hline
G & Brand Name & Mandatory & \\
\hline
H & Summary & Optional & This should be yet more text. \\
\hline
I & Spotlight & Optional & \\
\hline
J & Price & Mandatory & \\
\hline
K & Recommended Retail Price & Optional & \\
\hline
L & Cost Price & Optional &  \\
\hline
M & VAT Rate & Mandatory & \\
\hline
N & Description & Optional & \\
\hline
O & Specifications & Optional & \\
\hline
P & Display & Mandatory & Permitted values: Visible, Hidden, Blocked \\
\hline
Q & Available for Purchase & Mandatory & Permitted values: Yes, No \\
\hline
R & Link & Optional & This should be a full URL to a location with more product information (e.g., a YouTube video). \\
\hline
S--AB & Categories 1 to 10 & Optional & Category 1 is mandatory. \\
\hline
AC--AL & Images 1 to 10 & Optional & These are the names of associated image files, in order. \\
\hline
AM--AV & Files 1 to 10 & Optional & These are the names of associated PDF documents, in order. \\
\hline
AW & Stock Amount & Mandatory & The permitted values are any number (including zero, for ``out of stock''), or the letter ``U'' for ``stock not tracked (uncounted)''. \\
\hline
AX & Product Weight & Optional & \\
\hline
AY & Source Supplier & Optional & \\
\hline
AZ & Product Unique & Optional & Required if there's a Variant Name in the following column. \\
\hline
BA & Variant Name & Optional & \\
\hline
\end{tabular}
    \end{landscape}
\restoregeometry % return to original page llayout
\end{document}

在此处输入图片描述

相关内容