[MacPorts] #47972: LaTeXML: texlive-related improvements

MacPorts noreply at macports.org
Sat Jun 6 06:12:21 PDT 2015

#47972: LaTeXML: texlive-related improvements
  Reporter:  mojca@…      |      Owner:  bruce.miller@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:  LaTeXML      |

Comment (by bruce.miller@…):

 Maybe some background would help to understand a slightly peculiar
 situation. LaTeXML interacts with a local TeX installation in 2 ways:
 * LaTeXML increases the coverage of documents it can convert to XML/HTML
 by using native LaTeX style files (which it finds using `kpsewhich`), and
 can eg. generate images for math (tho' MathML is better! :>) by using
 latex & various dvi tools.  Since currently all the relevant files are
 found dynamically (via `$PATH` or `kpsewhich`), these features will work
 as long as there is ''any'' latex in the search path at run time, whether
 or not from MacPorts. Almost all users will expect this and consider it a
 bug when the "obvious thing" doesn't work; they'll want, at least,
 texlive-latex and any other packages that they expect to use.
 * LaTeXML also provides a couple of latexml-specific style files that
 users can use to customize their LaTeX documents. The documents can be
 enhanced when converted to XML/HTML with RDFa, CSS, headers, footers, etc;
 this works out-of-the-box with LaTeXML.  But it's important that the
 documents can also be processed with regular LaTeX, which it can provided
 the regular versions of the style files have been installed where TeX can
 find them, usually needing the lsr index to be rebuilt (using mktexlsr).

 Consequently, there's no need for a ''dependency'' to get the first set of
 features, although a user needs to be made aware that they probably should
 install ''some'' TeX.  The 2nd features is the tricky one and almost could
 get away without a dependency. (I'll discount clumsy solutions with
 `$TEXINPUTS` or editing `texmf.cnf`)

 Given all your thought provoking comments, I'm inclined to think that
 perhaps the following approach would be good.
 Have the `+mactex` variant as it is, but if `+mactex` is not used (would
 that be a "default" variant?), proceed as:
 * have no additional texlive dependencies, but issue a note or warning
 about the desirability of installing it if it isn't present.
 * go ahead and install the style files where the texlive PortGroup would
 expect them if it were there.
 * gently attempt to run `mktexlsr`, if it is available. (I assume that
 post-activate would still be run when the ''user'' installs LaTeXML, even
 when it's been prepared by a buildbot?) Unfortunately, this slightly
 changes behaviour depending on context, which seems frowned upon. Is that
 a fatal flaw?

 This would then allow the user to install any texlive set or subset they
 want, before or after installing LaTeXML. Probably installing a texlive
 package after LaTeXML would automatically invoke `mktexlsr`? If not, the
 user would need to.

Ticket URL: <https://trac.macports.org/ticket/47972#comment:7>
MacPorts <https://www.macports.org/>
Ports system for OS X

More information about the macports-tickets mailing list