在编写文档时,我发现在一页之后landscape
,标题LaTeX
后的段落之间会留出很大的空白subsection
,尤其是当段落少于 3 行时。当该部分之后的第一个段落超过 3 行时,就没有问题了。有什么提示为什么会发生这种情况吗?
\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[%
left=3.00cm,
right=2.00cm,
top=3.00cm,
bottom=2.00cm
]{geometry}
\usepackage[none]{hyphenat}
\usepackage{pdflscape}
\usepackage[parfill]{parskip}
\usepackage{afterpage}
\usepackage{microtype}
\setlength{\parskip}{\baselineskip}
\linespread{1.3}
\sloppy
\begin{document}
\blindtext\par
\afterpage{%
\begin{landscape}
\begin{figure}[htb]
\centering
A Figure
\end{figure}
\end{landscape}
}
\blindtext\par
\blindtext
\blindtext\par
\subsection{A long long long long longlong long long long long long long long long long long long long long long long long Title}
A sentence with less than 3 lines.\par
\blindtext\par
\blindtext
\end{document}
超过 3 行
答案1
可能是一个\afterpage
特点。
可以通过将其放在\clearpage
节标题之前来避免这种情况(这会使标题留在相同的位置,但在页标题代码启动之前清除后页)。
\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[%
left=3.00cm,
right=2.00cm,
top=3.00cm,
bottom=2.00cm
]{geometry}
\usepackage[none]{hyphenat}
\usepackage{pdflscape}
\usepackage[parfill]{parskip}
\usepackage{afterpage}
\usepackage{microtype}
\setlength{\parskip}{\baselineskip}
\linespread{1.3}
\sloppy
\begin{document}
\blindtext\par
\afterpage{%
\begin{landscape}
\begin{figure}[htb]
\centering
A Figure
\end{figure}
\end{landscape}%
}%
\blindtext\par
\blindtext
\blindtext\par
\clearpage
\subsection{A long long long long longlong long long long long long long long long long long long long long long long long Title}
A sentence with less than 3 lines.\par
\blindtext\par
\blindtext
\end{document}
请注意此警告
Package mathdesign/mdbch Warning: Package 'amsfonts' shouldn't be used
in conjonction with package mdbch, on input line 24.
我不会使用afterpage
或landscape
她,而是使用旋转的浮子
\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[%
left=3.00cm,
right=2.00cm,
top=3.00cm,
bottom=2.00cm
]{geometry}
\usepackage[none]{hyphenat}
\usepackage[parfill]{parskip}
\usepackage{rotating}
\usepackage{microtype}
\setlength{\parskip}{\baselineskip}
\linespread{1.3}
\sloppy
\begin{document}
\blindtext\par
\begin{sidewaysfigure}[htb]
\centering
A Figure
\end{sidewaysfigure}
\blindtext\par
\blindtext
\blindtext\par
\clearpage % if you want it
\subsection{A long long long long longlong long long long long long long long long long long long long long long long long Title}
A sentence with less than 3 lines.\par
\blindtext\par
\blindtext
\end{document}