How to disable tex ?

Help
iai
2014-03-26
2014-03-26
  • iai
    iai
    2014-03-26

    How I can disable tex output, so I can get simple plain-text output?

    Using the commands below, I am trying to get some optimized C code, which has been successful. But when I try to copy the generated code, I only get the tex code like "g_{0}\mathrm{:=}b*a". But I need C code like "g0 = b * g;". How can I do it?

    load_package "scope";
    z:=a^2b^2+10a^2m^6+a^2m^2+2abm^4+2b^2m^6+b^2m^2;
    OPTIMIZE z:=:z$

     
    • Arthur Norman
      Arthur Norman
      2014-03-26

      If you are using the CSL version via its GUI then what you want is
      probably "off fancy;"

      On Wed, 26 Mar 2014, iai wrote:

      How I can disable tex output, so I can get simple plain-text output?

      Using the commands below, I am trying to get some optimized C code,
      which has been successful. But when I try to copy the generated code, I
      only get the tex code like "g_{0}\mathrm{:=}b*a". But I need C code like
      "g0 = b * g;". How can I do it?

      load_package "scope";
      z:=a^2b^2+10a^2m^6+a^2m^2+2abm^4+2b^2m^6+b^2m^2;
      OPTIMIZE z:=:z$


      How to disable tex ?


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/reduce-algebra/discussion/899364/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • iai
    iai
    2014-03-26

    Yes, exactly. That's what I wanted. Thank you.
    Iai

     
    • Arthur Norman
      Arthur Norman
      2014-03-26

      On Wed, 26 Mar 2014, iai wrote:

      Yes, exactly. That's what I wanted. Thank you.
      Iai

      I guess scope never imagined that "on fancy" existed. At some stage I will
      try to arrange that it automatically switches it off as necessary. Arthur

       
      • iai
        iai
        2014-03-26

        I found it was not necessary to use "on fancy" to get C code in plain text. I should have used "optlang c;" before running "optimize". Then I got the C code that can be pasted in the source file without any modification. By default, it appears that "optlang nil;" is applied, which displays the optimized code in ordinary math notation using tex (i.e. fancy output).


        load_package "scope";
        z:=a^2b^2+10a^2m^6+a^2m^2+2abm^4+2b^2m^6+b^2m^2;
        optlang c;
        OPTIMIZE z:=:z$


        So it appears to me that you don't need to add automatic switching feature. However, I think it would have been more intuitive for a user like me if the default setting of optlang is "c" or any other computer language. If I saw the optimized Fortran code generated when I needed C code, I could tell I had to look for an option to switch the target language. But because I saw the optimization result shown in the usual fancy format couple days ago, I looked for a way to disable tex on reduce window.

        OPTLANG is mentioned in page 73 in http://www.reduce-algebra.com/docs/scope.pdf