bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@math{-} does not produce a minus sign in Info


From: Vincent Lefevre
Subject: @math{-} does not produce a minus sign in Info
Date: Tue, 25 Oct 2022 13:25:35 +0200
User-agent: Mutt/2.2.7+51 (a318ca5a) vl-149028 (2022-10-21)

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 <vincent@vinc17.net> - 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]