Re: [BUG] Citations: Locator treated as prefix [9.5 (release_9.5-225-g494c20 @ /home/quintus/.emacs.d/org-mode/lisp/)]

2021-11-13 Thread M . ‘quintus’ Gülker
Am Freitag, dem 12. November 2021 schrieb Nicolas Goaziou:
> Indeed. I forgot to say you also need to re-evaluate
> ‘org-cite-csl--label-regexp’ definition (in "oc-csl.el"), in order to
> refresh the locator regexp matched against.

Ah, I see. Indeed, re-evaluating that definition after amending
`org-cite-csl--label-alist' results in the desired result on export.

Thanks!

  -quintus

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [BUG] Citations: Locator treated as prefix [9.5 (release_9.5-225-g494c20 @ /home/quintus/.emacs.d/org-mode/lisp/)]

2021-11-12 Thread Nicolas Goaziou
M. ‘quintus’ Gülker  writes:

>> I don’t think it is reasonable to expect this variable to contain every
>> identifier in every language. It may be a good idea to turn the variable
>> above into a defcustom, thus.
>
> Probably, but I will leave this to you. Just using the standard
> “chapter” selector resolves my problem here.

Good. I’m not sure but I think it would be more natural if locators
could be expressed in user’s language. I will let actual users chime in.

>> Meanwhile, you can test again after evaluating:
>>
>>   (push '("Kap." . "chapter") org-cite-csl--label-alist)
>
> Interestingly, doing this does not make it work for me, the “Kap.” still
> is displays at the beginning.

Indeed. I forgot to say you also need to re-evaluate
‘org-cite-csl--label-regexp’ definition (in "oc-csl.el"), in order to
refresh the locator regexp matched against.

Regards,



Re: [BUG] Citations: Locator treated as prefix [9.5 (release_9.5-225-g494c20 @ /home/quintus/.emacs.d/org-mode/lisp/)]

2021-11-12 Thread M . ‘quintus’ Gülker
Am Freitag, dem 12. November 2021 schrieb Nicolas Goaziou:
> This is because "Kap." is not known as a locator identifier. See
> ‘org-cite-csl--label-alist’ for the full list of such identifiers.

You are right, sir. “Kap.” is German for “chapter” and CSL does have a
localisable chapter locator. Using

Das ist ein Test [cite:@redeker2020itr chapter A Rn. 72, Suffixtext hier]

results indeed in the desired

1 Redeker, IT-Recht, 7. Aufl. (2020), Kap. A Rn. 72 Suffixtext hier

. Thanks for pointing it out.

> I don’t think it is reasonable to expect this variable to contain every
> identifier in every language. It may be a good idea to turn the variable
> above into a defcustom, thus.

Probably, but I will leave this to you. Just using the standard
“chapter” selector resolves my problem here.

> Meanwhile, you can test again after evaluating:
>
>   (push '("Kap." . "chapter") org-cite-csl--label-alist)

Interestingly, doing this does not make it work for me, the “Kap.” still
is displays at the beginning.

  -quintus

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [BUG] Citations: Locator treated as prefix [9.5 (release_9.5-225-g494c20 @ /home/quintus/.emacs.d/org-mode/lisp/)]

2021-11-12 Thread Nicolas Goaziou
Hello,

M. ‘quintus’ Gülker  writes:

> take this org file `mwe.org':
>
> #+TITLE: Test
> #+AUTHOR: Testauthor
>
> #+LANGUAGE: de
> #+bibliography: /tmp/mwe/mwe.bib
>
> #+cite_export: csl /tmp/mwe/juristische-schulung.csl
>
> Das ist ein Test [cite:@redeker2020itr Kap. A Rn. 72, Suffixtext hier]
>
> with this `mwe.bib' Biblatex file:
>
> @Book{redeker2020itr,
> author   = {Helmut Redeker},
> title= {IT-Recht},
> year  = {2020},
> edition   = {7},
> publisher = {C.H. Beck},
> location  = {München},
> langid= {ngerman}}
>
> `juristische-schulung.el' is 
> https://github.com/citation-style-language/styles/blob/e22b8a566bad9b4c7f52720f60dd875057a5d210/juristische-schulung.csl
>
> When this is exported to HTML, the locator `Kap. A Rn. 72' is split and
> partly taken as the prefix. It exports to this:
>
> 1 Kap. A Rn.  Redeker, IT-Recht, 7. Aufl. (2020), 72 Suffixtext hier
>
> This is incorrect; it should export to:
>
> 1 Redeker, IT-Recht, 7. Aufl. (2020), Kap. A Rn. 72 Suffixtext
> hier

This is because "Kap." is not known as a locator identifier. See
‘org-cite-csl--label-alist’ for the full list of such identifiers.

I don’t think it is reasonable to expect this variable to contain every
identifier in every language. It may be a good idea to turn the variable
above into a defcustom, thus.

Meanwhile, you can test again after evaluating:

  (push '("Kap." . "chapter") org-cite-csl--label-alist)

Regards,
-- 
Nicolas Goaziou