1

I run the following on overleaf.

\documentclass{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[style=authoryear,sorting=ydnt,dashed=false]{biblatex}

\renewbibmacro*{date}{}
\renewbibmacro*{date+extrayear}{}
\renewbibmacro*{issue+date}{}
\newcommand*{\bibyear}{}

\defbibenvironment{bibliography}
  {\list
     {\iffieldequals{year}{\bibyear}
        {}
        {\printfield{year}%
         \savefield{year}{\bibyear}}}
     {\setlength{\topsep}{0pt}% layout parameters based on moderncvstyleclassic.sty
      \setlength{\labelwidth}{\hintscolumnwidth}%
      \setlength{\labelsep}{\separatorcolumnwidth}%
      \setlength{\itemsep}{\bibitemsep}%
      \leftmargin\labelwidth%
      \advance\leftmargin\labelsep}%
      \sloppy\clubpenalty4000\widowpenalty4000}
  {\endlist}
  {\item}

\firstname{John}
\familyname{Doe}
\addbibresource{biblatex-examples.bib}
\begin{document}
\makecvtitle
\nocite{companion,bertram,cicero,augustine}
\printbibliography[title={Publications}]
\end{document}

And get this output.. This output

But I see no detailed .bib file in the code. Can anyone tell how this is happening? I need the same setup to write my list of publications. How can I change the .bib file on overleaf to do this? Can anyone give an example of a compatible .bib file for this code?

  • 2
    Welcome to TeX.SE. Do the directives \addbibresource{biblatex-examples.bib}, located right before \begin{document}, and \printbibliography, located right before \end{document}, help? – Mico Mar 1 '18 at 6:37
  • 2
    You can indeed edit the file biblatex-example.bib on Overleaf. If you don't see a file list panel in your project, click on the "PROJECT" link in the top bar to toggle it open. – LianTze Lim Mar 1 '18 at 6:41
  • 1
    The code uses the example .bib file biblatex-examples.bib just upload or write your own .bib file and use that. – moewe Mar 30 '18 at 10:33
1

The code uses the example .bib file biblatex-examples.bib as indicated with \addbibresource{biblatex-examples.bib}.

You can upload or write your own .bib file and add it to the project. Then you can simply use that file. Ideally your file would not be called biblatex-examples.bib.

A working Overleaf project with its own .bib is at https://www.overleaf.com/read/sffsymwrqxfy

The only code change to your example is

\addbibresource{cvlit.bib}

instead of \addbibresource{biblatex-examples.bib} and citations of the sources contained in cvlit.bib

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.