Re: Literal HTML

*To*: mathgroup at smc.vnet.net*Subject*: [mg70509] Re: Literal HTML*From*: "David Reiss" <dbreiss at gmail.com>*Date*: Wed, 18 Oct 2006 04:17:15 -0400 (EDT)*References*: <eh1v76$24a$1@smc.vnet.net>

Hello Hugh, One way to do this would be to place in your notebook a "unique word" such as HTMLReplace99410651421346618 Then you read in the file that results from using HTMLSave as a string and use StringReplace on that file to insert the bit of HTML that you want in place of the HTMLReplace99410651421346618. After that, export the resulting string into the original file. This is the general technique that I use in my WorkLife FrameWork package (http://scientificarts.com/worklife) for modifying the HTML that Mathematica generates and turning it into the various things that I want--for example in using Mathematica as a blogging tool, etc... Best, David Goyder, Hugh wrote: > I would like to be able to save a notebook using Save As Special | HTML > but with some cells copied literally into the HTML. In particular, I am > using Martin Kraus's excellent LiveGraphics3D, which does not require > you to know HTML but does require a few lines of HTML to be inserted > into the HTML file. > > Thus I would like to have a cell with the lines > > <TABLE> > > <TR> > > <TD> > > <APPLET ARCHIVE="live.jar" CODE="Live.class" WIDTH=800 > HEIGHT=800 ALIGN=LEFT> > > <PARAM NAME=BGCOLOR VALUE=#FFFFFF> > > <PARAM NAME=MAGNIFICATION VALUE=1.> > > <PARAM NAME=INPUT_FILE VALUE="Fig 1.lg"> > > </APPLET> > > </TD> > > </TR> > > </TABLE> > > copied directly into the HTML literally. I have tried adding the option > ConversionRules to the cell but without success. Perhaps I have got the > rules wrong or perhaps there is another method? > > At the moment I have to hand cut and paste the extra HTML into the file > that Mathematica has converted. > > Any ideas? > > Thanks > > Hugh Goyder > > > Hugh Goyder > Cranfield University > Tel: +44 (0) 1793 785122 > Mob: +44 (0) 7804 252770