]> git.lyx.org Git - features.git/commitdiff
Fixes for nested ulem commands
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 4 May 2018 17:32:38 +0000 (19:32 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 5 May 2018 08:09:04 +0000 (10:09 +0200)
1. \uuline must be on top of \sout
2. \uwave in \xout needs a hack to compile

(cherry picked from commit 9fd94a2dd0631a7d408ad013736312a5cf563f2f)

src/Font.cpp
status.23x

index e81e12449ba2c7b9e0325667670aec7e97d985ad..b810e454d4c65335bed03d0bef5c613698d9f9ec 100644 (file)
@@ -441,6 +441,11 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
                count += 10;
                ++runparams.inulemcmd;
        }
+       if (f.uuline() == FONT_ON) {
+               os << "\\uuline{";
+               count += 11;
+               ++runparams.inulemcmd;
+       }
        if (f.strikeout() == FONT_ON) {
                os << "\\sout{";
                count += 9;
@@ -451,12 +456,13 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
                count += 9;
                ++runparams.inulemcmd;
        }
-       if (f.uuline() == FONT_ON) {
-               os << "\\uuline{";
-               count += 11;
-               ++runparams.inulemcmd;
-       }
        if (f.uwave() == FONT_ON) {
+               if (runparams.inulemcmd) {
+                       // needed with nested uwave in xout
+                       // see https://tex.stackexchange.com/a/263042
+                       os << "\\ULdepth=1000pt";
+                       count += 15;
+               }
                os << "\\uwave{";
                count += 10;
                ++runparams.inulemcmd;
index 4228e96113e686383bc2a746bbee44690406ba3f..a740f49e7137cc4be04eb75d61055365cd01621b 100644 (file)
@@ -143,6 +143,8 @@ What's new
 
 - Load hyperref with a suitable driver (bug 6418).
 
+- Fix LaTeX errors with nested ulem commands.
+
 - Recompile grandchildren when they have updated (bug 11112).
 
 - Output list of bibliography files in the order given in the dialog, rather