Bill Page wrote:
> I have added the following patch to the source code in
> 'src/algebra/tex.spad.pamphlet' in the source distribution but it
> isn't necessary to re-compile everything from source.
> 
> -bash-3.00$ svn diff tex.spad.pamphlet
> Index: tex.spad.pamphlet
> ===================================================================
> --- tex.spad.pamphlet   (revision 293)
> +++ tex.spad.pamphlet   (working copy)
> @@ -536,7 +536,12 @@
>          op
>        opPrec := binaryPrecs.p
>        s : S := formatTex(first args, opPrec)
> -      s := concat [s,op,formatTex(first rest args, opPrec)]
> +      if op = " \over " then
> +        s := concat [" \frac{",s,"}{",formatTex(first rest args, opPrec),"}"]
> +      else if op = " \sp " then
> +        s := concat [s,"^",formatTex(first rest args, opPrec)]
> +      else
> +        s := concat [s,op,formatTex(first rest args, opPrec)]
>        group
>          op = " \over " => s
>          opPrec < prec => parenthesize s
> 

Ralf Hemmecke wrote:

> Cool! Bill, I think that patch should go into fricas trunk. Actually,
> there should be more of these changes. Remember there were some
> complaints before that panAxiom's output is using plain TeX commands
> instead of LaTeX equivalents. Your patch is in the right direction.

I am for improving TeX output.  However I think that the patch has
two problems:

- AFAIK \frac is LaTeX only, so this will brake plain TeX output.
 \over works both for LaTeX and plain TeX.  Breaking plain TeX
 is bad idea, so if we really want \frac in LaTeX we probably
 should have special flag to trigger such transformations.

- the patch above changes already generated operator, it is probably
  better to generate '\sp' and '\frac' few lines earlier.  Also,
  change breaks test for '\over' in the following line.

Ralf also wrote:

> I only think that you should insert an 'ungroup' here....
>
>   s := concat [" \frac{",ungroup s,"}{",ungroup formatTex(first rest
> args, opPrec),"}"]
                          ^^^^^^^        ^^^^^^^
 
Yes.
   
-- 
                              Waldek Hebisch
[EMAIL PROTECTED] 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to