4

I want to write a symbol like the one shown in the following image

enter image description here

but I can't make it work. I tried:

$$ \underbar{\nabla} $$

but it didn't work (I think the reason for this is that the input for the underbar command should be only text.

How can I make this work ?

  • Why are you using the text-mode command \underbar instead of the math-mode command \underline? – Mico Jun 21 at 3:30
  • I wasn't aware of that command :D. Now, I know. – Andreas Mastronikolis Jun 21 at 9:07
14
\documentclass{article}

\begin{document}

$\underline{\nabla}$
\end{document}
4
\documentclass{article}
\usepackage{amsmath}

\begin{document}

$\underbar{\hbox{$\nabla$}}$
\end{document}

or, alternately,

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$\setbox0=\hbox{$\nabla$}\underbar{\box0}$
\end{document}

enter image description here

  • Thanks! Will accept the answer when I can (apparently it needs some time) – Andreas Mastronikolis Jun 20 at 18:08
  • 4
    the system forces you to wait to allow time for, hmm, better answers:-) – David Carlisle Jun 20 at 18:13
  • @DavidCarlisle Answers, schmansers. – Steven B. Segletes Jun 20 at 18:14
  • 3
    \underline is the primitive (and math mode), \underbar is a latex text mode version defined essentially as \def\hbar#1{\underline{\hbox{#1}} so nesting that in another hbox layer and another math group to get back to math mode is not the most direct route. – David Carlisle Jun 20 at 18:18
  • @DavidCarlisle My sarchasm was purely in jest. If you post, the answer is almost assuredly better than mine, and always for good reason. – Steven B. Segletes Jun 20 at 18:19

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.