* YAML: biblio-style, citestyle, bibstyle
@ 2023-04-23 17:38 Guido Milanese
[not found] ` <c12bf5d1-72d3-4883-b1af-425594f27822n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Guido Milanese @ 2023-04-23 17:38 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1338 bytes --]
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/c12bf5d1-72d3-4883-b1af-425594f27822n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2011 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: YAML: biblio-style, citestyle, bibstyle
[not found] ` <c12bf5d1-72d3-4883-b1af-425594f27822n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-04-24 10:40 ` Julien Dutant
2023-04-24 10:49 ` Julien Dutant
1 sibling, 0 replies; 4+ messages in thread
From: Julien Dutant @ 2023-04-24 10:40 UTC (permalink / raw)
To: pandoc-discuss
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: YAML: biblio-style, citestyle, bibstyle
[not found] ` <c12bf5d1-72d3-4883-b1af-425594f27822n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-04-24 10:40 ` Julien Dutant
@ 2023-04-24 10:49 ` Julien Dutant
[not found] ` <075fcbb1-068d-4089-a475-b2901032e8a6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: Julien Dutant @ 2023-04-24 10:49 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2119 bytes --]
Have you tried not specifying a `biblio-style` YAML key and setting instead:
``` yaml
biblatexoptions:
- bibstyle=ext-authortitle
- citestyle=ext-authoryear
```
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}
Which means that a `biblio-style=XXX` is converted to to the option
\usepackage[style=XXX,]{biblatex}, but arbitrary biblatexoptions are
reproduced as is.
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/075fcbb1-068d-4089-a475-b2901032e8a6n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3397 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: YAML: biblio-style, citestyle, bibstyle
[not found] ` <075fcbb1-068d-4089-a475-b2901032e8a6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-04-27 7:50 ` Guido Milanese
0 siblings, 0 replies; 4+ messages in thread
From: Guido Milanese @ 2023-04-27 7:50 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2568 bytes --]
Thank you and please excuse me for replying so late -- too many classes to
teach these days. Your suggestion is perfect: the resulting LaTeX code is
```
\usepackage[citestyle=ext-authoryear, bibstyle=ext-authortitle]{biblatex}
```
which exactly what I need.
All the best,
g
Il giorno lunedì 24 aprile 2023 alle 12:49:55 UTC+2 Julien Dutant ha
scritto:
> Have you tried not specifying a `biblio-style` YAML key and setting
> instead:
>
> ``` yaml
> biblatexoptions:
> - bibstyle=ext-authortitle
> - citestyle=ext-authoryear
> ```
>
> 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}
>
> Which means that a `biblio-style=XXX` is converted to to the option
> \usepackage[style=XXX,]{biblatex}, but arbitrary biblatexoptions are
> reproduced as is.
>
> 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/f3b51db2-410b-4d0e-8e87-0ce66e71273en%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 4389 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-27 7:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-23 17:38 YAML: biblio-style, citestyle, bibstyle Guido Milanese
[not found] ` <c12bf5d1-72d3-4883-b1af-425594f27822n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-04-24 10:40 ` Julien Dutant
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
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).