MathGroup Archive 1998

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

Search the Archive

Re: math versus mathematica

  • To: mathgroup at
  • Subject: [mg13833] Re: math versus mathematica
  • From: "P.J. Hinton" <paulh>
  • Date: Sat, 29 Aug 1998 04:41:11 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <6s5m51$>
  • Sender: owner-wri-mathgroup at

On 28 Aug 1998, David Epstein wrote:

> Under Unix, there are two commands that invoke Mathematica. math invokes
> the text-based version and mathematica invokes a notebook version. The
> Mathematica book seems to claim that you get the same results whichever
> you invoke. But you don't.
> The version of Mathematica which we run is Solaris 3.0 (August 21, 1997)
> This is the response to $Version for both math and mathematica.
> However, the program
> txt=
>  StyleBox[
>     RowBox[{"number ",n," ",
>         FractionBox["roman",
>           StyleBox["greek",FontSlant\[Rule]"Italic",FontSize\[Rule]24,
>             FontFamily\[Rule]"Times",FontColor\[Rule]Hue[0]]]}],
>     FontSize\[Rule]18,FontFamily\[Rule]"Arial"];
> n=5;
> pict = Plot[Sin[x],{x,0,7},Epilog\[Rule]Text[DisplayForm[txt],{3,.7}]];
> Display["plot.eps", pict,"eps"];
> gives rise to Postscript files that are VERY different. In particular,
> under mathematica the Postscript contains several lines which refer to
> italics (ignoring case), whereas under math there are no lines in the
> Postscript file referring to italics.
> Is this a bug? Is there a workaround? It is far more inconvenient for me
> to use the front end than the text-based version. In any case, it seems
> to me that Mathematica is not living up to the claims made in the
> Mathematica Book.

The behavior that you are observing is due to the fact that
DisplayForm[] returns different things depending on whether the kernel
is connected to a front end.  When a front end present, DisplayForm[]
uses the StandardForm format type.  When you are running the kernel
standalone, DisplayForm[] uses the OutputForm format type, which does
not support changes in font face and color.  

One of the reasons that OutputForm is used is because the kernel, by
itself, is incapable of generating PostScript code from box structures.
It must rely on the front end's typesetting system to do this, and this
is not possible in the absence of a notebook front end.

A caveat on this limitation is provided in the reference guide for

| In many cases, Display calls the Mathematica notebook front end via |
MathLink. If the front end is not present, certain capabilities of |
Display may not be available. 

P.J. Hinton
Mathematica Programming Group           paulh at Wolfram
Research, Inc.        
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Mathematica
  • Next by Date: Lissajous W (was Re: Looking for Contractor)
  • Previous by thread: math versus mathematica
  • Next by thread: Difficulties with Front End and with mysterious messages