在 cv4tw CV 中排版 biblatex 书目

在 cv4tw CV 中排版 biblatex 书目

我正在使用cv4tw包来生成简历。此包提供了一个\story用于排版单个简历条目的命令;它的一个参数是出现在左侧的标签,大多数其他参数都排版在该标签的右侧。左侧和右侧部分都在minipage环境中设置。

我需要在简历中包含几个较长的出版物列表,为此我使用 biblatex 命令\printbibliography\story或我自己简化的版本,如下所示)。问题是minipage参考书目所在的环境不允许分页。如果出版物列表对于页面来说太长,整个列表就会被推到下一页,即使这样,整个列表也可能无法容纳在页面上。

如何排版cv4tw文档中的参考书目,使其符合默认\story样式,但允许参考书目自动跨页拆分?我认为最好的方法是定义一个列表式环境来模拟 的外观\story,但我尝试过的所有方法(例如cvlistcurrvita包中调整环境)都会导致奇怪的间距。

下面是一个显示该问题的最小工作示例。(该\publist命令是默认命令的改编\story。)

\RequirePackage[bibstyle=authoryear,sorting=ydnt]{biblatex}
\documentclass[a4paper,11pt]{cv4tw}
\setlength\bibitemsep{1.5\itemsep}
\usetheme[minuit]{sharp}\firstname{John}\lastname{Doe}
\addbibresource{biblatex-examples.bib}

% Publication list, modelled after cv4tw's \story command
\newcommand*{\publist}[2]{
  \begin{flushleft}
    \begin{minipage}[t]{\cvleftwidth}
      {\mystyle[cvstorydatelocation] #1}
    \end{minipage}
    \begin{minipage}[t]{\cvrightwidth}
      \vspace*{-0.7em}
      \begin{refsection}%
        \nocite{#2}%
        \begin{sloppypar}%
          \mystyle[cvstoryshort]%
          \renewcommand{\bibfont}{\mystyle[cvstoryshort]}%
          \printbibliography[heading=none]%
        \end{sloppypar}%
      \end{refsection}%
    \end{minipage}
  \end{flushleft}
}

\begin{document}
\section{Publications}
\publist{Refereed journal articles}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\publist{Articles in refereed conference proceedings}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\publist{Articles I wrote just for the heck of it}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\end{document}

答案1

我认为一个 hackish 方法可能是这样的:

\newlength\cvleftbibindent
\setlength{\cvleftbibindent}{\dimexpr \cvleftwidth + \bibindent\relax}

\newcommand{\xpublist}[2]{%
  \begin{sloppypar}% as in original
      \begin{refsection}
        \nocite{#2}
        \renewcommand{\bibfont}{\mystyle[cvstoryshort]}%
        \defbibenvironment{bibliography}
        {\list
          {}
          {\setlength{\leftmargin}{\cvleftbibindent}%
            \setlength{\itemindent}{-15pt}% <-- change as needed
            \setlength{\itemsep}{\bibitemsep}%
            \setlength{\parsep}{\bibparsep}}}
        {\endlist}%
        {\item}%
        \raisebox{-1.65\baselineskip}[0pt][0pt]{%
          \parbox[t][0pt]{\cvleftwidth}{%
            \raggedright\mystyle[cvstorydatelocation] #1}}%
        \nobreak
        \printbibliography[heading=none]%
      \end{refsection}
  \end{sloppypar}
}

我之所以说它是 hackish,是因为“标题”的设置方式(即,以一种临时的方式)。但是,据我所知,它是有效的。

完整示例:

\RequirePackage[bibstyle=authoryear,sorting=ydnt]{biblatex}
\documentclass[a4paper,11pt]{cv4tw}
\setlength\bibitemsep{1.5\itemsep}
\usetheme[minuit]{sharp}\firstname{John}\lastname{Doe}
\addbibresource{biblatex-examples.bib}

% Publication list, modelled after cv4tw's \story command
\newcommand*{\publist}[2]{
  \begin{flushleft}
    \begin{minipage}[t]{\cvleftwidth}
      {\mystyle[cvstorydatelocation] #1}
    \end{minipage}
    \begin{minipage}[t]{\cvrightwidth}
      \vspace*{-0.7em}
      \begin{refsection}%
        \nocite{#2}%
        \begin{sloppypar}%
          \mystyle[cvstoryshort]%
          \renewcommand{\bibfont}{\mystyle[cvstoryshort]}%
          \printbibliography[heading=none]%
        \end{sloppypar}%
      \end{refsection}%
    \end{minipage}
  \end{flushleft}
}

\newlength\cvleftbibindent
\setlength{\cvleftbibindent}{\dimexpr \cvleftwidth + \bibindent\relax}

\newcommand{\xpublist}[2]{%
  \begin{sloppypar}% as in original
      \begin{refsection}
        \nocite{#2}
        \renewcommand{\bibfont}{\mystyle[cvstoryshort]}%
        \defbibenvironment{bibliography}
        {\list
          {}
          {\setlength{\leftmargin}{\cvleftbibindent}%
            \setlength{\itemindent}{-15pt}% <-- change as needed
            \setlength{\itemsep}{\bibitemsep}%
            \setlength{\parsep}{\bibparsep}}}
        {\endlist}%
        {\item}%
        \raisebox{-1.65\baselineskip}[0pt][0pt]{%
          \parbox[t][0pt]{\cvleftwidth}{%
            \raggedright\mystyle[cvstorydatelocation] #1}}%
        \nobreak
        \printbibliography[heading=none]%
      \end{refsection}
  \end{sloppypar}
}


\begin{document}
\section{Publications}
\publist{Refereed journal articles}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\publist{Articles in refereed conference proceedings}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\publist{Articles I wrote just for the heck of it}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}


\xpublist{Refereed journal articles}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\xpublist{Articles in refereed conference proceedings}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}
\xpublist{Articles I wrote just for the heck of it}{markey,cotton,cicero,brandt,wilde,shore,salam,reese,pines,moore,massa,maron,jaffe,iliad,hyman,doody,aksin,yoon,geer}


\end{document}

相关内容