[TxMt] Typeset & View (PDF)

Charilaos Skiadas skiadas at hanover.edu
Wed Apr 4 05:04:44 UTC 2007

On Apr 3, 2007, at 2:31 AM, Alain Matthes wrote:
>> Sorry, I don't really follow you here. Can't you just tell TM to  
>> use latex instead? The %!TEX-program directive should work just  
>> like in TeXShop.
> Hello  haris, it's difficult to explain because  my english is poor  
> and i'm a very newbie with the shell script, perhaps I don't  
> understand the script.

It's a very complicated script ;)
I am working on a cleaner ruby version of it, but it's not quite  
ready yet.

> first  I work with Texshop only if  i want to test a tex file with  
> dvi + ps because
>  with the mac there are a lot of possiblities :
> i try to be clear :
> 1) latex (dvi + ps) problem
> a) it's not necessary to use pstricks. A lot of linux users prefer  
> latex  ( dvi + ps)
>    because ...they can use "special" command  with PS. And when a  
> linux user work with the mac, often, he works with tex + ghoscript !
> b) dvi2ps is not an obligation, with the mac you can prefer dvitops  
> the apple distiller ( with texhop in the pref, you can choose the  
> distiller apple or ghoscript)
> The apple distiller is not very good but it exists.
> c) perhaps i don't understand the script but you can use a latex  
> class or a package who calls pstricks. I'm not sure that's the  
> script detects that ...
> d) I work only with pdflatex but i make packages and classes so i  
> need to test my work
>  with pdflatex with the two ways : pdf directly ( the good way for  
> me) and dvi + ps.
> e) it's more elegant to work with only one script but in this case  
> perhaps it's more easy to define a shell variable :  
> TM_LATEX_Option : DVI with PDF by default.

What I am saying is that if you have towards the top of your file the  
  %!TEX TS-program = latex
then TextMate will use latex+dvi+ps+ps2pdf instead of pdflatex. Is  
this not what you were asking?

As for the dvi2ps vs dvitops issue, is there anyone not using dvi2ps?  
If so, what are the reasons?
> 2) modify the script ...
>  with the old script, i made a special variant of the script  call  
> "preview"
> often i make piece of tex code and i want to compile this piece  
> without complete the file
> example : i want to have a look at the result of :
> \begin{enumerate}\setlength{\itemsep}{15pt}
> \item aaa
> \item  bb
> \item  cc
> \end{enumerate}
> so in the script i've
> # DIR=`dirname "$M"`
> # FILE=`basename "$M"`
> DIR="/Users/ego/Boulot/temp"
> FILE="temptex.tex"
> and after that
> cat >temptex.tex<<EOF
> \documentclass[$MY_OPT]{$MY_CLASS}
> \thispagestyle{empty}
> \begin{document}
> \input $M
> \end{document}
> i have some difficulties to insert that with the new script. I'm a  
> really newbie
> i make this but it's  very brutal :
> run_tex () {
> "$TEX" ${TM_LATEX_OPTIONS:=--shell-escape -interaction=nonstopmode - 
> file-line-error-style} "$1"
> }
> # Compile.
> run_tex "$FILE"
> open -a "$V" temptex.pdf
> html_footer

So is this not working?

If you want to create temporary files, I would suggest doing so in  
the /tmp directory, instead of the current directory.

Such a command would be very interesting.

> Greetings Alain Matthes [ www.altermundus.fr ]
> PS :  I work on the different lists of macro for the completion and  
> my work will be finish in some days . If you a special class for  
> the surveys with QCM, i can make it...

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

More information about the textmate mailing list