From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33188 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Grenet Newsgroups: gmane.text.pandoc Subject: Re: --biblatex and suppress-bibliography Date: Thu, 12 Oct 2023 11:20:58 -0700 (PDT) Message-ID: <8be5ad50-3e06-41ff-9f8b-0f57b8b46c54n@googlegroups.com> References: <66ba712f-f7bd-4ed8-87c0-a768d3c50fa6n@googlegroups.com> <7748A3B8-2AFB-413B-9E84-BA643C873CB3@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4568_1554328088.1697134858617" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10153"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCI3RRMGYQKBBC7SUCUQMGQEFKSWOVQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Oct 12 20:21:04 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f63.google.com ([209.85.161.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qr0Ix-0002SL-Lx for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 12 Oct 2023 20:21:03 +0200 Original-Received: by mail-oo1-f63.google.com with SMTP id 006d021491bc7-57b5e7c753fsf1711962eaf.3 for ; Thu, 12 Oct 2023 11:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1697134862; x=1697739662; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=eYfTP60cVtR3Pdb+wBMiJTF8OjJGblepl3JF2QTJEI8=; b=dUReHyJsKgWBzqHtxx5uTP7nkYCYyszwUcmsGy9fZb8MjjSVdPets4RUwv8UgpYj/r xAZcG9uFOjHwQMkPJC5PLQ29FO9c76HhN3Vlh2c90qT3DZQONDxvqcVY/lAAegyx3C23 KUjVUs3sr0YssK5/usGivJMsF/0oU/kQr0At8KuHIxTz2P3K3tN4c42swBI4MiwZ6gk8 C0vioIPhh3du4qRU4YP1mOAf+YMH/oVKdQroqIc2Rt0oUz3DaSv8oRcAtc2ArC53TDCD TffT9Du2Ta9yRBWbe2ThtxZR0znJrxugZZKy1Rf7z5DS61JcT/FBVmXfptRZLNI/V/Wg 4xxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697134862; x=1697739662; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=eYfTP60cVtR3Pdb+wBMiJTF8OjJGblepl3JF2QTJEI8=; b=gWe17j5mQHbtNWdTjbxU9gXuf226aG5zFJ4Gay23EgUG2RqSnAMNr19JzpRr5G3jBf 0mkX+Ndd2RXMAohSVblRcW/KNsJy/5wnsLKeTodRqLKd/PZyJg4HPeOQPveZAOOz7cH1 uot3jDwWociIbA0AvtANkf1CTiOO3YJsHOOSyh8caMZAarpMzAXCM7r5Vnfd11e9txD9 tlz07jGU2Z2XNrsT+puraYIZo/ge3MeMH5tw2sxa6exAKbrc+WhOInEsUL+PXmBNZ76b rjkjEm5p/8Zd+ndrhsFO2Lnmb5i7MlTeyw4Itjnz408FB3IiFoWgIQdRPL1/1xHIXwNL j3Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697134862; x=1697739662; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=eYfTP60cVtR3Pdb+wBMiJTF8OjJGblepl3JF2QTJEI8=; b=FQO/aZb4HqCMK/Kbva2O29kJ/o84erH7cWJPXu1VCCp76fu26VEJSPGhQg6UwejY9h s2zSZHD4YuRFt/JryLILvWJeDXnYxOk3dI3xafbbC916H6Rx/tdlvBjakXv7NuANpaGR WP167nBDGDkIAM7dh+bpOWLBKlyOcx1aJDrP0WJaPEUcnblM+ra5cKhJIsUpQu6SqNEL fvM57zrhpfWU+qDsQc9069ZYui7SeGLaegAUSSjBGfXAXTRIvhmmSvMa/BaFdaI/aXLn MliSdv3p0vvNovWs8hqpY26rKyWb8yPgGd6S3YmT1gfTuj8736 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YwK2fubhAaUaOAqB09yYVjrpi25WSn7Rt2kp/wVAix/8Y6RrnLD DriWRoTp/R/r16j4Nz+PPa8= X-Google-Smtp-Source: AGHT+IEJ1sg0ibp6v54m+BAEPXDykDAuSK62kOk1Jsb5CRfoAAdXiU3O8eLvKvDpXhxcqrQ/TpCV7A== X-Received: by 2002:a4a:3019:0:b0:56e:466c:7393 with SMTP id q25-20020a4a3019000000b0056e466c7393mr26483806oof.5.1697134862316; Thu, 12 Oct 2023 11:21:02 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:5101:0:b0:57b:5050:d730 with SMTP id s1-20020a4a5101000000b0057b5050d730ls2817870ooa.0.-pod-prod-03-us; Thu, 12 Oct 2023 11:20:59 -0700 (PDT) X-Received: by 2002:a05:6808:1a0a:b0:3ae:532c:e93a with SMTP id bk10-20020a0568081a0a00b003ae532ce93amr12402893oib.11.1697134859310; Thu, 12 Oct 2023 11:20:59 -0700 (PDT) In-Reply-To: <7748A3B8-2AFB-413B-9E84-BA643C873CB3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Original-Sender: bruno.grenet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33188 Archived-At: ------=_Part_4568_1554328088.1697134858617 Content-Type: multipart/alternative; boundary="----=_Part_4569_493935712.1697134858617" ------=_Part_4569_493935712.1697134858617 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I did not think about it before, but it seems there is a very simple=20 solution. I just searched for "printbibliography" in pandoc's source code.= =20 >From what I see, it seems that this is added to the .tex file from the=20 default latex template (line 583). Therefore, it is enough to add a test=20 for the metadata suppress-bibliography. Basically, it is sufficient to=20 surround lines 576-586 with "$if(suppress-bibliography)$$else$" and=20 "$endif$". Is there any problem with this solution? Le jeudi 12 octobre 2023 =C3=A0 18:56:55 UTC+2, John MacFarlane a =C3=A9cri= t : > That's true; this only affects use with citeproc. I'm not even sure how t= o=20 > make this happen with biblatex. > > > > On Oct 12, 2023, at 1:01 AM, Bruno Grenet wrote: > >=20 > > Dear all, > >=20 > > It seems to me that the metadata field suppress-bibliography has no=20 > effect when using the command-line option --biblatex. A minimal working= =20 > example: > >=20 > > --- > > 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 Seri= es > > type: article-journal > > volume: 19 > > --- > > This is a citation [@CooleyTukey1965]. > >=20 > > Then I can use either=20 > >=20 > > pandoc MWE.md -s --biblatex -o MWE.tex > >=20 > > or > >=20 > > pandoc MWE.md -s --metadata=3Dsuppress-bibliography --biblatex -o MWE.t= ex > >=20 > > and I get in both case the same result, that is the document is=20 > finishing with a \printbibliography.=20 > >=20 > > Am I missing something? Thanks! > >=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google=20 > Groups "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/66ba712f-f7bd-4ed8-87c0-= a768d3c50fa6n%40googlegroups.com > . > > --=20 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 e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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. ------=_Part_4569_493935712.1697134858617 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I did not think about it before, but it seems there is a very simple s= olution. I just searched for "printbibliography" in pandoc's source code. F= rom what I see, it seems that this is added to the .tex file from the defau= lt latex template (line 583). Therefore, it is enough to add a test for the= metadata suppress-bibliography. Basically, it is sufficient to surround li= nes 576-586 with "$if(suppress-bibliography)$$else$" and "$endif$". Is ther= e any problem with this solution?

Le jeudi 12 octobre 2023 =C3=A0 1= 8:56:55 UTC+2, John MacFarlane a =C3=A9crit=C2=A0:
That's true; this only affects us= e with citeproc. I'm not even sure how to make this happen with biblat= ex.


> On Oct 12, 2023, at 1:01 AM, Bruno Grenet <bruno....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> Dear all,
>=20
> It seems to me that the metadata field suppress-bibliography has n= o effect when using the command-line option --biblatex. A minimal working e= xample:
>=20
> ---
> 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 Fouri= er Series
> type: article-journal
> volume: 19
> ---
> This is a citation [@CooleyTukey1965].
>=20
> Then I can use either=20
>=20
> pandoc MWE.md -s --biblatex -o MWE.tex
>=20
> or
>=20
> pandoc MWE.md -s --metadata=3Dsuppress-bibliography --biblatex -o = MWE.tex
>=20
> and I get in both case the same result, that is the document is fi= nishing with a \printbibliography.=20
>=20
> Am I missing something? Thanks!
>=20
>=20
> --=20
> 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-f= 7bd-4ed8-87c0-a768d3c50fa6n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-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.
------=_Part_4569_493935712.1697134858617-- ------=_Part_4568_1554328088.1697134858617--