[OS X TeX] Changing texdoc behaviour

Alan Munn amunn at msu.edu
Mon Jan 29 04:36:24 CET 2007


At 10:26 PM -0500 1/28/07, Alan Munn wrote:
>At 10:00 PM -0500 1/28/07, Alan Munn wrote:
>>At 8:34 PM -0600 1/28/07, Axel E. Retif wrote:
>>>On Jan 28, 2007, at 20:01 , Alan Munn wrote:
>>>
>>>>Hello all,
>>>>
>>>>Currently texdoc opens DVI files with TeXShop, PDF files with 
>>>>Adobe reader and PS files with Preview. I would like all three 
>>>>types of files to open in either Reader or Preview, since TeXShop 
>>>>has no simple way of expanding the preview window to the screen 
>>>>width. Is there a simple way to do this?  Setting the environment 
>>>>variable for TEXDOC_pdf to "open -a Preview.app %s" in my .cshrc 
>>>>didn't seem to change the behaviour at all, although the man page 
>>>>for texdoc says it should.
>>>
>>>This is what I use in my .bash_profile (sorry, I don't know how to 
>>>configure it for the csh), thanks to Martin Costabel a few years 
>>>ago:
>>>
>>>export TEXDOCVIEW_dvi="open -a /Applications/TeXShop.app %s"
>>>export TEXDOCVIEW_html="open -a /Applications/Safari.app %s"
>>>export TEXDOCVIEW_ps="open -a /Applications/TeXShop.app %s"
>>>
>>>I think the key is TEXDOCVIEW, instead of TEXDOC.
>>
>>Thanks Axel. It would helped if I actually had typed what the man 
>>page said (as you did!).
>>
>>So this answers the last part of my question.  Now, how would I go 
>>about getting Preview to open DVI files.  I assume this involves 
>>some magic with dvipdf, but I assume that I would need to create 
>>the file in a temporary directory and then open it.
>
>Replying to my own message, here's my tentative solution, but I'd 
>like any comments on problems it may cause me.
>
>I created the following shell script called previewdvi which is then 
>called using the TEXDOCVIEW environment variable
>
>#!/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.

Alan
-- 
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 macostex-archives mailing list