我目前正在写简历,我想附上参考书目。以下是我的标题:
\documentclass[11pt,a4paper,sans]{moderncv}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath, amssymb}
\usepackage{enumerate}
\usepackage{dsfont}
\usepackage{multibib,chapterbib, babelbib}
\moderncvtheme[red]{classic}
\usepackage[left=25mm,right=25mm, top=30mm, bottom=30mm]{geometry}
\renewcommand{\baselinestretch}{1.25}
\AtBeginDocument{\recomputelengths}
因此,现在我想添加一个参考书目,但是存在以下问题:
参考书目本身缩进近半页。如何强制 Latex 从“正常”左边距开始?
不同来源的编号未显示在参考书目中,尽管如果我引用它们,CV 中就会出现编号,而如果你想查找来源,你必须仔细计数。如何才能让编号也出现在参考书目中?也许我的标题中缺少了一些东西。\
谢谢。
答案1
默认情况下,moderncv
不显示参考书目中的标签;若要显示它们,请在序言中添加以下几行:
\makeatletter
\renewcommand*\bibliographyitemlabel{\@biblabel{\arabic{enumiv}}}
\makeatother
另一个问题需要重新定义环境thebibliography
(filecontents*
在解决方案中不是必需的;只是为了获得一个完整的示例):
\begin{filecontents*}{xxyyy.bib}
@book{testa,
author = "The AuthorA",
title = "The TitleA",
year = "2012",
publisher = "The PublisherA"
}
@book{testb,
author = "The AuthorB",
title = "The TitleB",
year = "2012",
publisher = "The PublisherB"
}
\end{filecontents*}
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvtheme[red]{classic}
\usepackage[ngerman]{babel}
\usepackage{multibib,chapterbib, babelbib}
\firstname{John}
\familyname{Doe}
\makeatletter
\renewcommand*\bibliographyitemlabel{\@biblabel{\arabic{enumiv}}}
\renewenvironment{thebibliography}[1]%
{%
\setlength\hintscolumnwidth{0pt}
\setlength\separatorcolumnwidth{0pt}
\bibliographyhead{\refname}%
% \small%
\begin{list}{\bibliographyitemlabel}%
{%
\setlength{\separatorcolumnwidth}{0.025\textwidth}
\setlength{\topsep}{0pt}%
\settowidth\labelwidth{\@biblabel{#1}}
\setlength{\labelsep}{\separatorcolumnwidth}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code%
\usecounter{enumiv}%
\let\p@enumiv\@empty%
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy\clubpenalty4000\widowpenalty4000%
}%
{%
\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
\end{list}%
}
\makeatother
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\nocite{*}
\bibliographystyle{plain}
\bibliography{xxyyy}
\end{document}