Visual markup

I’ve made a small change to the visual markup parser in citeproc-js.
It formerly recognized an … tag span to designate text that
should not be mangled. This worked fine for proper names, but:

  • It is not HTML, and so would play poorly with a web UI, and
  • It missed out another use case, for the “v.” in case names, for
    which both capitalization and decorations should be suppressed.

I have adjusted the parser code to use
and instead, for the two cases
respectively. This should be workable for editing tools such as
TinyMCE, and the citeproc-js parser is able transform the tags into
whatever does the right thing for the current output mode.

I’ll be pushing the code tomorrow unless there are serious objections.

(cross-posted to citeproc-js)

Frank

(relaying this to xbiblio-devel for further discussion)

  • It missed out another use case, for the “v.” in case names, for
    which both capitalization and decorations should be suppressed.

I have adjusted the parser code to use
and instead, for the two cases
respectively.

I’m not following the “decoration” use case here. In the csl-data
schema, I just have a single “protect” class, which corresponds to
BibTeX’s use of brackets. Why is that not enough?

There are two use cases. For concrete-ish examples …

If the following is produced using text-case=“sentence”, the proper
name needs to be escaped for text mangling, but not for decorations:

Metaphorical subtext in Bullshot Crummond

My current markup in the data for this title would be:

Metaphorical Subtext in Bullshot Crummond

If the following is produced in any style, the “v.” needs to be
escaped for decorations. Currently I also escape it for text
mangling:

Lessard v. Schmidt

My current markup in the data for this title would be:

Lessard v. Schmidt

BibTeX cannot handle the second use case, but it doesn’t need to
because it is never used to process legal citations (or if it is,
users excuse the fact that it does not print them correctly).