If I write @math{-2} (where "-" is the ASCII HYPHEN-MINUS character),
I do not get a minus sign in Info, contrary to @minus{}2, while the
Texinfo manual suggests the use of @math with the regular '-' character
instead of @minus:
11.8.9 '@minus' (-): Inserting a Minus Sign
-------------------------------------------
[...]
If you actually want to typeset some math that does a subtraction, it
is better to use '@math'. Then the regular '-' character produces a
minus sign, as in '@math{a-b}' (*note Inserting Math::).
BTW, it contradicts
11.7 '@math' and '@displaymath': Formatting Mathematics
which says that "the '@math' command has no special effect on the Info
output".
However, @minus{} seems to work in @math for both Info output and TeX
(PDF output).
So I suppose that either @math{-} should generate a minus sign in Info
(and HTML) output or the manual should suggest the use of both @math
and @minus: @math{a@minus{}b}.
Tests done with:
\input texinfo @c -*-texinfo-*-
@documentencoding UTF-8
@node Top
@node Test
Test of minus.
@var{n} = @minus{}2
@math{@var{n} = -2}
@math{@var{n} = @minus{}2}
@var{n} = @var{a} @minus{} @var{b}
@math{@var{n} = @var{a} - @var{b}}
@math{@var{n} = @var{a} @minus{} @var{b}}
@bye
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)