emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Formal syntax for org-cite
Date: Thu, 30 Dec 2021 16:27:58 +0800	[thread overview]
Message-ID: <87tueqqytz.fsf@gmail.com> (raw)
In-Reply-To: <871r2xr1tr.fsf@gmail.com>

Hi All,

I've been away for a bit, but now I'm back and getting back into things
🙂. For starters, I'm thinking we may as well put a description of the
citation syntax into org-syntax. I'm still interested in more/broader
changes to improve the clarity and specificity of org-syntax (and have
had some more ideas on that front), but we may as well start by adding
this missing section.

I think my current version resolves all the comments made so far, see
below in case there's anything else that jumps out as needing changing.

The draft v3 follows:


Citations follow the pattern
where "cite" and =CITESTYLE=, =KEYCITES= and =GLOBALSUFFIX= are /not/
separated by whitespace. Whitespace after the leading colon or before
the closing square bracket is not significant. All other whitespace is

The only mandatory component, =KEYCITES= consists of one or more instances of the
following pattern, separated by semicolons,
where =KEYPREFIX=, =@KEY=, and =KEYSUFFIX= are /not/ separated by whitespace.

=KEY= can be made of any word-constituent character, =-=, =.=, =:=, =?=,
=!=, =`=, ='=, =/=, =*=, =@=, =+=, =|=, =(=, =)=, ={=, =}=, =<=, =>=,
=&=, =_=, =^=, =$=, =#=, =%=, or =~=.

=KEYPREFIX= and =KEYSUFFIX= are optional and can contain any characters
other than a semicolon (=;=), so long as all square brackets are
balanced. =KEYPREFIX= cannot contain any subsequence that forms a =KEY=.

Hence, a minimal citation is formed by the pattern ~[cite:@KEY]~.

=CITESTYLE= consists of a main =STYLE= and optionally a =VARIANT=​.
Both the =STYLE= and =VARIANT= are prefixed by a forwards slash.
=STYLE= and =VARIANT= can be made of any alphanumeric character, =_=, or
=-=​. Additionally, =VARIANT= can itself contain forward slashes (=/=) .

=GLOBALPREFIX= and =GLOBALSUFFIX= can contain the same characters as
=KEYPREFIX= and =KEYSUFFIX=. In the same manner as instances of the
be separated by semicolons.


Let me know if this looks alright.

All the best,

      parent reply	other threads:[~2021-12-30  8:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 17:21 Formal syntax for org-cite Timothy
2021-11-30 23:24 ` Tom Gillespie
2021-12-01 13:16 ` Nicolas Goaziou
2021-12-02  6:26   ` Timothy
2021-12-02 12:13     ` Timothy
2021-12-02 12:50       ` Ihor Radchenko
2021-12-02 12:55         ` Timothy
2021-12-30  8:27 ` Timothy [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=87tueqqytz.fsf@gmail.com \
    --to=tecosaur@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \


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