Nasser M. Abbasi wrote:
> I can generate Latex output of a single result in Fricas. I can also write 
> it to a file. 
> 
> But what I really need to write the Latex output as one long string to the 
> file.

You can easily get list of strings:

(6) -> tex((exp(x)^2 + 1)::OutputForm::TexFormat)

   (6)  ["{{{{e} \sp {x}}} \sp {2}}+1"]
                                                           Type: List(String)

Actually, this list will always have a single element, but for
historical reasons it is a list.  Note: this is just inner part,
without outer "$$" or equation number.  If you want some more
options do one of the following:

(14) -> tf := convert((exp(x)^2 + 1)::OutputForm, 42)$TexFormat

   (14)  ["$$", "{{{{e} \sp {x}}} \sp {2}}+1 ", "\leqno(42)", "$$"]
                                                              Type: TexFormat
(15) -> tf := (exp(x)^2 + 1)::OutputForm::TexFormat                

   (15)  ["$$", "{{{{e} \sp {x}}} \sp {2}}+1 ", "$$"]
                                                              Type: TexFormat

and then use 'tex', 'prologue' and 'epilogue':

(16) -> prologue(tf)

   (16)  ["$$"]
                                                           Type: List(String)
(17) -> epilogue(tf)

   (17)  ["$$"]
                                                           Type: List(String)
(18) -> epilogue(convert((exp(x)^2 + 1)::OutputForm, 42)$TexFormat)

   (18)  ["\leqno(42)", "$$"]
                                                           Type: List(String)


-- 
                              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