English 中文(简体)
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.





相关问题
Java (AWT): fitting text in a box

I have an application that extends a Frame. Then, it ll display a few lines of text using: Font f = new Font("Arial", Font.PLAIN, 10); g.setFont(f); g.drawString("Test|great Yes ^.", x, y + 10); Now ...

Embed font into PDF file by using iText

I defined a tag map, and got a XML data file. I want to convert the XML data file to PDF by using iText. The question is how to embed fonts (e.g. Polish font, Chinese font) into the target PDF when ...

Font Rendering between Mozilla and webkit

I m not sure if this has anything to do with the recent Safari update, but I m beginning to notice this a lot. There is a drastic difference in the way each browser is rendering fonts. for instance, ...

Embedding Fonts in AS3 - Dynamic Text Field disappears

This is hopefully a new problem or just me missing something obvious. Please help! I m embedding a font into my AS3 application. I m doing everything by-the-book and it half-works. In my main class, ...

Dynamic GD image width text

I m trying to spice up my website by using custom fonts for headings. For me, the most appropriate way to do this is using PHP and GD. I have written a little script which will output the dynamic text ...

How do I combine @font-face and @media declarations?

I d like to build a common typography stylesheet with a very small number of selectors. As such, I d far prefer to use @media sections for the various versions rather than create different files, each ...

热门标签