For my thesis, I would like to use (light gray) underlines to indicate the rank of tensors. There are three modes: No underline, one underline and two underline. (For rank-0, rank-1 and rank-2 tensors.)

Currently, it looks like this:

example for underlines

Since the underlines are not essential, they should not disturb the reader. But I do not like, that the underlines are all at different heights.

For example

$\underline{\underline{G}}, \underline{\underline{g}}$

results in

different heights

Is there an easy way to have the underlines all the the same height?

I would not mind, if the underlines are in the background and the letters might overlap them a bit...

I know, underlines are an ugly idea, but in elasticity, there are many variables to keep in mind. Therefore, I would like to support the reader at least a little bit. But if I do not find a good notation, I will just drop the idea.

I don't want to use \mathbb or other too fancy font modes. (These are sometimes used to denote rank-4 tensors already.) I can not use lower or upper case to distinguish them, since this already indicates the domains and I want to stay close to my literature.

  • 1
    Here's the easy way: $\underline{\underline{\vphantom{g}G}}, \underline{\underline{g}}$ or $\underline{\underline{G}}, \underline{\underline{\smash{g}}}$ – Werner Sep 13 '18 at 19:41
  • That's exactly what I looked for! This answers my question. Thanks! – Steffen Plunder Sep 13 '18 at 19:44

You should create a syntax that you can change easily, so define commands for what you want. Here are some options:



The above provides \something (whatever your use-case would be for printing elements in bold) and two underline macros: \suline that adds a single underline and \duline for double underlines.

If you want all underlines to be at the same level, you could try using:


\mathstrut is a box of "typical" height/depth.

  • I actually like the \smash solution most ;) But \mathstrut is also a useful command here. – Steffen Plunder Sep 13 '18 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.