From: David G. <go...@py...> - 2006-06-30 13:23:41
|
I'm trying to get through my backlog of email; sorry for the long delay! [Yannick Copin] > as I'm trying to extend my use of reStructuredText (how > convenient!), I face some difficulties related to the limited > definition of reference names > (http://docutils.sf.net/docs/ref/rst/restructuredtext.html#reference-na= mes). > > 1. The ADS bibliographic code (e.g. 1970ApJ...159..165H in > http://cdsads.u-strasbg.fr/cgi-bin/nph-bib_query?bibcode=3D1970ApJ...15= 9..165H) > is very useful as a cite-key. Still, it cannot be used directly in a > citation [1970ApJ...159..165H]_ because of the presence of multiple > '.' I assume (it does not issue any WARNING or INFO though, but just > does nothing). Of course, I could use the hyperlink target > `1970ApJ...159..165H`_, but this is no more a citation. I just proposed an extension to the citation syntax to allow for phrase references (see the "citation enhancement?" thread). Once implemented, your example would be possible as: [`1970ApJ...159..165H`]_ > 2. I'm using reST to automatically generate tables of stars, some of > them having a '+' in their (otherwise reST-compliant) name > (e.g. BD+75325). This prevent me from making a simple link with > BD+75325_, and I have to use the slightly less (machine) readable > `BD+75325`_ format. > > So, my question: is there any strong reason for not allowing > non-isolated periods and '+'-sign in reference names? In general, reference name syntax is kept simple to prevent accidental markup recognition. Plus sign: I suppose "+" could be added to simple reference name syntax. The only objection I can think of is in uses like "pi+e_" where "e" is a reference but "pi+e" isn't. But since hyphens, which double as minus signs, *are* allowed, that isn't much of an objection. Question for all: Any objections to adding "+" to simple reference name syntax? Note that I don't want to add any other punctuation characters to the simple reference name syntax (commas, colons, equals signs, quotes, parentheses, etc.), because the danger of misinterpreting input would grow too high. Backquotes suffice to allow arbitrary reference text. Multiple periods (multiple punctuation in general): I think this would go too far. Two periods in a row might be acceptable, but three make up an ellipsis, which separates words. I would expect this to work as three separate references: reference_...not a reference...another_...`yet another`_... If we allowed multiple periods in simple reference names, the example above would be misinterpreted ("reference...another" mistaken for one name). And I would be loathe to require backslash escapes in this case. We could allow this form in citation reference context only: [1970ApJ...159..165H]_ But that would complicate the syntax model, both algorithmically and mentally. So I don't think so. The phrase reference syntax should suffice: [`1970ApJ...159..165H`]_ --=20 David Goodger <http://python.net/~goodger> |