I need help about how to put vertical line above number ?

  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Heiko Oberdiek Sep 17 '15 at 8:39
  • Welcome to TeX.SX! Your question is completely unclear! Which number? Which documentclass? – user31729 Sep 17 '15 at 8:39
  • 3
    Close-Voters: Give some time to improve the question ;- – user31729 Sep 17 '15 at 9:00
  • 1
    Do you mean something like a \bar{} rotated 90 degrees? @Christian Hupfer Isn't that what the on hold feature is for? – JJM Driessen Sep 17 '15 at 9:28
  • 2
    @Monika can you add a picture of what you want to your question (you can edit your question to add it)? Does the “vertical line” you want mean something? (And if yes: what does it mean?) – cgnieder Sep 17 '15 at 9:44

Something like this?


\usepackage{amssymb} % required for \shortmid

\newcommand{\vbar}[1]{\stackon[1pt]{$#1$}{\shortmid}} % vbar = vertical bar


Like this? \vbar{5}


enter image description here

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.