bug-texinfo
[Top][All Lists]
Advanced

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

Re: MathJax support in texi2any


From: Christopher Dimech
Subject: Re: MathJax support in texi2any
Date: Tue, 13 Oct 2020 17:07:04 +0200


Sent: Tuesday, October 13, 2020 at 4:05 PM
From: "Patrice Dumas" <pertusus@free.fr>
To: "Christopher Dimech" <dimech@gmx.com>
Cc: "Gavin Smith" <gavinsmith0123@gmail.com>, "Texinfo" <bug-texinfo@gnu.org>, 
"Oliver Heimlich" <oheim@posteo.de>
Subject: Re: MathJax support in texi2any
On Tue, Oct 13, 2020 at 01:35:56PM +0200, Christopher Dimech wrote:
>
> The distinction between the variant of Tex the user codes should remain.
>
> For plain tex, the command should remain "@tex @end tex". As Latex Syntax
> is much different, there should be some command like @latex @end latex.
>
> Mixing creates too many problems to those making modifications. One should
> stick with the same syntax type according to the variant a user is actually
> coding with.

I agree in principle, but note that some manuals have already used @tex
for LaTeX, for instance the Singular manual. Right now texi2any
actually more or less accepts that with the --init latex2html.pm (for
LaTeX in @tex and @math) and --init tex4ht.pm (for TeX in @tex and a mix
of texinfo and TeX in @math), but I agree that it is confusing and it
would be better to have @latex, but LaTeX is not supported by texi2any.
I wanted to do an output in LaTeX, but I haven't found the time in like
5 years...

C*: I consider that authors with too much latex to be a mistake in planning.
One can write a script to print the tex and latex code and simplify it with
plain tex. If Latex is not supported by texi2any, it should say: latex is not
supported in texinfo.  And when it becomes supported, we can have the specific
declaration @latex in there.

C*: My suggestion would be that if html is going to support mathematical 
expression,
the implementation should be done first for plain tex. So manuals with latex
sections would only be processed with plain tex. 

> However, when transforming to html, texinfo should parse the respective 
> variant
> without having the user specify any html tags.

You mean without?

C*: Yes, I meant without.


In any case, there is no perfect solution here, as when outputting html
it is not easy to select the @tex/@latex blocks tht should be used. One
can use the conditionals, but then there is an ambiguity on whether they
are for html or TeX output. It is possible to use double conditionals
but then it becomes tedious.

There is no perfect solution, but a bad solution would be to have a
convoluted acceptance of various variants in the same section, that
maintainers could regret having done later on, as people would start
coding all sort of mixed code. That would be a parsing nightmare - to
myself anyway.

--
Pat



reply via email to

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