[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: behavior of @math with HTML output
From: |
Gavin Smith |
Subject: |
Re: behavior of @math with HTML output |
Date: |
Sun, 16 Oct 2022 12:30:02 +0100 |
On Sat, Oct 15, 2022 at 07:14:04PM -0500, Jacob Bachmeyer wrote:
> Since @math is defined to use TeX syntax in its argument, would it be better
> to extend the other Texinfo processors to recognize \var inside @math and do
> whatever is needed to make it act as @var in that case?
@var already seems to do the right thing in Info, HTML, DocBook, LaTeX,
and texinfo.tex output.
I see no benefit to extending texi2any to recognize e.g. \var as well. I'm
going to change the documentation to make it clear that Texinfo
@-commands are still accessed with @ not \ inside @math.
> Because math expressions will often contain variables also mentioned
> in running text, Texinfo supports one extension to plain TeX in
> @math: the Texinfo @var{...} command is available as \var{...}
> inside the argument of a @math command.
It wouldn't be surprising if people wanted to use other Texinfo commands
inside @math too, so I'd rather leave it ambiguous.
> ... or something similar. There is no (good) way to make this /not/ work
> with texinfo.tex (for TeXnical reasons) but the other Texinfo processors
> would need to be extended to support it.
Au contraire, code is needed in texinfo.tex for this (in the definition
of \sl, assigning \fam).
> > It also works well enough with MathJax with Patrice's latest change,
> > using \mathit for the variable names (there appears to be no "\mathsl" so
> > there is a slight difference in font style in and out of math - this
> > seems unavoidable).
>
> If I am reading my copy of /TeX for the Impatient/ correctly, the ordinary
> plain TeX \sl command should work in math mode.
It does, but not with MathJax (or the version I tested).
> Note that I am not sure
> that HTML normally has slanted fonts at all, so MathJax may be stuck with
> substituting italics for slanted; this would be an output format limitation,
> much as plain text and Info lack the ability to change fonts at all, but
> should also be consistent: if HTML substitutes italics for slanted, the
> normal use of @var would also produce italic text.
- Re: behavior of @math with HTML output, (continued)
- Re: behavior of @math with HTML output, Gavin Smith, 2022/10/15
- Re: behavior of @math with HTML output, Vincent Lefevre, 2022/10/15
- Re: behavior of @math with HTML output, Patrice Dumas, 2022/10/15
- Re: behavior of @math with HTML output, Gavin Smith, 2022/10/15
- Re: behavior of @math with HTML output, Patrice Dumas, 2022/10/15
- Re: behavior of @math with HTML output, Gavin Smith, 2022/10/15
- Re: behavior of @math with HTML output, Patrice Dumas, 2022/10/15
- Re: behavior of @math with HTML output, Jacob Bachmeyer, 2022/10/15
- Re: behavior of @math with HTML output,
Gavin Smith <=
- Re: behavior of @math with HTML output, Patrice Dumas, 2022/10/15