emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A minor suggestion about formatting citations


From: Bruce D'Arcus
Subject: Re: A minor suggestion about formatting citations
Date: Mon, 11 Oct 2021 12:55:44 -0400

On Mon, Oct 11, 2021 at 11:54 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > On Mon, Oct 11, 2021 at 10:28 AM John Kitchin <jkitchin@andrew.cmu.edu> 
> > wrote:
> >>
> >> you should probably trim each key, and re-add spaces where you want them 
> >> in the function that does these kinds of things.
> >
> > I realize that's an option, but something about that feels wrong to me.
> >
> > We're adding a single space as prefix, not because it's meaningful for
> > citation purposes (there actually is no prefix, though org-cite
> > interprets it as " "), but only so buffer formatting works correctly.
>
> 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.

> > And then presumably code needs to be added to the export machinery to
> > strip those empty affixes?
>
> I think they are ignored already. I didn't check though.

I just checked, and believe you are correct.

> > Am not saying the latter goal isn't important; just seems like the
> > side effect isn't ideal.
> >
> >> Maybe that should even be controlled by a defcustom that allows 0-1 spaces.
> >
> > You mean in org-cite? I think that'd be my preference, unless there's
> > a better solution to this issue.
>
> 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."

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?

> 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?

Bruce



reply via email to

[Prev in Thread] Current Thread [Next in Thread]