From 9fd94a2dd0631a7d408ad013736312a5cf563f2f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 4 May 2018 19:32:38 +0200 Subject: [PATCH] Fixes for nested ulem commands 1. \uuline must be on top of \sout 2. \uwave in \xout needs a hack to compile --- src/Font.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index e81e12449b..b810e454d4 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -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; -- 2.39.5