On 2015-06-16, Steve Hnizdur wrote:

> The point is that the \usepackage(undertilde} added by Lyx to the 
> preamble doesn't load the undertilde.tex file. The compilation error is 
> that undertilde.sty is not found. Hence \input{undertilde} is needed in 
> the preamble and has to supplied by the user.

So, a change like::

diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index d5b8b2f..1f551b4 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -926,9 +930,10 @@ string const LaTeXFeatures::getPackages() const
            params_.use_package("stackrel") != BufferParams::package_off)
                packages << "\\usepackage{stackrel}\n";
 
+        // undertilde is not a package (*.sty) but a *.tex file
        if (mustProvide("undertilde") &&
                params_.use_package("undertilde") != BufferParams::package_off)
-               packages << "\\usepackage{undertilde}\n";
+               packages << "\\input{undertilde}\n";
 
        // [x]color and pdfcolmk are handled in getColorOptions() above


would be required?

Before applying this, we would need to check why it seemed to work in some
cases. It may be, that some distributions have "undertilde.sty" and some
"undertilde.tex", the something like 

 \InputIfFileExists{undertilde.tex}{}{\usepackage{undertilde}}
 
should be used.

Günter 

Reply via email to