# How to use pandoc-citeproc in raw latex block of a markdown document?

I'm at a loss. It's probably not possible out of the box, so I'm looking for a workaround.

In my markdown document, that I use with pandoc to generate a PDF, I want to include a figure with subfigures like this:

\begin{figure}[t]
\centering
\subfigure[fig 1]
{\includegraphics[]{figa.pdf}\label{fig:figa}
}
\hspace{0.5cm}%
\subfigure[fig 2]
{\includegraphics[]{figb.pdf}\label{fig:figb}
}
\caption[fig 1 and 2]{caption [@ref]}
\label{fig:figs}
\end{figure}


Is there a way to make pandoc-citeproc parse the reference [@ref] in the raw latex environment? Or substitute the reference with another command that would still allow me to go from markdown to pdf directly without converting to tex first and then compile with pdflatex and bibtex?

I am using pandoc with the xelatex switch, a custom template, .bibtex + .csl files and the pandoc-crossref filter.

I am afraid there is no solution with pandoc-citeproc. Pandoc does not support direct PDF output if you pass the option -R (parse raw LaTeX). I would rather pipe the output as follows.
pandoc -s -S --include-in-header=foo.txt --biblatex markdown_rawlatex.md -o Ref_rawlatex.tex | xelatex Ref_rawlatex.tex | biber Ref_rawlatex | xelatex Ref_rawlatex.tex | xelatex Ref_rawlatex.tex

This command is under the assumption that use use biber as the backend in biblatex.
• I was afraid the answer would look somewhat like this. I'll take a look at it in the next few days. Do you know if i can use *.csl or *.bst styles with biber or where to find din-1505-2 styles for biber? – waeltken Nov 4 '15 at 16:01
• A standalone .bst file does not work with biber (applicable to biber 1.6 - see section 2.1 in the documentation). There is also a thread that refers to citations in din-1505-2. You will also find a corresponding .csl but I am pretty sure that it won't work with biber. – blue_tiger300 Nov 4 '15 at 16:57