我使用以下 Latex 模板来制作我的简历:
https://www.latextemplates.com/template/awesome-resume-cv
但是,模板没有附带有关如何创建出版物部分以及如何使用 bibentry 包自动创建所需出版物列表的示例。因此,我对模板进行了以下更改,以自动将出版物打印在与书目文件不同的部分中:
\documentclass[11pt, a4paper]{awesome-cv} % A4 paper size by default, use 'letterpaper' for US letter
\usepackage{bibentry}
\geometry{left=2cm, top=1.5cm, right=2cm, bottom=2cm, footskip=.5cm} % Configure page margins with geometry
\fontdir[fonts/] % Specify the location of the included fonts
\colorlet{awesome}{awesome-darknight} % Default colors include: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange, awesome-nephritis, awesome-concrete, awesome-darknight
\renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} % If you would like to change the social information separator from a pipe (|) to something else
\name{}
\address{}
\mobile{}
\email{}
\github
\linkedin{}
\makecvfooter{}{~~~·~~~Résumé}{\thepage} % Specify the letter footer with 3 arguments: (<left>, <center>, <right>), leave any of these blank if they are not needed
%----------------------------------------------------------------------------------------
\begin{document}
\nobibliography{biblio}
\bibliographystyle{unsrt}
\makecvheader % Print the header
\section*{Publications}
\begin{enumerate}
\item \bibentry{module}
\item \bibentry{module_ext}
\end{enumerate}
%----------------------------------------------------------------------------------------
\end{document}
但是该模板需要使用XeLatex进行编译。当我编译latex文件时,出现以下错误:
lonely \item--perhaps a missing list environment.
注意:我已经使用 BibTex 编译了书目文件。那么可能是什么问题呢?
答案1
另加\usepackage{natbib}
并更改\bibliographystyle{unsrt}
为\bibliographystyle{unsrtnat}
。
\documentclass[11pt, a4paper]{awesome-cv} % A4 paper size by default, use 'letterpaper' for US letter
\usepackage{natbib,bibentry}
\geometry{left=2cm, top=1.5cm, right=2cm, bottom=2cm, footskip=.5cm} % Configure page margins with geometry
%\fontdir[fonts/] % Specify the location of the included fonts
\colorlet{awesome}{awesome-darknight} % Default colors include: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange, awesome-nephritis, awesome-concrete, awesome-darknight
\renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} % If you would like to change the social information separator from a pipe (|) to something else
\name{Some}{Name}
\address{Whatever}
\mobile{555-555-555}
\email{a@b}
\github{xyz}
\linkedin{abc}
\makecvfooter{}{~~~·~~~Résumé}{\thepage} % Specify the letter footer with 3 arguments: (<left>, <center>, <right>), leave any of these blank if they are not needed
%----------------------------------------------------------------------------------------
\begin{document}
\nobibliography{biblio}
\bibliographystyle{unsrtnat}
\makecvheader % Print the header
\section*{Publications}
\begin{enumerate}
\item \bibentry{module}
\item \bibentry{module_ext}
\end{enumerate}
%----------------------------------------------------------------------------------------
\end{document}