MathGroup Archive 2007

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

Search the Archive

Re: eps exports with dashes in them (important - to me, anyway)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72986] Re: eps exports with dashes in them (important - to me, anyway)
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 27 Jan 2007 06:33:47 -0500 (EST)
  • References: <acbec1a40701251524k34255d3dyfea63aac9d10c52a@mail.gmail.com>

I have been exploring this issue more deeply. In an attempt to (more
closely) compare my Windows eps output to my Linux eps output, I
attempted to change the character encoding for the windows machine to
ISOLatin1. I have discovered that the Export command does not pass the
CharacterEncoding option on to the Front End:

$SystemCharacterEncoding="ISOLatin1"

$CharacterEncoding="ISOLatin1"

SetOptions[Export,CharacterEncoding->"ISOLatin1"]

and

SetOptions[$FrontEnd,CharacterEncoding->"ISOLatin1"]

all appear to have no effect, either alone or in any combination (even
after a Mathematica restart), on the output encoding of the Windows EPS file.
It always comes out as WindowsANSI.

Intrigued (okay, infuriated) I began to explore what the Front End
command ExportPacket does, because this is the command which returns
the EPS string - as I found out from a Trace on Export. I Googled
ExportPacket and found this page,

http://library.wolfram.com/conferences/devconf99/hintonimportexport/Links/ImportExport19991021_lnk_29.html

, which is part of the HTML conversion of a notebook for a
presentation that P.J. Hinton gave on Export/Import functionality at a
developer's conference in 1999**.

I have a feeling that the output of the ExportPacket call is directly
related to the content of AbsoluteOptions[$FrontEnd]. Could someone
please send me a copy of the front end absolute options from a Windows
machine with a properly working EPS Export (preferably immediately
after a Ctrl+Shift launch)? This can be done with:

Put[AbsoluteOptions[$FrontEnd],"C:\\FrontEndOptions.m"]

My options are up at:

http://test.chris.chiasson.name/Mathematica/FrontEndOptions.m

-------------------------------------------------------------------------------------------
**end of email and beginning of digression about the conference

http://library.wolfram.com/conferences/devconf99/

I wish I had seen Hinton's presentation several months ago when I was
first writing MMADE, because ExportPacket returns the EPS string and
its bounding boxes (tight/loose) simultaneously, along with options to
control which bounding boxes are used in the rendering.

There is another presentation by John M. Novak that shows how to use
the function CheckAll to make Abort safe changes to stateful variables
(such as $FrontEnd options). This could allow for a revision of Carl
Woll's SilentCheck that does not permanently turn off a message if an
Abort is encountered. The form is
CheckAll[expr,(recovery;If[#2===Hold[],#1,ReleaseHold[#2]]&)]

Before Total existed, I could have used Tr instead of Plus@@  (Knapp).

Villegas' presentation on held expressions:

I can "trap" (print every use of) a command by using a simple
Condition and Block:
wasProtected = Unprotect[Get];
$TrapGet = True;
g_Get /; $TrapGet :=Block[{$TrapGet = False},Print[Unevaluated[g], "
was evaluated!"];g]
Protect @@ wasProtected;

Attributes can't be Blocked.

To really kill something, use Block[symb,Remove@symb] (reader challenge)

On 1/25/07, Chris Chiasson <chris at chiasson.name> wrote:
> If I issue the this command,
>
> Export["C:\\windows.eps",Sqrt[21/x]]
>
> , with a fresh kernel on Mathematica 5.2 in Windows. I get an output that looks like:
>
> (use gsview and scroll down to see it)
>
> http://test.chris.chiasson.name/Mathematica/windows.eps
>
> This is ridiculous.
>
> I have no idea why Mathematica is behaving this way. It did this once
> before, in a more limited fashon. I made a thread about it here:
>
> (this next url needs to be all on one line to load)
>
> http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/e5f1c88c86aeae49/
>
> At the end of the thread, Bruce Miller essentially said, "There are
> problems and we're working on them."
>
> My Windows computer did not exhibit the problem for a long time
> thereafter, but it started again a few days ago - and this time the
> problem is much worse. I have tried a lot of different things to get
> Mathematica to produce normal output, including completely
> reinstalling my operating system and Mathematica from scratch.
> However, this hasn't helped.
>
> I don't have the problem on my Linux computer, but it has other
> problems that prevent me from using it for production.
>
> Any help you give is appreciated. Thank you.
>
> --
> http://chris.chiasson.name/
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: can't InstallJava[] on Linux-x86-64 to Import an xls file
  • Next by Date: RE: Re: 2D interpolation
  • Previous by thread: Re: eps exports with dashes in them (important - to me, anyway)
  • Next by thread: Re: eps exports with dashes in them (important - to me, anyway)