[Top][All Lists]

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

Re: behavior of @math with HTML output

From: Patrice Dumas
Subject: Re: behavior of @math with HTML output
Date: Thu, 13 Oct 2022 21:15:57 +0200

On Thu, Oct 13, 2022 at 11:57:26AM +0200, Vincent Lefevre wrote:
> The GMP manual has the following:
> @c  @m{T,N} is $T$ in tex or @math{N} otherwise.  Commas in N or T don't work,
> @c  but @C{} can be used instead.
> @iftex
> @macro m {T,N}
> @tex$\T\$@end tex
> @end macro
> @end iftex
> @ifnottex
> @macro m {T,N}
> @math{\N\}
> @end macro
> @end ifnottex
> with for instance a use like that:
> Set @var{rop} to @m{@var{op1} \times 2^{op2}, @var{op1} times 2 raised to
> @var{op2}}.
> So, if a PDF is generated, then TeX is used and everything is OK, but
> if HTML is generated, then one gets something like
>   @math{@var{op1} times 2 raised to @var{op2}}
> so MathJax would not make much sense on that. And since this is like
> normal text, I don't see why <em> makes sense.

I agree with Gavin, you should not use @math if you want normal text,
but given that there is now good support of TeX math in texi2any for
HTML with any of the 3 HTML_MATH option, I would suggest to use the TeX
code for HTML too and use the plain text in Info only, so something like

@macro m {T,N}
@end macro
@end ifinfo
@macro m {T,N}
@end macro
@end ifnotinfo

> and I still see no reasons to use <em> on this. I would rather see
> a <span class="math"> so that there would be no special styles by
> default (like for Info), but CSS could optionally be added.

I, personnally, do not have much preference on that issue.  However
given that you are the first one to report the issue, it is possible
that many users find the default <em> to be better.  It is possible with
<em> to make it be like span using CSS, so I think that changing the
default formatting has a high risk of displeasing many for an uncertain
gain in term of default formatting.  That being said, if there is
evidence that changing from <em> to <span> is favored by enough users,
that could be done.


reply via email to

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