emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Bruce D'Arcus" <bdarcus@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>,
	John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: A minor suggestion about formatting citations
Date: Wed, 13 Oct 2021 14:51:31 +0200	[thread overview]
Message-ID: <8735p584vg.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAF-FPGMZbjeNkLBKjg28h1qjuFxCbjtVyxZVQiM5n-r6EcSJtA@mail.gmail.com> (Bruce D'Arcus's message of "Mon, 11 Oct 2021 12:55:44 -0400")


"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> On Mon, Oct 11, 2021 at 11:54 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

>> I don't think that's totally true. The additional space makes sense
>> typographically, in particular when some suffix is associated to the
>> key.
> Can you give an example of what you mean here? I can't think of one
> off the top-of-my-head.

I mean that it seems natural to write, e.g.,

 [cite:@doe21 p. 1; @doe99]

instead of 

  [cite:@doe21 p. 1;@doe99]

>> Org Cite is unrelated to this. One could as well have inserted spaces
>> manually, i.e., without calling `org-cite-insert' at all.
> I know; but you changed the default behavior of org-cite-make-insert-processor.
> The OP asked if there were any implications for this generally, and
> I'm just saying "yes, there is."

OK. Then, we are in a violent agreement. :)

> You do have to trim the whitespace on either side of the key, since
> the space is the delimiter. I guess it's not possible for the citation
> parser to ignore the other whitespace?

I'm not sure to understand your question. The space is not the
delimiter; the semicolon is.

For now, the whitespaces are significant for the parser, barring the
leading and trailing ones. It seemed useful for export back-end and
citation processor combinations unable to handle punctuation
automatically (e.g., HTML + oc-basic). I can't tell if they should be
ignored instead.

>> The functions responsible for swapping citations ought to cope with this situation
>> too.
> So check if the content of an affix, for example, is " " (rather than
> whether there's an affix), and adjust accordingly?

I don't think you need to check affixes when cycling citation
references. You could split at ";", trim, re-order, and re-build the
contents inserting "; " between each reference.

Nicolas Goaziou

      reply	other threads:[~2021-10-13 12:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10 23:09 A minor suggestion about formatting citations Vikas Rawal
2021-10-11  7:38 ` Eric S Fraga
2021-10-11  9:40 ` Nicolas Goaziou
2021-10-11 13:38   ` Bruce D'Arcus
2021-10-11 14:28     ` John Kitchin
2021-10-11 14:54       ` Bruce D'Arcus
2021-10-11 15:54         ` Nicolas Goaziou
2021-10-11 16:55           ` Bruce D'Arcus
2021-10-13 12:51             ` Nicolas Goaziou [this message]

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:

  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=8735p584vg.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=bdarcus@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).