带有德语参考书目的 moderncv 类,无编号的 bibitems

带有德语参考书目的 moderncv 类,无编号的 bibitems

使用 documentclassmoderncv可以包含已发表论文的列表。如果你尝试使用德语,可以使用书目样式,gerplain但会出现一些错误(已在问题中解决书目中的 modernCV 和 bf 存在问题),但缺少“und”(德语和)或“;”,这在德国很常见。(您可以尝试使用以下 MWE。)

通过样式plaindinunsrtdin获取正确的书目,但现在您有了领先的 bibitems等[1][2]

有没有办法在不创建新文件的情况下删除这些 bibitem bst?或者让 bibitem 右对齐?

用于测试的 MWE:

\listfiles
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{book1,
  author    = {John Doe and John Smith},
  title     = {Title},
  publisher = {Publisher},
  edition   = {edition},
  year      = {year},
}

@BOOK{book2,
  author    = {John Doe and Eva Smith},
  title     = {Title2},
  publisher = {Publisher2},
  edition   = {edition},
  year      = {year},
}

@MISC{misc1,
  author = {John Doe},
  title  = {Title},
  year   = {year},
}

@MISC{misc2,
  author = {John Doe and Max Musterfrau},
  title  = {Title},
  year   = {year},
}
\end{filecontents*}


\documentclass[11pt,a4paper,sans]{moderncv} 
\moderncvstyle{casual}  
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}

\usepackage[ngerman]{babel}

%\setlength{\hintscolumnwidth}{3cm}  %change the width of the column with the dates

%  for numerical labels: I do not want them!
%\renewcommand{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}

% personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title}                  
\address{street and number}{postcode city}{country}
\mobile{+1~(234)~567~890}                          
\phone{+2~(345)~678~901}                           
\fax{+3~(456)~789~012}                         
\email{[email protected]}                           
\homepage{www.johndoe.com}                     
\extrainfo{additional information}    
\photo[64pt][0.4pt]{example-image-a} % change image name 
\quote{Some quote}                    

\begin{document}

\selectlanguage{ngerman} % German cv

\makecvtitle

% Publications from a BibTeX file without multibib
\renewcommand{\refname}{Veröffentlichungen}  % instead "Publications"
\nocite{*}                   % cite all entrys in bib file
\bibliographystyle{unsrtdin} % german bib styles: gerplain, plaindin, unsrtdin
                             % compare with plain (wrong "and" instead German "und")
                             % gerplain: -> 12 errors \sc undefined, missing "`und"' or "`;"'
                             % plaindin, unsrtdin: unwanted bibitems
\bibliography{\jobname}      % bib file \jobname.bib

\end{document}

我使用了example-image-a包中的图像MWE您将得到如下结果:

[1]          Doe, John ; Smith, John: Title. edition. Publisher, year

我希望有:

             Doe, John ; Smith, John: Title. edition. Publisher, year

或(第二选择):

        [1]  Doe, John ; Smith, John: Title. edition. Publisher, year

在结果bbl文件中你可以找到:

\bibitem[1]{book1}
\textsc{Doe}, John ; \textsc{Smith}, John:
\newblock \emph{Title}.
\newblock edition.
\newblock Publisher, year

据我所知,由于类与它不兼容,biblatex因此无法使用。moderncv

答案1

该命令的第一个可选参数由具有一个强制参数的\bibitem命令执行。\@biblabel

我的建议是使用命令@,因此您必须按照问题中的描述来处理它们:\makeatletter 和 \makeatother 起什么作用?

对于第一个选择,您可以通过以下任务吞噬强制参数:

 \let\@biblabel\@gobble

对于第二种选择,您可以使用一个小技巧。参考书目标签的对齐由 完成\@biblabel{#1}\hfill。要吞噬\hfill以获得您请求的对齐,您可以使用\hfill作为 定义的一部分\@biblabel

\def\@biblabel#1\hfill{[#1]}

在下面的 mwe 中我实现了这两种解决方案:

\listfiles
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{book1,
  author    = {John Doe and John Smith},
  title     = {Title},
  publisher = {Publisher},
  edition   = {edition},
  year      = {year},
}

@BOOK{book2,
  author    = {John Doe and Eva Smith},
  title     = {Title2},
  publisher = {Publisher2},
  edition   = {edition},
  year      = {year},
}

@MISC{misc1,
  author = {John Doe},
  title  = {Title},
  year   = {year},
}

@MISC{misc2,
  author = {John Doe and Max Musterfrau},
  title  = {Title},
  year   = {year},
}
\end{filecontents*}


\documentclass[11pt,a4paper,sans]{moderncv} 
\moderncvstyle{casual}  
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}

\usepackage[ngerman]{babel}
\bibliographystyle{unsrtdin} 
% personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title}                  
\address{street and number}{postcode city}{country}
\mobile{+1~(234)~567~890}                          
\phone{+2~(345)~678~901}                           
\fax{+3~(456)~789~012}                         
\email{[email protected]}                           
\homepage{www.johndoe.com}                     
\extrainfo{additional information}    
\photo[64pt][0.4pt]{example-image-a} % change image name 
\quote{Some quote}                    

\begin{document}
\selectlanguage{ngerman} % German cv
\makecvtitle
% Publications from a BibTeX file without multibib
\renewcommand{\refname}{Veröffentlichungen}  % instead "Publications"
\nocite{*}                   % cite all entrys in bib file
\makeatletter
\let\@biblabel\@gobble
\makeatother
\bibliography{\jobname}      % bib file \jobname.bib

\makeatletter
\def\@biblabel#1\hfill{[#1]}
\makeatother
\bibliography{\jobname}      % bib file \jobname.bib

\end{document}

在此处输入图片描述

相关内容