Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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

3 Answers 3

up vote 10 down vote accepted

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}.

share|improve this answer
    
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
1  
@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}

enter image description here

share|improve this answer

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

share|improve this answer
    
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 at 21:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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