* Citations and basic processor: examples of some things that don't work
@ 2023-11-28 20:22 William Denton
2023-11-29 10:08 ` Ihor Radchenko
0 siblings, 1 reply; 7+ messages in thread
From: William Denton @ 2023-11-28 20:22 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 712 bytes --]
Attached (I think attachments work on this list) is a small Org file that has a
table that sets out all the various options possible with the basic processor
for citations. Most work, but not the author style, and the caps and bare-caps
variants never do.
To test try changing parentheses to square brackets, for example
(cite/t/c:@friends) to [cite/t/c:@friends], and exporting. From what I see in
oc-basic.el, everything in the table should work. Changing the processor to use
CSL, they all do.
Thanks,
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 421.47 ppm (Mauna Loa Observatory, 2023-11-24)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-bibtex; name=Basic.bib, Size: 480 bytes --]
@book{chassellIntro,
title = {An Introduction to Programming in {{Emacs Lisp}}},
author = {Chassell, Robert},
date = {2023},
publisher = {{GNU Press}},
location = {Boston},
url = {https://www.gnu.org/software/emacs/manual/eintr.html}
}
@book{friends,
title = {{{LaTeX}} and Friends},
author = {van Dongen, M.R.C.},
date = {2012},
location = {Berlin},
publisher = {Springer},
doi = {10.1007/978-3-642-23816-1},
isbn = {9783642238161}
}
[-- Attachment #3: Type: text/plain, Size: 1822 bytes --]
#+title: Org citations with the basic processor
#+author:
#+date:
#+startup: showall align
#+options: num:nil ^:nil toc:nil
#+bibliography: Basic.bib
#+cite_export: basic
Something like =(cite//c:@friends)= is a citation that does not work. Test by changing the parentheses to square brackets and exporting.
#+attr_latex: :environment longtable
| style | variant | cite | result |
|---------------+----------------+---------+-----------------------|
| | | : | [cite:@friends] |
| | b (bare) | //b: | [cite//b:@friends] |
| | c (caps) | //c: | (cite//c:@friends) |
| a (author) | | /a: | (cite/a:@friends) |
| a (author) | c (caps) | /a/c: | (cite/a/c:@friends) |
| ft (note) | | /ft: | [cite/ft:@friends] |
| ft (note) | b (bare) | /ft/b: | [cite/ft/b:@friends] |
| ft (note) | bc (bare-caps) | /ft/bc: | (cite/ft/bc:@friends) |
| ft (note) | c (caps) | /ft/c: | (cite/ft/c:@friends) |
| n (nocite) | | /n: | [cite/n:@friends] |
| na (noauthor) | | /na: | [cite/na:@friends] |
| na (noauthor) | b (bare) | /na/b: | [cite/na/b:@friends] |
| nb (numeric) | | /nb: | [cite/nb:@friends] |
| t (text) | | /t: | [cite/t:@friends] |
| t (text) | b (bare) | /t/b: | [cite/t/b:@friends] |
| t (text) | bc (bare-caps) | /t/bc: | (cite/t/bc:@friends) |
| t (text) | c (caps) | /t/c: | (cite/t/c:@friends) |
* Bibliography
# You can specify "plain" or "numeric," and anything else turns into author-year.
#+print_bibliography:
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Citations and basic processor: examples of some things that don't work
2023-11-28 20:22 Citations and basic processor: examples of some things that don't work William Denton
@ 2023-11-29 10:08 ` Ihor Radchenko
2023-11-29 15:03 ` William Denton
0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2023-11-29 10:08 UTC (permalink / raw)
To: William Denton; +Cc: emacs-orgmode
William Denton <wtd@pobox.com> writes:
> Attached (I think attachments work on this list) is a small Org file that has a
> table that sets out all the various options possible with the basic processor
> for citations. Most work, but not the author style, and the caps and bare-caps
> variants never do.
Seems to work for me on main. Unless I miss something:
ASCII export:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
style variant cite result
────────────────────────────────────────────────────────────────────
: (van Dongen, M.R.C., 2012)
b (bare) //b: van Dongen, M.R.C., 2012
c (caps) //c: (Van Dongen, M.R.C., 2012)
a (author) /a: van Dongen, M.R.C.
a (author) c (caps) /a/c: Van Dongen, M.R.C.
ft (note) /ft: [1]
ft (note) b (bare) /ft/b: [2]
ft (note) bc (bare-caps) /ft/bc: [3]
ft (note) c (caps) /ft/c: [4]
n (nocite) /n:
na (noauthor) /na: (2012)
na (noauthor) b (bare) /na/b: 2012
nb (numeric) /nb: (1)
t (text) /t: van Dongen, M.R.C. (2012)
t (text) b (bare) /t/b: van Dongen, M.R.C. 2012
t (text) bc (bare-caps) /t/bc: Van Dongen, M.R.C. 2012
t (text) c (caps) /t/c: Van Dongen, M.R.C. (2012)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Citations and basic processor: examples of some things that don't work
2023-11-29 10:08 ` Ihor Radchenko
@ 2023-11-29 15:03 ` William Denton
2023-12-06 14:53 ` Ihor Radchenko
0 siblings, 1 reply; 7+ messages in thread
From: William Denton @ 2023-11-29 15:03 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]
On 29 November 2023, Ihor Radchenko wrote:
> William Denton <wtd@pobox.com> writes:
>
>> Attached (I think attachments work on this list) is a small Org file that has a
>> table that sets out all the various options possible with the basic processor
>> for citations. Most work, but not the author style, and the caps and bare-caps
>> variants never do.
>
> Seems to work for me on main. Unless I miss something:
>
> ASCII export:
Huh! I never tried ASCII export. I see HTML works, too.
Try LaTeX or ODT. My apologies, I should have specified that. It should throw
an error that starts like this:
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p (raw nil
#("van Dongen, M.R.C." 0 18 (:parent #3))))
capitalize((raw nil #("van Dongen, M.R.C." 0 18 (:parent #1))))
(if caps (capitalize a) a)
(org-cite-concat p (if caps (capitalize a) a) ", " y s)
(closure ((caps "c" "bc")) (p a y s) (org-cite-concat p (if caps (capitalize
a) a) ", " y s))(nil (raw nil #("van Dongen, M.R.C." 0 18 (:parent #2))) "2012"
nil)
funcall((closure ((caps "c" "bc")) (p a y s) (org-cite-concat p (if caps
(capitalize a) a) ", " y s)) nil (raw nil #("van Dongen, M.R.C." 0 18 (:parent
#3))) "2012" nil)
I can reproduce this by running "make repro" on main and then loading in that
basic.org file.
Thanks,
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 420.59 ppm (Mauna Loa Observatory, 2023-11-28)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Citations and basic processor: examples of some things that don't work
2023-11-29 15:03 ` William Denton
@ 2023-12-06 14:53 ` Ihor Radchenko
2023-12-06 21:17 ` William Denton
0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2023-12-06 14:53 UTC (permalink / raw)
To: William Denton; +Cc: emacs-orgmode
William Denton <wtd@pobox.com> writes:
>> ASCII export:
>
> Huh! I never tried ASCII export. I see HTML works, too.
>
> Try LaTeX or ODT. My apologies, I should have specified that. It should throw
> an error that starts like this:
>
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p (raw nil
> #("van Dongen, M.R.C." 0 18 (:parent #3))))
This should be working now.
Fixed.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Citations and basic processor: examples of some things that don't work
2023-12-06 14:53 ` Ihor Radchenko
@ 2023-12-06 21:17 ` William Denton
2023-12-07 10:34 ` Ihor Radchenko
0 siblings, 1 reply; 7+ messages in thread
From: William Denton @ 2023-12-06 21:17 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
Thanks for digging into this, Ihor. It exports now, but I'm afraid it's
doing too much capitaliztion.
A name like "van Dongen" should become "Van Dongen" when cited with a caps
variant, for example [cite/a/c:@friends]. This is turning it into "VAN DONGEN",
upcasing the whole string when it should just be doing the first letter.
I looked into how the CSL versions handles it. In citeproc-el's
citeproc-site.el there's this: "CAPITALIZE-FIRST is non-nil if the first word
of the rendered citation should be capitalized." That goes with this in
oc-csl.el in the definition of org-cite-csl--create-structure-params for doing a
/a/c author-caps citation:
((or "caps" "c") '(:mode author-only :capitalize-first t))
So for the basic exporter to do what the CSL one does, it should just capitalize
the first letter. I hope you don't mind opening up that file one last time for
this fix ...
Thanks,
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 420.04 ppm (Mauna Loa Observatory, 2023-12-01)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Citations and basic processor: examples of some things that don't work
2023-12-06 21:17 ` William Denton
@ 2023-12-07 10:34 ` Ihor Radchenko
2023-12-07 14:16 ` William Denton
0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2023-12-07 10:34 UTC (permalink / raw)
To: William Denton; +Cc: emacs-orgmode
William Denton <wtd@pobox.com> writes:
> Thanks for digging into this, Ihor. It exports now, but I'm afraid it's
> doing too much capitaliztion.
>
> A name like "van Dongen" should become "Van Dongen" when cited with a caps
> variant, for example [cite/a/c:@friends]. This is turning it into "VAN DONGEN",
> upcasing the whole string when it should just be doing the first letter.
This is another, new bug I introduced while fixing the previous one :)
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a59193e47
It would be nice to have proper tests for oc-basic and other oc-* backends.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Citations and basic processor: examples of some things that don't work
2023-12-07 10:34 ` Ihor Radchenko
@ 2023-12-07 14:16 ` William Denton
0 siblings, 0 replies; 7+ messages in thread
From: William Denton @ 2023-12-07 14:16 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
On 7 December 2023, Ihor Radchenko wrote:
> This is another, new bug I introduced while fixing the previous one :)
> Fixed, on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a59193e47
Fantastic! Thanks. Now it all works.
> It would be nice to have proper tests for oc-basic and other oc-* backends.
I'll have a look in there and see if I can add some.
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
CO₂: 420.04 ppm (Mauna Loa Observatory, 2023-12-01)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-07 14:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28 20:22 Citations and basic processor: examples of some things that don't work William Denton
2023-11-29 10:08 ` Ihor Radchenko
2023-11-29 15:03 ` William Denton
2023-12-06 14:53 ` Ihor Radchenko
2023-12-06 21:17 ` William Denton
2023-12-07 10:34 ` Ihor Radchenko
2023-12-07 14:16 ` William Denton
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).