[OS X TeX] Number of pages with AppleScript in TeXShop

Simon Spiegel simon at simifilm.ch
Tue Oct 18 22:50:33 CEST 2005


Ok, using shell and grep (and with help from the MacAchaia) I was  
able to do a page count. But here comes the next problem: How can I  
find the root file with AppleScript if I use \include?

TIA

simon

On 18.10.2005, at 21:28, Maarten Sneep wrote:

> On 18 Oct 2005, at 19:23, Simon Spiegel wrote:
>
>
>> a question for the AppleScript experts: Is it possible to get the  
>> number of pages of a pdf document created by TeXShop with  
>> AppleScript?
>>
>
> None of the popular viewers have a proper applescript dictionary,  
> TeXShop obviously has, but apparently it doesn't offer this info.
>
> I think there is a pdfinfo like tool, but I didn't find it. Dirty  
> trickery ahead: use lastpage.sty, write the number of the last page  
> to the log file and grep from there. It does give you the TeX page  
> number, not the physical page number, I don't know what you want to  
> do exactly, but it may help. (parsing the logfile itself, is pretty  
> hard, the page indicators may be split over multiple lines).
>
> Alternatively: use gs to expand each page to a low-res bitmapped  
> format in a temp directory, and count files.
>
> Maarten
> ------------------------- Info --------------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>          & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Archive: http://tug.org/pipermail/macostex-archives/
>
>

--
Simon Spiegel
Mutschellenstr. 97
8038 Zürich

Telephon: ++41 43 535 81 71
Mobophon: ++41 76 459 60 39

http://www.simifilm.ch

"I'm not that easy to impress. – O, a blue car." Homer Simpson



------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list