Ralf Hemmecke wrote:
> 
> > From time to time I am pasting LaTeX output from FriCAS to papers.
> > That is clearly important use case.
> 
> OK. But why do we have the latex function then?

I do not know.  Probably historical accident: somebody wanted
to do things in different way and left a half-baked code.
It makes sense to have a convenience function which produces
latex on demand, but for this it is enough to add it to
'CoercibleTo(OutputForm)' implementing it on top of coerce
and TeXFormat.  Or add a tiny package.

> Anyway. Let's stick to TexFormat.
> 
> Would you be satisfied by letting TexFormat generate special
> environments like, for example,
> 
> \begin{LaTeXMath}{4} % 4 is the step number of the input/output
> \begin{Matrix}{5} % 5 is number of columns
> a & b & c & d & e \\
> 1 & 2 & 3 & 4 & 5
> \end{Matrix}
> \end{LaTeXMath}
> 
> and have a small .sty file (that I will provide)
> that maps the commands coming from TexFormat to the respective wish of
> the user. I.e. I would provide example
> texformatlatex.sty --> maps to plain LaTeX2e
> texformatamsmath.sty --> maps to LaTeX2e+amsmath
> texformatmathtools.sty --> maps to LaTeX2e+mathtools
> 
> All the respective definitions will be switched on at
> 
>   \begin{LaTeXMath}{4}
> 
> and switched off at
> 
>   \end{LaTeXMath}
> 
> so that they do not interfere with any other stuff defined elsewhere.
> 
> That would allow users to even change some preferences. For example,
> currently a*b results in "a\: b", but a user might want to have
> "a\cdot b". So it would be better to generate "\tftimes{a}{b}" and have
> \def\tftimes#1#2{#1\: #2} in the .sty file.
> 
> What do you think about this direction? I.e. most stuff would be default
> LaTeX2e, but some things, like array would come as special things that
> need a few lines of .sty definitions.

That looks very good.  Of course we need to adjust efricas and
MathAction.  For MathAction I hope this will be easy: AFAICS
Python code matches generically '\begin{something}...\end{something}'
so probably no change will be needed.  There is global LaTeX
template and we need to use apropriate style there.  MathAction
uses texbreak program. so the main question is how breqn compares
to texbreak.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to