CSSSave` Package

Version 1.0

© 1999-2003, Reinhold Kainhofer, reinhold@kainhofer.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License,or (at your option) any later version.
For the complete text of the license see the file GPL_V2.

General
License and forbidden uses
Downloading
Installing and Using the package
Known Bugs / Limitations / Flaws
History
The functions in the package (HelpBrowser entries)

General

The CSSSave` package extends the HTML export function of Mathematica 4 With this package also the colors and other formats like frames and spagins are converted and displayed in a web browser. This is done by creating CSS (cascading style sheets) for use with html files. When you convert a notebook to HTML (using either the menuitem or the HTMLSave command), this will automatically be done, and the colors will appear in any browser that is capable of cascading style sheet (Netscape 4 or Internet Explorer 3 or higher).

Furthermore some more features like a "back" link at the bottom of each child page are included (see the help browser entry for "HTMLSave extensions" on how to use and customize these), and bugs in the HTMLSave code are fixed.

As an example you can take this page, which was also written in Mathematica (using an adapted Report.nb Style sheet) and then converted to html using the CSSSave` package together with the HTMLSave function.

 
I have to admit, the package is not yet perfect, but normally it does a pretty good job. However, if you used some smart ways to create a special effect, be prepared that it will be lost on your html page. Still, I think, my package is a big improvement compared to HTMLSave alone (which converts only with preset styles).

Examples of converted notebooks

Some more examples of the StyleSheets that are distributed together with Mathematica can be found at examples.html.
A larger notebook is my software project about Mathematica in formal methods. Look it up at my homepage: http://reinhold.kainhofer.com/

System Requirements

You need at least Mathematica Version 4 to work with that package.

License and forbidden uses

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License,or (at your option) any later version.

Furthermore, you have to use this package at your own risk. The author cannot take responsibility for any damage, harm or data loss that is caused by using this package.

Note that until recently I used a different, more restrictive license, but decided, that the GPL would be more appropriate and so switched.

Downloading

You can download the package, including some short documentation, here:

Download from Sourceforge

Please note that this package was written and tested only under Windows 95 and 98 (it should work under Linux and Mac as well, but I cannot guarantee that), using Mathematica version 4 for Windows. This package does NOT work with Mathematica version 3.x.x or 2.x.
Download this package only, if you have read the "License and forbidden uses" section above and agree with it!!!

Installing and Using the package

Open the notebook install.nb and simply follow the instructions. It will copy the package into the Mathematica AddOns directory (e.g. $TopDirectory/AddOns/Applications/CSSSave). The CSSSave.m might be encoded, so don't worry if it's contents are something like (*!1N!*)mcm j<mi2..........

You can now load the package by a simple

<<CSSSave`

That's it. When you now convert any notebook to HTML (using the menuitem in the File - Save as special), an additional file named the same as the html file, only with the extension .css will be created that holds information about colors and other layout information. The browser will also load this css file and show the html page according to the information given in the StyleSheet.

Known Bugs / Limitations / Flaws

History

The functions in the package (HelpBrowser entries)

Internally a function CSSSave is defined that converts the Mathematica style sheet to a Cascading style sheet. If you only need to create a css file from a Mathematica Style sheet, this is the function you need. It has the same syntax as HTMLSave:

Also, the HTMLSave function was extended by 4 Options:

Patching existing functions


Converted by Mathematica      April 27, 2003
Thanks to SourceForge for hosting lots of GPLŽed software projects!!! SourceForge Logo