Skip to content

Instantly share code, notes, and snippets.

@moewew
Created April 24, 2018 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moewew/5217d7a0aa8622db971739ad758d4145 to your computer and use it in GitHub Desktop.
Save moewew/5217d7a0aa8622db971739ad758d4145 to your computer and use it in GitHub Desktop.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@phdthesis{normalthesis,
author = {Author Normal},
title = {Title PhD Thesis},
date = {2016},
}
@thesis{mormalthesis,
author = {Author Mormal},
title = {Title PhD Thesis},
date = {2017},
type = {phdthesis},
}
@thesis{mythesis,
author = {Author These},
title = {Title Thèse},
date = {2014},
}
@habilthesis{habilthesis,
author = {Author Habilitation},
title = {Title Thése Habilitation},
date = {2014},
}
@thesis{habilthesis2,
author = {Author Habilitation},
title = {Title Thése Habilitation},
date = {2014},
type = {habilthesis},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\NewBibliographyString{thesis,habilthesis}
\DefineBibliographyStrings{french}{
thesis = {Thèse},
habilthesis = {Thèse d'habilitation},
}
\DeclareStyleSourcemap{
\maps{
\map{
\step[typesource=habilthesis, typetarget=thesis, final]
\step[fieldset=type, fieldvalue=habilthesis]
}
\map{
\pertype{thesis}
\step[fieldset=type, fieldvalue=thesis]
}
}
}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment