Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I insert a double underline in Mathematica?
Can I make it the default to put it on the last line of a "TraditionalForm"?

share|improve this question
up vote 2 down vote accepted

I don't think that Mathematica can do double underlined. It's not one of the font variations that it supports. What you can do is use an iterated underscript. Select the text that you want and press Ctrl-4 (Ctrl-= in versions < 7) then enter the underscore character _ and repeat. It can also be created using the code Underscript[Underscript[1234, _], _]. For non-bold text, this looks like


But this is not what you probably want. I'm guessing that the second part of your question means that you have some long TraditionalForm outputs and you want the last line underlined to indicate/emphasize the end?

This is tricky for a couple of reasons. Firstly, I don't think that there's any (easy) way of modifying the typesetting procedure to detect and style the final line. Also, the wordwrapping is probably independent of what *Form you use to produce the boxes that are displayed in the cell.

You could put a CellFrame on the bottom of the output cells (either manually, or by modifying the "Output" style or by making your own "FramedOutput" cell style that you can use whenever you want), but this will not distinguish between StandardForm and TraditionalForm output. It also can not draw doubled lines (as far as I can tell...).

To modify an existing "Output" cell, select its bracket and press Ctrl-Shift-O to open the option inspector. Then go to the Cell > CellFrame section and set the CellFrame to {{0,0},{4,0}} where the number indicates the thickness of the frame, e.g.


To modify the stylesheet of a notebook go menu item Format > Edit Stylesheet. Click on the parent style sheet "Default.nb" and copy the Output subsection (from the "Styles for Input and Output Cells" section) into the stylesheet of the notebook you're working on. Then select the output subsection's cell bracket and use the option inspector (or modify the Cell Expression) to change the CellFrame as in the example above. Now all output cells will have a line beneath them.

You can modify the frame styling and size to suit your preferences.

Hope that helps!

share|improve this answer
You answered 4/4 of my Mathematica questions, didn't you? :P – Tyilo Aug 30 '11 at 14:08
@Tyilo: Maybe... There's not enough Mma users on superuser. Also, I've been practicing procrastinating. – Simon Aug 30 '11 at 14:16
@Tyilo: BTW did I properly understand what you were getting at in your question? – Simon Aug 30 '11 at 14:17
The first paragraph is exactly what i wanted. – Tyilo Aug 30 '11 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .