On Fri, Jul 22, 2022 at 02:58:21PM -0700, Raymond Toy wrote:
> I'm getting a funny line break when displaying MathJax inline formulas on
> an html page. The TeX version doesn't have a line break.
>
> It's part of a much larger document from maxima, but the relevant part is
> given below. On the html page, there's a line break before "is the
> solution subject". All the other parts have no unexpected line breaks.
> Other than that, the formulas and everything display very nicely.
>
> This is with texinfo 6.8.
>
The problem is that you are using @html as well as @ifhtml. If you
take the @html lines out the results are good.
Indeed it does. Thanks!
This example comes from maxima, and before the manual was updated to use texinfo 6.8, the @html block contained html that contained the mathjax formula to be shown. Since it mostly worked when the formula was updated to use @math{}, I didn't think about it. It should all be fixed now.
Although using Texinfo commands like @math in @html appeared to work
here, this is not at all recommended and the results are unpredictable.
@html is for raw HTML only. To my knowledge, the only Texinfo commands
that should occur in these "raw blocks" are @@, @{ and @}, as well as
possibly macros and conditionals. There might be more work to be done
here on texi2any to issue warnings for invalid command nestings.
Processed with '../texi2any.pl mathjax.texi --html -c HTML_MATH=mathjax'
for development version:
\input texinfo
These two solutions are oscillatory for @math{x < 0}.
@ifhtml
@math{{\rm Ai}(x)}
@end ifhtml
@ifinfo
@math{Ai(x)}
@end ifinfo
@tex
${\rm Ai}(x)$
@end tex
is the solution subject to the
condition
@ifhtml
@math{y\rightarrow 0}
@end ifhtml
@ifinfo
@math{y -> 0}
@end ifinfo
@tex
$y\rightarrow 0$
@end tex
as
@ifhtml
@math{x\rightarrow \infty}
@end ifhtml
@ifinfo
@math{x -> inf}
@end ifinfo
@tex
$x\rightarrow \infty$
@end tex
.
@html
@math{{\rm Bi}(x)}
@end html
@ifinfo
@math{Bi(x)}
@end ifinfo
@tex
${\rm Bi}(x)$
@end tex
is the second solution with the
same amplitude as
@ifhtml
@math{{\rm Ai}(x)}
@end ifhtml
@ifinfo
@math{Ai(x)}
@end ifinfo
@tex
${\rm Ai}(x)$
@end tex
as
@ifhtml
@math{x
\rightarrow -\infty}
@end ifhtml
@ifinfo
@math{x -> minf}
@end ifinfo
@tex
$x
\rightarrow -\infty$
@end tex
which differs in phase by
@ifhtml
@math{{\pi/2}}
@end ifhtml
@ifinfo
@math{%pi/2}
@end ifinfo
@tex
${\pi/2}$
@end tex
@bye