postscript - postscript 定义字符串变量
问题描述
我想创建一个名为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
解决方案
这:
/units (cm) def
/Times-Roman findfont 20 scalefont setfont
300 300 moveto units show
showpage
可能是你想要的
推荐阅读
- audio - FFmpeg 输出视频文件比未压缩的输入音频文件小得多,使用选项保留原始音频质量
- html - 每 3 秒在按钮上闪耀效果(无悬停)
- git - 如何复制分支?
- google-sheets - 暂时冻结自动增量
- ionic-framework - 使用 BLE 进行 Wifi 配置
- kotlin - 为什么 Sinks.many().multicast().onBackpressureBuffer() 在订阅者之一取消订阅后完成以及如何避免它
- java - 是否可以优化我的自定义反序列化器?
- java - 如何在 JavaFx 中检测当前的键盘语言(英语、俄语等)
- asp.net-core - 如何在 Azure bot 中使用 c# 添加自定义类型指示器
- database - 有没有办法在两列中突出显示重复的值组合,而不管顺序如何?