# Converting from Markdown-with-biblatex-commands to LaTeX

How can I use biblatex commands in a Markdown file (instead of Markdown's native cite commands) and have pandoc output a .tex file that preserves those biblatex commands unchanged?

# question disambiguation

My question is distinct from one that may sound similar, where the issue was how to use Markdown's native citation format (e.g., [@mycitation, 23]) and have pandoc produce .tex output that converted those to biblatex commands (e.g., \autocite[23]{mycitation}).

Also, to be clear, I am not asking how to have pandoc format the citations for me. In other words, I believe that the answer to my question should not involve pandoc-citeproc.

# motivation

I would like to be able to write in Markdown but take advantage of the range and flexibility of biblatex-chicago cite commands, which are far more flexible than Markdown (which, for example, does not have a way to reproduce \volcite{...}[...]{...} natively -- that is, without doing it manually as in @mycitation, vol. 1, p. 23). I would then like to convert those Markdown files to LaTeX that can be processed with xelatex and biber.

# MWE

Markdown input:

This assertion *must* be cited.^[See \volcite{1}[23]{mycitation}.]


Output using pandoc myfile.md -o myfile.tex (note the escaped curly braces and square brackets):

This assertion \emph{must} be cited.\footnote{See
\volcite{1}{[}23{]}\{mycitation\}.}


Desired .tex output:

This assertion \emph{must} be cited.\footnote{See \volcite{1}[23]{mycitation}.}


No need to use Pandoc, you can use the Markdown package:

\documentclass{article}
\usepackage{biblatex}
\usepackage[hybrid,inlineFootnotes]{markdown}
\begin{document}
\begin{markdown}
This assertion *must* be cited.^[See \volcite{1}[23]{mycitation}.]
\end{markdown}
\end{document}


The hybrid package option enables the TeX commands, inlineFootnotes add support for the footnotes. It supports many of the Pandoc extensions, see the manual.

This is the result:

It is also supported by tex4ht, so you can convert your Markdown + LaTeX document to HTML:

make4ht -us filename.tex "fn-in"