semprag / tex

S&P LaTeX and BibTeX sources
The Unlicense
3 stars 1 forks source link

Inconsistencies in changing from times/cm to lucida #5

Open chbrown opened 8 years ago

chbrown commented 8 years ago

sp.cls imports different packages based on what font option is supplied in the documentclass.

The means an author can use commands from, for example, stmaryrd, without explicitly importing that package, but this breaks when moving to production and adding the lucida flag.

It's an easy fix to explicitly \usepackage the previously implicitly required package in the article's preamble, but that seems sub-optimal.

fintelkai commented 8 years ago

Have you seen this issue in real life? The four packages in question are

  1. amssymb
  2. textcomp
  3. mathptmx (just for times)
  4. stmaryrd (which is needed for semantic value brackets)

amssymb is recreated in lucimatx.sty and should not be loaded when using the lucida fonts.

textcomp is actually loaded by lucimatx.sty itself.

I don't remember why mathptmx is called.

We could dispense with stmaryrd and just import the two glyphs for semantic value brackets.

chbrown commented 8 years ago

I'm prepping CondoravdiLauer-Anankastics.tex for production work, and they use \shortrightarrow from stmaryrd, so yeah. I haven't hit this before on anything else, though.

chbrown commented 7 years ago

Looking at this more, stmaryrd and lucimatx conflict (or at least the setup in the \if@lucida branch in sp.cls), so order of import matters. You'll get different looking semantic brackets (among other things, I expect) in the final Lucida render depending on whether the user called \usepackage{stmaryrd} or not. This is bad. Two options:

  1. \RequirePackage{stmaryrd} in sp.cls before running the lucimatx import and other Lucida setup. If we do this, our custom Lucida settings will win whatever conflicts might occur, and any subsequent \usepackage{stmaryrd} calls in the author's TeX will (necessarily) be ignored.
  2. Add stmaryrd to the list of forbidden imports, with an exception for uses like \usepackage[only,funnsymbol1]{stmaryrd} that don't overwrite existing commands.