3

Running the following

agrid = Grid[{{Style["hello", Bold]}}]
ImportString[ExportString[agrid, "PNG"], "PNG"]
ImportString[ExportString[agrid, "EPS"], "EPS"]

spits out

hello
hello
"hello"

That is, the EPS exporter included the quotation marks in the output. Same for PDF. Without the Grid, all exporters leave out the quotation marks. What magic do I need to get rid of the quotation marks in the PDF?

Janus
  • 5,421
  • 2
  • 26
  • 37

1 Answers1

4

Add ShowStringCharacters->False to your Style.

ragfield
  • 2,486
  • 13
  • 15
  • 1
    Thanks, I was not looking in that direction at all. Do you know of any reason it works fine (without fancy styling) when the string is not in a Grid? – Janus Jun 18 '10 at 16:16
  • 1
    @Janus The reason is that [export to PDF uses the `"Printout"` screen style environment by default](http://groups.google.com/group/comp.soft-sys.math.mathematica/msg/7f5cb9e2d4677855) but export to raster formats seems to be using the default `"Working"` environment. An alternative to `ShowStringCharacters->False` is to set `SetOptions[$FrontEndSession, PrintingStyleEnvironment -> "Working"]` as suggested by Mr.Wizard [here](http://stackoverflow.com/questions/6093559/how-to-export-graphics-in-working-style-environment-rather-than-printout/6093783#6093783). – Alexey Popkov May 23 '11 at 10:01