开发者

LaTeX font in Postscript document

I am starting off with Postscript, and would like to do something very simple: include a LaTeX symbol within my Postscript document. For example:

%!
/FontSize 12 def
newpath
0 0 moveto 
("Hello \LaTeX") show % This is where I would like
                      % the rendering of \LaTeX 
                      % with actual LaTeX font
showpage

Any i开发者_Go百科deas?


The \LaTeX logo is just normal letters moved slightly around via kerning. So if you're already hacking raw postscript commands, you should just copy the dimensions from the definition in latex.ltx and issue the same movement commands between the letters in postscript. Ditto to select the CM font, or whatever you would like.


If the aim is to mix together Postscript and Latex in one document, you can use Metapost. Hans Hagen's Metafun manual is the best introduction to Metapost I know of, although note that:

  1. He assumes that you will be using Tex or Context and not Latex. If you want to use Latex macros in Metapost, you will need some additional boilerplate;
  2. Metafun is a slight superset of regular Metapost; and
  3. He more or less ignores the ability of Metapost to embed raw Postscript — the core of the Metapost language is an extension of Knuth's Metafont, and is quite unlike Postscript.

Cf. also Troy Henderson's Embedding fonts in MetaPost output, which explains how to embed Tex fonts in the Postscript files generated by Metapost.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜