Hi Rob,

Rob Beezer escribió:
> Hi Offray,
>
> Those are very interesting experiments.  Thanks for posting them.  For
> further comparison, I've taken your two examples and run them through
> my process.  Here are some observations based on that, with the
> disclaimer that TeXmacs is new to me.
>   

Thanks for your quick answer. I will make some comments on each item.

> 1.  I output both your examples from within TeXmacs using  File >
> Export > Latex.  I ran these through  tex4ht  to produce jsmath
> without too many complaints and each produced final output.

Could you please send me the specific command? may be I'm 
misunderstanding something because my outputs doesn't seems as good as 
yours.

>   The
> titling information never came through (should be easy to fix) and the
> "mouse-fold" stuff from the "tmparmod" environment consistently caused
> complaints.  
Yes mouse-fold gives also errors with PlasTeX. In TeXmacs this is a mode 
to interactively collapse or show some part of the text, so I used in my 
exams in a way that I can solve them first and print them without 
showing the answers despite of being in the same document.
> I would bet that tex4ht could provide a configuration
> file for latex that is specific to TeXmacs.
>   

I think that is possible also.
> 2.  I ran my custom script on the output to convert to Sage
> worksheets, the output is below, where I've renamed the files to tm-
> minimal and tm-maximal.  There are obvious mistakes, but I think the
> output is good enough to suggest fine-tuning would be successful.
> Other than adding a title to each one, I haven't made any changes by
> hand.
> http://buzzard.ups.edu/sage/tm-minimal.sws
> http://buzzard.ups.edu/sage/tm-maximal.sws
>
>   
I have uploaded the worksheets and both seem fine. Minor glitches here 
and there but I think that it can be solved easily.

> 3.  It strikes me that TeXmacs should be a very good environment for
> authoring Sage worksheets where the amount of mathematics and text is
> proportionally greater than the amount of actual Sage code.
> Especially for students new to TeX, Sage and the command-line.
>   

That is my main motivation. Sage notebook interface is fine if 
calculations are bigger that mathematical writing but in educative 
contexts you want most people justify why they are making, and automatic 
calculations are a convenience that is overcome by proper 
justifications. My engineering freshmen students can learn LaTeX for 
getting a good grade in a work, and in fact they will, but most of the 
freshmen are not willing to, and even if they learn, this will be some 
kind of experience that they don't want to repeat. Experience has shown 
me that most of the students didn't use any "explicit LaTeX tool" if 
they are not forced to, and instead some of my students continue to use 
TeXmacs for their mathematical related works even if they're not asked 
just because is easier and quicker for them that just anything else, and 
now I want to bring that catch to Sage also, and this TeXmacs to Sage 
bridge could be one of the keys.

> 4.  The PlasTeX html output is very nice, especially with the
> navigation elements, etc.  However, the mathematical elements are
> embedded graphics files.  I think a very strong advantage of jsmath is
> that it avoids this approach, which has been taken by numerous such
> converters, including Sphinx.  As a simple illustration, try
> increasing the font size (Ctrl-+ in Firefox) in the PlasTeX HTML
> versus the SWS jsmath above and you should see the jsmath fonts scale
> nicely, while the math graphics files get the "jaggies".  It would
> seem to me that it will be a lot of work to get PlasTeX html, with
> graphics, into jsmath for a Sage worksheet.
>   

You're right. I will try to see if there is any possibility to have 
PlasTeX working with jsmath output instead of graphics. For the moment 
all graphics need to be in the "data" directory of the sws file and 
referenced in that place inside the html output.
> 5.  The TeXmacs file format is highly structured and clearly
> delineates a Sage "session" along with "input" and "output" blocks
> (use Document > View > Edit source tree).  From very limited poking
> around, it would appear that there are hooks in TeXmacs to extend the
> conversion process to Latex.  As an example, on my system
>
> /usr/share/texmacs/TeXmacs/plugins/maxima/packages/session/maxima.ts
>
> would appear to recognize a  maxima  session and extend the formatting
> there.  The main hack in my process above is to mark off Sage cells
> for conversion to cells in the sws output.  It would appear that it
> may be straightforward to have TeXmacs flag any embedded Sage sessions
> properly for further processing.  I could see a TeXmacs wrapping a
> Sage session in (new) SageTeX environments, which would be useful in
> their own right, since then TeXmacs could be a way to author SageTeX
> documents.  It should then be straightforward to have  tex4ht
> implement the SageTeX environments as cells properly formatted for the
> sws format in the conversion to jsmath.
>
> 6.  So, off the top of my head, I could imagine:
>
> (a)  Iron out any kinks in TeXmacs output, like the tmparmod
> environment, or handle them in (c).
>
> (b) Create a TeXmacs "package" to extend its Latex conversion to
> properly mark off a sequence of Sage inputs and the possible output,
> perhaps in cooperation with Dan Drake and SageTeX.
>
> (c)  Add a configuration file to tex4ht which creates the text version
> of a Sage worksheet from the output of (b).  Since  t4ht  already
> builds  jsmath  this would mostly mean only adding support for SageTeX
> macros built in (b).
>
> (d)  Build a tool to package up the text from (c) into the sws format
> (directories, archive format, etc).  I do this by hand now via cut/
> paste into a new worksheet, but such a tool would be trivial.
>
> 7.  So in summary, this would have TeXmacs be the pretty front-end to
> Latex, with Sage sessions built-in.  tex4ht would do 99% of the
> conversion to sws format.  Authors could write in a helpful tool, with
> the power of Sage at hand, and distribute the results as Sage
> worksheets, again with Sage available to the reader.
>
>   

About the points 5 to 7 I agree with you. I will try with PlasTeX a 
little while. Is not (only) because I'm stubborn (in fact I'm) but 
because PlasTeX is the only working option I have at hand and I read 
something that calls my attention:

" What’s really nice about this is that you can actually manipulate the 
document object prior to rendering. While this may be an esoteric 
feature, not many other converters let you get between the parser and 
the renderer."

So I will try to make that manipulation from the LaTeX document to get 
proper markers for sage sessions and after that apply your script or 
some modification of it to the output.

Cheers,

Offray

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-edu" 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/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to