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?
\jobname.bib, which is not the same aspublications.bib. Why not just use\bibliography{publications}? Note that JabRef is just a manager of BibTeX items. You should still compile the.bibfile using BibTeX orbiber(if you're usingbiblatex. – Werner Feb 22 '14 at 17:28filecontentspart of the setup, since you don't need that. – Werner Feb 22 '14 at 17:41filecontentspart 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\bibliography{publications}, not\bibliography{\publications}. – Werner Feb 22 '14 at 17:49\bibliography{publications}nothing is added to the Publication section. – user_3849 Feb 22 '14 at 17:51\bibliography{publications}tell TeX that you're using a bibliography namedpublications.bib. Compile yourfile.texonce (latex file), and then compilebibtex file, and then againlatex file. – Werner Feb 22 '14 at 17:56moderncvclass and it worked. Now if I just usebibliography{\publications}I get errors! Undefined control sequence. <argument> \@firstname {}~\@lastname {} l.6 \begin{document}– user_3849 Feb 22 '14 at 18:06