Vincent Delecroix on Tue, 02 Aug 2016 16:02:02 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: latex macro |
On 02/08/16 02:17, Karim Belabas wrote:
* 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.) E.g startword -> operator with identically named HTML entity (⊂, \subset) startbc -> calligraphic letter (\mathcal, 𝒜) startbi -> blackboard bold letter (\mathbb, 𝔸) startbg -> fraktur font letter (\mathfrak, 𝔄) startbod -> boldface (\textbf, <b></b>) startcode -> code sample (~ \texttt, <code></code>) startit -> underline (\textit, <em></em>) etc.
Thanks Karim for taking the time to explain! I guess the semantic of @[startlword]BLAH@[endlword] is not clear for us. We want to perform conversion to ReST format (that includes latex mathematic formulas). The thing is that many of the BLAH in @[startlword]BLAH@[endlword] in PARI/GP documentation are already defined tex macros (e.g. \exp, \min, \max). In Sage, we used to make the simple substitution @[startlword]BLAH@[endlword] -> $BLAH$. And this used to work! It fails on the last releases since Hom and Frob are not macro in our latex setting.
I am just trying to improve our documentation parser (that will be part of the cypari project). For now, I just added special rules for Hom and Frob.
Best, Vincent