1

I am trying to create my cv using moderncv class. Everything look fine until the publication section. I have a publication database under the title "publications.bib" that is created in JabRef. I want to use import the publications included in this database in my cv. I tried to modify the plainyr.bst file like here Sorted list of publications in moderncv from bibtex but did not work, apparently it leaves the section empty. Here is a MWE:

\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{grey}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

\end{filecontents}
\renewcommand{\familydefault}{\sfdefault}
\nopagenumbers{}

\usepackage[utf8]{inputenc}
\firstname{E}
\familyname{Xample}
\begin{document}

\section{Publications}
\nocite{*}
\bibliographystyle{moderncv}
\bibliography{\jobname}
\end{document}

Even when I don't use the .bib and work just like in the first answer of the above link, having:

\documentclass{moderncv}
\moderncvstyle{classic}  
\moderncvcolor{blue}       

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{A01,
  author = {Author, A.},
  journal = {Good Journal},
  year = {2001},
  title = {Alpha},
}

\end{filecontents}

\firstname{E}
\familyname{Xample}
\begin{document}

\section{Publications}
\nocite{*}
\bibliographystyle{plainyrrev}
\bibliography{\jobname}

\end{document}

In the pdf file, I get just printed the section "Publications" and nothing is included in that. However, a .bib file is created that has the entry of the article.

Any idea?

  • 1
    You're pulling in \jobname.bib, which is not the same as publications.bib. Why not just use \bibliography{publications}? Note that JabRef is just a manager of BibTeX items. You should still compile the .bib file using BibTeX or biber (if you're using biblatex. – Werner Feb 22 '14 at 17:28
  • When I put publications.bib I get a mispelling error. Everytime I compile it, it replaces the .bib file with an empty file. – user_3849 Feb 22 '14 at 17:33
  • I bibtex the file inside TexMaker. \bibliography{publications} compiles, but adds nothing to the cv – user_3849 Feb 22 '14 at 17:36
  • Drop the filecontents part of the setup, since you don't need that. – Werner Feb 22 '14 at 17:41
  • When I skip the filecontents part and still have the publication sections as in the MWE but with \bibliography{\publications} I get a mispelling error again ! Undefined control sequence. <write> \string \bibdata {\publications} l.102 \bibliography{\publications} – user_3849 Feb 22 '14 at 17:46
1

I found what the problem was. Everytime I change the .bib file, I have to change into the .aux file the line that defines the style \bibstyle{moderncv} to \bibstyle{plainyr}. Then I compile the .bib file and then I create the pdf. Everything works fine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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