# Changing rendering of bibitems in moderncv

I'm using moderncv to style my CV and would like to modify how it renders references.

Here's an MWE:

\documentclass[11pt,letterpaper]{moderncv}
\usepackage{fontspec}
\moderncvstyle{casual}
\moderncvcolor{orange}

\name{Foo}{Bar}

\begin{document}
\nocite{ref}
\makecvtitle
\section{Education}

\cventry{1990-1999}{Ph.D}{Awesome University}{}{}{\LaTeX}
\bibliographystyle{plain}
\bibliography{mwe}

\section{How I want it}
\begin{description}
\item[ [A1] ] this is an even longer reference
\end{description}

\end{document}


And here's how it renders (what it does and I want are both shown in the document)

In particular, I would like the references to not be indented as much as they are, and I'd also like the citation label. Note that I think I can get citation labels with multibib, but the indentation problem doesn't go away. The reason I'd like this is that for a long CV with many references, the reduced width wastes too much space.

I poked around in the moderncv style file and saw an entry for bibindent which I changed in my document from 1.5em to 0. That didn't seem to have any effect. I also saw a redefinition of newblock but I don't think that affects the indentation of the overall entry.

-
–  texenthusiast Feb 25 at 4:24

Add the following lines in the preamble:

\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\patchcmd{\thebibliography}
{\setlength{\labelwidth}{\hintscolumnwidth}}
{\setlength{\labelwidth}{0pt}}
{}
{}
\makeatother


and you will get what you want.

The line

\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}


is to give a label to each bibliography entry, while the others patch the thebibliography environment so to have no indentation (etoolbox is loaded by moderncv).

Full MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{mwe.bib}
@article{ref,
author = {Author J. Author},
title = {TeX is awesome},
journal = {Creatively},
year = {2014},
}
\end{filecontents*}

\documentclass[11pt,letterpaper]{moderncv}
\usepackage{fontspec}
\moderncvstyle{casual}
\moderncvcolor{orange}

\name{Foo}{Bar}

\makeatletter
\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
\patchcmd{\thebibliography}
{\setlength{\labelwidth}{\hintscolumnwidth}}
{\setlength{\labelwidth}{0pt}}
{}
{}
\makeatother

\begin{document}
\nocite{ref}
\makecvtitle
\section{Education}

\cventry{1990-1999}{Ph.D}{Awesome University}{}{}{\LaTeX}
\bibliographystyle{plain}
\bibliography{mwe}

\end{document}


Output:

-
Wow ! and Yikes. it's a pity something like this has to be hand-hacked. –  Suresh Feb 25 at 4:44
@Suresh I've simplified it a little. –  karlkoeller Feb 25 at 4:59