emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Denis Maier <denismaier@mailbox.org>
To: Bruce D'Arcus <bdarcus@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [wip-cite-new] Adjust punctuation around citations
Date: Mon, 14 Jun 2021 13:45:23 +0200	[thread overview]
Message-ID: <48377c85-5891-3658-d35b-cba1358878a8@mailbox.org> (raw)
In-Reply-To: <CAF-FPGOJZXNg_+jOEtp71poxTVxJ9zjzxRfbchL1MhUtz1igCw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6544 bytes --]

Below a few examples of what I mean.

WDYT? Am I missing something?

Denis
===========================================================
#+cite_export: csl
#+cite_export: csl 
"C:/Users/denis/Zotero/styles/chicago-note-bibliography.csl"
#+bibliography: test.bib

* Original source

"A quotation ending with a period."

"A quotation ending without punctuation"

* Author-date style input (= semantically non-strict input)

"A quotation ending with a period" [cite: @hoel-71-whole].

"A quotation ending without punctuation" [cite: @hoel-71-whole].

** author-date output with language: en-us
Expected: "A quotation ending with a period" (Hoel 1971).
Actual:   "A quotation ending with a period" (Hoel 1971).

Expected: "A quotation ending without punctuation" (Hoel 1971).
Actual:   "A quotation ending without punctuation" (Hoel 1971).

=> ok

** author-date output with language: de
Expected: "A quotation ending with a period" (Hoel 1971).
Actual:   "A quotation ending with a period" (Hoel 1971).

Expected: "A quotation ending without punctuation" (Hoel 1971).
Actual:   "A quotation ending without punctuation" (Hoel 1971).

=> ok

** note style output with language: en-us
Expected: "A quotation ending with a period."[1]
Actual:   "A quotation ending with a period."[1]

Expected: "A quotation ending without punctuation."[1]
Actual:   "A quotation ending without punctuation."[1]

=> ok

** note style output with language: en-gb or de
Expected: "A quotation ending with a period."[1]
Actual:   "A quotation ending with a period".[1]

Expected: "A quotation ending without punctuation".[1]
Actual:   "A quotation ending without punctuation".[1]

=> Here, we cannot distinguish between the two cases as we don't know 
whether punctuation appears in the original source.

* Note style input (=semantically strict input)

"A quotation ending with a period." [cite: @hoel-71-whole]

"A quotation ending without punctuation". [cite: @hoel-71-whole]

As the input preserves the location of punctuation in the original 
material, I'd say it should be much easier to deal with this. We don't 
have to add information which isn't in the input, but rather we'll just 
have to move any punctuation to after the citation object. Maybe I'm 
missing something, but to me this looks like a much simpler operation 
than going in the opposite direction.

Maybe we should stop talking about author date vs note style input, but 
rather about strict vs. non-strict input. And, I think that's the whole 
issue: going from strict to non-strict is easy while the other way is 
more complicated; at least, it would require some more efforts to 
support the last case (going from non-strict input to note style output 
with a language that requires strict output.
=========================================================================

Am 14.06.2021 um 00:47 schrieb Bruce D'Arcus:
> I'll let you two sort it out; I don't have a position.
>
> On Sun, Jun 13, 2021, 3:23 PM Denis Maier <denismaier@mailbox.org 
> <mailto:denismaier@mailbox.org>> wrote:
>
>
>>     Bruce D'Arcus <bdarcus@gmail.com <mailto:bdarcus@gmail.com>> hat
>>     am 14.06.2021 00:04 geschrieben:
>>
>>
>>     Nicolas explained the reverse is out of scope,
>     IIRC, it was out of scope ATM.
>>     and gave a reasonable explanation why (because much harder to
>>     reconstruct missing information IIRC).
>     That's where I disagree. I think the opposite is true.
>
>>     On Sun, Jun 13, 2021, 2:54 PM Denis Maier <denismaier@mailbox.org
>>     <mailto:denismaier@mailbox.org>> wrote:
>>
>>         Am 12.06.2021 um 11:39 schrieb Nicolas Goaziou:
>>         > Hello,
>>         >
>>         > Denis Maier <denismaier@mailbox.org
>>         <mailto:denismaier@mailbox.org>> writes:
>>         >
>>         >> Yes, good this is coming.
>>         >
>>         > As a step forward, I rebased wip-cite-new branch with more
>>         support for
>>         > note numbers handling.
>>         >
>>         > I added three customizable variables:
>>         >
>>         > - org-cite-adjust-note-numbers, which simply allows the
>>         user to toggle
>>         >    punctuation and note number moving (on by default).
>>         >
>>         > - org-cite-note-rules, which defines what rules to apply
>>         according to
>>         >    locale, expressed as a language tag, as in RFC 4646.
>>         >
>>         > - org-cite-punctuation-marks, which lists strings
>>         recognized as
>>         >    punctuation in the process.
>>         >
>>         > `csl' and `basic' processors now both make use of this.
>>         >
>>         > I'd appreciate some feedback, in particular about the
>>         docstrings of the
>>         > variables above. I focused on the "note numbers" topic
>>         instead of
>>         > "punctuation" since I found the latter too generic.
>>         >
>>         > Also, there are some points that may need to be discussed:
>>         >
>>         > - I'm not sure about the `org-cite-punctuation-marks'
>>         variable being
>>         >    global, i.e., not locale-specific.
>>         >
>>         > - There is no support for this in LaTeX-derived back-ends,
>>         because
>>         >    I don't know when a citation is going to become a
>>         footnote. As
>>         >    a reminder, there is no "\footcite" command in
>>         `biblatex' processor.
>>         >    OTOH, users might prefer using a more advanced
>>         mechanism, e.g.,
>>         >    csquotes.
>>         >
>>         > - It doesn't do anything special in quote blocks, because
>>         I'm still not
>>         >    sure there is something to do. AFAIU, special casing
>>         there only
>>         >    applies to author-date location, which out of the scope
>>         of this code.
>>         >
>>         > WDYT?
>>
>>         Ok, I've managed to test this a bit, and I think this looks
>>         pretty good
>>         so far.
>>
>>         The only question I'd still have is if this could somehow
>>         also cover the
>>         reverse situation (going from a note style to author-date).
>>         I've noticed
>>         that simply adding a new language rule doesn't work
>>         anymore---as opposed
>>         to my initial tests with earlier iterations of that
>>         mechanism. Seems
>>         like this mechanism is now only triggered when using a note
>>         based style.
>>
>>         Best,
>>         Denis
>>
>>         >
>>         > Regards,
>>         >
>>


[-- Attachment #2: Type: text/html, Size: 10180 bytes --]

  reply	other threads:[~2021-06-14 11:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 21:33 Nicolas Goaziou
2021-05-13 22:14 ` Denis Maier
2021-05-13 23:21 ` Bruce D'Arcus
2021-05-14  8:31   ` Denis Maier
2021-05-14 10:26   ` Nicolas Goaziou
2021-05-14 12:37     ` Bruce D'Arcus
2021-05-14  8:42 ` Denis Maier
2021-05-14 12:28   ` Bruce D'Arcus
2021-05-15 11:56   ` Nicolas Goaziou
2021-05-15 12:03     ` Bruce D'Arcus
2021-05-15 12:43       ` Bruce D'Arcus
2021-05-16 21:29     ` Denis Maier
2021-05-16 21:38       ` Bruce D'Arcus
2021-05-16 22:03         ` Denis Maier via General discussions about Org-mode.
2021-05-16 22:24           ` Bruce D'Arcus
2021-05-17  8:08             ` Denis Maier
2021-06-05 21:35               ` Nicolas Goaziou
2021-06-05 21:45                 ` Bruce D'Arcus
2021-06-05 22:00                   ` Denis Maier
2021-06-12  9:39                     ` Nicolas Goaziou
2021-06-12 21:41                       ` Bruce D'Arcus
2021-06-12 22:04                         ` Nicolas Goaziou
2021-06-12 22:12                           ` Bruce D'Arcus
2021-06-13  8:22                           ` Denis Maier
2021-06-13 21:54                       ` Denis Maier
2021-06-13 22:04                         ` Bruce D'Arcus
2021-06-13 22:23                           ` Denis Maier
2021-06-13 22:47                             ` Bruce D'Arcus
2021-06-14 11:45                               ` Denis Maier [this message]
2021-06-14 11:51                                 ` Denis Maier
2021-06-14 23:37                                 ` Bruce D'Arcus
2021-06-14 23:41                                   ` Bruce D'Arcus
2021-06-20  7:41                                   ` Nicolas Goaziou
2021-06-20 16:37                                     ` Bruce D'Arcus
2021-06-20 17:17                                       ` Nicolas Goaziou
2021-06-21  8:12                                     ` Denis Maier
2021-06-21  8:45                                       ` Nicolas Goaziou
2021-06-21  9:49                                         ` Denis Maier
2021-06-21 10:07                                         ` Denis Maier
2021-05-14 13:39 ` Denis Maier
2021-05-15 11:43   ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48377c85-5891-3658-d35b-cba1358878a8@mailbox.org \
    --to=denismaier@mailbox.org \
    --cc=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --subject='Re: [wip-cite-new] Adjust punctuation around citations' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this 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).