MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Export challenge

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27126] Re: [mg27078] Export challenge
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Sun, 4 Feb 2001 21:27:10 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On Sat, 3 Feb 2001 diacono at altavista.net wrote:

> I want to make a gif image of a mathematical function but the
> expression should be in a single line. Nevertheless, after applying:
>
> Export["imag.gif",ToBoxes["x123[i_,j_]=y123[i,j]-z123[i,j]*w123[i,j]+q123[i,j]/(m123[i,j]-n123[i,j]*p123[i,j]+s123[i,j])"]]
>
> The image shows the expression splitted in two lines. Is there any way
> to pre-format the image output in order to get the expression
> presented in a single line?

Since the GIF that you create is based on what would be drawn on a 
notebook, your best bet is to specify the size of the notebook window into 
which the cell should be drawn.  Below is an example that demonstrates ho 
you can do this step-by-step.

boxexpr = 
    MakeBoxes[
      x123[i_,j_]=
        y123[i,j]-z123[i,j]*w123[i,j]+
          q123[i,j]/(m123[i,j]-n123[i,j]*p123[i,j]+s123[i,j])];

cellexpr = Cell[BoxData[boxexpr]];

nbexpr = 
  Notebook[
    {cellexpr}, 
    WindowSize -> {800, 400}, 
    ShowCellBracket -> False
  ]; 


Export["imag.gif", nbexpr]

If your front end settings are pretty close to the defaults, this should 
produce a GIF with a single line of typeset math.

-- 
P.J. Hinton
User Interface Programmer                         paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.




  • Prev by Date: Re: matrix inversion
  • Next by Date: Re: Negation versus Exponential
  • Previous by thread: Export challenge
  • Next by thread: Frequency analysis of quasiperiodic Functions