0

Like a lot of people, I write documents in Markdown and then use Pandoc to convert to LaTeX. Pandoc renders Markdown citations in the format [@citekey] as \autocite{citekey}. I use a footnoting style based of verbose-inote. This all works well for the most part; Pandoc automatically handles multiple citations, as well as post- and pre-notes.

However, sometimes it's necessarily to nest these citations in an explicit footnote, like so:

^[Here is some discursive text that could go in a pre-note: [@citkey1].
But here is some more text followed by another citation that should be
in the same footnote. LaTeX won't allow nested citations of course, so
we need to use a footnote: [@citekey2].]

The problem is, if you open that footnote with a citation that ends up being rendered as an ibid, the \autocite command will leave it uncapitalised. So

^[[@citekey].]

becomes

\footnote{\autocite{citekey}.}

and renders in PDF as 'ibid'.

Assuming I'm not missing something else obvious, the solution would seem to be to replace any \autocite directly following \footnote{ with \Autocite. My question is, what would be the best way to achieve this? Regex substitution would be pretty easy, but as far as I can tell Pandoc applies its filters directly to its native AST during the conversion.

  • If you can just add LaTeX commands, a \bibsentence would do it. – moewe Aug 19 '15 at 15:55
  • Try, instead of a footnote, a citation block: you'd have to drop the brackets in the citations and separate them by a semicolon somewhere (reflecting biblatex's usage), but pandoc will put everything in an \autocites with the proper pre- and post-notes. E.g.: [Here is some discursive text that could go in a pre-note: @citekey1; but here is some more text followed by another citation that should be in the same footnote. LaTeX won't allow nested citations of course, so we need to use a footnote: @citekey2.] – henrique Aug 19 '15 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.