我有 4 个并排的小页面,但它们出现在空白页之后,如何避免这种情况?
其次,页面之间有细小的空白,如何去除
\begin{document}
\noindent
\fcolorbox{red}{red}{%
\begin{minipage}[t][\textheight]{0.05\textwidth}%%%%a
A
\end{minipage}}
\fcolorbox{green}{green}{%
\begin{minipage}[t][\textheight]{.3\textwidth}%%%%a
B
\end{minipage}}
\fcolorbox{blue}{blue}{%
\begin{minipage}[t][\textheight]{.05\textwidth}%%%%a
C
\end{minipage}}
\fcolorbox{yellow}{yellow}{%
\begin{minipage}[t][\textheight]{.6\textwidth}%%%%a
D
\end{minipage}}
\end{document}
答案1
不确定\textheight
,您是故意给出这个吗?因为,如果您删除它,那么blankpage
问题就解决了,只需在 minipage 标签末尾给出\ignorespaces
一个符号,这将解决细小空白问题,请参阅以下代码:%
\documentclass{book}
\usepackage{color,graphicx}
\usepackage{showframe}
\begin{document}
\null\removelastskip\nointerlineskip\vspace*{-\baselineskip}
\setlength{\fboxsep}{0pt}
\noindent\fcolorbox{red}{red}{%
\begin{minipage}[t][\textheight]{0.05\textwidth}%%%%a
A
\end{minipage}}\ignorespaces%
\fcolorbox{green}{green}{%
\begin{minipage}[t][\textheight]{.3\textwidth}%%%%a
B
\end{minipage}}\ignorespaces%
\fcolorbox{blue}{blue}{%
\begin{minipage}[t][\textheight]{.05\textwidth}%%%%a
C
\end{minipage}}\ignorespaces%
\fcolorbox{yellow}{yellow}{%
\begin{minipage}[t][\textheight]{.6\textwidth}%%%%a
D
\end{minipage}}
\end{document}