PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

Implement an "abbr" tag #239

Closed rbeezer closed 8 years ago

rbeezer commented 8 years ago

Write as-is into HTML, and help LaTeX with periods and spaces. Motivated by

https://groups.google.com/d/topic/mathbook-xml-support/coEowjfVDUk/discussion

(Add to DTD.)

Alex-Jordan commented 8 years ago

Note: use this to implement <vs /> and various other things. See https://groups.google.com/d/msg/mathbook-xml-support/coEowjfVDUk/a8iEIk_9DQAJ

davidfarmer commented 8 years ago

The special treatment of abbreviations seems like a temporary measure. If we had an "s" sentence tag wrapper around sentences, then you would know that the "." inside the sentence should not get extra space after it.

rbeezer commented 8 years ago

I'm not so sure about the temporary nature. A web browser might do something with text wrapped in abbr. With a sentence tag, we still might not know when MBA or et al. was an abbreviation, and I think we would have a hard time deciding exactly where it started.

I am not convinced that an MBX abbr will allow the LaTeX output to properly handle every period, but with abbr and a sentence tag, the undecidable special cases might be very limited.

In any event I see abbr as something you use to get the best possible output (a book), but not for less valuable things (Sage in-class worksheet). So optional, in a way. If it is absent, we do our best to infer no bad decisions.

And if I can abstract abbr on a per-format basis, then things like vs. will become one-shot definitions down in mathbook-common.xsl, which is a long-term goal for maintenance and stability.

rbeezer commented 8 years ago

Abbreviation, acronyms, and initialisms implemented as <abbr>, <acro> and <init> at 237cd660

See also #263