[Tex/LaTex] moderncv – bibliography entries CATEGORIZED and ORDER by year

bibliographiesmoderncv

I am trying to include my publication in my cv and in particular I would like to:

  • divide them for typology: i.e. published papers, working papers, conference presentations
  • order the items in each of the group by decreasing year.

This is a MWE

    \documentclass[11pt,a4paper,sans]{moderncv}

    \moderncvstyle{casual}
    \moderncvcolor{black}
    \usepackage{lastpage}
    \rfoot{\addressfont\itshape\textcolor{gray}{\thepage/\pageref{LastPage}}}
    \usepackage[utf8]{inputenx}
    \usepackage{enumitem}
    \usepackage[left=2cm,right=2cm,top=1.8cm,bottom=2.2cm]{geometry}
    \setlength{\hintscolumnwidth}{3.7cm}

    \firstname{Frank}
    \familyname{Pins}

    \renewcommand*{\cventry}[7][.25em]{%
      \cvitem[#1]{#2}{%
        {\bfseries#3}%
    %   \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% I changed this line (with comma) ...
        \ifthenelse{\equal{#4}{}}{}{ {\slshape#4}}% ... into this one (without comma).
        \ifthenelse{\equal{#5}{}}{}{, #5}%
        \ifthenelse{\equal{#6}{}}{}{, #6}%
        .\strut%
        \ifx&#7&%
          \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

    \begin{document}

    \maketitle

    \renewcommand{\refname}{Publications\subsection{Papers}}
    \renewcommand{\bibliographyitemlabel}{[{\arabic{enumiv}}]}
    \setlength{\hintscolumnwidth}{1.8cm}
    \nocite{A}
    \nocite{B}
    \renewcommand{\refname}{Publications\subsection{Working Papers}}
    \nocite{C}
    \nocite{D}
    %\bibliographystyle{plain}
    \bibliography{references} 

    \end{document}

Where the reference.bib file has the following entries:

    @Unpublished{C,
      Title                    = {Hi},
      Author                   = {Me, myself},
      Note                     = {Available at },
      Year                     = {2014}
    }
    @Unpublished{D,
      Title                    = {Hi 2},
      Author                   = {Me, myself},
      Note                     = {Available at },
      Year                     = {1800}
    }

    @article{A,
    author = {Me, myself},
    title = {Hi3},
    journal = {journaltitle},
    volume={2},
    year={2014}
    }
    @article{B,
    author = {Me, myself},
    title = {Hi3},
    journal = {journaltitle},
    volume={2},
    year={1900}
    }

What should I do? Any help?

Thank

Ginu

Best Answer

Easily done with the modern combo of biblatex and biber. Choose a style that serves your needs.

ginuModerncvBibSections

\begin{filecontents*}{\jobname.bib}
    @Unpublished{C,
        Title                    = {Hi},
        Author                   = {Me, myself},
        Note                     = {Available at },
        Year                     = {2014}
    }
    @Unpublished{D,
        Title                    = {Hi 2},
        Author                   = {Me, myself},
        Note                     = {Available at },
        Year                     = {1800}
    }

    @article{A,
        author = {Me, myself},
        title = {Hi3},
        journal = {journaltitle},
        volume={2},
        year={2014}
    }
    @article{B,
        author = {Me, myself},
        title = {Hi3},
        journal = {journaltitle},
        volume={2},
        year={1900}
    }
\end{filecontents*}

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{casual}
\moderncvcolor{black}
    \usepackage[utf8]{inputenc}
\usepackage{enumitem}
\usepackage[left=2cm,right=2cm,top=1.8cm,bottom=2.2cm]{geometry}
\setlength{\hintscolumnwidth}{3.7cm}

\firstname{Frank}
\familyname{Pins}




\usepackage[sorting=ydnt,style=authoryear]{biblatex}
\nocite{*}
\addbibresource{\jobname.bib}
\begin{document}

\maketitle

\printbibheading[title=Publications]
\printbibliography[heading=subbibliography,type=unpublished,title={Working Papers}]
\printbibliography[heading=subbibliography,type=article,title={Papers}]
\end{document}