Nasser M. Abbasi wrote:
> 
> FYI;
> 
> I think the Latex code generated by Fricas here might not be valid. But I 
> am not sure.
> 
> But it hangs Lualatex when I compile it and when I am using breqn package.
> 
> Here it is
> 
> ------------------------
> ii:=integrate(1/(a^2-b^2*x^2), x)
> tex(ii::OutputForm::TexFormat)
> 
>    [
>     "{{\log \left( {{{b \  x}+a}} \right)} -{\log \left( {{{b \  x} -a}} 
> \right
>     )}} \over {2 \  a \  b}"
>      ]
> ------------------------
> 
> Now I put the above code in a latex file and compile it:
> 
> \documentclass[]{article}\usepackage{amsmath}\usepackage{breqn}\begin{document}
> \begin{dmath*}[frame={.5pt}]{{\log \left( {{{b \  x}+a}} \right)} -{\log 
> \left( {{{b \  x} -a}} \right)}} \over {2 \  a \  b}\end{dmath*}
> \end{document}
> 
> 
> Using lualatex foo.tex
> 
> This seems to hangs or crashes lualatex.  amsmath does not like the latex 
> code and gives warning
> 
> Package amsmath Warning: Foreign command \over;(amsmath)                \frac 
> or \genfrac should be used instead(amsmath)                 on input line 8.
> 
> 
> May be \over can be replaced by \frac ?

\over was used because it is valid both in plain TeX and in LaTeX.
But now plain TeX is rearely used and it seems that some constructs
in tex output only work with LaTeX, so we could change this.
> 
> I posted this question 
> at  
> https://tex.stackexchange.com/questions/412450/why-this-latex-code-hangs-lualatex-foreign-command-over
>   
> asking for workaround.

Some comment about answer from tex.stackexchange: AFAIK \over needs
no outer braces, it is supposed to gobble items how far it can.
It is breqn that has problems.  

Also, FriCAS puts spaces in output for a reason: in a CAS it is
must to have multiletter names and spaces are the only way to
distinguish between multiletter name and seqence of single letter
ones.  Yes, it is ugly and goes against usual math proctice,
but how to output multiletter names otherwise?

-- 
                              Waldek Hebisch

-- 
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to