7

Possible Duplicate:
How to look up a symbol?

When I do $\not>$ in LaTeX it gives me not greater than, however I would like the bar to vertical instead of slanted. How do I do that?

marked as duplicate by cmhughes, lockstep, Martin Schröder, Marco Daniel, percusse Aug 20 '12 at 6:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • how-to-look-up-a-symbol and then pg 38 of texdoc symbols gives \documentclass{article} \usepackage{mathabx} \begin{document} $2\ngtr 3$ \end{document} – cmhughes Jul 24 '12 at 18:47
  • \ngtr doesn't work, beause mathabx clashes with another package on several symbols. – Mads Ohm Larsen Jul 24 '12 at 19:48
  • You might be interested in my comment to Boris' answer. – Hendrik Vogt Aug 5 '12 at 9:42
3

Something like this, using \rlap to typeset bar, but not move the point?

\documentclass{article}
\thispagestyle{empty}

\begin{document}
$a\rlap{\kern.45em$|$}>b$

\end{document}

enter image description here

  • Your suggestion doesn't work when TeX needs to stretch a line to achieve justified text: the vertical bar will move quite a bit to the left. See this answer for details. – Hendrik Vogt Aug 5 '12 at 9:41
13

Overprinting symbols or text is possible \ooalign. The following MWE provides \ngrt and \nlst as math relations:

enter image description here

\documentclass{article}
\newcommand{\ngrt}{%
  \mathrel{\ooalign{$>$\cr\hidewidth$|$\hidewidth}}%
}
\newcommand{\nlst}{%
  \mathrel{\ooalign{$<$\cr\hidewidth$|$\hidewidth}}%
}

\begin{document}
$a\ngrt b\nlst c$
\end{document}​

For a quick course in \ooalign, see \subseteq + \circ as a single symbol (“open subset”).

  • 1
    This one is perfect. :) – egreg Jul 24 '12 at 20:02

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