Skip to content

Instantly share code, notes, and snippets.

@Sharpie
Created July 26, 2010 21:32
Show Gist options
  • Save Sharpie/491290 to your computer and use it in GitHub Desktop.
Save Sharpie/491290 to your computer and use it in GitHub Desktop.
Example showing how to use natbib's \defcitealias to shorten or alter BibTeX citations.
@techreport{caltrans2002,
Author = {{California Department of Transportation}},
Title = {{Humboldt Bay Bridges Seismic Substructure Retrofit Environmental Assessment/Finding of No Significant Impact (EA/FONSI)}},
Year = {2002}}
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
\documentclass[11pt]{article}
\usepackage{natbib}
\bibliographystyle{plainnat}
\defcitealias{caltrans2002}{\scshape CalTrans, 2002}
\usepackage[tightpage,psfixbb]{preview}
\setlength{\PreviewBorder}{1ex}
\setlength{\parindent}{0em}
\begin{document}
% Without using a citealias
Lorem ipsum dolor sit amet, consectetur adipiscing elit \citep{caltrans2002}.
\bigskip
%Using a citealias
Lorem ipsum dolor sit amet, consectetur adipiscing elit \citepalias{caltrans2002}.
\bibliography{shortCite}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment