Dear developers

I finally ended with no errors with the ctest of the 335 files in doc, examples and templates directories containing one or more of the ten math options set to "Do not load".

Then I ran the following filter on the files

s/use_package amsmath 0/use_package amsmath 1/;
s/use_package amssymb 0/use_package amssymb 1/;
s/use_package cancel 0/use_package cancel 1/;
s/use_package esint 0/use_package esint 1/;
s/use_package mathdots 0/use_package mathdots 1/;
s/use_package mathtools 0/use_package mathtools  1/;
s/use_package mhchem 0/use_package mhchem 1/;
s/use_package stackrel 0/use_package stackrel 1/;
s/use_package stmaryrd 0/use_package stmaryrd 1/;
s/use_package undertilde 0/use_package undertilde 1/;

to make the loading automatic.

Then I reran the ctest command (I run ctest only on xhtml, pdf and pdf2 export formats).

I got 5 errors, which in fact are two:
- export of doc/Math.lyx (and the 3 translations of the doc file in German, Spanish and French). This is due to the fact that unlike the code added in the preamble to create the boolean \ifundertilde, what is added by the math options mechanism is an unconditional \usepackage{undertilde} command. As undertilde is not installed on my system, compilation stops with a fatal error. This is clearly a situation where the math option panel has been superseded by code in the preamble, so that "Do not load" should remain enforced. - export of file templates/IOP-article.lyx, because as it is said in the LyX-note of the file:

<cite>
* the two options Use AMS math package in the document settings under Math Options are not used
* you do not use AMS Math Environments
</cite>

This case is not clear, because if no ams construct are used in the document,
amssymb and amsmath should not be loaded if the automatic loading option is checked. But amsmath is loaded all right, and a lot of conflicts happen between the IOP class and amsmath.sty.

I do not get any error with the remaining ctested 330 files.

I reverted the changes in the 4 Math.lyx files and the IOP-article.lyx file, I can commit the changes that I made to the other files, but this raises two questions - why does automatic loading load a package that the file does not request? How does this automatic loading feature exactly work? - are there other files than Math.lyx where the preamble supersedes the automatic loading mechanism?

What do you think? Should I parse the files to find \usepackage{xxx} command in preambles, where xxx is one of the ten math packages managed by math options, or is it sufficient to have no ctest failure?

--
Jean-Pierre

Reply via email to