[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @math{-} does not produce a minus sign in Info
From: |
Gavin Smith |
Subject: |
Re: @math{-} does not produce a minus sign in Info |
Date: |
Tue, 25 Oct 2022 12:46:31 +0100 |
On Tue, Oct 25, 2022 at 01:25:35PM +0200, Vincent Lefevre wrote:
> 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::).
Why does it matter if the Unicode minus character is not used in Info?
The ASCII hyphen is just as good. It's wrong to say that - isn't a minus
sign because it looks just like one.
>
> BTW, it contradicts
>
> 11.7 '@math' and '@displaymath': Formatting Mathematics
>
> which says that "the '@math' command has no special effect on the Info
> output".
The @minus node wasn't specifically discussing Info output. We can change
it to
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index bc1eebac87..1b7f029ba4 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -10308,8 +10308,7 @@ @node @code{@@minus}
@end display
If you actually want to typeset some math that does a subtraction, it
-is better to use @code{@@math}. Then the regular @samp{-} character
-produces a minus sign, as in @code{@@math@{a-b@}} (@pxref{Inserting
+is better to use @code{@@math}, as in @code{@@math@{a-b@}} (@pxref{Inserting
Math}).
to eliminate discussion of what character - may be output as.
> 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}.
Neither of these are a good idea. As it's been stated many times before,
no interpretation of the argument takes place for @math in Info, and
@math{a@minus{}b} is clearly worse than @math{a-b} so we are not going
to recommend that usage to people.
If we needed to have consistency between @math{-} and @minus{} in Info
output, the only way to achieve this would be to make @minus{} output
an ASCII hyphen. This wouldn't do anything for HTML output, though.