简体   繁体   中英

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 ideas?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM