If you're doing much copy-paste from word processors, then it's better to load
\usepackage[utf8]{inputenc}
in your LaTeX document. Then you can teach LaTeX new correspondences between Unicode characters and LaTeX set of known objects, in this case
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar}
%% the first is the “unknown minus” (U+2212), the second is a hyphen
\newunicodechar{−}{-}
\begin{document}
$−1$
\end{document}
How do you know there's something amiss? Look in the .log file: you should find several instances of something like
Missing character: There is no <E2> in font cmr10!
Missing character: There is no <88> in font cmr10!
Missing character: There is no <92> in font cmr10!
one for each “disappearing” minus sign. Indeed, if you don't load inputenc
with the utf8
option, TeX just sees the three byte representation of U+2212, precisely the bytes 0xE2
, 0x88
and 0x92
that don't correspond to a printable character, because the default TeX fonts have only 128 glyphs.
With utf8
, but no \newunicodechar
declaration you'd get an error:
! Package inputenc Error: Unicode char \u8:− not set up for use with LaTeX.
and you can so understand what went wrong: the minus sign is not understood. Copy it and use it for defining the correct \newunicodechar
declaration.