[OS X TeX] Changing texdoc behaviour

Alan Munn amunn at msu.edu
Sun Jan 28 23:26:06 EST 2007

At 11:23 PM -0500 1/28/07, Ettore Aldrovandi wrote:
>On Sun, Jan 28, 2007 at 10:36:24PM -0500, Alan Munn wrote:
>>  At 10:26 PM -0500 1/28/07, Alan Munn wrote:
>>  >
>>  >#!/bin/sh
>>  >FileName= `basename $1 .dvi`
>>  >OutputFile= /var/tmp/$FileName.pdf
>>  >dvipdf $FileName $OutputFile  | open -a Preview.app
>>  >
>>  >This seems to give the required behaviour.   Are there any obvious
>>  >problems with doing this?
>>  Ok, I'll stop wasting people's time reading my thinking out loud.
>>  Sorry.  I had fooled myself into thinking this script worked, but it
>>  doesn't.  But the idea is right, I guess.  If someone wants to bail
>>  me out with a working script along these lines I'll be grateful.
>Why the pipe in the last line? The output of dvipdf goes to
>$OutputFile, not stdout. (Besides, I don't think open can be used
>in that way: If I try "cat file.pdf|open -a preview" I only get
>Preview.app to open.) Why not:
>dvipdf $FileName $OutputFile
>open -a preview $OutputFile

Thanks.  That was what I figured out soon after.


Alan Munn 
amunn at msu.edu
Department of Linguistics                             
and Germanic, Slavic, Asian and African Languages   Fax.  +1-517-432-2736
Michigan State University, East Lansing MI 48824       Tel.  +1-517-355-7491

------------------------- 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 MacOSX-TeX mailing list