DRMF / texvcjs

A LaTeX validator/translator for TeX strings embedded in wikitext
0 stars 2 forks source link

Implement general DLMF/DRMF macro #9

Open HowardCohl opened 9 years ago

HowardCohl commented 9 years ago

A general DLMF/DRMF macro looks like this

\macro{}...{}[]...[]@...@{}..{},

where \macro is the macro name, there are n parameters {}...{}, m optional parameters []...[], p number of @ symbols, and q number of arguments {}...{}.

Note: (1) if n>0 then must give full list (possibly empty) of parameters; (2) if m>0 then []...[] may or may not appear (hence optional); (3) if p>0 then @'s may appear in any number 0\le p' \le p; and (4) if q>0 then must give either zero arguments of full q'=q list of arguments.

physikerwelt commented 9 years ago

I would not know how to do that. I.e. can you elaborate on the goal. The intention of texvcjs is that only valid and renderable latex is passed. Allowing for any macro would change this

physikerwelt commented 9 years ago

I would prefere to replace that by all commands specified in the csv file... where the csv file should be interchangable without to modify the program

HowardCohl commented 9 years ago

Read in the following csv file

macro name, n, m, p, q
\frac,2,0,0,0
\sinh,0,0,2,1
\cosh,0,0,2,1
\exp,0,0,2,1
\sqrt,1,1,0,0

and then process appropriate LaTeX strings to ensure these are valid.

(remove these from the main file)

poortho commented 9 years ago

I have not looked at this issue very much, I was hoping to try this after I finished everything else (excluding #11) as it seems like this issue requires much more complex programming that the other issues at the moment, so I was hoping to gain some more knowledge of the program with the other issues before trying to complete this one.