diff --git a/lib/symbols b/lib/symbols index f1fa587e3f..aac3ee3b6c 100644 --- a/lib/symbols +++ b/lib/symbols @@ -58,7 +58,7 @@ overline decoration none overrightarrow decoration none tilde decoration none uline decoration none ulem -underbar decoration none +underbar decoration everymode underbrace decoration none underleftarrow decoration none amsmath underleftrightarrow decoration none amsmath diff --git a/src/mathed/InsetMathDecoration.cpp b/src/mathed/InsetMathDecoration.cpp index 614904c4bc..960b6b78ab 100644 --- a/src/mathed/InsetMathDecoration.cpp +++ b/src/mathed/InsetMathDecoration.cpp @@ -182,7 +182,8 @@ void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const void InsetMathDecoration::write(TeXMathStream & os) const { bool needs_mathmode = currentMode() == MATH_MODE; - bool textmode_macro = currentMode() == TEXT_MODE; + bool textmode_macro = currentMode() == TEXT_MODE + && key_->extra != "everymode"; MathEnsurer ensurer(os, needs_mathmode, true, textmode_macro); if (os.fragile() && protect()) os << "\\protect";