emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Citation syntax: a revised proposal
@ 2015-02-15  2:29 Richard Lawrence
  2015-02-15  2:45 ` Richard Lawrence
                   ` (6 more replies)
  0 siblings, 7 replies; 163+ messages in thread
From: Richard Lawrence @ 2015-02-15  2:29 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi everyone,

Since discussion seems to have petered out on the previous thread (see:
http://thread.gmane.org/gmane.emacs.orgmode/94524), I took some time to
go back over the discussion and write up a concrete proposal for
citation syntax.

This proposal represents my attempt to formulate a syntax that is easy
to read, easy to parse, and covers all the use-cases that people
mentioned as being important.  It is surely not perfect, but I learned a
lot from the previous thread, and I hope something like this will serve
the community's needs.

The proposal is below, both inline (for easy quoting) and attached (for
easy reading).  To keep it relatively short, I have mostly not explained
my reasoning for the choices I made, but I am happy to do so here if
anyone has questions.

I welcome feedback, comments, criticisms, and objections on any point.
However, since we've already had a long discussion about this, I
respectfully request that we try to keep this thread focused.  To that
end, I suggest:

  1) If you have criticisms or objections, please try to indicate
     whether you think they are `substantive' (e.g., you see a problem
     that would prevent you from using this syntax, or prevent Org from
     implementing it) or not (e.g., you would prefer a slightly
     different but equivalent way of expressing something).

  2) If you wish to express an opinion about the proposal without
     offering further comments, let us know by just replying with +1
     (meaning you'd like to see this syntax, or something reasonably
     similar to it, be adopted), 0, or -1 (meaning you'd prefer not to
     see this syntax or anything similar to it adopted).

I guess this is my Valentine to the Org community. :) Thanks for reading!

Best,
Richard


[-- Attachment #2: citation-syntax.org --]
[-- Type: text/plain, Size: 13614 bytes --]

#+TITLE: Citation syntax, a revised proposal
#+DATE: <2015-02-14 Sat>
#+AUTHOR: Richard Lawrence
#+EMAIL: richard.lawrence@berkeley.edu
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport

* Citation syntax
** Requirements
A citation is a textual reference to one or more individual works,
together with other information about those works, grouped together in
a single place.  

Within a citation, each reference to an individual work needs to be
capable of containing:
  1) a database key that references the cited work
  2) prefix / pre-note
  3) suffix / post-note
     
Whole citations also need:
  4) [@4] a way of specifying whether the citation is in-text or
     parenthetical
  5) a way of representing a common prefix and suffix, if the citation
     is a multi-cite
  6) a way of specifying whether the citation should produce a
     complete bibliography entry in-place
  7) an extensible way of specifying formatting properties to export
     filters and/or specific export backends 
     
** Citation definitions
*** Citation keys; bibliography references vs. complete entries 
A citation key consists of a unique label preceded by a flag, which is
optionally preceded by a hyphen.

The flag is either `@' or `&'.  `@' indicates that the citation should
produce a normal reference to the bibliography entry for the cited
work (in whatever style the document uses), located elsewhere.

The `&' flag indicates that the citation should produce a complete
bibliography entry for the cited work in the place where the citation
appears.

The optional hyphen (`-') indicates that the author's name should be
suppressed from the rendered citation.  (Note that this is only useful
in author-X citation styles; it should have no effect in numeric
styles.)

*** Basic citations: Parenthetical vs. in-text 
There are two basic types of citation: /parenthetical/ and /in-text/.
Each of these may contain references to one or more individual works.

The difference between parenthetical and in-text citations is
expressed using parentheses around the /first/ citation key.  A
parenthetical citation has such parentheses around the first citation
key; an in-text citation lacks them.  (Parentheses around non-initial
keys are permitted for visual consistency and to keep the grammar
simple, but have no meaning.)

A citation thus consists in general of a bracketed list, beginning
with `cite:', of one or more individual references, each of which:
  - may contain a prefix,
  - must contain a citation key, which may or may not be surrounded by `(...)'
  - and may contain a suffix
Individual references are separated by semi-colons.

There are also two special cases to make simple-but-common uses very
easy to type and read:
  1) a parenthetical citation for a single work with no prefix and
     suffix may be written by just surrounding the key with brackets,
     like: [@Doe99].
  2) an in-text citation for a single work with no prefix and suffix
     may be written as a /bare/ key, without brackets, like: @Doe99.
(Thus, in both of the `simple' cases, one less level of bracketing is
required.)

Prefix and suffix text are regular Org text, which are allowed to
contain various kinds of Org markup (see the grammar below for a
complete list).

*** Multi-cite citations 
Multi-cite citations are distinguished from basic parenthetical and
in-text citations by the presence of an optional common prefix or
common suffix (which may not contain keys).  If present, the common
prefix must occur before the first individual reference, and the
common suffix must occur after the last individual reference.  The
common prefix and suffix are separated from the individual references
by semi-colons.

*** Examples of main citation syntax
Basic parenthetical citation:
#+BEGIN_QUOTE
The nineteenth century was very interesting. [cite: (@Doe99)]
#+END_QUOTE

Basic parenthetical citation using special-case syntax:
#+BEGIN_QUOTE
The nineteenth century was very interesting. [@Doe99]
#+END_QUOTE

Parenthetical citation with multiple works and prefix and suffix:
#+BEGIN_QUOTE
The nineteenth century was in fact lovely [cite: see (@Doe99) p. 44;
@Smith2000 has a review].
#+END_QUOTE

Basic in-text citation with a suffix:
#+BEGIN_QUOTE
As [cite: @Doe99 p. 44] says, the nineteenth century was very interesting.
#+END_QUOTE

In-text citation using special-case syntax:
#+BEGIN_QUOTE
@Doe2000 explains that the twentieth century was even more interesting. 
#+END_QUOTE

In-text citation with author suppressed:
#+BEGIN_QUOTE
As Doe explained in his -@Doe2003, the twentieth century was somewhat
less interesting than previously thought.
#+END_QUOTE

Parenthetical citation with full-entry key:
#+BEGIN_QUOTE
A complete bibliography entry follows in parentheses. [cite: (&Doe99)]
A complete bibliography entry follows in parentheses. [&Doe99]
#+END_QUOTE

In-text citation with full-entry key:
#+BEGIN_QUOTE
A complete bibliography entry follows: [cite: &Doe99].
A complete bibliography entry follows: &Doe99.
#+END_QUOTE

Full-entry in-text citation, in a footnote:
#+BEGIN_QUOTE
Doe exhibits unusual scholarship.[fn:: &Doe99.]
#+END_QUOTE

In-text citation, with a complete bibliography entry minus the author
in a footnote, plus a suffix:
#+BEGIN_QUOTE
@Doe99 exhibits unusual scholarship.[fn:1]

[fn:1] [cite: -&Doe99 Cf. especially section 4.]
#+END_QUOTE

In-text multi-cite:
#+BEGIN_QUOTE
Speculation abounds about what the twenty-first century will
bring. [cite: For an overview of this topic, see; @Smith1998;
@Jones1999; @Miller2001; and references therein.]
#+END_QUOTE

Parenthetical multi-cite:
#+BEGIN_QUOTE
Speculation abounds about what the twenty-first century will
bring. [cite: For an overview of this topic, see; (@Smith1998);
@Jones1999; @Miller2001; and references therein.]
#+END_QUOTE

*** Syntax for extensions 
Additional information can be supplied in a citation that may affect
how export filters or particular backends format it.

This additional information may be supplied following the brackets of
a citation between the following delimiters: `%%( ... )'.

(Note: I am proposing that this expression go /after/ the main
citation brackets both because it visually separates this extra
information from the main citation, and in order to avoid imposing any
further syntactic restriction on suffixes.)

At least for now, any information supplied this way is /strictly the
user's responsibility/ to interpret (e.g., using an export filter).
This means that citations that have information like this are not
portable and might not be exported correctly:
  - in other users' setups
  - by particular backends
  - by future versions of Org

I will not deal with the details of how this additional information
should be syntactically represented, since this has not really been
discussed.  But I suggest that, to deal with the complexities of
additional information in full generality, something like a complete
Lisp list is required.  Thus, I suggest that this additional
information simply be represented as a Lisp list.  (Besides
generality, this has the benefit of making the syntax easy to parse:
the parser can just call Elisp's read function with a marker after the
`%%'.)

I provide these examples merely to illustrate the possibilities here:
#+BEGIN_QUOTE
@vonNeumann1930 %%(:type genitive :capitalize t) model can only handle
a limited range of observed cases.

@McCarthy1950 %%('s) clever use of Lisp syntax was also used to
express the Saxon genitive.

For more, see Ref. @Doe99 %%(:type refnum :follow-to "some.pdf").

Even more complicated examples occur after Doe's famous article from
[cite: @Doe99] %%(:type date-only).

And in [cite: @Doe2000] %%(:attr_latex (:format-string
"\citeyear{%KEY}") :attr_html (:only-fields (month year))), Doe
finally realized that arbitrary complexity was a powerful but
double-edged sword.

@_aParticularlyUGLYkey:is-this-one %%(:overlay "Nice Display")
#+END_QUOTE 

** Grammar
This section formally documents the syntax of citations discussed
above.  

To represent the syntax of citations, we need a category of /citation/
objects, which require the following properties (the names here are not
important and could be changed):
  - is-parenthetical (boolean; nil means is in-text)
  - common-prefix (text)
  - common-suffix (text)
  - references (list)
  - extra-info (list)

Each reference in the list of references should be a plist with the
following properties:
  - prefix (text)
  - suffix (text)
  - key (string)
  - is-parenthesized (boolean; t means key was parenthesized; only
    significant for the first reference in a citation)
  - suppress-author (boolean; t means author name should not be output)
  - is-full (boolean; t means a full bibliography entry should be
    output in-place) 

The category of citations has the following grammar:
  - A CITATION is a PARENTHETICAL-CITATION or an IN-TEXT citation.
  - A PARENTHETICAL-CITATION is either a SIMPLE-PARENTHETICAL or a
    CITATION-LIST whose first individual INDIVIDUAL-REFERENCE is a
    PARENTHESIZED-KEY
  - An IN-TEXT-CITATION is either a SIMPLE-IN-TEXT, or a
    CITATION-LIST whose first INDIVIDUAL-REFERENCE is a BARE-KEY.
  - A SIMPLE-PARENTHETICAL is a KEY immediately surrounded by square
    brackets, optionally followed by an EXTRA-INFO clause.
  - A SIMPLE-IN-TEXT is a BARE-KEY, optionally followed by an
    EXTRA-INFO clause
  - A CITATION-LIST has the format
       [cite: PREFIX; INDIVIDUAL-REFERENCE; ... INDIVIDUAL-REFERENCE; SUFFIX] EXTRA-INFO
    where the initial PREFIX, final SUFFIX, and EXTRA-INFO clause are
    optional.  At least one INDIVIDUAL-REFERENCE must be present. 
  - An INDIVIDUAL-REFERENCE has the format: 
       PREFIX KEY-MAYBE-PARENS SUFFIX
    The KEY-MAYBE-PARENS is obligatory, and the prefix and suffix
    are optional.
  - A KEY-MAYBE-PARENS is either a BARE-KEY or PARENTHESIZED-KEY
  - A BARE-KEY is a KEY with immediately-preceding whitespace
  - A PARENTHESIZED-KEY is a KEY immediately surrounded by `(' and `)'.
  - A KEY optionally begins with `-', and obligatorily contains `@' or
    `&' followed by a string of characters which begins with a letter
    or `_', and may contain alphanumeric characters and the following
    internal punctuation characters:
       :.#$%&-+?<>~/
  - A PREFIX or SUFFIX is arbitrary text (except `;', `]', and
    KEY-MAYBE-PARENs) which may contain only the following Org
    objects:
    - bold
    - code
    - entity
    - italic
    - latex-fragment
    - line-break
    - strike-through
    - subscript
    - superscript
    - underline
    - superscript
    (Note that this list could be extended somewhat if necessary.)
  - An EXTRA-INFO clause consists of data not specified by this
    grammar, in between `%%(' and `)'

** Outstanding issues
It seems to me that there are potential problems with the above
proposal in a number of areas, but I cannot tell how serious they are,
or what changes (if any) should be made to solve them.  I don't
pretend that this is an exhaustive list:
  1) *Nesting.*  I have favored LaTeX compatibility for in-text
     citations with multiple references; but this means there is no
     way to `nest' citations.  Thus, there is no way to express (in
     the main syntax) what Pandoc expresses as:
        @Doe99 [p. 34; see also @DoeRoe2000]
     which renders like:
        Doe (1999, p. 34; see also Doe and Roe 2000)
     Instead, since a citation is in-text or parenthetical as a whole,
     the equivalent in the above syntax
        [cite: @Doe99 p. 34; see also @DoeRoe2000]
     should render like:
	Doe (1999, p. 34), see also Doe and Roe (2000).
     I am not certain if Pandoc-like output is important in this case.
     The few people who commented on this said that it was not. 
  2) *Limitations on prefixes and suffixes.*  There may be legitimate
     uses of `@', `;', `]', etc. inside prefix or suffix text that the
     above syntax does not allow.  Examples might include:
     - use of semi-colons as part of the prefix/suffix text
     - footnotes, links, or timestamps inside a prefix/suffix
     I am not certain how important these cases are.  If they are
     important, some of them might be able to be worked around with
     entities.
  3) *Edge cases.* The above syntax may make it possible to express
     things that don't make sense, or would be too difficult to
     export.  The only one I can think of is that it is possible to
     mix `@'-style and `&'-style keys in the same citation.  I am not
     sure if this should be forbidden; it may sometimes make sense.
     It may also be possible to express things that external tools,
     such as citeproc-js, don't know how to process.  I do not have a
     good sense of what, if anything, falls into that category, and
     what should be done about it.
  4) *Citation commands.*  Rather than introduce an explicit
     representation for different citation commands/types, I have used
     different parts of the syntax to express the common distinctions
     that people mentioned.  I suggest that, for now, anything beyond
     these basic distinctions be left to the user-extension syntax.
     However, if it becomes clear in the future that there is a need
     to add a representation for a command to the main syntax, there
     is a natural place to do so: immediately after the `cite:' tag
     (as Nicolas suggested).

Also, I have not said anything in this proposal to address how other
document metadata should be represented, which has not been discussed
much on the list.  I think this should be discussed separately.
      

[-- Attachment #3: citation-syntax.org --]
[-- Type: text/plain, Size: 13614 bytes --]

#+TITLE: Citation syntax, a revised proposal
#+DATE: <2015-02-14 Sat>
#+AUTHOR: Richard Lawrence
#+EMAIL: richard.lawrence@berkeley.edu
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport

* Citation syntax
** Requirements
A citation is a textual reference to one or more individual works,
together with other information about those works, grouped together in
a single place.  

Within a citation, each reference to an individual work needs to be
capable of containing:
  1) a database key that references the cited work
  2) prefix / pre-note
  3) suffix / post-note
     
Whole citations also need:
  4) [@4] a way of specifying whether the citation is in-text or
     parenthetical
  5) a way of representing a common prefix and suffix, if the citation
     is a multi-cite
  6) a way of specifying whether the citation should produce a
     complete bibliography entry in-place
  7) an extensible way of specifying formatting properties to export
     filters and/or specific export backends 
     
** Citation definitions
*** Citation keys; bibliography references vs. complete entries 
A citation key consists of a unique label preceded by a flag, which is
optionally preceded by a hyphen.

The flag is either `@' or `&'.  `@' indicates that the citation should
produce a normal reference to the bibliography entry for the cited
work (in whatever style the document uses), located elsewhere.

The `&' flag indicates that the citation should produce a complete
bibliography entry for the cited work in the place where the citation
appears.

The optional hyphen (`-') indicates that the author's name should be
suppressed from the rendered citation.  (Note that this is only useful
in author-X citation styles; it should have no effect in numeric
styles.)

*** Basic citations: Parenthetical vs. in-text 
There are two basic types of citation: /parenthetical/ and /in-text/.
Each of these may contain references to one or more individual works.

The difference between parenthetical and in-text citations is
expressed using parentheses around the /first/ citation key.  A
parenthetical citation has such parentheses around the first citation
key; an in-text citation lacks them.  (Parentheses around non-initial
keys are permitted for visual consistency and to keep the grammar
simple, but have no meaning.)

A citation thus consists in general of a bracketed list, beginning
with `cite:', of one or more individual references, each of which:
  - may contain a prefix,
  - must contain a citation key, which may or may not be surrounded by `(...)'
  - and may contain a suffix
Individual references are separated by semi-colons.

There are also two special cases to make simple-but-common uses very
easy to type and read:
  1) a parenthetical citation for a single work with no prefix and
     suffix may be written by just surrounding the key with brackets,
     like: [@Doe99].
  2) an in-text citation for a single work with no prefix and suffix
     may be written as a /bare/ key, without brackets, like: @Doe99.
(Thus, in both of the `simple' cases, one less level of bracketing is
required.)

Prefix and suffix text are regular Org text, which are allowed to
contain various kinds of Org markup (see the grammar below for a
complete list).

*** Multi-cite citations 
Multi-cite citations are distinguished from basic parenthetical and
in-text citations by the presence of an optional common prefix or
common suffix (which may not contain keys).  If present, the common
prefix must occur before the first individual reference, and the
common suffix must occur after the last individual reference.  The
common prefix and suffix are separated from the individual references
by semi-colons.

*** Examples of main citation syntax
Basic parenthetical citation:
#+BEGIN_QUOTE
The nineteenth century was very interesting. [cite: (@Doe99)]
#+END_QUOTE

Basic parenthetical citation using special-case syntax:
#+BEGIN_QUOTE
The nineteenth century was very interesting. [@Doe99]
#+END_QUOTE

Parenthetical citation with multiple works and prefix and suffix:
#+BEGIN_QUOTE
The nineteenth century was in fact lovely [cite: see (@Doe99) p. 44;
@Smith2000 has a review].
#+END_QUOTE

Basic in-text citation with a suffix:
#+BEGIN_QUOTE
As [cite: @Doe99 p. 44] says, the nineteenth century was very interesting.
#+END_QUOTE

In-text citation using special-case syntax:
#+BEGIN_QUOTE
@Doe2000 explains that the twentieth century was even more interesting. 
#+END_QUOTE

In-text citation with author suppressed:
#+BEGIN_QUOTE
As Doe explained in his -@Doe2003, the twentieth century was somewhat
less interesting than previously thought.
#+END_QUOTE

Parenthetical citation with full-entry key:
#+BEGIN_QUOTE
A complete bibliography entry follows in parentheses. [cite: (&Doe99)]
A complete bibliography entry follows in parentheses. [&Doe99]
#+END_QUOTE

In-text citation with full-entry key:
#+BEGIN_QUOTE
A complete bibliography entry follows: [cite: &Doe99].
A complete bibliography entry follows: &Doe99.
#+END_QUOTE

Full-entry in-text citation, in a footnote:
#+BEGIN_QUOTE
Doe exhibits unusual scholarship.[fn:: &Doe99.]
#+END_QUOTE

In-text citation, with a complete bibliography entry minus the author
in a footnote, plus a suffix:
#+BEGIN_QUOTE
@Doe99 exhibits unusual scholarship.[fn:1]

[fn:1] [cite: -&Doe99 Cf. especially section 4.]
#+END_QUOTE

In-text multi-cite:
#+BEGIN_QUOTE
Speculation abounds about what the twenty-first century will
bring. [cite: For an overview of this topic, see; @Smith1998;
@Jones1999; @Miller2001; and references therein.]
#+END_QUOTE

Parenthetical multi-cite:
#+BEGIN_QUOTE
Speculation abounds about what the twenty-first century will
bring. [cite: For an overview of this topic, see; (@Smith1998);
@Jones1999; @Miller2001; and references therein.]
#+END_QUOTE

*** Syntax for extensions 
Additional information can be supplied in a citation that may affect
how export filters or particular backends format it.

This additional information may be supplied following the brackets of
a citation between the following delimiters: `%%( ... )'.

(Note: I am proposing that this expression go /after/ the main
citation brackets both because it visually separates this extra
information from the main citation, and in order to avoid imposing any
further syntactic restriction on suffixes.)

At least for now, any information supplied this way is /strictly the
user's responsibility/ to interpret (e.g., using an export filter).
This means that citations that have information like this are not
portable and might not be exported correctly:
  - in other users' setups
  - by particular backends
  - by future versions of Org

I will not deal with the details of how this additional information
should be syntactically represented, since this has not really been
discussed.  But I suggest that, to deal with the complexities of
additional information in full generality, something like a complete
Lisp list is required.  Thus, I suggest that this additional
information simply be represented as a Lisp list.  (Besides
generality, this has the benefit of making the syntax easy to parse:
the parser can just call Elisp's read function with a marker after the
`%%'.)

I provide these examples merely to illustrate the possibilities here:
#+BEGIN_QUOTE
@vonNeumann1930 %%(:type genitive :capitalize t) model can only handle
a limited range of observed cases.

@McCarthy1950 %%('s) clever use of Lisp syntax was also used to
express the Saxon genitive.

For more, see Ref. @Doe99 %%(:type refnum :follow-to "some.pdf").

Even more complicated examples occur after Doe's famous article from
[cite: @Doe99] %%(:type date-only).

And in [cite: @Doe2000] %%(:attr_latex (:format-string
"\citeyear{%KEY}") :attr_html (:only-fields (month year))), Doe
finally realized that arbitrary complexity was a powerful but
double-edged sword.

@_aParticularlyUGLYkey:is-this-one %%(:overlay "Nice Display")
#+END_QUOTE 

** Grammar
This section formally documents the syntax of citations discussed
above.  

To represent the syntax of citations, we need a category of /citation/
objects, which require the following properties (the names here are not
important and could be changed):
  - is-parenthetical (boolean; nil means is in-text)
  - common-prefix (text)
  - common-suffix (text)
  - references (list)
  - extra-info (list)

Each reference in the list of references should be a plist with the
following properties:
  - prefix (text)
  - suffix (text)
  - key (string)
  - is-parenthesized (boolean; t means key was parenthesized; only
    significant for the first reference in a citation)
  - suppress-author (boolean; t means author name should not be output)
  - is-full (boolean; t means a full bibliography entry should be
    output in-place) 

The category of citations has the following grammar:
  - A CITATION is a PARENTHETICAL-CITATION or an IN-TEXT citation.
  - A PARENTHETICAL-CITATION is either a SIMPLE-PARENTHETICAL or a
    CITATION-LIST whose first individual INDIVIDUAL-REFERENCE is a
    PARENTHESIZED-KEY
  - An IN-TEXT-CITATION is either a SIMPLE-IN-TEXT, or a
    CITATION-LIST whose first INDIVIDUAL-REFERENCE is a BARE-KEY.
  - A SIMPLE-PARENTHETICAL is a KEY immediately surrounded by square
    brackets, optionally followed by an EXTRA-INFO clause.
  - A SIMPLE-IN-TEXT is a BARE-KEY, optionally followed by an
    EXTRA-INFO clause
  - A CITATION-LIST has the format
       [cite: PREFIX; INDIVIDUAL-REFERENCE; ... INDIVIDUAL-REFERENCE; SUFFIX] EXTRA-INFO
    where the initial PREFIX, final SUFFIX, and EXTRA-INFO clause are
    optional.  At least one INDIVIDUAL-REFERENCE must be present. 
  - An INDIVIDUAL-REFERENCE has the format: 
       PREFIX KEY-MAYBE-PARENS SUFFIX
    The KEY-MAYBE-PARENS is obligatory, and the prefix and suffix
    are optional.
  - A KEY-MAYBE-PARENS is either a BARE-KEY or PARENTHESIZED-KEY
  - A BARE-KEY is a KEY with immediately-preceding whitespace
  - A PARENTHESIZED-KEY is a KEY immediately surrounded by `(' and `)'.
  - A KEY optionally begins with `-', and obligatorily contains `@' or
    `&' followed by a string of characters which begins with a letter
    or `_', and may contain alphanumeric characters and the following
    internal punctuation characters:
       :.#$%&-+?<>~/
  - A PREFIX or SUFFIX is arbitrary text (except `;', `]', and
    KEY-MAYBE-PARENs) which may contain only the following Org
    objects:
    - bold
    - code
    - entity
    - italic
    - latex-fragment
    - line-break
    - strike-through
    - subscript
    - superscript
    - underline
    - superscript
    (Note that this list could be extended somewhat if necessary.)
  - An EXTRA-INFO clause consists of data not specified by this
    grammar, in between `%%(' and `)'

** Outstanding issues
It seems to me that there are potential problems with the above
proposal in a number of areas, but I cannot tell how serious they are,
or what changes (if any) should be made to solve them.  I don't
pretend that this is an exhaustive list:
  1) *Nesting.*  I have favored LaTeX compatibility for in-text
     citations with multiple references; but this means there is no
     way to `nest' citations.  Thus, there is no way to express (in
     the main syntax) what Pandoc expresses as:
        @Doe99 [p. 34; see also @DoeRoe2000]
     which renders like:
        Doe (1999, p. 34; see also Doe and Roe 2000)
     Instead, since a citation is in-text or parenthetical as a whole,
     the equivalent in the above syntax
        [cite: @Doe99 p. 34; see also @DoeRoe2000]
     should render like:
	Doe (1999, p. 34), see also Doe and Roe (2000).
     I am not certain if Pandoc-like output is important in this case.
     The few people who commented on this said that it was not. 
  2) *Limitations on prefixes and suffixes.*  There may be legitimate
     uses of `@', `;', `]', etc. inside prefix or suffix text that the
     above syntax does not allow.  Examples might include:
     - use of semi-colons as part of the prefix/suffix text
     - footnotes, links, or timestamps inside a prefix/suffix
     I am not certain how important these cases are.  If they are
     important, some of them might be able to be worked around with
     entities.
  3) *Edge cases.* The above syntax may make it possible to express
     things that don't make sense, or would be too difficult to
     export.  The only one I can think of is that it is possible to
     mix `@'-style and `&'-style keys in the same citation.  I am not
     sure if this should be forbidden; it may sometimes make sense.
     It may also be possible to express things that external tools,
     such as citeproc-js, don't know how to process.  I do not have a
     good sense of what, if anything, falls into that category, and
     what should be done about it.
  4) *Citation commands.*  Rather than introduce an explicit
     representation for different citation commands/types, I have used
     different parts of the syntax to express the common distinctions
     that people mentioned.  I suggest that, for now, anything beyond
     these basic distinctions be left to the user-extension syntax.
     However, if it becomes clear in the future that there is a need
     to add a representation for a command to the main syntax, there
     is a natural place to do so: immediately after the `cite:' tag
     (as Nicolas suggested).

Also, I have not said anything in this proposal to address how other
document metadata should be represented, which has not been discussed
much on the list.  I think this should be discussed separately.
      

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

end of thread, other threads:[~2015-03-18 15:20 UTC | newest]

Thread overview: 163+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-15  2:29 Citation syntax: a revised proposal Richard Lawrence
2015-02-15  2:45 ` Richard Lawrence
2015-02-15  3:57 ` Thomas S. Dye
2015-02-15 16:40   ` Richard Lawrence
2015-02-15 19:43     ` Thomas S. Dye
2015-02-16  3:34       ` Matt Price
2015-02-16  8:56         ` Nicolas Goaziou
2015-02-16  9:57         ` Rasmus
2015-02-17 17:18       ` Richard Lawrence
2015-02-17 18:11         ` Rasmus
2015-02-18  0:44           ` Matt Price
2015-02-18  3:38           ` Richard Lawrence
2015-02-18  2:24         ` Thomas S. Dye
2015-02-18  4:03           ` Richard Lawrence
2015-02-18  9:00             ` Stefan Nobis
2015-02-18 10:11             ` Eric S Fraga
2015-02-18 14:19             ` Nicolas Goaziou
2015-02-18 16:38               ` Richard Lawrence
2015-02-18 18:44                 ` Samuel Wales
2015-02-18 18:46                   ` Samuel Wales
2015-02-18 20:54                   ` Aaron Ecay
2015-02-18 21:21                     ` Samuel Wales
2015-02-18 21:24                     ` John Kitchin
2015-02-18 19:42                 ` Nicolas Goaziou
2015-02-18 20:47                   ` Aaron Ecay
2015-02-18 22:43                     ` Rasmus
2015-02-18 22:35                   ` Rasmus
2015-02-19 17:06                   ` Richard Lawrence
2015-02-20  0:10                     ` Nicolas Goaziou
2015-02-20 16:44                       ` Richard Lawrence
2015-02-20 19:45                         ` Samuel Wales
2015-02-20 20:01                           ` Rasmus
2015-02-20 22:33                             ` Samuel Wales
2015-02-21 11:58                               ` Rasmus
2015-02-21 17:25                                 ` Thomas S. Dye
2015-02-27  0:56                                 ` Samuel Wales
2015-02-27  8:55                                   ` Stefan Nobis
2015-02-27  9:56                                   ` Rasmus
2015-02-21  3:12                           ` Richard Lawrence
2015-02-21 12:00                             ` Rasmus
2015-02-21 20:19                             ` Samuel Wales
2015-02-21 20:36                             ` Samuel Wales
2015-02-25 13:59                         ` Aaron Ecay
2015-02-25 16:57                           ` Richard Lawrence
2015-02-25 22:37                             ` Nicolas Goaziou
2015-02-26  5:10                               ` Richard Lawrence
2015-03-01 20:35                                 ` Nicolas Goaziou
2015-03-01 21:31                                   ` Rasmus
2015-03-02  0:24                                     ` Thomas S. Dye
2015-03-02  8:57                                       ` Eric S Fraga
2015-03-02  1:37                                     ` Thomas S. Dye
2015-03-02  9:23                                       ` Rasmus
2015-03-02 19:11                                     ` Aaron Ecay
2015-03-02 20:15                                       ` Rasmus
2015-03-03  3:14                                       ` Richard Lawrence
2015-03-03  5:33                                         ` Avram Lyon
2015-03-03 17:27                                           ` Richard Lawrence
2015-03-03 17:56                                             ` Avram Lyon
2015-03-04 16:41                                               ` Richard Lawrence
2015-03-03  9:24                                         ` Rasmus
2015-03-03  9:39                                           ` Rasmus
2015-03-03 14:12                                         ` Aaron Ecay
2015-03-02 18:50                                   ` Richard Lawrence
2015-03-02 20:14                                     ` Nicolas Goaziou
2015-03-02 20:34                                       ` Rasmus
2015-03-02 22:17                                         ` Nicolas Goaziou
2015-03-02 22:33                                           ` Rasmus
2015-03-02 22:45                                             ` Nicolas Goaziou
2015-03-02 23:05                                               ` Rasmus
2015-03-02 23:27                                                 ` Nicolas Goaziou
2015-03-02 23:42                                                   ` Rasmus
2015-03-03  2:48                                       ` Richard Lawrence
2015-03-03  8:43                                         ` Nicolas Goaziou
2015-03-03 16:59                                           ` Richard Lawrence
2015-03-04  0:43                                           ` Matt Price
2015-03-08  0:16                                         ` Nicolas Goaziou
2015-03-03 14:23                                     ` Aaron Ecay
2015-03-02 18:54                                   ` Aaron Ecay
2015-03-02 20:26                                     ` Nicolas Goaziou
2015-03-03  2:53                                       ` Richard Lawrence
2015-03-03  8:38                                         ` Nicolas Goaziou
2015-03-03  9:13                                           ` Rasmus
2015-03-03 16:12                                             ` Richard Lawrence
2015-03-03 14:25                                       ` Aaron Ecay
2015-03-02 20:53                                     ` Rasmus
2015-03-03 14:57                                       ` Aaron Ecay
2015-03-03 15:41                                         ` Rasmus
2015-03-03 15:58                                           ` Ken Mankoff
2015-03-03 16:08                                             ` Rasmus
2015-03-03 17:13                                         ` Richard Lawrence
2015-03-10  3:44                                     ` Aaron Ecay
2015-03-10  9:49                                       ` Rasmus
2015-03-11  1:51                                         ` Aaron Ecay
2015-03-11  6:04                                           ` Thomas S. Dye
2015-03-10 16:31                                       ` Richard Lawrence
2015-03-11  2:21                                         ` Aaron Ecay
2015-03-11 17:33                                           ` Richard Lawrence
2015-03-13 18:13                                             ` Richard Lawrence
2015-03-17  5:15                                               ` Richard Lawrence
2015-03-17  9:27                                                 ` Andreas Leha
2015-03-17 16:26                                                   ` Richard Lawrence
2015-03-17 20:42                                                     ` Andreas Leha
2015-03-17 21:34                                                       ` Richard Lawrence
2015-03-18  1:12                                                     ` Matt Price
2015-03-18 15:19                                                       ` Richard Lawrence
2015-02-25 18:08                           ` Thomas S. Dye
2015-02-26 21:30                             ` Aaron Ecay
2015-02-26 23:50                               ` Thomas S. Dye
2015-02-27  8:49                               ` Stefan Nobis
2015-02-27 16:35                                 ` Richard Lawrence
2015-02-27 10:09                               ` Rasmus
2015-03-02  5:48                               ` Thomas S. Dye
2015-03-02 12:22                                 ` Aaron Ecay
2015-03-02 13:53                                   ` Thomas S. Dye
2015-03-02 19:02                                     ` Aaron Ecay
2015-02-20  5:27                     ` Melanie Bacou
2015-02-20 16:49                       ` Richard Lawrence
2015-02-24  7:08         ` Vaidheeswaran C
2015-02-25  4:29           ` Richard Lawrence
2015-02-25  5:57             ` Vaidheeswaran C
2015-02-15 11:17 ` Tory S. Anderson
2015-02-15 11:57 ` Rasmus
2015-02-15 17:05   ` Richard Lawrence
2015-02-16  8:53     ` Stefan Nobis
2015-02-16 17:52       ` Thomas S. Dye
2015-02-15 17:23   ` Nicolas Goaziou
2015-03-09 10:40     ` Sebastien Vauban
2015-03-09 10:50       ` Vaidheeswaran C
2015-02-15 17:19 ` Nicolas Goaziou
2015-02-15 17:37   ` Rasmus
2015-02-15 17:55     ` Nicolas Goaziou
2015-02-15 19:30     ` John Kitchin
2015-02-15 18:07   ` Richard Lawrence
2015-02-15 18:25     ` Nicolas Goaziou
2015-02-15 19:05       ` Aaron Ecay
2015-02-15 19:18         ` Nicolas Goaziou
2015-02-15 19:38           ` Aaron Ecay
2015-02-15 20:13             ` Nicolas Goaziou
2015-02-15 20:23               ` Rasmus
2015-02-16  9:07               ` Stefan Nobis
2015-02-16 16:59               ` Richard Lawrence
2015-02-16 17:43                 ` Nicolas Goaziou
2015-02-16 18:39                   ` Rasmus
2015-02-16 19:16                     ` Thomas S. Dye
2015-02-16 19:40                       ` Rasmus
2015-02-15 20:49 ` John Kitchin
2015-02-16 16:18   ` Richard Lawrence
2015-02-16 18:21     ` John Kitchin
2015-02-16 12:05 ` Eric S Fraga
2015-02-16 13:10   ` William Denton
2015-02-16 13:42   ` John Kitchin
2015-02-16 16:19     ` Nicolas Goaziou
2015-02-16 17:28       ` John Kitchin
2015-02-16 18:49         ` Rasmus
2015-02-16 19:16           ` John Kitchin
2015-02-23  7:26       ` Vaidheeswaran
2015-02-16 16:35     ` Jorge A. Alfaro-Murillo
2015-02-16 17:56       ` Stefan Nobis
2015-02-16 18:24         ` John Kitchin
2015-02-16 18:39           ` Jorge A. Alfaro-Murillo
2015-02-16 19:19         ` Jorge A. Alfaro-Murillo
2015-02-17  6:47           ` Stefan Nobis
2015-02-16 16:45   ` Richard Lawrence

Code repositories for project(s) associated with this public 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).