Re: HTMLSave and GIF size
- To: mathgroup at smc.vnet.net
- Subject: [mg21109] Re: HTMLSave and GIF size
- From: paulh at wolfram.com (P.J. Hinton)
- Date: Fri, 17 Dec 1999 01:21:08 -0500 (EST)
- Organization: "Wolfram Research, Inc."
- References: <831igt$df7@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <831igt$df7 at smc.vnet.net>, Pasquale Nardone <Pasquale.Nardone at ulb.ac.be> writes: >how can I change the gif size >of the MathOutput ? > >(they are too small) >thanks a lot What version of Mathematica are you using? If you are running Mathematica 3.0, there isn't much you can do, but for Mathematica 4, there is a simple fix that can be applied. Add this snippet of code to your kernel init.m file. [begin snippet] HTMLSave; Begin["System`Convert`HTMLDump`"]; createGIF[channel:(_OutputStream | _String), nbExpr_Notebook, opts___] := Module[ {cells, nbopts, convexpr}, cells = nbExpr /. Notebook[cellList_List, ___] -> cellList; nbopts = nbExpr /. Notebook[_, optSequence___] -> {optSequence}; nbopts = DeleteCases[nbopts, WindowSize -> Automatic, -1]; (* Needed to keep the front end aware of window size *) nbopts = nbopts /. Rule[WindowSize, {width_, height_}] :> Rule[WindowSize, {width, 384 + Mod[FromDate[Date[]], 384]}]; convexpr = Notebook[cells, Sequence @@ nbopts]; Rest @ System`Dump`PutGIF[convexpr, channel, Sequence @@ System`Dump`DisplayToGIFOptions[opts]] ] End[] [end snippet] This code will force HTMLSave[] under Mathematica 4 to use the current notebook window width as the basis for the linebreak calculation of multiline formulae. It is very close to what you see on screen. -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. Disclaimer: Opinions expressed herein are those of the author alone.