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:

\subfigure[fig 1]
\subfigure[fig 2]
\caption[fig 1 and 2]{caption [@ref]}

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.

There is a lot of potential in making a nice script or makefile out of this.

  • 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
  • I've ended up following your advice using natbib. – waeltken Nov 30 '15 at 8:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.