I am trying to define a macro for double underline in TeX (not LaTeX).
Asked
Active
Viewed 5.8k times
12
-
The title and the body of your posting seem to contain some ambiguity: Is the double-underlining supposed to happen in text mode or math mode? – Mico Jun 10 '15 at 16:24
-
1Well, for example, what are you trying to underline? A single symbol? A very long math expression? – Alenanno Jun 10 '15 at 16:24
-
Welcome to TeX.SE. – Peter Grill Jun 10 '15 at 17:36
1 Answers
19
The first idea that comes to mind is
\def\doubleunderline#1{\underline{\underline{#1}}}
$\doubleunderline{a+b}$
\bye

egreg
- 1,121,712
-
1The
\underline{\underline{#1}}has the "drawback" that the underlines of two consecutive underlined symbols merge, e.g.$\doubleunderline{a}\doubleunderline{b}$, which is often not what one would want in the context of writing matrices double underlined... – Christoph90 Jan 08 '18 at 10:13 -
-
This also has the drawback of letting an awkward space between the two lines. – Arnaud Mortier Jun 09 '18 at 17:52