public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Julien Dutant <julien.dutant-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: YAML: biblio-style, citestyle, bibstyle
Date: Mon, 24 Apr 2023 03:40:16 -0700 (PDT)	[thread overview]
Message-ID: <012f9280-1c53-4146-a8bd-55128d816274n@googlegroups.com> (raw)
In-Reply-To: <c12bf5d1-72d3-4883-b1af-425594f27822n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2989 bytes --]

For a temporary solution It looks like you have to modify Pandoc's LaTeX 
template. The biblatex manual says that citestyle has to be given as 
\usepacakge option. From Pandoc's LaTeX template 
(https://github.com/jgm/pandoc-templates/blob/master/default.latex, line 
400) you'll see that the command is generated by:

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

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

```
\usepackage[$if(cite-style)$citestyle=$cite-style$,
$if(biblio-style)$bibstyle=$biblio-style$,$endif$$else$
$if(biblio-style)$style=$biblio-style$,$endif$$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} 
```

(This generates `citestyle=<cite-style>,bibstyle=<bibstyle>` if both are 
present and `sytle=<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 downside 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 PM UTC+1 Guido Milanese wrote:

> I have been using pandoc + LaTeX + Biblatex for several years now as my 
> normal tool for scholarly writing, and I find the biblatex filter really 
> excellent. For some reasons, the style of a journal requires  a particular 
> biblatex style "mixture":
>
> ```
> citestyle=ext-authoryear, bibstyle=ext-authortitle
> ```
>
> For a similar use, see e.g. 
> https://tex.stackexchange.com/questions/433643/customizing-biblatex-authoryear-labels-in-bibliography-and-format-of-editor
> .
>
> Question: while I normally write, in my YAML header:
>
> ```
> biblio-style: <required style>
> ```
>
> I was not able to find a YAML instruction suitable for this particular 
> need, i.e. two searate style for citation and for the final bibliography. 
> Not a big issue, since I can edit the TeX file with s simple sed script, 
> but I was just curious to know if it is possible 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 "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 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.

[-- Attachment #1.2: Type: text/html, Size: 4782 bytes --]

  parent reply	other threads:[~2023-04-24 10:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 17:38 Guido Milanese
     [not found] ` <c12bf5d1-72d3-4883-b1af-425594f27822n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-04-24 10:40   ` Julien Dutant [this message]
2023-04-24 10:49   ` Julien Dutant
     [not found]     ` <075fcbb1-068d-4089-a475-b2901032e8a6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-04-27  7:50       ` Guido Milanese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=012f9280-1c53-4146-a8bd-55128d816274n@googlegroups.com \
    --to=julien.dutant-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).