diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index cd00e0d023..9f606ff0a2 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -142,6 +142,9 @@ void InsetRef::latex(otexstream & os, OutputParams const & rp) const string const cmd = getCmdName(); docstring const data = getEscapedLabel(rp); + if (rp.inulemcmd) + os << "\\mbox{"; + if (cmd == "eqref" && buffer().params().use_refstyle) { os << '(' << from_ascii("\\ref{") << data << from_ascii("})"); } @@ -159,6 +162,9 @@ void InsetRef::latex(otexstream & os, OutputParams const & rp) const p["reference"] = ref; os << p.getCommand(rp); } + + if (rp.inulemcmd) + os << "}"; } diff --git a/status.20x b/status.20x index 029bfcc739..7f51249be6 100644 --- a/status.20x +++ b/status.20x @@ -32,6 +32,9 @@ What's new - Add support for some IPA diacritics. +- Enclose underlined \ref{} commands in \mbox{} to protect them when + using the package soul in place of (or together with) ulem. + * TEX2LYX IMPROVEMENTS