Skip to content

Instantly share code, notes, and snippets.

@JohnLukeBentley
Last active October 17, 2017 05:36
Show Gist options
  • Save JohnLukeBentley/47aaf833f71260e57722080e1c3f0570 to your computer and use it in GitHub Desktop.
Save JohnLukeBentley/47aaf833f71260e57722080e1c3f0570 to your computer and use it in GitHub Desktop.
Demonstrates the motive for wanting the ability to have commands in the prenote of a citation command.
\documentclass{article}
\usepackage{a4wide}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{sep_2016_stanford,
author = {{SEP}},
date = {2016-23},
title = {The Stanford Encyclopedia of Philosophy},
urldate = {2016-06-20},
editor = {Zalta, Edward N.},
timestamp = {2016-11-02T19:02:26Z},
url = {http://plato.stanford.edu/archives/fall2016/}
}
@inreference{wikipedia_2016_paris,
author = {Wikipedia},
date = {2016-08-01},
title = {Paris},
note = {Page Version ID: 732468897},
urldate = {2016-08-01},
booktitle = {Wikipedia, the Free Encyclopedia},
langid = {english},
timestamp = {2016-10-28T03:03:49Z},
url = {https://en.wikipedia.org/w/index.php?title=Paris&oldid=732468897},
rights = {Creative Commons Attribution-ShareAlike License}
}
\end{filecontents}
\usepackage[%
style=authoryear,
url=false,
]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Entry outside main citation:\\
See \citetitle{wikipedia_2016_paris} in \autocite{wikipedia_2016_paris}.\\
Entry as a prenote:\\
lorem \autocite[Rights,][]{sep_2016_stanford}\\
lorem \autocite[See Paris,][]{wikipedia_2016_paris}.\\
Entry as a prenote, using a command inside a prenote (uncomment source):
%lorem \autocite[\citetitle{sep_2016_stanford}][]{sep_2016_stanford}\\
\printbibliography
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment