[OS X TeX] ai, eps, pdf and TeXShop

Gary L. Gray gray at engr.psu.edu
Fri Oct 19 22:55:40 CEST 2007


As I posted earlier, I have a simple little AppleScript app that will  
properly crop the PDF by dragging and dropping the file on the app.  
Here is the procedure we use to label figures -- it includes the  
cropping aspect.

The general idea is that you can create the labels in a .tex file,  
convert the fonts in the resulting .pdf file to Postscript outlines,  
open that .ps file in AI, and then copy and post those outlines in  
the AI figure file. The steps are as follows:

(1) Download the archive at:

http://www.esm.psu.edu/mac-tex/PDF-Processing-Apps.zip

(2) Create your figure in AI and save it as "Adobe PDF (pdf)". I will  
assume it is called "test.pdf".

(3) Create the labels for your figure in a .tex file. I will assume  
it is called "labels.tex".

(4) Typeset the labels.tex file using pdflatex and then drop the  
resulting labels.pdf file on "TeX Font Outliner.app"

(5) After you drop the .pdf file on "TeX Font Outliner.app", the  
resulting .ps file will automatically open in AI. Copy the labels  
from the .ps file and place them labels in the fig you saved in part  
(1), i.e., in test.pdf

(6) Move the labels into position and save test.pdf.

(7) Drop test.pdf onto "PDF Cropper.app". This will rename test.pdf  
to test-AI.pdf (so that you will have your original file for later  
editing) and then it will crop that file by removing all white space  
and it will name the cropped file test.pdf.

That's all there is too it. I have only tested this with AI CS2 and  
CS3, though it should work with earlier versions with a slight  
modification of the AppleScript. Both apps are universal binary.

We have labeled hundreds of figures this way over the past couple of  
years and it really works exceedingly well.

-- Gary



On Oct 19, 2007, at 4:47 PM, David Watson wrote:

> Is it possible to use Folder Actions or Automator to do something  
> like that?
>
> On Oct 19, 2007, at 3:31 PM, Themis Matsoukas wrote:
>
>> On Oct 19, 2007, at 4:09 PM, Herbert Schulz wrote:
>>
>>> Will running pdfcrop on the pdf file fix up the bounding box?
>>>
>>> pdfcrop "file.pdf"
>>>
>>> creates file-crop.pdf which has the proper bounding box.
>>
>> Just tried it, and it works well. It would be nice, though, to  
>> have an automated way that does not require user intervention.
>>
>> Themis
>
> ------------------------- Helpful Info -------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
> List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
>
>


------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list