我正在尝试调试使用Friggeri 的简历模板但无论我怎么尝试,仍然存在无法摆脱的反复警告......
我使用的是相同的 friggeri-cv.cls 文件,我只是将所有 Helvetica 字体更改为 Arial,并将“backend=biber”添加到“\RequirePackage{biblatex}”行。
我无法摆脱的警告是每次使用“entrylist”环境时都会出现的“Underfull \hbox(badness 10000)”,friggeri-cv.cls 文件中的相关行如下:
%%%%%%%%%%%%%%%%%%%%
% List environment %
%%%%%%%%%%%%%%%%%%%%
\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.8cm}{%
\textbf{#2}%
\hfill%
{\footnotesize\addfontfeature{Color=lightgray} #3}\\%
#4\vspace{\parsep}%
}\\}
请在下方找到可以重现警告的 MWE。非常感谢!
\documentclass[]{friggeri-cv}
\begin{document}
\header{name}{surname}
{occupation}
% In the aside, each new line forces a line break
\begin{aside}
\section{about}
aaa
bbb
\end{aside}
\section{background}
\begin{entrylist}
\entry
{1991}
{MSc {\normalfont in this and that}}
{This institution}
{{\thinfont Specialized in this and that}\\
Honorary Mention}
\entry
{1993}
{PhD {\normalfont in other stuff}}
{This institution}
{{\thinfont Specialized in other stuff}\\
Honorary Mention}
\end{entrylist}
\end{document}
答案1
正如您所发现的,问题在于entrylist
环境的定义;它通过让环境在材料之前结束前一段tabular*
并在之后结束段落来解决tabular*
:
\makeatletter
\renewenvironment{entrylist}{%
\par\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}\par
}
\makeatother
完整示例:
\documentclass[]{friggeri-cv}
\makeatletter
\renewenvironment{entrylist}{%
\par\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}\par
}
\makeatother
\begin{document}
\header{name}{surname}
{occupation}
% In the aside, each new line forces a line break
\begin{aside}
\section{about}
aaa
bbb
\end{aside}
\section{background}
\begin{entrylist}
\entry
{1991}
{MSc {\normalfont in this and that}}
{This institution}
{{\thinfont Specialized in this and that}\\
Honorary Mention}
\entry
{1993}
{PhD {\normalfont in other stuff}}
{This institution}
{{\thinfont Specialized in other stuff}\\
Honorary Mention}
\end{entrylist}
\end{document}