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
Alain,
the best way to accomplish this I think is via the use of the environment variable TM_LATEX_MASTER. If you have a project, you can set an environment variable just for the project with name TM_LATEX_MASTER and with value the full path to the file you want compiled. Then, no matter which file you work on, the file pointed to by TM_LATEX_MASTER will be compiled instead. The great thing is that if you use pdfsync, that still works as you'd like it to.
Have you seen the LaTeX in TextMate screencasts? I think I've described that there.
Haris
Le 21 févr. 06 à 17:33, Charilaos Skiadas a écrit :
Alain,
the best way to accomplish this I think is via the use of the
environment variable TM_LATEX_MASTER. If you have a project, you can set an environment variable just for the project with name TM_LATEX_MASTER and with value the full path to the file you want compiled. Then, no matter which file you work on, the file pointed to by TM_LATEX_MASTER will be compiled instead. The great thing is that if you use pdfsync, that still works as you'd like it to.
Have you seen the LaTeX in TextMate screencasts? I think I've described that there.
thanks
but
1 ) what is the script language used for lATEX & VIEW ?
2) I saw the first but I will re-examine them
3) i don't want to write the NEWFILE
\documentclass{myclass} \begin{document} \input{exercise.tex} \end{document}
i just want to write the contents of exercice
exercise :
L'espace est rapporté à repère orthonormal .
Soit $A$, $B$ et $C$ les points de coordonnées respectives $A(a;0;0))$,$B(0;b;0)$ et $C (0;0;c)$ où $a$, $b$ et $c$ sont trois réels non nuls.
\begin{enumerate}
\item Montrer qu'une équation du plan $(ABC)$ est: [{x\over a}+{y\over b}+{z\over c}=1$ ] Ce résultat pourra être utilisé dans la suite du devoir. \item Soit $A(3;0;0))$, $B (0;2;0)$ et $C(0;0;4)$.
Déterminer une équation du plan $(ABC)$
\end{enumerate}
I can't compile this... without
\documentclass{myclass} \begin{document}
\end{document}
and I want a script to do that. i save only exercise without \documentclass{myclass}...
I do not believe that a project can help me to do that but I need several environment variables like in Latex & view. ( sorry for my english )
Alain
Le 21 févr. 06 à 17:28, Alain Matthes a écrit :
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
- modification of FILE in ---> NEWFILE
NEWFILE = "\documentclass[]{VAR_FAV_CLASS} \begin{document} \input{$File} \end{document}"
perhaps it's better to compile
\documentclass[]{VAR_FAV_CLASS} \begin{document} $File \end{document}
how to add the lines
\documentclass[]{VAR_FAV_CLASS} \begin{document}
et \end{document} to the file?
Alain Matthes