2010-06-18 66 views
3

运行以下字符串引号当一个Mathematica电网为矢量图形

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

吐出

你好
你好
“你好”

也就是说,EPS输出器在输出中包含引号。 PDF相同。如果没有Grid,所有出口商都会留下引号。 我需要用什么神奇来摆脱PDF中的引号?

回答

4

将ShowStringCharacters-> False添加到您的样式中。

+1

谢谢,我根本没有朝这个方向看。当字符串不在网格中时,你知道它有什么理由可以正常工作吗(没有花哨的样式)? – Janus 2010-06-18 16:16:14

+1

@Janus原因是[导出为PDF时默认使用''Printout''屏幕样式环境](http://groups.google.com/group/comp.soft-sys.math.mathematica/msg/7f5cb9e2d4677855 ),但导出为栅格格式似乎使用默认的“Working”环境。 'ShowStringCharacters-> False'的另一种方法是按照Mr.Wizard [这里]的建议设置SetOptions [$ FrontEndSession,PrintingStyleEnvironment - >“Working”]'(http://stackoverflow.com/questions/6093559/how-与出口的图形功能于工作风格的环境,而高于打印/ 6093783#6093783)。 – 2011-05-23 10:01:19