Skip to content

Instantly share code, notes, and snippets.

@bgromov
Created January 8, 2020 10:06
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 bgromov/a2bf7201a4bd8780fbe9b482f4c69e5f to your computer and use it in GitHub Desktop.
Save bgromov/a2bf7201a4bd8780fbe9b482f4c69e5f to your computer and use it in GitHub Desktop.
LaTeX: How to add a prefix to `natbib` references and bibliography with `numbers` citation style and without `biblatex`?
\documentclass{your_thesis_class}
\usepackage[utf8x]{inputenc} % <--- required by Inkscape generated pdf_tex figures. biblatex won't work with these
\usepackage[numbers]{natbib}
% \setcitestyle{numbers} % <--- if natbib is already included by another package
\usepackage{bibunits} % <--- lets you have a separate bibliography, e.g. your own publications list
\begin{document}
\begin{bibunit}[unsrtnat] % <--- unsrtnat arranges bibliography list in appearance order
\renewcommand\bibsection{\section*{\refname}} % <--- places bibliography in a section instead of a chapter
% Modify the format for this section only
\renewcommand{\citenumfont}[1]{A#1} % <--- Appends letter A to a numbered citation in the text, e.g. generated with \citep{}
\renewcommand{\bibnumfmt}[1]{[A#1]} % <--- Appends letter A to a numbered reference in the bibliography list
\chapter{Publications}
\putbib[references] % <--- generates bibliography list from references.bib file
\end{bibunit}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment