hi,
i would like to use textmate to create latex docs that use the nomencl package. that means i should tweak the compilation process. if i have the file mytest.tex i could compile it manually like following:
1. compile within textmate (TM_LATEX_COMPILER = latexmk.pl) 2. from the directory of "mytest.tex": makeindex mytest.nlo -s nomencl.ist -o mytest.nls 3. compile again within textmate
earlier i used texniccenter on windows where i created a project related output profile postprocessor: - executable: C:\apps\editor\texmf\MiKTeX\bin\makeindex.exe - arguments: "%bm.nlo" -s nomencl.ist -o "%bm.nls"
how could i achieve this with textmate?
On Nov 3, 2006, at 6:23 AM, Jens Heipmann wrote:
hi,
i would like to use textmate to create latex docs that use the nomencl package. that means i should tweak the compilation process. if i have the file mytest.tex i could compile it manually like following:
- compile within textmate (TM_LATEX_COMPILER = latexmk.pl)
- from the directory of "mytest.tex": makeindex mytest.nlo -s
nomencl.ist -o mytest.nls 3. compile again within textmate
earlier i used texniccenter on windows where i created a project related output profile postprocessor:
- executable: C:\apps\editor\texmf\MiKTeX\bin\makeindex.exe
- arguments: "%bm.nlo" -s nomencl.ist -o "%bm.nls"
how could i achieve this with textmate?
You would have to create your own script and set that as TM_LATEX_COMPILER. It could call on latexmk.pl for most of the dirty work, and then do the makeindex stuff and second compilation.
Though I thought latexmk.pl was designed to exactly deal with such situations, no?
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Haris
On Nov 3, 2006, at 6:23 AM, Jens Heipmann wrote:
hi,
i would like to use textmate to create latex docs that use the nomencl package. that means i should tweak the compilation process. if i have the file mytest.tex i could compile it manually like following:
- compile within textmate (TM_LATEX_COMPILER = latexmk.pl)
- from the directory of "mytest.tex": makeindex mytest.nlo -s
nomencl.ist -o mytest.nls 3. compile again within textmate
earlier i used texniccenter on windows where i created a project related output profile postprocessor:
- executable: C:\apps\editor\texmf\MiKTeX\bin\makeindex.exe
- arguments: "%bm.nlo" -s nomencl.ist -o "%bm.nls"
how could i achieve this with textmate?
Are you using TM_LATEX_MASTER, or is this always happening in the current file? Because it might be simpler to just write a command that does the makeindex stuff by itself, and then use a macro to get both commands to run, the Typeset first and the makeindex later, and then the Typeset again.
If TM_LATEX_MASTER is set you can still do it, but it would be more complicated.
To get you started, here is how you would do the makeindex command. You would probably need to create a new TextMate command that just does something like:
M=${TM_LATEX_MASTER:-$TM_FILEPATH} makeindex "${M%.*}.nlo" -s "${M%.*}.ist" -o "${M%.*}.nls"
So, the first line above looks to see if the variable TM_LATEX_MASTER is set, and if it is it assigns it to M, otherwise it assigns the variable TM_FILEPATH to M. The second line executes the makeindex command. ${M%.*}.nlo tells the shell to look at the value of the variable M, and replace the first match from the right which consists of a dot followed by a series of things with .nlo. So what this does is to change the .tex extension of M into a nlo extension. Then we put it in quotes for the case where the filename contains spaces, so we want the whole thing to be treated as the filename.
You probably want the input and output of the command to be none and discard respectively. Or perhaps Show tooltip, to see any errors that might come up.
Let me know if I can help more with this.
Haris