LaTeX forum ⇒ Text FormattingBar above and below character Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
AdiJAIN1129
Posts: 3
Joined: Sun Aug 30, 2015 11:24 pm

Bar above and below character

Postby AdiJAIN1129 » Sun Aug 30, 2015 11:27 pm

Hi, so I need to be able to put a bar both above and below the same character. I know I can use \bar{X} to put a bar above X and use accents to put one below, but what will allow me to have a bar over the letter and a bar below the same letter?

Thanks!

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Mon Aug 31, 2015 12:06 am

Welcome to the LaTeX community!

Do you need text accents or math accents?

  1. \documentclass{article}
  2.  
  3. \begin{document}
  4.  
  5. Text: \b{v} \={v} \b{\={v}}
  6.  
  7. Math: $\underline{v}$ $\bar{v}$ $\underline{\bar{v}}$
  8.  
  9. \end{document}


There's also \underbar but its contents are placed in text mode so it's not suitable for mathmode.

There's also the accents package for a math underbar (and other things):

  1. \documentclass{article}
  2. \usepackage{accents}
  3. \begin{document}
  4.  
  5. Math: $\underaccent{\bar}{v}$ $\underaccent{\bar}{\bar{v}}$
  6.  
  7. \end{document}


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

AdiJAIN1129
Posts: 3
Joined: Sun Aug 30, 2015 11:24 pm

Postby AdiJAIN1129 » Mon Aug 31, 2015 12:12 am

Ah, I didn't realize you could combine the use of underaccent and bar like that. That's perfect, thanks!


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 9 guests