1

I am creating my CV in LaTeX with classicthesis-styled CV. Instead of adding publications individually, I would like to add a bibliography file. I tried it with the following code, but couldn't get it working.

MWE

\documentclass{scrartcl}

\reversemarginpar % Move the margin to the left of the page 

\newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}} % New command defining the margin text style

\usepackage[nochapters]{classicthesis} % Use the classicthesis style for the style of the document
\usepackage[LabelsAligned]{currvita} % Use the currvita style for the layout of the document

\renewcommand{\cvheadingfont}{\LARGE\color{Maroon}} % Font color of your name at the top

\usepackage{hyperref} % Required for adding links   and customizing them
\hypersetup{colorlinks, breaklinks, urlcolor=Maroon, linkcolor=Maroon} % Set link colors

\newlength{\datebox}\settowidth{\datebox}{Spring 2011} % Set the width of the date box in each block

\newcommand{\NewEntry}[3]{\noindent\hangindent=2em\hangafter=0 \parbox{\datebox}{\small \textit{#1}}\hspace{1.5em} #2 #3 % Define a command for each new block - change spacing and font sizes here: #1 is the left margin, #2 is the italic date field and #3 is the position/employer/location field
\vspace{0.5em}} % Add some white space after each new entry

\newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{1em}} % Define a command for descriptions of each entry - change spacing and font sizes here

\addbibresource{bibliography.bib}

%----------------------------------------------------------------------------------------

\begin{document}

\thispagestyle{empty} % Stop the page count at the bottom of the first page

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\begin{cv}

%----------------------------------------------------------------------------------------
%   WORK EXPERIENCE
%----------------------------------------------------------------------------------------

\noindent\spacedlowsmallcaps{Publications}\vspace{1em}

% \section{publications}

\printbibsection{article}{article in peer-reviewed journal} % Print all articles from the bibliography

\printbibsection{book}{books} % Print all books from the bibliography

\begin{refsection} % This is a custom heading for those references marked as "inproceedings" but not containing "keyword=france"
\nocite{*}
\printbibliography[sorting=chronological, type=inproceedings, title={international peer-reviewed conferences/proceedings}, notkeyword={france}, heading=bibheading]
\end{refsection}

\begin{refsection} % This is a custom heading for those references marked as "inproceedings" and containing "keyword=france"
\nocite{*}
\printbibliography[sorting=chronological, type=inproceedings, title={local peer-reviewed conferences/proceedings}, keyword={france}, heading=bibheading]
\end{refsection}

\printbibsection{misc}{other publications} % Print all miscellaneous entries from the bibliography

\printbibsection{report}{research reports} % Print all research reports from the bibliography

\end{cv}

\end{document}

How to add bibliography file to classicthesis-styled CV?

Mensch
  • 65,388
nxkryptor
  • 1,478
  • 1
    You are not loading package biblatex. Also, \printbibsection is not a valid command by default, it is defined in the friggeri template though. But that definition is a bit buggy as well. – Johannes_B Mar 06 '16 at 17:19
  • @Johannes_B Do you want to type up a short answer? I feel that the other answer doesn't quite address the problem in the MWE. – moewe Mar 07 '16 at 07:46
  • @moewe Do you want to write an answer? – Johannes_B Mar 07 '16 at 07:59
  • @Johannes_B I have done that then, let me know if something could be improved. – moewe Mar 09 '16 at 07:47

2 Answers2

1

You neglected to load biblatex in your MWE.

Furthermore, \printbibsection is not a standard biblatex command, it is defined in the friggeri-cv as

\newcommand{\printbibsection}[2]{
  \begin{refsection}
    \nocite{*}
    \printbibliography[sorting=chronological, type={#1}, title={#2}, heading=subbibliography]
  \end{refsection}
}

But normally you wouldn't need \printbibsection and all the refsections, you could just go with

\documentclass{scrartcl}
\usepackage[sorting=ydnt, tyle=authortitle, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\nocite{*}

\begin{document}
\printbibliography[type=article, title={Articles}]
\printbibliography[type=book, title={Books}]
\printbibliography[nottype=article,nottype=book, title={Others}]
\end{document}
moewe
  • 175,683
0

From this work provided by Friggeri template and using Tabular bibliography with 2 cols for @inbook, @article etc I can provide you my template that permit to distinguish the same type of publications using keywords={france}.

This following MWE can be another start for your CV.

\documentclass[a4paper]{article}
\usepackage{inputenc}
\usepackage[english,french]{babel}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{csquotes}
\usepackage[backend=biber, maxnames=99, sorting=ydnt, hyperref=true]{biblatex}
\usepackage[left=3cm,top=2.5cm,right=3cm,bottom=2.5cm]{geometry}

\begin{filecontents}{\jobname.bib}

@ARTICLE{mwe2012,
  author = {Smith, A. and Johnson, B. and Willians, C.},
  title = {The three most common surnames in the United States of America},
  journal = {Review of Useless Knowledge},
  year = {2012},
  volume = {8},
  number = {1},
  pages = {290--290},
  keywords={france}
}

@INPROCEEDINGS{mwe2011,
  author = {Miller, J. and Brown, D.},
  title = {Most used surnames in fake passports},
  booktitle = {Journal of Nosense Ranks},
  year = {2011},
  volume = {5},
  number = {3},
  pages = {1--130},
  pmid = {1234567}
}


@INPROCEEDINGS{mwe2015,
  author = {Miller, J. and Brown, D.},
  title = {Most used surnames in fake passports},
  booktitle = {Journal of Nosense Ranks},
  year = {2011},
  volume = {5},
  number = {3},
  pages = {1--130},
  pmid = {1234567},
  keywords = {france}
}

\end{filecontents}

\addbibresource{\jobname.bib}

\defbibenvironment{bibliography}
{\list
    %{\printtext[labelnumberwidth]{\printfield{labelnumber}}}%
    {\printtext{\addtocounter{publi}{1}[\thepubli]}}
    {\setlength{\labelwidth}{\labelnumberwidth}%
    \setlength{\leftmargin}{\labelwidth}%
    \setlength{\labelsep}{\biblabelsep}%
    \addtolength{\leftmargin}{\labelsep}%
    \setlength{\itemsep}{\bibitemsep}%
    \setlength{\parsep}{\bibparsep}}%
    \renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}

\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[book]{title}{#1}
\DeclareFieldFormat[inproceedings]{title}{#1}
\DeclareFieldFormat[inproceedings_fr]{title}{#1}
\DeclareFieldFormat[misc]{title}{#1}
\DeclareFieldFormat[report]{title}{#1}
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat[article]{volume}{\textbf{#1}}
\DeclareFieldFormat[unpublished]{title}{#1}

\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
\begin{tabular}{p{0.9\textwidth}}
    \printfield{title}\\
    \printnames{author}\\
    \printfield{journaltitle}%
    \addcomma\space%
    \printfield{volume}%
    \iffieldundef{number}{}{\space(\printfield{number})}%
    \addcomma\space%
    \printfield{pages}%
    \addcomma\space%
    \printfield{year}.
\end{tabular}
\vspace{.5em}
\hrule
\usebibmacro{finentry}}

\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
\begin{tabular}{p{0.9\textwidth}}
    \printfield{title}\\
    \printnames{author}\\
    \printfield{booktitle}%
    \addcomma\space%
    \printfield{volume}%
    \iffieldundef{number}{}{\space(\printfield{number})}%
    \addcomma\space%
    \printfield{pages}%
    \addcomma\space%
    \printlist{location}
    \addcomma\space%
    \printfield{year}.
\end{tabular}
\vspace{.5em}
\hrule
\usebibmacro{finentry}}

\begin{document}
\selectlanguage{french}
\section{Liste de publications (extrait)}

\newcounter{publi}
\nocite{*}

\selectlanguage{english}
\setcounter{publi}{0}
\printbibliography[type=article, title={Revues internationales avec comité de lecture}, heading=subbibliography]

\setcounter{publi}{0}
\printbibliography[type=inproceedings, title={Conférences internationales avec comité de lecture}, notkeyword={france}, heading=subbibliography]

\selectlanguage{french}
\setcounter{publi}{0}
\printbibliography[type=inproceedings, title={Conférences nationales avec comité de lecture}, keyword={france}, heading=subbibliography]
\end{document}