我正在尝试使用 准备我的简历,我的出版物列表目前分页。我希望下一页moderncv
的顶部有\refname{} (continued)
与原始\refname
标注相同的字体。
我最接近得到的是包裹\afterpage
,但是这个(A)要求我确切地知道分页符处应该包含哪些部分,这可能会随着我在简历中添加或删除内容而改变,并且(二)效果不佳,bibliography
因为它是一个创建部分的宏,因此似乎不喜欢被打断。下面我提供的 MWE 接近我想要的,但上面的问题 (a) 和 (b) 很明显。
我能做些什么?
这是 MWE(.bib 文件的参考资料在其下方):
\documentclass[11pt,letterpaper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{black}
\usepackage[scale=0.75]{geometry}
\name{John T.}{Doe}
\title{Curriculum vitae}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(555)~555~5890}
\usepackage{afterpage}
\interlinepenalty=10000
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\section{Awards and Honors}
\cvitem{year}{Award}
\cvitem{year}{Award}
\cvitem{year}{Award}
\cvitem{year}{Award}
\cvitem{year}{Award}
\section{Teaching Positions}
\cvitem{year}{course name}
\cvitem{year}{course name}
\cvitem{year}{course name}
\cvitem{year}{course name}
\cvitem{year}{course name}
\cvitem{year}{course name}
\renewcommand{\refname}{Publications I Wish I had Written}
\bibliographystyle{unsrt}
\nocite{gore2011}
\nocite{komatsu2011}
\nocite{lister2011}
\nocite{rasmussen2011}
\afterpage{\section{\refname{} (continued)}}
\bibliography{publications}
\end{document}
出版物.bib:
@article{komatsu2011,
title={Seven-year Wilkinson microwave anisotropy probe (WMAP) observations: cosmological interpretation},
author={Komatsu, Eiichiro and Smith, KM and Dunkley, J and Bennett, CL and Gold, B and Hinshaw, G and Jarosik, N and Larson, D and Nolta, MR and Page, L and others},
journal={The Astrophysical Journal Supplement Series},
volume={192},
number={2},
pages={18},
year={2011},
publisher={IOP Publishing}
}
@article{lister2011,
title={Hotspots of aberrant epigenomic reprogramming in human induced pluripotent stem cells},
author={Lister, Ryan and Pelizzola, Mattia and Kida, Yasuyuki S and Hawkins, R David and Nery, Joseph R and Hon, Gary and Antosiewicz-Bourget, Jessica and O’Malley, Ronan and Castanon, Rosa and Klugman, Sarit and others},
journal={Nature},
volume={471},
number={7336},
pages={68--73},
year={2011},
publisher={Nature Publishing Group}
}
@article{gore2011,
title={Somatic coding mutations in human induced pluripotent stem cells},
author={Gore, Athurva and Li, Zhe and Fung, Ho-Lim and Young, Jessica E and Agarwal, Suneet and Antosiewicz-Bourget, Jessica and Canto, Isabel and Giorgetti, Alessandra and Israel, Mason A and Kiskinis, Evangelos and others},
journal={Nature},
volume={471},
number={7336},
pages={63--67},
year={2011},
publisher={Nature Publishing Group}
}
@article{rasmussen2011,
title={Structure of a nanobody-stabilized active state of the [bgr] 2 adrenoceptor},
author={Rasmussen, S{\o}ren GF and Choi, Hee-Jung and Fung, Juan Jose and Pardon, Els and Casarosa, Paola and Chae, Pil Seok and DeVree, Brian T and Rosenbaum, Daniel M and Thian, Foon Sun and Kobilka, Tong Sun and others},
journal={Nature},
volume={469},
number={7329},
pages={175--180},
year={2011},
publisher={Nature Publishing Group}
}
答案1
仍有一个错误,但希望其他人可以解决它:)
我的想法是:thebibliography
在每次开始时关闭环境,\bibitem
然后立即重新打开它。这样,LaTeX 就会\bibliographyhead
在每个 bib 项之间打印参考书目标题。
然后它应该只需修改\bibliographyhead
为仅在将新条件\ifbibliographyhead
设置为时打印某些内容即可true
。然后我们可以将其设置为true
最初,将其设置为false
每次打印标题时,并将其设置为在每页开头\afterpage
再次设置为。true
以下是代码:
\makeatletter
\let\refname@original\refname
\newif\ifbibliographyhead\bibliographyheadtrue% define a new conidtional and set it to "true" initially
\def\bibliographyhead#1{%
% print the header only if \ifbibliographyhead is set to "true"
\ifbibliographyhead%
\section{#1}%
\global\bibliographyheadfalse% set the conditional to false after every header printout
\gdef\refname{\refname@original{} (cont'd)}% update the header title to add " (cont'd)"
\fi}
\let\bibitem@original\bibitem
\renewcommand{\bibitem}[1]{%
% \ifbibliographyhead% if you uncomment this line and the following \fi, the "(cont'd)" heading jumps a bib item further (?!)
\end{thebibliography}%
\begin{thebibliography}{1}%
% \fi
\bibitem@original{#1}}
\makeatother
% at the start of every new page, reset the new conditional to "true"
\afterpage{\global\bibliographyheadtrue}
不幸的是,不知何故,新页面的第一页\bibitem
不显示页眉,只显示第二页。我不明白为什么——然而……