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.

I have a > symbol in my LateX file. Specifically, I have the sentence:

Say I have n > 1 apples.

When compile my .tex document using pdflatex, I get a pdf with an upside-down question mark in place of the > symbol.

I checked this math guide for TeX and saw no special markup for >. ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf

What is going on?

share|improve this question
4  
That's an equation, so you should be using math mode by enclosing the text in $...$: Say I have $n > 1$ apples. –  Jake Jan 25 '12 at 0:04
    
Thanks, how did pdflatex detect that I was in math mode? –  David Faux Jan 25 '12 at 0:05
    
For instance, I could have very well been writing a paragraph that happened to contain n > 1, right? –  David Faux Jan 25 '12 at 0:07
3  
TeX doesn’t detect maths automatically. The author requests mathmode by writing \( math \) or \[ math \] when using LaTeX and $ math $ or $$ math $$ when using plain TeX. –  uli Jan 25 '12 at 0:12
1  
@uli Actually PDFTeX will try and guess when you are in math mode, but it is really bad at it an will screw up when it does. As someone who forgets ( too often I've seen that error a few times >.> –  Canageek Jan 25 '12 at 0:13

1 Answer 1

up vote 16 down vote accepted

Related question: Less than symbol (<) appears as upside down “!”

Short answers:

This specific example should really be in math mode, since n is a variable. But for completeness:

\documentclass{article}
% comment out to see inverted question mark in place of > in ``Regular'' entry.
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\begin{document}
\begin{itemize}
\item Say I have n > 1 apples (regular, with or without fontenc package).
\item Say I have \( n > 1 \) apples (math mode).
\item Say I have n \textgreater{} 1 apples (textcomp).
\end{itemize}
\end{document}

enter image description here

Also, the math mode greater-than sign is a bit heavier than the text symbols.

share|improve this answer

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.