Karim Belabas on Tue, 02 Aug 2016 08:17:28 +0200

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

Re: latex macro

* Vincent Delecroix [2016-08-02 00:48]:
>> Use an up to date 'gphelp' from 'master', then a direct 'gphelp -raw' should
>> indeed do the trick.
>> The script gphtml (http://pari.math.u-bordeaux.fr/dochtml/gphtml)
>> uses 'gphelp -raw' + minor post-processing to generate both
>>   http://pari.math.u-bordeaux.fr/dochtml/html/
>> and
>>   http://pari.math.u-bordeaux.fr/dochtml/ref/
>> without error or warning.
> I still got the issue with the 2.8.0-alpha. Namely
> $ gphelp -raw mseval|grep Hom
> <snip> @[startlword]Hom@[endlword] <snip>
> And as far as I understand, @[startlword]Hom@[endlword] is intended to be
> replaced by \Hom.

I don't understand what the problem is. It is the other way round, we
start from TeX and replace it by easily parsed markup for conversion to
other formats; in our case ASCII text, HTML and Plain Old Documentation (.pod).

@[startlword]BLAH@[endlword] is an arbitrary (La)TeX named operator
(think \DeclareMathOperator), whose MathML translation would simply be
<mi>BLAH</mi>. Our primitive raw-to-HTML translator gphtml just discards
the markers => BLAH (no markup whatsoever).

The markup format is not documented because we never thought anybody
else would use it but I can provide a complete dictionnary if needed.
(In fact, I would rename some of these first.)

  startword -> operator with identically named HTML entity (&subset;, \subset)
  startbc   -> calligraphic letter (\mathcal, &Ascr;)
  startbi   -> blackboard bold letter (\mathbb, &Aopf;)
  startbg   -> fraktur font letter (\mathfrak, &Afr;)
  startbod  -> boldface (\textbf, <b></b>)
  startcode -> code sample (~ \texttt, <code></code>)
  startit   -> underline (\textit, <em></em>)


Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]