![我如何更改页面布局以使其不会阻塞同一页面上的所有内容?](https://linux22.com/image/287506/%E6%88%91%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9%E9%A1%B5%E9%9D%A2%E5%B8%83%E5%B1%80%E4%BB%A5%E4%BD%BF%E5%85%B6%E4%B8%8D%E4%BC%9A%E9%98%BB%E5%A1%9E%E5%90%8C%E4%B8%80%E9%A1%B5%E9%9D%A2%E4%B8%8A%E7%9A%84%E6%89%80%E6%9C%89%E5%86%85%E5%AE%B9%EF%BC%9F.png)
我一直用 LaTeX 写简历,并使用模板。问题是,当我把所有条目放入这个特定部分时,它会将所有条目分组到一个区块中,并将它们放在下一页,留下半页空白。
模板附带的相关代码如下,我想知道如何更改它以便允许条目跨越多个页面而不是将其全部放在具有所需空间的下一页上?
谢谢。
\setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
#1&\parbox[t]{11.4cm}{%
\textbf{#2}%
\hfill%
{\footnotesize\addfontfeature{Color=lightgray} #3}\\%
#4\vspace{\parsep}%
}\\}
实现上述代码:
\section{Experience}
\begin{entrylist}
\entry
{This text is the wrong colour}
{Text}
{Text}
{\emph{Bold text} \\
Text.}
%------------------------------------------------
\entry
{This text is the wrong colour}
{Text}
{Text}
{\emph{Bold text} \\
Text.}
%------------------------------------------------
\entry
{This text is the wrong colour}
{Text}
{Text}
{\emph{Bold text} \\
Text.}
%------------------------------------------------
\entry
{This text is the wrong colour}
{Text}
{Text}
{\emph{Bold text} \\
Text.}
%------------------------------------------------
\end{entrylist}
答案1
由于只有代码片段可供参考,我不能完全确信这会起作用。您可以使用环境longtable
而不是tabular*
环境,如下所示:
\usepackage{longtable}
\newenvironment{entrylist}{%
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{@{}l@{\extracolsep{\fill}}l@{}} % this tells 'longtable' to take up
% the full width of the textblock
}{%
\end{longtable}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
#1&\parbox[t]{11.4cm}{%
\textbf{#2}%
\hfill%
{\footnotesize\addfontfeature{Color=lightgray} #3}\\%
#4\vspace{\parsep}%
}\\}