emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-cite styles don't allow * in them
@ 2022-04-03 21:06 John Kitchin
  2022-04-05 15:56 ` Bruce D'Arcus
  0 siblings, 1 reply; 21+ messages in thread
From: John Kitchin @ 2022-04-03 21:06 UTC (permalink / raw)
  To: org-mode-email

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

I was looking into using latex commands as styles in org-cite, e.g.

[cite/citet:@key]. That example works fine, but [cite/citet*:@key] is not
allowed. Could that be allowed?



John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-03 21:06 org-cite styles don't allow * in them John Kitchin
@ 2022-04-05 15:56 ` Bruce D'Arcus
  2022-04-05 16:11   ` John Kitchin
  2022-04-07  4:17   ` Ihor Radchenko
  0 siblings, 2 replies; 21+ messages in thread
From: Bruce D'Arcus @ 2022-04-05 15:56 UTC (permalink / raw)
  To: John Kitchin; +Cc: org-mode-email

On Sun, Apr 3, 2022 at 5:07 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>
> I was looking into using latex commands as styles in org-cite, e.g.
>
> [cite/citet:@key]. That example works fine, but [cite/citet*:@key] is not allowed. Could that be allowed?

I have no insight into the restriction, but I hope it can be removed.

It occurs to me in that scenario it should be easy to write a function
that allows users to toggle between the two sets of styles: the direct
latex ones, and the more general default org-cite ones.

Bruce


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-05 15:56 ` Bruce D'Arcus
@ 2022-04-05 16:11   ` John Kitchin
  2022-04-05 17:41     ` Bruce D'Arcus
  2022-04-07  4:17   ` Ihor Radchenko
  1 sibling, 1 reply; 21+ messages in thread
From: John Kitchin @ 2022-04-05 16:11 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email

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

Would you find it suitable to use [cite/command:pre @key post] in general?
For portability, I suppose there could be a defcustom mapping if one wanted
to leverage the oc-csl library with pretty minimal effort.

I think two things need to be addressed to fix that. First is allowing a *
in the style/variant section; there are probably 17 or so of these commands
in natbib/biblatex. Second is fixing org-activate-link so that link
activation functions don't get called on something like [cite/citet:@key].
This is necessary for org-ref and org-cite to co-exist, but also other
packages or users might also define links like cite:.


John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Tue, Apr 5, 2022 at 11:56 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:

> On Sun, Apr 3, 2022 at 5:07 PM John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
> >
> > I was looking into using latex commands as styles in org-cite, e.g.
> >
> > [cite/citet:@key]. That example works fine, but [cite/citet*:@key] is
> not allowed. Could that be allowed?
>
> I have no insight into the restriction, but I hope it can be removed.
>
> It occurs to me in that scenario it should be easy to write a function
> that allows users to toggle between the two sets of styles: the direct
> latex ones, and the more general default org-cite ones.
>
> Bruce
>

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-05 16:11   ` John Kitchin
@ 2022-04-05 17:41     ` Bruce D'Arcus
  0 siblings, 0 replies; 21+ messages in thread
From: Bruce D'Arcus @ 2022-04-05 17:41 UTC (permalink / raw)
  To: John Kitchin; +Cc: org-mode-email

On Tue, Apr 5, 2022 at 12:11 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>
> Would you find it suitable to use [cite/command:pre @key post] in general?

I think it's a reasonable approach that would appeal to some users who
would treat org as a front-end to LaTeX primarily, and obviously
previous org-ref users, and that it's better than supporting this in a
parallel but incompatible syntax.

> For portability, I suppose there could be a defcustom mapping if one wanted to leverage the oc-csl library with pretty minimal effort.

Right.

I'm not sure what the precise right solution is, where, but something like that.

oc-biblatex, for example, has the new org-cite-biblatex-styles
defcustom, whose list entries look like:

("author"   "caps"      "Citeauthor*" nil         nil)

So with that, a oc-biblatex user can already do this presumably.

("Citeauthor*"   nil      "Citeauthor*" nil         nil)

But could also have a new org-ref processor with a simpler defcustom like:

("Citeauthor*" . "author/caps")

> I think two things need to be addressed to fix that. First is allowing a * in the style/variant section; there are probably 17 or so of these commands in natbib/biblatex. Second is fixing org-activate-link so that link activation functions don't get called on something like [cite/citet:@key]. This is necessary for org-ref and org-cite to co-exist, but also other packages or users might also define links like cite:.

+1

Bruce


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-05 15:56 ` Bruce D'Arcus
  2022-04-05 16:11   ` John Kitchin
@ 2022-04-07  4:17   ` Ihor Radchenko
  2022-04-07 11:30     ` John Kitchin
  2022-04-21  8:06     ` Nicolas Goaziou
  1 sibling, 2 replies; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-07  4:17 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email, John Kitchin

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

> On Sun, Apr 3, 2022 at 5:07 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>>
>> I was looking into using latex commands as styles in org-cite, e.g.
>>
>> [cite/citet:@key]. That example works fine, but [cite/citet*:@key] is not allowed. Could that be allowed?
>
> I have no insight into the restriction, but I hope it can be removed.

I do like the proposal in general, but I can see a potential issue for
users. Constructs like "word*:" can be recognised as a valid bold
emphasis ending. For example:

>>> Some *bold emphasis with reference [cite/citet*:@key] will end
>>> at "citet*", but not here*.

Note that inserting zero-width space will not only be awkward here, but
also breaks parser: e.g. [cite/cite<zwspace>t:@key] is not currently
recognised as a citation.

Best,
Ihor


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-07  4:17   ` Ihor Radchenko
@ 2022-04-07 11:30     ` John Kitchin
  2022-04-16 16:29       ` Bruce D'Arcus
  2022-04-21  8:06     ` Nicolas Goaziou
  1 sibling, 1 reply; 21+ messages in thread
From: John Kitchin @ 2022-04-07 11:30 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: org-mode-email, Bruce D'Arcus


[-- Attachment #1.1: Type: text/plain, Size: 1513 bytes --]

On Thu, Apr 7, 2022 at 12:17 AM Ihor Radchenko <yantar92@gmail.com> wrote:

> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> > On Sun, Apr 3, 2022 at 5:07 PM John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
> >>
> >> I was looking into using latex commands as styles in org-cite, e.g.
> >>
> >> [cite/citet:@key]. That example works fine, but [cite/citet*:@key] is
> not allowed. Could that be allowed?
> >
> > I have no insight into the restriction, but I hope it can be removed.
>
> I do like the proposal in general, but I can see a potential issue for
> users. Constructs like "word*:" can be recognised as a valid bold
> emphasis ending. For example:
>
> >>> Some *bold emphasis with reference [cite/citet*:@key] will end
> >>> at "citet*", but not here*.
>

That is a fair point, and also an issue with links that have * in them
(which is also already allowed). I can't say it has ever been reported as
an issue though.

>
> Note that inserting zero-width space will not only be awkward here, but
> also breaks parser: e.g. [cite/cite<zwspace>t:@key] is not currently
> recognised as a citation.


A less awkward solution (IMO) would be to use an entity like ⋆.  It is
straightforward to add that to the org-element-citation-prefix-re. Then I
see something like this.

[image: image.png]
I don't know how difficult it would be to improve the emphasis handling, it
seems like the start/end markers should not cross some element boundaries.


>
> Best,
> Ihor
>

[-- Attachment #1.2: Type: text/html, Size: 2431 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 31927 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-07 11:30     ` John Kitchin
@ 2022-04-16 16:29       ` Bruce D'Arcus
  2022-04-17  8:42         ` Ihor Radchenko
  0 siblings, 1 reply; 21+ messages in thread
From: Bruce D'Arcus @ 2022-04-16 16:29 UTC (permalink / raw)
  To: John Kitchin; +Cc: org-mode-email, Ihor Radchenko


[-- Attachment #1.1: Type: text/plain, Size: 1764 bytes --]

On Thu, Apr 7, 2022 at 7:30 AM John Kitchin <jkitchin@andrew.cmu.edu> wrote:

> On Thu, Apr 7, 2022 at 12:17 AM Ihor Radchenko <yantar92@gmail.com> wrote:
>
>> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>>
>> > On Sun, Apr 3, 2022 at 5:07 PM John Kitchin <jkitchin@andrew.cmu.edu>
>> wrote:
>> >>
>> >> I was looking into using latex commands as styles in org-cite, e.g.
>> >>
>> >> [cite/citet:@key]. That example works fine, but [cite/citet*:@key] is
>> not allowed. Could that be allowed?
>> >
>> > I have no insight into the restriction, but I hope it can be removed.
>>
>> I do like the proposal in general, but I can see a potential issue for
>> users. Constructs like "word*:" can be recognised as a valid bold
>> emphasis ending. For example:
>>
>> >>> Some *bold emphasis with reference [cite/citet*:@key] will end
>> >>> at "citet*", but not here*.
>>
>
> That is a fair point, and also an issue with links that have * in them
> (which is also already allowed). I can't say it has ever been reported as
> an issue though.
>
>>
>> Note that inserting zero-width space will not only be awkward here, but
>> also breaks parser: e.g. [cite/cite<zwspace>t:@key] is not currently
>> recognised as a citation.
>
>
> A less awkward solution (IMO) would be to use an entity like ⋆.  It is
> straightforward to add that to the org-element-citation-prefix-re. Then I
> see something like this.
>
> [image: image.png]
> I don't know how difficult it would be to improve the emphasis handling,
> it seems like the start/end markers should not cross some element
> boundaries.
>

So Ihor, is there any problem with John's proposed change here?

Seems sensible to me.

Bruce



>
>
>>
>> Best,
>> Ihor
>>
>

[-- Attachment #1.2: Type: text/html, Size: 3675 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 31927 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-16 16:29       ` Bruce D'Arcus
@ 2022-04-17  8:42         ` Ihor Radchenko
  2022-04-17 12:14           ` John Kitchin
  0 siblings, 1 reply; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-17  8:42 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email, John Kitchin

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

>> A less awkward solution (IMO) would be to use an entity like ⋆.  It is
>> straightforward to add that to the org-element-citation-prefix-re. Then I
>> see something like this.
>
> So Ihor, is there any problem with John's proposed change here?

I am not a big fan of using unicode characters, but otherwise I have no
objections and no better ideas (except a general desire to solve similar
parser issues more generally).

However, I am not org-cite's maintainer. So, I would prefer to hear from
Nicolas before implementing anything myself.

Best,
Ihor


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-17  8:42         ` Ihor Radchenko
@ 2022-04-17 12:14           ` John Kitchin
  2022-04-17 13:18             ` Ihor Radchenko
  0 siblings, 1 reply; 21+ messages in thread
From: John Kitchin @ 2022-04-17 12:14 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: org-mode-email, Bruce D'Arcus

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

I am also not a fan of using Unicode here and prefer a simple ascii
asterisk. That works fine for me so far, but I am not a heavy user of bold
markup and citations.

As I mentioned there is the same problem for links, and in the last 10
years I can’t recall an issue being reported with bold.

On Sun, Apr 17, 2022 at 4:41 AM Ihor Radchenko <yantar92@gmail.com> wrote:

> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
> >> A less awkward solution (IMO) would be to use an entity like ⋆.  It is
> >> straightforward to add that to the org-element-citation-prefix-re. Then
> I
> >> see something like this.
> >
> > So Ihor, is there any problem with John's proposed change here?
>
> I am not a big fan of using unicode characters, but otherwise I have no
> objections and no better ideas (except a general desire to solve similar
> parser issues more generally).
>
> However, I am not org-cite's maintainer. So, I would prefer to hear from
> Nicolas before implementing anything myself.
>
> Best,
> Ihor
>
-- 
John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-17 12:14           ` John Kitchin
@ 2022-04-17 13:18             ` Ihor Radchenko
  2022-04-17 14:24               ` John Kitchin
  0 siblings, 1 reply; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-17 13:18 UTC (permalink / raw)
  To: John Kitchin; +Cc: org-mode-email, Bruce D'Arcus

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> I am also not a fan of using Unicode here and prefer a simple ascii
> asterisk. That works fine for me so far, but I am not a heavy user of bold
> markup and citations.

What about something like [cite/citet*/:@key]?
"*/" is not recognised as bold ending.

> As I mentioned there is the same problem for links, and in the last 10
> years I can’t recall an issue being reported with bold.

This is because links containing "\\*[ -.,;:!?'")}\\[]" match are
extremely rare.

In contrast, [cite/citet*:@key] is likely to be used fairly frequently
and has much higher chance to break things.

Best,
Ihor



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-17 13:18             ` Ihor Radchenko
@ 2022-04-17 14:24               ` John Kitchin
  2022-04-18  9:09                 ` Ihor Radchenko
  0 siblings, 1 reply; 21+ messages in thread
From: John Kitchin @ 2022-04-17 14:24 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: org-mode-email, Bruce D'Arcus

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

On Sun, Apr 17, 2022 at 9:18 AM Ihor Radchenko <yantar92@gmail.com> wrote:

> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
> > I am also not a fan of using Unicode here and prefer a simple ascii
> > asterisk. That works fine for me so far, but I am not a heavy user of
> bold
> > markup and citations.
>
> What about something like [cite/citet*/:@key]?
> "*/" is not recognised as bold ending.


That is a great solution when you want to have bold, and it would be
optional if you don’t use bold there.  You still would need to add * to the
cite pattern.

>

>
> > As I mentioned there is the same problem for links, and in the last 10
> > years I can’t recall an issue being reported with bold.
>
> This is because links containing "\\*[ -.,;:!?'")}\\[]" match are
> extremely rare.
>
> In contrast, [cite/citet*:@key] is likely to be used fairly frequently
> and has much higher chance to break things.


We have had a citet*:key link (and all the other * variants) for a long
time in org-ref, with no reported issues I can recall.


>
> Best,
> Ihor
>
> --
John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-17 14:24               ` John Kitchin
@ 2022-04-18  9:09                 ` Ihor Radchenko
  2022-04-18 10:25                   ` Bruce D'Arcus
  0 siblings, 1 reply; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-18  9:09 UTC (permalink / raw)
  To: John Kitchin; +Cc: org-mode-email, Bruce D'Arcus

John Kitchin <jkitchin@andrew.cmu.edu> writes:

>> In contrast, [cite/citet*:@key] is likely to be used fairly frequently
>> and has much higher chance to break things.
>
>
> We have had a citet*:key link (and all the other * variants) for a long
> time in org-ref, with no reported issues I can recall.

I respect your experience in this regard. If the discussed issue is
uncommon in practice, we may simply provide citet* and similar styles +
fallback citet*/ as an alias. The citet* will be the default while
citet*/ may be suggested, say, by org-lint if we add a new checker for
this.

P.S. Thinking more about org-lint, I imagine that it could be a good
practice to run org-lint before every export. For example, it can save
people from a common problem with handling broken links during export.

Best,
Ihor


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-18  9:09                 ` Ihor Radchenko
@ 2022-04-18 10:25                   ` Bruce D'Arcus
  2022-04-19  2:59                     ` Ihor Radchenko
  0 siblings, 1 reply; 21+ messages in thread
From: Bruce D'Arcus @ 2022-04-18 10:25 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: org-mode-email, John Kitchin

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

On Mon, Apr 18, 2022, 5:08 AM Ihor Radchenko <yantar92@gmail.com> wrote:

> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
> >> In contrast, [cite/citet*:@key] is likely to be used fairly frequently
> >> and has much higher chance to break things.
> >
> >
> > We have had a citet*:key link (and all the other * variants) for a long
> > time in org-ref, with no reported issues I can recall.
>
> I respect your experience in this regard. If the discussed issue is
> uncommon in practice, we may simply provide citet* and similar styles +
> fallback citet*/ as an alias. The citet* will be the default while
> citet*/ may be suggested, say, by org-lint if we add a new checker for
> this.
>

Just to clarify, I don't believe the discussion is to add such styles to
the included org-cite processors (which already support such
functionality), but rather to allow it, for example for third party ones;
say a hypothetical org-ref one.

Bruce



> P.S. Thinking more about org-lint, I imagine that it could be a good
> practice to run org-lint before every export. For example, it can save
> people from a common problem with handling broken links during export.
>
> Best,
> Ihor
>

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-18 10:25                   ` Bruce D'Arcus
@ 2022-04-19  2:59                     ` Ihor Radchenko
  0 siblings, 0 replies; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-19  2:59 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email, John Kitchin

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

> Just to clarify, I don't believe the discussion is to add such styles to
> the included org-cite processors (which already support such
> functionality), but rather to allow it, for example for third party ones;
> say a hypothetical org-ref one.

Sure. However, the discussed problem should be supported by Org core one
way or another.

Consider a third-party processor that introduces citet* style.
Then, some user happens to encounter the discussed edge case with
*bold [cite:citet*:@key}

If the third-party processor does not also have citet*/ variant, what
can the user do? Be stuck?

From Org's point of view, we listed 2 possible approaches:

1. Allow unicode ⋆ star in citation styles
2. Allow ordinary * star in citation styles + Make oc.el recognise
   style* as an alias to style*/ + make org-lint warn about the edge
   case.

Best,
Ihor


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-07  4:17   ` Ihor Radchenko
  2022-04-07 11:30     ` John Kitchin
@ 2022-04-21  8:06     ` Nicolas Goaziou
  2022-04-21 10:09       ` Ihor Radchenko
                         ` (2 more replies)
  1 sibling, 3 replies; 21+ messages in thread
From: Nicolas Goaziou @ 2022-04-21  8:06 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: org-mode-email, Bruce D'Arcus, John Kitchin

Hello,

Ihor Radchenko <yantar92@gmail.com> writes:

> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
>> On Sun, Apr 3, 2022 at 5:07 PM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>>>
>>> I was looking into using latex commands as styles in org-cite, e.g.
>>>
>>> [cite/citet:@key]. That example works fine, but [cite/citet*:@key] is not allowed. Could that be allowed?
>>
>> I have no insight into the restriction, but I hope it can be removed.
>
> I do like the proposal in general, but I can see a potential issue for
> users. Constructs like "word*:" can be recognised as a valid bold
> emphasis ending. For example:
>
>>>> Some *bold emphasis with reference [cite/citet*:@key] will end
>>>> at "citet*", but not here*.

Note the issue already exists for italics and underline markers.

> Note that inserting zero-width space will not only be awkward here, but
> also breaks parser: e.g. [cite/cite<zwspace>t:@key] is not currently
> recognised as a citation.

I think the zero-width space can be inserted on the other side.

If there's no objection, I'll add asterisk character to the list of
allowed characters in citation style.

More generally, what other characters should be allowed ?

Regards,
-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-21  8:06     ` Nicolas Goaziou
@ 2022-04-21 10:09       ` Ihor Radchenko
  2022-04-21 11:28         ` Nicolas Goaziou
  2022-04-22 12:42       ` Bruce D'Arcus
  2022-05-22 15:51       ` Bruce D'Arcus
  2 siblings, 1 reply; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-21 10:09 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode-email, Bruce D'Arcus, John Kitchin

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> Note that inserting zero-width space will not only be awkward here, but
>> also breaks parser: e.g. [cite/cite<zwspace>t:@key] is not currently
>> recognised as a citation.
>
> I think the zero-width space can be inserted on the other side.

Could you elaborate? In the following example, inserting zero-width
space at *<z-w-spc>bold will break the intended bold emphasis *bold ... here*.

Some *bold emphasis with reference [cite/citet*:@key] will end at "citet*", but not here*.

Best,
Ihor


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-21 10:09       ` Ihor Radchenko
@ 2022-04-21 11:28         ` Nicolas Goaziou
  2022-04-21 13:40           ` Ihor Radchenko
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolas Goaziou @ 2022-04-21 11:28 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Bruce D'Arcus, org-mode-email, John Kitchin

Ihor Radchenko <yantar92@gmail.com> writes:

>> I think the zero-width space can be inserted on the other side.
>
> Could you elaborate? In the following example, inserting zero-width
> space at *<z-w-spc>bold will break the intended bold emphasis *bold ... here*.
>
> Some *bold emphasis with reference [cite/citet*:@key] will end at "citet*", but not here*.

I had your

  *bold [cite:citet*:@key]

example in mind. Sure, if bold jumps across the citation this is
different. I'm not sure this is something that is frequent enough to
worry.

Besides, the suggested idea of using [cite/citet*/:@key] for
disambiguation seems fine (as long as they are implemented).

Regards,


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-21 11:28         ` Nicolas Goaziou
@ 2022-04-21 13:40           ` Ihor Radchenko
  0 siblings, 0 replies; 21+ messages in thread
From: Ihor Radchenko @ 2022-04-21 13:40 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bruce D'Arcus, org-mode-email, John Kitchin

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> I had your
>
>   *bold [cite:citet*:@key]
>
> example in mind. Sure, if bold jumps across the citation this is
> different. I'm not sure this is something that is frequent enough to
> worry.

According to Prof. Kitchin, it is not frequent. However, if it does
happen it will be very annoying to deal with.

> Besides, the suggested idea of using [cite/citet*/:@key] for
> disambiguation seems fine (as long as they are implemented).

Maybe we can make trailing "/" alias of the same style without slash?
(e.g. cite/citet*/ is treated as alias of cite/citet* even if
cite/citet*/ is not explicitly defined by the processor) I do not think
that we can afford to rely on external processors to take care about
this.

best,
Ihor



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-21  8:06     ` Nicolas Goaziou
  2022-04-21 10:09       ` Ihor Radchenko
@ 2022-04-22 12:42       ` Bruce D'Arcus
  2022-04-22 13:30         ` John Kitchin
  2022-05-22 15:51       ` Bruce D'Arcus
  2 siblings, 1 reply; 21+ messages in thread
From: Bruce D'Arcus @ 2022-04-22 12:42 UTC (permalink / raw)
  To: org-mode-email

On Thu, Apr 21, 2022 at 4:06 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> If there's no objection, I'll add asterisk character to the list of
> allowed characters in citation style.
>
> More generally, what other characters should be allowed ?

This request is to accommodate latex command names, and the only
non-letter characters those use are asterisks.

I think it's fine to stop there.

Bruce


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-22 12:42       ` Bruce D'Arcus
@ 2022-04-22 13:30         ` John Kitchin
  0 siblings, 0 replies; 21+ messages in thread
From: John Kitchin @ 2022-04-22 13:30 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: org-mode-email

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

I agree.
John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Fri, Apr 22, 2022 at 8:57 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:

> On Thu, Apr 21, 2022 at 4:06 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
> wrote:
>
> > If there's no objection, I'll add asterisk character to the list of
> > allowed characters in citation style.
> >
> > More generally, what other characters should be allowed ?
>
> This request is to accommodate latex command names, and the only
> non-letter characters those use are asterisks.
>
> I think it's fine to stop there.
>
> Bruce
>
>

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: org-cite styles don't allow * in them
  2022-04-21  8:06     ` Nicolas Goaziou
  2022-04-21 10:09       ` Ihor Radchenko
  2022-04-22 12:42       ` Bruce D'Arcus
@ 2022-05-22 15:51       ` Bruce D'Arcus
  2 siblings, 0 replies; 21+ messages in thread
From: Bruce D'Arcus @ 2022-05-22 15:51 UTC (permalink / raw)
  To: Ihor Radchenko, Bruce D'Arcus, org-mode-email, John Kitchin

On Thu, Apr 21, 2022 at 4:06 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> If there's no objection, I'll add asterisk character to the list of
> allowed characters in citation style.

It's been a month without objection. Could we please add this then?


Bruce


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2022-05-22 16:39 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 21:06 org-cite styles don't allow * in them John Kitchin
2022-04-05 15:56 ` Bruce D'Arcus
2022-04-05 16:11   ` John Kitchin
2022-04-05 17:41     ` Bruce D'Arcus
2022-04-07  4:17   ` Ihor Radchenko
2022-04-07 11:30     ` John Kitchin
2022-04-16 16:29       ` Bruce D'Arcus
2022-04-17  8:42         ` Ihor Radchenko
2022-04-17 12:14           ` John Kitchin
2022-04-17 13:18             ` Ihor Radchenko
2022-04-17 14:24               ` John Kitchin
2022-04-18  9:09                 ` Ihor Radchenko
2022-04-18 10:25                   ` Bruce D'Arcus
2022-04-19  2:59                     ` Ihor Radchenko
2022-04-21  8:06     ` Nicolas Goaziou
2022-04-21 10:09       ` Ihor Radchenko
2022-04-21 11:28         ` Nicolas Goaziou
2022-04-21 13:40           ` Ihor Radchenko
2022-04-22 12:42       ` Bruce D'Arcus
2022-04-22 13:30         ` John Kitchin
2022-05-22 15:51       ` Bruce D'Arcus

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