Re: oc-biblatex too aggressive in replacing styles

2021-11-30 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> However, I think it is currently too aggressive in overwriting styles.
>
> Ah?
>
>> Could it perhaps accept any style that is given in
>> ‘org-cite-biblatex-options’ / ‘org-latex-packages-alist’ and only
>> overwrite it if another style is explicitly specified in the file to be
>> exported?
>
> Isn't it the case already?

For me it is not. But maybe I used the latest release and not the latest git 
version.  Let me recheck and get pack. 

>> Currently, the only way I have found that I can specify that I want to use
>> biblatex-chicago is by issuing
>>
>> #+cite_export: biblatex chicago-authordate
>
> If you need chicago-authordate style globally, you can set
> `org-cite-export-processors' instead, e.g., to
>
>   ((t biblatex "chicago-authordate"))

I see. I had missed that you could supply a third argument, but it seems to 
work perfectly! Thanks! 
(And sorry about the noise.)

Maybe I will try to write a patch for the manual.

Kind regards,
Rasmus

-- 
A clever person solves a problem. A wise person avoids it



Re: oc-biblatex too aggressive in replacing styles

2021-11-28 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> However, I think it is currently too aggressive in overwriting styles.

Ah?

> Could it perhaps accept any style that is given in
> ‘org-cite-biblatex-options’ / ‘org-latex-packages-alist’ and only
> overwrite it if another style is explicitly specified in the file to be
> exported?

Isn't it the case already?

> Currently, the only way I have found that I can specify that I want to use
> biblatex-chicago is by issuing
>
> #+cite_export: biblatex chicago-authordate

If you need chicago-authordate style globally, you can set
`org-cite-export-processors' instead, e.g., to

  ((t biblatex "chicago-authordate"))

You are responsible, however, for requiring appropriate packages in the
document header (with `org-latex-packages-alist', for example).

Regards,
-- 
Nicolas Goaziou



Re: oc-biblatex too aggressive in replacing styles

2021-11-28 Thread Rasmus
"Bruce D'Arcus"  writes:

> On Sun, Nov 28, 2021 at 12:19 PM Bruce D'Arcus  wrote:
>>
>> On Sun, Nov 28, 2021, 12:04 PM Rasmus  wrote:
>>
>
>>> However, I think it is currently too aggressive in overwriting styles.
>>>
>>> Could it perhaps accept any style that is given in
>>> ‘org-cite-biblatex-options’ / ‘org-latex-packages-alist’ and only
>>> overwrite it if another style is explicitly specified in the file to be
>>> exported?
>>
>> I raised a similar question awhile back, and am not sure the best approach.
>
> Here's Nicolas' response to my query, which I agree with, and which is
> consistent I think with what you are suggesting.
>
> https://lists.gnu.org/archive/html//emacs-orgmode/2021-10/msg00449.html
>
> Bruce

Thanks a lot for pointing me to that thread! 

Rasmus




Re: oc-biblatex too aggressive in replacing styles

2021-11-28 Thread Bruce D'Arcus
On Sun, Nov 28, 2021 at 12:19 PM Bruce D'Arcus  wrote:
>
> On Sun, Nov 28, 2021, 12:04 PM Rasmus  wrote:
>
>> However, I think it is currently too aggressive in overwriting styles.
>>
>> Could it perhaps accept any style that is given in
>> ‘org-cite-biblatex-options’ / ‘org-latex-packages-alist’ and only
>> overwrite it if another style is explicitly specified in the file to be
>> exported?
>
> I raised a similar question awhile back, and am not sure the best approach.

Here's Nicolas' response to my query, which I agree with, and which is
consistent I think with what you are suggesting.

https://lists.gnu.org/archive/html//emacs-orgmode/2021-10/msg00449.html

Bruce



Re: oc-biblatex too aggressive in replacing styles

2021-11-28 Thread Bruce D'Arcus
On Sun, Nov 28, 2021, 12:04 PM Rasmus  wrote:

However, I think it is currently too aggressive in overwriting styles.
>
> Could it perhaps accept any style that is given in
> ‘org-cite-biblatex-options’ / ‘org-latex-packages-alist’ and only
> overwrite it if another style is explicitly specified in the file to be
> exported?


I raised a similar question awhile back, and am not sure the best approach.

But to give some context:

The current styles in the core processors are designed for portability;
they are not natbib or biblatex or CSL styles, but org styles that can be
mapped to those targets in more-or-less consistent ways.

This is tricky to do, in part because of inconsistencies; in particular
between natbib and biblatex.

Which is to say, in some cases the style mappings might be enhanced or
modified.

But I agree there should be some kind to fallback, in particular for
biblatex, which has an insane amount of commands.

Bruce


oc-biblatex too aggressive in replacing styles

2021-11-28 Thread Rasmus
Hi,

Thanks for providing ox-biblatex.

It works very well and has replaced my local hacks for LaTeX
bibliographies.

However, I think it is currently too aggressive in overwriting styles.

Could it perhaps accept any style that is given in
‘org-cite-biblatex-options’ / ‘org-latex-packages-alist’ and only
overwrite it if another style is explicitly specified in the file to be
exported?

A bit like how ox-koma-letter looks for in-buffer changed values.

Currently, the only way I have found that I can specify that I want to use
biblatex-chicago is by issuing

#+cite_export: biblatex chicago-authordate

But this is a bit blunt as it overrules ‘org-cite-export-processors’ and
thus biblatex is used for e.g. text export (of course I can replicate
org-cite-export-processors with a macro that looks at the current export
backend).

(If you want I am happy to try to work on this)

Thanks,
Rasmus

Example:

See [cite/t:@OrgCitations]

#+bibliography: lit.bib

# only way to "actuallyhicago:
#+cite_export: biblatex chicago-authordate
* settings :noexport:
#+begin_src emacs-lisp
  (require 'oc-biblatex)
  ;; test 1:  style is gobbled 
  ;; (setq org-cite-biblatex-options "style=chicago-authordate, 
maxcitenames=2")
  ;; test 2:  style is gobbled
  ;; (setq org-latex-packages-alist '(("style=chicago-authordate, 
maxcitenames=2" "biblatex")))
  ;; test 3: biblatex and biblatex-chicago are both loaded
  ;; (setq org-latex-packages-alist '(("authordate" "biblatex-chicago")))
#+end_src


-- 
9000!