# \bar below symbol

Is there a command like \bar{...} but such that the bar is placed below the symbol?

Of course there is \underline{...} but then the line is adapted to the width of the symbol and I don't want that (compare with the difference between \overline{...} and \bar{...}).

I need this for math mode.

-
Do you need it in text mode or in math mode? Have a look at the accents package. –  egreg Jul 25 '13 at 13:02
Maybe this from amsmath: \underset{\bar{}}{A} –  Sigur Jul 25 '13 at 13:03
@egreg That's good. Could you turn the comment into an answer please. –  lpdbw Jul 25 '13 at 13:12

The accents package has the feature you're looking for:

\usepackage{accents}
\newcommand{\ubar}[1]{\underaccent{\bar}{#1}}


Why the \newcommand? Because you might change your mind or find a new way to underline a symbol, so you can just modify the definition instead of hunting through the document for occurrences of \underaccent{\bar}.

-
Interesting. With this we don't need to write \bar{} like mine suggestion. Also, the space between the symbol and the bar is different. –  Sigur Jul 25 '13 at 13:23
@Sigur The accents package ensures that the correct vertical dimension is assigned to the underaccent; with \underset{\bar{}}{x} you get a full vertical sized bar; and, moreover, it will be in script style. –  egreg Jul 25 '13 at 13:30

You can play with the three parameters (1.2pt underset gap, .8ex rule length, .075ex rule width

\documentclass{article}
\usepackage{stackengine}
\begin{document}
\newcommand\barbelow[1]{\stackunder[1.2pt]{$#1$}{\rule{.8ex}{.075ex}}}
$$\overline{A} \bar{A} \barbelow{A}$$
\end{document}


-

My solution is \newcommand{\ubar}[1]{\text{\b{$#1$}}} since I get a conflict of accents and amsmath packages concerning \vec command.

-
Can someone please explain why this has been downvoted? I am unsure if I should use the accents package in case there is indeed an assue with the amsmath package, as @SergeyPolyakovskiy suggests, however it is unclear. I have tried searching it in other questions and it seems that such a \vec issue does exist, but some clarification would be helpful. Thanks! –  Flint72 Oct 5 '14 at 21:25