[Top][All Lists]

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

Re: behavior of @math with HTML output

From: Vincent Lefevre
Subject: Re: behavior of @math with HTML output
Date: Sat, 15 Oct 2022 12:33:32 +0200
User-agent: Mutt/2.2.7+47 (8681885b) vl-149028 (2022-10-10)

On 2022-10-14 21:27:22 -0500, Jacob Bachmeyer wrote:
> Vincent Lefevre wrote:
> > I assumed that this was for commands that exist in plain TeX, which
> > is not the case of @var.
> Since "var" actually is a TeX macro (Texinfo works by adjusting TeX's
> configuration to make @ introduce commands, like backslash does in plain
> TeX), would the correct syntax be "@math{\var{base} \le 16}" for the example
> above?

And @math should accept @ as a synonym, e.g.

  @math{@var{base} @le{} 16}

which could also be used for Info. This is what is currently done in
the MPFR manual for this particular formula and some other ones (but
instead of @math, one could also use a macro that would expand to
@math{\ARG\} for PDF output and just \ARG\ otherwise). So one just
needs to write the formula once.

> TeX has an \ifmmode conditional that is true in math mode; @var/\var and
> other marking macros could be adjusted to mark their arguments appropriately
> when invoked in math mode.  Are there other macros that would be appropriate
> in @math?  At first glance, @var seems unique here.

Also user macros. The MPFR manual currently has:

@end tex
@macro GMPabs {X}
@end macro
@end ifnottex

\gdef\abs{\mathop{\rm abs}}
@end tex
@macro abs
@end macro
@end ifnottex

(this has been copied on the GMP manual, with minor changes).

The idea is still to write code that would be valid for HTML, Info
and PDF output at the same time.

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]