首页 文章

postscript定义字符串变量

提问于
浏览
2

我想创建一个名为units的变量来存储字符串“cm” . 我试图通过以下方式做到这一点:

1) /units (cm) def
2) /units "cm" def
3) /units cm def
4) /units "cm" string def

这是一个不会运行的程序:

/units (cm) def
0 0 moveto 100 100 lineto

没有哪个工作,怎么办呢?

更明确一点,这是我想要创建的程序:

/units (cm) def
/Times-Roman findfont 20 scalefont setfont
300 300 moveto units show stroke

1 回答

  • 3

    这个:

    /units (cm) def
    /Times-Roman findfont 20 scalefont setfont
    300 300 moveto units show
    showpage
    

    可能是你想要的

相关问题