On Tue, Jan 14, 2020 at 10:42 AM Gavin Smith <gavinsmith0...@gmail.com> wrote:
> On Mon, Jan 13, 2020 at 9:40 PM Raymond Toy <toy.raym...@gmail.com> wrote: > > > > I'm currently trying to write nice equations in some texinfo files. > I've been using MathJax to generate the formulas for the html version of > the doc. However, since the TeX version of the doc doesn't use LaTeX, I > have to either have different formulas for the html version and TeX > version. Sometimes I can use the same if I remember how to write a > plain-TeX version that will work in MathJax. But LaTeX with AMSTeX is so > much easier to get equations arranged nicely. > > > > Any way to get that? I'm assuming not since the TeX version really is > just plain-TeX. > > Not really. Maybe some day Texinfo will have a LaTeX back-end but that > would only work for outputting to LaTeX, not for other formats. > > The main difference as far as I am aware is that there is no such > command as \frac in plain TeX. Maybe you could get around this with > something like > > @tex > \gdef\frac#1#2{{#1}\over{#2}}% > @end tex > > Yeah, instead of defining this, I just converted the formula to use \over for both TeX and LaTeX. This works. > (I haven't tested this). Of course, as you use more and more LaTeX > features, this approach becomes increasingly impossible. > Although I haven't had to use it yet, but amstex makes formatting math much easier for complicated cases. I guess if I want not to duplicate formulas, I'll have to learn plain TeX to do math and use it for both. Googling for math stuff almost always points to LaTeX and/or AMSTeX solutions, not plain TeX. > > > (Does any one really use plain TeX anymore?) > > I have to use it to maintain Texinfo ;-) and of course anybody > developing LaTeX or its packages has to understand it (although AFAIK > LaTeX is not based on "plain TeX" per se), or any other "higher-level" > format like ConTeXt. > -- Ray