Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

With documentclass modercv one can include a list of published papers. If you try this is German one could use bibliography style gerplain getting some errors (solved in question Problem with modernCV and bf inside bibliography) but with a missing "und" (German and) or ";" as usual in Germany. (You can try with the following MWE.)

With the styles plaindin or unsrtdin one gets the right bibliography, but now you have leading bibitems [1], [2] etc.

Is there a way to get rid of these bibitems without creating a new bst file? Or to have the bibitems right justified?

The MWE for testing:

\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{john@doe.org}                           
\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}

I used image example-image-a from package MWE for the photo. You will get a result like:

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

I would prefer to have:

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

or (second choise):

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

In the resulting bbl file you can find:

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

Using biblatex is not possible because class moderncv is not compatible with it as I know.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The first optional argument of the command \bibitem is executing by the command \@biblabel which have one mandatory argument.

My suggestion uses commands with @ and so you must handle them as describe in the question: What do \makeatletter and \makeatother do?

For the first choice you can gobble the mandatory argument by the following assignment:

 \let\@biblabel\@gobble

For the second choice you can use a small trick. The justification of the bibliography label is done by \@biblabel{#1}\hfill. To gobble the \hfill to get your requested alignment you can use \hfill as part of the definition of \@biblabel

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

In the mwe below I have implemented both solutions:

\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{john@doe.org}                           
\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}

enter image description here

share|improve this answer
    
Yes I thought I have to use etoolbox with some coding I do not know. With \renewcommand I got only centered numbers because there was always an closing \hfill added. And the resulting \hfill #1\hfill returns an centered #1. –  Kurt Mar 2 '13 at 13:17
    
@Kurt: I used the hfill as part of the argument. ;-) "Manchmal sieht man den Wald vor lauter Bäumen nicht" –  Marco Daniel Mar 2 '13 at 13:22
    
"Wohl wahr, deshalb bin ich auch dankbar, dass es diese Seite gibt!" I have to improve my TeX knowledge ... –  Kurt Mar 2 '13 at 13:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.