Ok, thanks a lot.

A "reasonable" pipe-line would be
pandoc test.md -t latex --biblatex | pandoc --pdf-engine=latexmk -o test.pdf
or is there anything more clever?

Thanks!



Le ven. 29 oct. 2021 à 12:47, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> a écrit :

There isn't really a good way to do this, no.

One option would be to use the --biblatex or --natbib option
with pandoc instead of --citeproc, if you're targeting LaTeX
anyway.  Then you *could* just use regular LaTeX \cite
commands.  (Note however that pandoc's pdf output won't
run bibtex or biber itself; you'd need to use
--pdf-engine=latexmk, or generate the tex using pandoc
and compile it yourself.)

Clément Aubert <aubert.clement-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Good morning,
>
> Tldr: I don't understand how I can cite inside latex blocks using
> --citeproc.
>
> Long version:
>
> If I use
>
> pandoc test.md --citeproc -o test.pdf
>
> to convert an md file into a pdf, then I can use [@key] for references, and
> I can also use most of LaTeX commands inside my md file (such as \label{…},
> typically).
> Inside a latex environment, everything has to be in latex, if I understand
> correctly, so that
>
> \begin{definition}
> - This
> - Is
> - A list
> \end{definition}
>
> would not work. Hence,
>
> \begin{definition}
> [@key]
> \end{definition}
>
> would not work either, but since I use citeproc, I cannot use \cite{key}
> either.
> So, is there any way to make a reference from within a "latex environment"
> using -citeproc?
> (And, just to be clear: the definition environment is just an example here,
> I don't particularly care about this specific environment).
>
> Thanks!
> Clément.
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAPGHSewQHSJ4O3i-PUpEw8iSw_2sfyHum0acE%3Di0uAHaQvgk1A%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAPGHSex4ezmFVkRyV7MnDZ5Hk2DKKRR9zOnkDa8iAgZYTQkWQw%40mail.gmail.com.