I did not think about it before, but it seems there is a very simple solution. I just searched for "printbibliography" in pandoc's source code. From what I see, it seems that this is added to the .tex file from the default latex template (line 583). Therefore, it is enough to add a test for the metadata suppress-bibliography. Basically, it is sufficient to surround lines 576-586 with "$if(suppress-bibliography)$$else$" and "$endif$". Is there any problem with this solution?

Le jeudi 12 octobre 2023 à 18:56:55 UTC+2, John MacFarlane a écrit :
That's true; this only affects use with citeproc. I'm not even sure how to make this happen with biblatex.


> On Oct 12, 2023, at 1:01 AM, Bruno Grenet <bruno....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> Dear all,
>
> It seems to me that the metadata field suppress-bibliography has no effect when using the command-line option --biblatex. A minimal working example:
>
> ---
> references:
> - author:
> - family: Cooley
> given: James W.
> - family: Tukey
> given: John W.
> container-title: Mathematics of computation
> doi: 10.1090/S0025-5718-1965-0178586-1
> id: CooleyTukey1965
> issue: 90
> issued: 1965
> page: 297-301
> title: An Algorithm for the Machine Calculation of Complex Fourier Series
> type: article-journal
> volume: 19
> ---
> This is a citation [@CooleyTukey1965].
>
> Then I can use either
>
> pandoc MWE.md -s --biblatex -o MWE.tex
>
> or
>
> pandoc MWE.md -s --metadata=suppress-bibliography --biblatex -o MWE.tex
>
> and I get in both case the same result, that is the document is finishing with a \printbibliography.
>
> Am I missing something? Thanks!
>
>
> --
> 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-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/66ba712f-f7bd-4ed8-87c0-a768d3c50fa6n%40googlegroups.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/8be5ad50-3e06-41ff-9f8b-0f57b8b46c54n%40googlegroups.com.