[TxMt] latex script

Alain Matthes alain.matthes at mac.com
Tue Feb 21 16:28:48 UTC 2006


Hello

I am a professor of mathematics and my essential activity is to
  create exercises which I arrange in a structure called "Base"

Often, I work in the following situation:

I create a file "exercise.tex", i put this file in the "Base"

then I create a new file "try.tex" :

\documentclass{myclass}
\begin{document}
\input{exercise.tex}
\end{document}

I do not have enough knowledge on scripts to obtain this:

In Textmate, when i work on an file exercise.tex, i would like wih  
one command or script (?)
to compile "try.tex" directly.


I think that a modification of "LATEX & VIEW" should be enough...

With this idea and
with FILE = exercise.tex (the file which I create)
with VAR_FAV_CLASS =  myclass


1) modification of FILE in ---> NEWFILE

NEWFILE =
"\documentclass[]{VAR_FAV_CLASS}
\begin{document}
\input{$File}
\end{document}"

2) Compilation of NEWFILE like in "LATEX & VIEW"

Is it possible ?
Would somebody have an idea to build this script?

in LATEX & VIEW, line 35/36 there is

if [ "$TEX" != latexmk.pl ]
	then "$TEX" ${TM_LATEX_OPTIONS:=--shell -escape - 
interaction=nonstopmode -file-line-error-style} "$1"

I'm not sure but "$1" is perhaps the file  I want modify


Thanks

Alain Matthes




More information about the textmate mailing list