[OS X TeX] Scripting LaTeXiT

Michael Sharpe msharpe at ucsd.edu
Mon Sep 8 20:51:09 EDT 2008


On Sep 8, 2008, at 2:04 PM, Chris Goedde wrote:

> Is it possible to script LaTeXiT? It doesn't seem to have an  
> Applescript dictionary.
>
> What I'd like to do is create, for example, all the individual  
> capital letters in math boldface for use in OmniGraffle.
>

For such a small collection of files, scripting seems like overkill,  
but if you plan to do this will varying fonts and sizes, here's how  
you could arrange it without LaTeXit.
  I assume you want each letter as a separate PDF file.

1. Start with a LaTeX file alphabet.tex whose body is {\boldmath $A$} 
\newpage {\boldmath $B$}\newpage ...{\boldmath $Z$}, and having  
\pagestyle{empty} in the preamble.

2. Run latex (not pdftex) to produce alphabet.dvi.

3. dvips -Ppdf -S 1 -i -E alphabet
should produce 26 separate EPS files, each with a tight bounding box,  
named alphabet.001 ... alphabet.026, whose names should be changed to  
A.eps, etc (see note below.)

4. Convert each to pdf format using epstopdf. A small shell script  
could handle the 26 cases.


Note: dvips -E uses metric information from the tfm file, and so  
doesn't always give a correct bounding box. In that case, you could  
drop the option -E and then run

ps2eps -l -B -f

on each resulting page file. Once again, a shell script would  be  
useful. (You may need to download and install ps2eps first.)

Michael




More information about the MacOSX-TeX mailing list