Re: oc-biblatex and biblatex substyles

2022-01-06 Thread Thomas S. Dye

Aloha Rasmus,

Rasmus  writes:


I guess you (and Tom) is right that it would be better to make a 
derived style.


Tom, did you already make a derived style?  From the later 
emails it
sounded like it, but I don’t see oc-biblatex-chicago.el in the 
main repo.


Otherwise, I can have try to have a go at it over the coming 
weeks.


No, I haven't worked on a derived style.  


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2022-01-06 Thread Rasmus
Ah, now I sent two emails. I thought the first one got lost.
Sorry for the noise.
Rasmus

Rasmus  writes:

> Hi there,
>
> Sorry for the slow reply.
>
> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rasmus  writes:
>>
>>> I wonder if oc-biblatex should support loading biblatex-derived libraries,
>>> e.g. biblatex-chicago?
>>>
>>> There’s a quite a few of these libraries:
>>>
>>>$ tlmgr search --global "biblatex-" | wc -l
>>>  66
>>>
>>> (This is somewhat overestimating the true number of “biblatex-*”
>>> packages).
>>>
>>> These libraries are typically nie because they are (i) easier to configure
>>> than biblatex for a specific style and (ii) actually support some
>>> \usepackage keywords that can’t be used by biblatex (e.g. ibidtracker for
>>> biblatex-chicago).
>>>
>>> Thus, it might be able to at least support
>>>
>>> #+cite_export: biblatex-$SUBSTYLE
>>>
>>> E.g. #+cite_export: biblatex-chicago.  But oc-biblatex would likely also
>>> have to be able to pickup biblatex-* packages in
>>> org-latex-(default-)packages-alist...
>>>
>>> So maybe it’s a can of worms?
>>
>> I don't know enough about BibLaTeX to answer that question. What does it
>> entail to "support loading biblatex-derived libraries" in practical
>> terms? I assume \usepackage{biblatex-chicago} instead of
>> \usepackage{biblatex}, with a different set of options and commands,
>> too.
>
> For the most part it should be drop in replacements.  I don’t think any
> user commands are *removed* from a derived style. But options to the
> package could be added an user commands could be added.
>
>> It may be possible to define a new variable, e.g.,
>> ‘org-cite-biblatex-package‘, defaulting to ("bilatex" . nil). It would
>> contain entries like (SUBSTYLE . OPTIONS) and would be used to build the
>> proper \usepackage invocation.
>
> Maybe that is the best way to go about.  Then at least we could support
> the main styles out there.  I guess Chicago covers most of the social
> sciences?  I guess the humanities use APA?  I don’t know how different
> biblatex-apa is though.
>
> There are also obscure styles.  E.g. a student once used biblatex-aer
> which is a derived style of biblatex-chicago that makes it look like a
> famous journal.
>
>
>> I also plan to allow custom commands in "oc-biblatex.el", so it could
>> also handle commands introduced by the substyles.
>>
>> How we would select substyle from the document is not clear, tho.
>
> If we want to support arbitrary styles somewhat I guess something like
> #+cite_export: biblatex-$SUBSTYLE would be ok.  But it would not
> necessarily be full support.
>
>> Another possibility it to write, e.g., "oc-biblatex-chicago.el" and
>> define a new ‘biblatex-chicago’ export processor, re-using most
>> functions from "oc-biblatex.el". It would probably only be necessary to
>> re-define ‘org-cite-biblatex-export-citation’ and
>> ‘org-cite-biblatex-prepare-preamble’.
>
> I guess you (and Tom) is right that it would be better to make a derived 
> style.
>
> Tom, did you already make a derived style?  From the later emails it
> sounded like it, but I don’t see oc-biblatex-chicago.el in the main repo.
>
> Otherwise, I can have try to have a go at it over the coming weeks.
>
> Kind regards and terribly sorry again for missing the follow ups earlier,
> Rasmus

-- 
What will be next?



Re: oc-biblatex and biblatex substyles

2022-01-06 Thread Rasmus
Hi there,

Sorry for the slow reply.

Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> I wonder if oc-biblatex should support loading biblatex-derived libraries,
>> e.g. biblatex-chicago?
>>
>> There’s a quite a few of these libraries:
>>
>>$ tlmgr search --global "biblatex-" | wc -l
>>  66
>>
>> (This is somewhat overestimating the true number of “biblatex-*”
>> packages).
>>
>> These libraries are typically nie because they are (i) easier to configure
>> than biblatex for a specific style and (ii) actually support some
>> \usepackage keywords that can’t be used by biblatex (e.g. ibidtracker for
>> biblatex-chicago).
>>
>> Thus, it might be able to at least support
>>
>> #+cite_export: biblatex-$SUBSTYLE
>>
>> E.g. #+cite_export: biblatex-chicago.  But oc-biblatex would likely also
>> have to be able to pickup biblatex-* packages in
>> org-latex-(default-)packages-alist...
>>
>> So maybe it’s a can of worms?
>
> I don't know enough about BibLaTeX to answer that question. What does it
> entail to "support loading biblatex-derived libraries" in practical
> terms? I assume \usepackage{biblatex-chicago} instead of
> \usepackage{biblatex}, with a different set of options and commands,
> too.

For the most part it should be drop in replacements.  I don’t think any
user commands are *removed* from a derived style. But options to the
package could be added an user commands could be added.

> It may be possible to define a new variable, e.g.,
> ‘org-cite-biblatex-package‘, defaulting to ("bilatex" . nil). It would
> contain entries like (SUBSTYLE . OPTIONS) and would be used to build the
> proper \usepackage invocation.

Maybe that is the best way to go about.  Then at least we could support
the main styles out there.  I guess Chicago covers most of the social
sciences?  I guess the humanities use APA?  I don’t know how different
biblatex-apa is though.

There are also obscure styles.  E.g. a student once used biblatex-aer
which is a derived style of biblatex-chicago that makes it look like a
famous journal.


> I also plan to allow custom commands in "oc-biblatex.el", so it could
> also handle commands introduced by the substyles.
>
> How we would select substyle from the document is not clear, tho.

If we want to support arbitrary styles somewhat I guess something like
#+cite_export: biblatex-$SUBSTYLE would be ok.  But it would not
necessarily be full support.

> Another possibility it to write, e.g., "oc-biblatex-chicago.el" and
> define a new ‘biblatex-chicago’ export processor, re-using most
> functions from "oc-biblatex.el". It would probably only be necessary to
> re-define ‘org-cite-biblatex-export-citation’ and
> ‘org-cite-biblatex-prepare-preamble’.

I guess you (and Tom) is right that it would be better to make a derived style.

Tom, did you already make a derived style?  From the later emails it
sounded like it, but I don’t see oc-biblatex-chicago.el in the main repo.

Otherwise, I can have try to have a go at it over the coming weeks.

Kind regards and terribly sorry again for missing the follow ups earlier,
Rasmus

-- 
In theory, practice and theory are the same. In practice they are not



Re: oc-biblatex and biblatex substyles

2022-01-06 Thread Rasmus
Hi there,

Sorry for the slow reply. 

Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> I wonder if oc-biblatex should support loading biblatex-derived libraries,
>> e.g. biblatex-chicago?
>>
>> There’s a quite a few of these libraries:
>>
>>$ tlmgr search --global "biblatex-" | wc -l
>>  66
>>
>> (This is somewhat overestimating the true number of “biblatex-*”
>> packages).
>>
>> These libraries are typically nie because they are (i) easier to configure
>> than biblatex for a specific style and (ii) actually support some
>> \usepackage keywords that can’t be used by biblatex (e.g. ibidtracker for
>> biblatex-chicago).
>>
>> Thus, it might be able to at least support
>>
>> #+cite_export: biblatex-$SUBSTYLE
>>
>> E.g. #+cite_export: biblatex-chicago.  But oc-biblatex would likely also
>> have to be able to pickup biblatex-* packages in
>> org-latex-(default-)packages-alist...
>>
>> So maybe it’s a can of worms?
>
> I don't know enough about BibLaTeX to answer that question. What does it
> entail to "support loading biblatex-derived libraries" in practical
> terms? I assume \usepackage{biblatex-chicago} instead of
> \usepackage{biblatex}, with a different set of options and commands,
> too.

While I haven’t looked through other styles, I would assume the user
commands (“\*cite*”) remain the same.  Only The library differs.  But
sometimes it may introduce new options to the package.

> It may be possible to define a new variable, e.g.,
> ‘org-cite-biblatex-package‘, defaulting to ("bilatex" . nil). It would
> contain entries like (SUBSTYLE . OPTIONS) and would be used to build the
> proper \usepackage invocation.
>
> I also plan to allow custom commands in "oc-biblatex.el", so it could
> also handle commands introduced by the substyles.
>
> How we would select substyle from the document is not clear, tho.

> Another possibility it to write, e.g., "oc-biblatex-chicago.el" and
> define a new ‘biblatex-chicago’ export processor, re-using most
> functions from "oc-biblatex.el". It would probably only be necessary to
> re-define ‘org-cite-biblatex-export-citation’ and
> ‘org-cite-biblatex-prepare-preamble’.
>
> WDYT?

Maybe that is a good way.  But e.g. a student once preferred an even more
obscure style, biblatex-aer which builds on biblatex-chicago to make a
style similar to a specific journal.  It could get old quickly...

OTOH, we could select some key derivatives to support.

Kind regards,
Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


"Thomas S. Dye"  writes:


IIUC, the map in 'org-cite-biblatex-styles' is correct for
biblatex-chicago.


biblatex-chicago introduces new LaTeX commands. Does that mean 
those can

be ignored?


If the goal is to support the styles and variants in 
org-cite-biblatex-styles, then I believe the answer is 'yes'.


A potentially useful biblatex-chicago extension to \textcite is 
\gentextcite, which depending on the package option genallnames 
will give all authors' names or the last author's name in genitive 
form.  This defaults to the English 's, but there is an optional 
argument so it can be tailored to other languages.  It might be 
worthwhile to map this to a new 'gen' variant of the 'text' style.


Rasmus has been active in biblatex-chicago development, so I'd be 
keen to hear his thoughts on the capabilities of 
oc-biblatex-chicago.


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Nicolas Goaziou
"Thomas S. Dye"  writes:

> IIUC, the map in 'org-cite-biblatex-styles' is correct for
> biblatex-chicago.

biblatex-chicago introduces new LaTeX commands. Does that mean those can
be ignored?

Regards,



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


"Thomas S. Dye"  writes:


Hmm, I can't find 'org-cite-biblatex-styles' in main.

Do you mean the map represented by the nested pcase in
org-cite-biblatex-export-citation function, or something else?


You need to update main. `org-cite-biblatex-styles' is a recent 
addition

to oc-biblatex.el. The pcase you're talking about does not exist
anymore.


Got it.  Thanks.

IIUC, the map in 'org-cite-biblatex-styles' is correct for 
biblatex-chicago.


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Nicolas Goaziou
"Thomas S. Dye"  writes:

> Hmm, I can't find 'org-cite-biblatex-styles' in main.
>
> Do you mean the map represented by the nested pcase in
> org-cite-biblatex-export-citation function, or something else?

You need to update main. `org-cite-biblatex-styles' is a recent addition
to oc-biblatex.el. The pcase you're talking about does not exist
anymore.

Thank you for having a look.

Regards,



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


Hello,

"Thomas S. Dye"  writes:


Nicolas Goaziou  writes:

Another possibility it to write, e.g., 
"oc-biblatex-chicago.el" and
define a new ‘biblatex-chicago’ export processor, re-using 
most
functions from "oc-biblatex.el". It would probably only be 
necessary

to
re-define ‘org-cite-biblatex-export-citation’ and
‘org-cite-biblatex-prepare-preamble’.

This is probably the path of least resistance for users who 
want to use biblatex-chicago out of the box, rather than as a 
basis for deriving a specific style.


I can write a biblatex-chicago citation processor. However, it 
would
help me tremendously if someone could map styles/variants to 
LaTeX

commands when using this package.

See for example `org-cite-biblatex-styles' in main branch.


Hmm, I can't find 'org-cite-biblatex-styles' in main.

Do you mean the map represented by the nested pcase in 
org-cite-biblatex-export-citation function, or something else?


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Nicolas Goaziou
Hello,

"Thomas S. Dye"  writes:

> Nicolas Goaziou  writes:
>
>> Another possibility it to write, e.g., "oc-biblatex-chicago.el" and
>> define a new ‘biblatex-chicago’ export processor, re-using most
>> functions from "oc-biblatex.el". It would probably only be necessary
>> to
>> re-define ‘org-cite-biblatex-export-citation’ and
>> ‘org-cite-biblatex-prepare-preamble’.
>>
> This is probably the path of least resistance for users who want to use 
> biblatex-chicago out of the box, rather than as a basis for deriving a 
> specific style.

I can write a biblatex-chicago citation processor. However, it would
help me tremendously if someone could map styles/variants to LaTeX
commands when using this package.

See for example `org-cite-biblatex-styles' in main branch.

Any volunteer?

Regards,
-- 
Nicolas Goaziou



Re: oc-biblatex and biblatex substyles

2021-12-10 Thread Thomas S. Dye



Nicolas Goaziou  writes:

Another possibility it to write, e.g., "oc-biblatex-chicago.el" 
and

define a new ‘biblatex-chicago’ export processor, re-using most
functions from "oc-biblatex.el". It would probably only be 
necessary to

re-define ‘org-cite-biblatex-export-citation’ and
‘org-cite-biblatex-prepare-preamble’.


This is probably the path of least resistance for users who want to use 
biblatex-chicago out of the box, rather than as a basis for deriving a specific 
style.

Here is the relevant section 4.51 of the biblatex-chicago manual:

 With the addition of the author-date styles to the package, I 
 have provided three keys for choosing which style to load, 
 notes, authordate, and authordate-trad , one of which you put in 
 the options to the \usepackage command. The default way of 
 loading the notes + bibliography style has therefore slightly 
 changed. With early versions of biblatex-chicago-notes , the 
 standard way of loading the package was via a call to biblatex , 
 e.g.:


 \usepackage[style=chicago-notes,strict,backend=bibtex8,%
 babel=other,bibencoding=inputenc]{biblatex}

 Now, the default way to load the style, and one that will in the 
 vast majority of standard cases produce the same results as the 
 old invocation, will look like this:


 \usepackage[notes,strict,backend=biber,autolang=other,%
 bibencoding=inputenc]{biblatex-chicago}

 (In point of fact, the previous biblatex-chicago loading method 
 without the notes option will still work, but only because I’ve 
 made the notes & bibliography style the default if no style is 
 explicitly requested.) If you read through biblatex-chicago.sty, 
 you’ll see that it sets a number of biblatex options aimed at 
 following the Chicago specification, as well as setting a few 
 formatting variables intended as reasonable defaults (see 
 section 4.4.1, above). Some parts of this specification, 
 however, are plainly more “suggested” than “required,” and 
 indeed many publishers, while adopting the main skeleton of the 
 Chicago style in citations, nonetheless maintain their own house 
 styles to which the defaults I have provided do not conform.


 If you only need to change one or two parameters, this can 
 easily be done by putting different options in the call to 
 biblatex-chicago or redefining other formatting variables in the 
 preamble, thereby overriding the package defaults. If, however, 
 you wish more substantially to alter the output of the package, 
 perhaps to use it as a base for constructing another style 
 altogether, then you may want to revert to the old style of 
 invocation above. You’ll lose all the definitions in 
 biblatex-chicago.sty, including those to which I’ve already 
 alluded and also the code that sets the note number in-line 
 rather than superscript in endnotes or footnotes. Also in this 
 file is the code that calls cmsamerican.lbx , which means that 
 you’ll lose all the Chicago-specific bibstrings I’ve defined 
 unless you provide, in your preamble, a \DeclareLanguageMapping 
 command adapted for your setup, on which see section 7 below and 
 also §§ 4.9.1 and 4.11.8 in biblatex.pdf .


 What you will not lose is the ability to call the package 
 options annotation, strict, short, and noibid (section 4.4.3, 
 above), in case these continue to be useful to you when 
 constructing your own modifications. There’s very little code, 
 therefore, actually in biblatex-chicago.sty , but I hope that 
 even this minimal separation will make the package somewhat more 
 adaptable. Any suggestions on this score are, of course, 
 welcome.


All the best,
Tom

--
Thomas S. Dye https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-10 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> I wonder if oc-biblatex should support loading biblatex-derived libraries,
> e.g. biblatex-chicago?
>
> There’s a quite a few of these libraries:
>
>$ tlmgr search --global "biblatex-" | wc -l
>  66
>
> (This is somewhat overestimating the true number of “biblatex-*”
> packages).
>
> These libraries are typically nie because they are (i) easier to configure
> than biblatex for a specific style and (ii) actually support some
> \usepackage keywords that can’t be used by biblatex (e.g. ibidtracker for
> biblatex-chicago).
>
> Thus, it might be able to at least support
>
> #+cite_export: biblatex-$SUBSTYLE
>
> E.g. #+cite_export: biblatex-chicago.  But oc-biblatex would likely also
> have to be able to pickup biblatex-* packages in
> org-latex-(default-)packages-alist...
>
> So maybe it’s a can of worms?

I don't know enough about BibLaTeX to answer that question. What does it
entail to "support loading biblatex-derived libraries" in practical
terms? I assume \usepackage{biblatex-chicago} instead of
\usepackage{biblatex}, with a different set of options and commands,
too.

It may be possible to define a new variable, e.g.,
‘org-cite-biblatex-package‘, defaulting to ("bilatex" . nil). It would
contain entries like (SUBSTYLE . OPTIONS) and would be used to build the
proper \usepackage invocation.

I also plan to allow custom commands in "oc-biblatex.el", so it could
also handle commands introduced by the substyles.

How we would select substyle from the document is not clear, tho.

Another possibility it to write, e.g., "oc-biblatex-chicago.el" and
define a new ‘biblatex-chicago’ export processor, re-using most
functions from "oc-biblatex.el". It would probably only be necessary to
re-define ‘org-cite-biblatex-export-citation’ and
‘org-cite-biblatex-prepare-preamble’.

WDYT?

Regards,
-- 
Nicolas Goaziou