Hi Nicolas, Nicolas Goaziou <m...@nicolasgoaziou.fr> writes:
> Also, AFAIU, the syntax for valid citations is not defined explicitly so > far. For example, I don't think it was discussed if any subset of Org > objects (e.g., macros or bold text) is allowed in a citation. This is a good question that, as you say, deserves more discussion. I am not sure, but I am *thinking* that inline citations are objects (not elements) that can contain some other objects. Specifically I think we need the following categories, all of which would be objects: - key - prefix / pre-text - suffix / post-text - locator - individual citation - bracketed citation - unbracketed citation These should have a grammar like the following, based on my (reverse-engineered) understanding of the Pandoc syntax for citations: - A bracketed citation is a list of one or more individual citations, separated by ';' if there are two or more, and surrounded by '[' ']' - An individual citation is formatted like: PREFIX KEY LOCATOR SUFFIX The key is obligatory, and the prefix, locator and suffix are optional. - A key optionally begins with '-', and obligatorily contains '@' followed by a string of charcters which begins with a letter or '_', and may contain alphanumeric characters and the following internal punctuation characters: :.#$%&-+?<>~/ - A prefix or suffix is a text object (that may contain markup like emphasis or macros) - An unbracketed citation consists of a key, optionally followed by a locator which is enclosed in '[' ']' I am not sure about the syntax of locators. In particular, I do not know if they should allow internal markup, I do not know if they have an internal syntax, and I do not know if a comma is required to separate them from a key in a bracketed citation. Best, Richard