-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
\sout should be a text-mode command, not a math mode one #4166
Copy link
Copy link
Closed
Description
\sout defined by \usepackage{ulem} (doc) is designed for text mode. While it seems to be allowed in math mode it doesn't actually do the right thing. For example, in LuaLaTeX:
\text{\sout{ab}}works fine\text{\sout{$ab$}}works fine$\sout{ab}$compiles but shows an underline, which is not the intended use of\sout
KaTeX seems to do the opposite:
- In text mode, it incorrectly gives: "KaTeX parse error: Can't use function '\sout' in text mode"
- In math mode, it behaves like a proper strike-out, even though it doesn't seem intended to be used as such with
ulem's current behavior.
Screenshot of LuaLaTeX behavior for the following LaTeX
a\sout{bc}d
a\sout{$bc$}d
$a\sout{bc}d$
Reactions are currently unavailable