Re: [BUG] HTML-export citation suffix rendering with CSL [9.6 (9.6-??-bed47b437 @ /home/romeo/.emacs.d/.local/straight/build-28.2.50/org/)]

2023-02-28 Thread András Simonyi
Dear All,

On Wed, 25 Jan 2023 at 12:53, Ihor Radchenko  wrote:
> Confirmed, after replacing the .bib key with 
> abnarQuantifyingAttentionFlow2020a.
>
> András, may you take a look?

First of all, apologies for reacting that late, unfortunately, I've
had way less time to work on Org-mode and citeproc related problems
than I'd have wished or expected. I've managed to look into the issue
now and merged two PRs (#137 and #138) into citeproc-el's main branch
which should fix Problem 1.

As for the second problem, this is more difficult, because in this
case the behavior is along the expected lines:
the org-cite suffix ", Thm. 1" is further parsed by oc-csl into the
prefix ", Thm. " and the locator "1", with the implicit label "page".
If the used CSL style doesn't use a rendered label for pages (like
Chicago author-date) than an (admittedly ugly) workaround is to use an
explicit "page" label, that is,
[cite:@abnarQuantifyingAttentionFlow2020a page Thm. 1] is rendered as
(Abdar et al. 2021, Thm. 1) in Chicago.

We might want to change parsing to automatically parse everything as
CSL suffix if the org-cite suffix starts with a comma, but before
considering that I'd like to raise issue of treating Theorem/Thm. and
similar terms (Lemma etc.) as valid CSL locator labels in their own
right, which would be, I think, a more principled solution. I don't
know whether this was considered by CSL developers (CC-ing Bruce and
Denis).

best wishes,
András

> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 



Re: [BUG] HTML-export citation suffix rendering with CSL [9.6 (9.6-??-bed47b437 @ /home/romeo/.emacs.d/.local/straight/build-28.2.50/org/)]

2023-01-25 Thread Ihor Radchenko
Romeo Valentin  writes:

> To reproduce, please download the .org and .bib file (place .bib in
> /tmp), run org-html-export-to-html, and open the file e.g. with a browser.
> Notice that the citations, in particular the suffixes, are rendered 
> incorrectly.

Confirmed, after replacing the .bib key with abnarQuantifyingAttentionFlow2020a.

András, may you take a look?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] HTML-export citation suffix rendering with CSL [9.6 (9.6-??-bed47b437 @ /home/romeo/.emacs.d/.local/straight/build-28.2.50/org/)]

2023-01-24 Thread Romeo Valentin

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report? See

https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Dear maintainers,
attached is an org file which contains citations that are processed
through the CSL citation processor, and a .bib file for completeness.
The files are also included at the end of the email text.

I am trying to export the org file to HTML and point out a specific
theorem, however including a suffix in the citation breaks the HTML
rendering in two ways, as demonstrated in the files.

To reproduce, please download the .org and .bib file (place .bib in
/tmp), run org-html-export-to-html, and open the file e.g. with a browser.
Notice that the citations, in particular the suffixes, are rendered 
incorrectly.


Kind regards,
Romeo Valentin

PS: Recall the citation syntax from here [1] or here [2].
[1]: https://orgmode.org/manual/Citations.html
[2]: https://blog.tecosaur.com/tmio/2021-07-31-citations.html

Emacs  : GNU Emacs 28.2.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.36, cairo version 1.17.6)

 of 2023-01-07
Package: Org mode version 9.6 (9.6-??-bed47b437 @ 
/home/romeo/.emacs.d/.local/straight/build-28.2.50/org/)



*citeproc-bugreport.org:*
#+title: Citeproc Bugreport
#+bibliography: /tmp/citeproc-bugreport-references.bib
#+cite_export: csl

* Problem 1: textcite plus suffix
- Normal citation with suffix: 
[cite:@abnarQuantifyingAttentionFlow2020a, Thm. one]
- Broken (text)citation with suffix: 
[cite/t:@abnarQuantifyingAttentionFlow2020a, Thm. one]

  *This doesn't display correctly*

* Problem 2: citation with suffix and number
- Broken citation with suffix: 
[cite:@abnarQuantifyingAttentionFlow2020a, Thm. 1]

  *This doesn't display correctly*
- Notice that here a number comes last. I assume that the number is 
trying to be matched to a "locator", however there is no locator for 
"theorem".


#+print_bibliography:

*/tmp/citeproc-bugreport-references.bib:
*@article{abdarReviewUncertaintyQuantification2021,
  title = {A {{Review}} of {{Uncertainty Quantification}} in {{Deep 
Learning}}: {{Techniques}}, {{Applications}} and {{Challenges}}},
  shorttitle = {A {{Review}} of {{Uncertainty Quantification}} in 
{{Deep Learning}}},
  author = {Abdar, Moloud and Pourpanah, Farhad and Hussain, Sadiq and 
Rezazadegan, Dana and Liu, Li and Ghavamzadeh, Mohammad and Fieguth, 
Paul and Cao, Xiaochun and Khosravi, Abbas and Acharya, U. Rajendra and 
Makarenkov, Vladimir and Nahavandi, Saeid},

  date = {2021-12},
  journaltitle = {Information Fusion},
  eprint = {2011.06225},
  eprinttype = {arxiv},
  archiveprefix = {arXiv},
  keywords = {Computer Science - Artificial Intelligence,Computer 
Science - Computer Vision and Pattern Recognition,Computer Science - 
Machine Learning},

}

**#+title: Citeproc Bugreport
#+bibliography: /tmp/citeproc-bugreport-references.bib
#+cite_export: csl

* Problem 1: textcite plus suffix
- Normal citation with suffix: [cite:@abnarQuantifyingAttentionFlow2020a, Thm. one]
- Broken (text)citation with suffix: [cite/t:@abnarQuantifyingAttentionFlow2020a, Thm. one]
  *This doesn't display correctly*

* Problem 2: citation with suffix and number
- Broken citation with suffix: [cite:@abnarQuantifyingAttentionFlow2020a, Thm. 1]
  *This doesn't display correctly*
- Notice that here a number comes last. I assume that the number is trying to be matched to a "locator", however there is no locator for "theorem".

#+print_bibliography:
@article{abdarReviewUncertaintyQuantification2021,
  title = {A {{Review}} of {{Uncertainty Quantification}} in {{Deep Learning}}: {{Techniques}}, {{Applications}} and {{Challenges}}},
  shorttitle = {A {{Review}} of {{Uncertainty Quantification}} in {{Deep Learning}}},
  author = {Abdar, Moloud and Pourpanah, Farhad and Hussain, Sadiq and Rezazadegan, Dana and Liu, Li and Ghavamzadeh, Mohammad and Fieguth, Paul and Cao, Xiaochun and Khosravi, Abbas and Acharya, U. Rajendra and Makarenkov, Vladimir and Nahavandi, Saeid},
  date = {2021-12},
  journaltitle = {Information Fusion},
  shortjournal = {Information Fusion},
  eprint = {2011.06225},
  eprinttype = {arxiv},
  issn = {15662535},
  doi = {10.1016/j.inffus.2021.05.008},
  archiveprefix = {arXiv},
  keywords = {Computer Science - Artificial Intelligence,Computer Science - Computer Vision and Pattern Recognition,Computer Science - Machine Learning},
  file = {/home/romeo/Zotero/storage/3SA9DLUL/Abdar et al. - 2021 - A Review of Uncertainty Quantification in Deep Lea.pdf;/home/romeo/Zotero/storage/W8AUG4IY/Abdar et al. - 2021 - A Review of Uncertainty Quantification in Deep Lea.pdf;/home/romeo/Zotero/storage/V7MHDX4H/2011.html}
}
Title: Citeproc Bugreport






Citeproc Bugreport

Table of Contents


1. Problem 1: textcite plus suffix
2. Problem 2: citation with