From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32485 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Julien Dutant Newsgroups: gmane.text.pandoc Subject: Re: YAML: biblio-style, citestyle, bibstyle Date: Mon, 24 Apr 2023 03:40:16 -0700 (PDT) Message-ID: <012f9280-1c53-4146-a8bd-55128d816274n@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6942_1670652415.1682332816179" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26583"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC5Y3356IYIJDOMZUIDBUBAL63HGS-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Apr 24 12:40:22 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f62.google.com ([209.85.160.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pqtcL-0006k5-4C for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 24 Apr 2023 12:40:21 +0200 Original-Received: by mail-oa1-f62.google.com with SMTP id 586e51a60fabf-1842c946ffdsf25503614fac.0 for ; Mon, 24 Apr 2023 03:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1682332820; x=1684924820; 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=eD+86MLh7qGjmyYdfKxCqBz4zotHx09eRdHIxe9YRes=; b=CJE+3MScmnPp9AzmdNPbrl8v5tDKRkOWU4CCJybIwtSmi+lIkxliwg80+eDqhWXOlZ FPgaaMg+nSgBcRpJpzbtzPI5YyTITxl2nii3bJuxpewvdVkDkPli9w8Xh9NTgFt8Abmu R9RN2KDKsQMW9nwqZRNK3w++m03/fqlD/PN9hirAIZg1lOAczyxHUb65WJiApgAj+Ygf 3MbL3+h9z+PAZHRdJe+ALO+LgSLpvdtNqJFWS+hcLQehYMn5ALmv2/4tk+RFO0472EIK dhMPb+GesFAzwD4pm9QLrLsO+/s6eYUIdmecLZWc0p1FbCOwLbn1De+s6NmKUWkbbECn Ydbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682332820; x=1684924820; 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=eD+86MLh7qGjmyYdfKxCqBz4zotHx09eRdHIxe9YRes=; b=j22HgETVBLvVsCk+2EVIXvELOx7IiFyDSyHW2zUgdwa+f+4wvSc1HPKKG33FygCgVd zMl/FW8GE7GLujSVlCBQCMK7KP5ceWxVjsDt3PKbrDrUdCZ17NBRFtWLxmSPtVgjrxNV ZH6fW60O+mOzucKNH4PUrATv18RzoG90fJx4JMSpSfWFkT2a+dZCbtq8BGcTwn07b4JD 1YY/2hvJxabKrX9EUW3qS4Ps3LaQuWOnXeyz7IbaNKLntPP5iO+LYe4SjQ4dtcRmzzGq 8CT0Kv8gVTjGY/ecTu59gQMmADqaYe2Nzir9VF0R/KV1NSxDkIwdraghHNJMm0zVibd9 BJBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682332820; x=1684924820; 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=eD+86MLh7qGjmyYdfKxCqBz4zotHx09eRdHIxe9YRes=; b=ZmVNLv77A5rLl29AeJLn4KHSDTuEEKTgxGg8fCpVmQ6oDDNSHP7flmdd62+UQ0dm20 qEreHTMEhLn5uZSu96tHH2RFoyWFlDL9tjPaDApDJHmXVeMgUzrstsEhZtqUaYlusNLU QOSQVxnzLHymrdOkOgcMBrCb26hM5mTU5HnrcQX8a/YJbO2/mYHB9HSCDkyXC/KBffna 5MD4Fjx0SUiQBErGb22zAS4p8hPyalR+irbVDrGIFEunPaKIU+gWaLWyTHiRXWtYvCcu K4GDtxVg97PtedfFXSCt8mna+ClPJVlXaPKlt4plgnst5da8hA Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AAQBX9eK3jkCbIdvgTNICERRwdW42TeqiBMkdLMXd1BXQJHCFmzMEJep 059DN7krsLxgAwC9i2DYMGk= X-Google-Smtp-Source: AKy350bDe2M4CzNVJ+0N9Mo+iqCzcUpYbmRpWRiiGdBIn+5U1Ar+9zJethN5/pmMOyXD8eX/aPD1vw== X-Received: by 2002:aca:f1c2:0:b0:38e:96b5:5b73 with SMTP id p185-20020acaf1c2000000b0038e96b55b73mr3261446oih.1.1682332819856; Mon, 24 Apr 2023 03:40:19 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:661c:b0:6a4:2882:ca84 with SMTP id cp28-20020a056830661c00b006a42882ca84ls1624585otb.10.-pod-prod-gmail; Mon, 24 Apr 2023 03:40:17 -0700 (PDT) X-Received: by 2002:a9d:57c4:0:b0:6a6:b8a:4453 with SMTP id q4-20020a9d57c4000000b006a60b8a4453mr4440325oti.7.1682332816874; Mon, 24 Apr 2023 03:40:16 -0700 (PDT) In-Reply-To: X-Original-Sender: julien.dutant-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:32485 Archived-At: ------=_Part_6942_1670652415.1682332816179 Content-Type: multipart/alternative; boundary="----=_Part_6943_1692929636.1682332816179" ------=_Part_6943_1692929636.1682332816179 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable For a temporary solution It looks like you have to modify Pandoc's LaTeX=20 template. The biblatex manual says that citestyle has to be given as=20 \usepacakge option. From Pandoc's LaTeX template=20 (https://github.com/jgm/pandoc-templates/blob/master/default.latex, line=20 400) you'll see that the command is generated by: ``` \usepackage[$if(biblio-style)$style=3D$biblio-style$,$endif$$for(biblatexop= tions)$$biblatexoptions$$sep$,$endfor$]{biblatex}=20 ``` You could insert a command to use a cite-style variable here. Save the=20 default template by running `pandoc -D latex > mytpl.latex`, replace line= =20 400 with: ``` \usepackage[$if(cite-style)$citestyle=3D$cite-style$, $if(biblio-style)$bibstyle=3D$biblio-style$,$endif$$else$ $if(biblio-style)$style=3D$biblio-style$,$endif$$endif$$for(biblatexoptions= )$$biblatexoptions$$sep$,$endfor$]{biblatex}=20 ``` (This generates `citestyle=3D,bibstyle=3D` if both ar= e=20 present and `sytle=3D` if the YAML doesn't define a `cite-style`= .)=20 You can then add `cite-style: ext-authoryear` to your YAML block and run=20 Pandoc with --template mytpl.latex. You can place the template in your=20 pandoc user directory so it can be used anywhere with --template=20 mytpl.latex, e.g. $HOME/local/share/pandoc on Linux. See=20 https://pandoc.org/MANUAL.html#option--data-dir The downside is that you might have to redo this in further Pandoc updates= =20 (unless Pandoc's own template introduces a cite-style option). Best On Sunday, April 23, 2023 at 6:39:00=E2=80=AFPM UTC+1 Guido Milanese wrote: > I have been using pandoc + LaTeX + Biblatex for several years now as my= =20 > normal tool for scholarly writing, and I find the biblatex filter really= =20 > excellent. For some reasons, the style of a journal requires a particula= r=20 > biblatex style "mixture": > > ``` > citestyle=3Dext-authoryear, bibstyle=3Dext-authortitle > ``` > > For a similar use, see e.g.=20 > https://tex.stackexchange.com/questions/433643/customizing-biblatex-autho= ryear-labels-in-bibliography-and-format-of-editor > . > > Question: while I normally write, in my YAML header: > > ``` > biblio-style: > ``` > > I was not able to find a YAML instruction suitable for this particular=20 > need, i.e. two searate style for citation and for the final bibliography.= =20 > Not a big issue, since I can edit the TeX file with s simple sed script,= =20 > but I was just curious to know if it is possible to incorporate this=20 > instruction within a YAML header. > > Many thanks for everything. > guido (Italy) > --=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/012f9280-1c53-4146-a8bd-55128d816274n%40googlegroups.com. ------=_Part_6943_1692929636.1682332816179 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
For a temporary solution It looks like you have to modify Pandoc's LaT= eX template. The biblatex manual says that citestyle has to be given as \us= epacakge option. From Pandoc's LaTeX template (https://github.com/jgm/pando= c-templates/blob/master/default.latex, line 400) you'll see that the comman= d is generated by:

```
\usepack= age[$if(biblio-style)$style=3D$biblio-style$,$endif$$for(biblatexoptions)$$= biblatexoptions$$sep$,$endfor$]{biblatex}
```

Y= ou could insert a command to use a cite-style variable here. Save the defau= lt template by running `pandoc -D latex > mytpl.latex`, replace line 400= with:

```
\usepack= age[
$if(cite-style)$cit= estyle=3D$cite-style$,<= /span>$if(biblio-style)$bibsty= le=3D$biblio-style$,$endif$$else$$if(biblio-st= yle)$style=3D$biblio-style$,$endif$$endif$$for(biblatexoptions)$$biblatexop= tions$$sep$,$endfor$]{biblatex}
```

<= div>(This generates `citestyle=3D<cite-style>,bibstyle=3D<bibstyle= >` if both are present and `sytle=3D<bib-style>` if the YAML doesn= 't define a `cite-style`.) You can then add `cite-style: ext-authoryear` to= your YAML block and run Pandoc with --template mytpl.latex. You can place = the template in your pandoc user directory so it can be used anywhere with = --template mytpl.latex, e.g. $HOME/local/share/pandoc on Linux. See https:/= /pandoc.org/MANUAL.html#option--data-dir

The dow= nside is that you might have to redo this in further Pandoc updates (unless= Pandoc's own template introduces a cite-style option).

Best

On Sunday, April 23, 2023 at 6:39:00=E2=80= =AFPM UTC+1 Guido Milanese wrote:
I have been using pandoc + LaTeX + Biblatex for s= everal years now as my normal tool for scholarly writing, and I find the bi= blatex filter really excellent. For some reasons, the style of a journal re= quires=C2=A0 a particular biblatex style "mixture":
```
citestyle=3Dext-authoryear, bibstyle=3Dext-au= thortitle
```


=
Question: while I normally write, in my YAML header:
```
biblio-style: <required style>
```

I was not able to find a YAML instructio= n suitable for this particular need, i.e. two searate style for citation an= d for the final bibliography. Not a big issue, since I can edit the TeX fil= e with s simple sed script, but I was just curious to know if it is possibl= e to incorporate this instruction within a YAML header.

Many thanks for everything.
guido (Italy)

--
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/012f9280-1c53-4146-a8bd-55128d816274n%40googlegroups.= com.
------=_Part_6943_1692929636.1682332816179-- ------=_Part_6942_1670652415.1682332816179--