Math & ScienceMissing minus inside equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
arunappa
Posts: 2
Joined: Thu Jun 09, 2011 3:09 am

Missing minus inside equation

Post by arunappa »

Under cygwin, the following latex code

Code: Select all

\documentclass{article}

\begin{document}

One of the most important inequalities in calculus is
\[
        0 < |x−a| < \delta
\]
where $\delta$ is a positive real number.

\end{document}
when run through latex, dvips and gv commands or pdflatex command
is missing the minus sign between 'x' and 'a' in generated output.

$ latex -v
pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
kpathsea version 3.5.4

$ pdflatex -v
pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)
kpathsea version 3.5.4

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Missing minus inside equation

Post by frabjous »

This is because you're using a unicode minus sign rather than a hyphen in the code, which plain LaTeX can't handle. Just replace it with a regular dash/hyphen:

Code: Select all

\documentclass{article}

\begin{document}

One of the most important inequalities in calculus is
\[
        0 < |x-a| < \delta
\]
where $\delta$ is a positive real number.

\end{document}
Which should generate a minus sign in the output anyway.

If you're really set on using unicode math symbols, you could try XeLaTeX with the unicode-math package, but I don't really see the need here. Aren't hyphens easier to type than true minus signs anyway?
Post Reply