Hi all, I tried a complementary approach to Rob's one using PlasTeX[1] (tex4ht complains a lot about LaTeX files exported by TeXmacs and PlasTeX is more pythonic that tex4ht because... well is made on python :-P). The final idea is to have something that takes TeXmacs[2] documents and converts them as Sage worksheets. For the moment the work flow goes like this: TeXmacs --> LaTeX --> html. The idea is to add to that chain sws at the end and use jsmath instead of images for math equations, but so far I like the results of this preliminary exploration with two files. You can see the original TeXmacs files [5][6] and the respective pdfs [7][8] and htmls[9][10]. Now the idea is to explore html to sws conversion.
[1] http://plastex.sourceforge.net/ [2] www.texmacs.org [5] https://files.getdropbox.com/u/394620/Sage/TestLink/supletorio2-2009-1.tm [7] https://files.getdropbox.com/u/394620/Sage/TestLink/supletorio2-2009-1.pdf [9] https://files.getdropbox.com/u/394620/Sage/TestLink/supletorio2-2009-1/index.html [6] https://files.getdropbox.com/u/394620/Sage/TestLink/texmacs2Sage.tm [8] https://files.getdropbox.com/u/394620/Sage/TestLink/texmacs2Sage.pdf [10] https://files.getdropbox.com/u/394620/Sage/TestLink/texmacs2Sage/index.html Cheers, Offray Ps: there are some orthography mistakes in the docs Rob Beezer escribió: > I've been working on the conversion of LaTeX documents, which include > Sage code, into Sage worksheets. Here's the current state of the > experiment. From the same LaTeX source, I'm producing PDF with bits > of Sage code inline and in set-off blocks. The blocks are formatted > with SageTeX's "sageverbatim" environment. > > http://buzzard.ups.edu/sage/sage-group-theory.pdf > > To create a worksheet, I use tex4ht to convert the LaTeX into jsMath. > The sageverbatim environment is redefined so that tex4ht wraps the > sage code with markers. Then a small Python script (about 55 lines) > makes minor modifications to the jsMath so that it is in the proper > format to copy into a worksheet wholesale as text. The result is that > the blocks of code are now "live" when viewed in the Sage notebook so > the reader can execute or modify them as they read about Sage and/or > mathematics. > > http://buzzard.ups.edu/sage/sage-group-theory-20081217.sws > > At a minimum, this is a nice example of several open tools working > together (LaTeX, tex4ht, jsMath, Sage NB). Hopefully some will see > the potential for cleaning this up and expanding the possibilities. I > think it could be a big help in creating more tutorials, guides and > books that combine Sage and mathematics in a variety of formats - > further promoting Sage, especially in educational settings. > > Comments, suggestions, help, etc welcome. (Content itself is still a > work-in-progress.) > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to sage-edu@googlegroups.com To unsubscribe from this group, send email to sage-edu+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en -~----------~----~----~----~------~----~------~--~---