Hi,
I have a few questions regarding my TM & Latex-Combination - I'm switching from TexShop, but I just like TM better.
So, for using the package "glossaries" with TexShop I had to create an extra engine... containing th following commands: #!/bin/bash bfname="`basename "$1" .tex`" pdflatex "$1" bibtex "$bfname" makeindex -s "$bfname".ist -t "$bfname".glg -o "$bfname".gls "$bfname".glo makeindex -s "$bfname".ist -t "$bfname".alg -o "$bfname".acn "$bfname".acr pdflatex "$1" pdflatex "$1"
Could be that this is a little often, but afterwards everything was compiled, index, acronyms, bibtex etc...
How can I port this to TM? When I just select "Typeset and Preview" i.e. glossaries don't show up or don't get updated. ??
Thanks a lot flo
Hi, I've just seen a sample somewhere, containg this code in the beginning of the tex-document:
% COMPILING: % pdflatex test % makeindex -s test.ist -t test.glg -o test.gls test.glo % pdflatex test % pdflatex test
Is this the way to tell Textmate how to compile? And could I have a more generalized form, lets say one that fits every time?
Thanks...
Flo,
You may just want to use latexmk as your latex compiler in textmate. It is smart enough to run bibtex and makeindex and latex as many times as necessary to get your document into shape.
If you are using the standard off the shelf TextMate you will want to set the environment variable TM_LATEX_COMPILER=latexmk
If you are using the new branch in the subversion repository then you can just go to the preferences panel and check the latexmk.pl box.
Brad
On 8/1/07, Flo monkey2q@gmail.com wrote:
Hi, I've just seen a sample somewhere, containg this code in the beginning of the tex-document:
% COMPILING: % pdflatex test % makeindex -s test.ist -t test.glg -o test.gls test.glo % pdflatex test % pdflatex test
Is this the way to tell Textmate how to compile? And could I have a more generalized form, lets say one that fits every time?
Thanks...
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Hi, thanks four your reply.
If you are using the standard off the shelf TextMate you will want to set the environment variable TM_LATEX_COMPILER=latexmk
My setting currently is TM_LATEX_COMPILER=latexmk.pl, this is the same, isn't it?
If you are using the new branch in the subversion repository then you can just go to the preferences panel and check the latexmk.pl box.
I don't actually know how to get the branch of a subversion repository - is it necessary to stay updated? In case how do I get it?
Anyway, files are properly compiled only more complex issues like glossaries etc don't work.
It is smart enough to run bibtex and makeindex and latex as many times as necessary to get your document into shape.
-- this doesn't work for some reason.. (I have to admit I never properly understood the syntax i.e. of makeindex ... )
Thanks very much beforehand Flo
On 8/2/07, Flo monkey2q@gmail.com wrote:
Hi, thanks four your reply.
If you are using the standard off the shelf TextMate you will want to set the environment variable TM_LATEX_COMPILER=latexmk
My setting currently is TM_LATEX_COMPILER=latexmk.pl, this is the same, isn't it?
Yes, that should work.
If you are using the new branch in the subversion repository then
you can just go to the preferences panel and check the latexmk.pl box.
I don't actually know how to get the branch of a subversion repository - is it necessary to stay updated? In case how do I get it?
It is only necessary if you want to keep up with the bleeding edge of bundle development. There are also bundles in the subversion repository that are not in the delivered version of TextMate. Many bundles are under active development and get improvements all the time. Latex is certainly one of them.
Anyway, files are properly compiled only more complex issues like
glossaries etc don't work.
It is smart enough to run bibtex and makeindex and latex as many times as necessary to get your document into shape.
-- this doesn't work for some reason.. (I have to admit I never properly understood the syntax i.e. of makeindex ... )
I have not used makeindex to build a glossary, only and index, so maybe glossary building is not something latexmk.pl understands.
You can use the script you wrote before to make your own custom textmate command. You can go to the bundle editor and make yourself a new command and just paste in the contents of the script. You can replace $1 with $TM_FILEPATH and you will want to add a line to cd to $TM_DIRECTORY so your files end up in the right place.
I'm going to give some more thought to how we can allow users to provide their own custom latex compile scripts without creating their own command in TextMate.
Brad
Thanks very much beforehand
Flo
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Aug 2, 2007, at 12:33 PM, Brad Miller wrote:
I'm going to give some more thought to how we can allow users to provide their own custom latex compile scripts without creating their own command in TextMate.
Any reason why we can't just offer the user the option of a "custom script" in the popup, with a text field next to it for them to write the full path to the script? Then, I think, users should be able to port their "engines" from TeXShop just fine. (Btw, I think your use of the word "engine" in the menu might be slightly different than TeXShop's).
In other words, just like they now select latexmk.pl, they should be allowed to type an arbitrary path to a shell script there. (That was in fact the point of the TM_LATEX_COMPILER variable).
Btw, why is latexmk.pl an option in the popup? Is it independent of the four options there?
Brad
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Aug 11, 2007, at 5:18 PM, Brad Miller wrote:
What do you think of the attached screen shot?
I would prefer to make it clear that this is script is to be used in place of a direct engine, with some checkbox somewhere. In fact, this should be an alternative to latexmk. i.e. I am thinking of it as having a checkbox that makes it clear to the user that they have enabled a custom script or latexmk.pl, instead of the direct choices on the top.
Also, I think that there is some %!TEX directive that users can use to force the use of a particular "TeXShop engine" (i.e. what we cann a custom script), which would be nice if we can respect in some way.
Btw, why is latexmk.pl an option in the popup? Is it independent of the four options there?
I didn't put it in the popup because its not the same thing as the others. Plus, potentially latexmk.pl could be instructed to use the engine specified by the popup.
Oh it can? How? If that's the case, then of course it should be kept separate.
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On Aug 11, 2007, at 5:45 PM, Brad Miller wrote:
On Aug 11, 2007, at 5:18 PM, Brad Miller wrote:
So, I'm not understanding what you mean by a TexShop engine.
It's just a regular script like latexmk.pl really. From the TeXShop help:
These XeTeX features form a special case of a new general method for adding typesetting engines to TeXShop. There is now a folder in ~/ Library/TeXShop named Engines; the files in this folder are shell scripts which call typesetting programs. When TeXShop first starts, it examines this folder and adds the script names of files it contains to the pull-down typesetting menu. Choosing one of these items and pushing the Typeset button calls the script. Users can write their own scripts and add them to the Engines folder. Each such script must have a name without spaces, and extension ".engine", and have the executable bit set. Items in ~/Library/TeXShop/Engines can be chosen as the default typesetting method in TeXShop Preferences. Notice that when a method is listed in Preferences, its name is given without the extension.
I think this might also give an example: http://www.apfelwiki.de/ forum/viewtopic.php?p=4579&sid=d9d6934f9efa686624a1a56fb1d758de
Maybe this setup would be more descriptive. The text entry box would only be active if the checkbox was checked.
Yes this looks very close to what I had in mind, except that the user shouldn't really be able to choose both latexmk.pl and a custom script. Perhaps radio buttons would be the way here, one of them being "use above engine", another being "use latexmk.pl" and the other being "use custom script: ...".
If the menu gets too chaotic, you could have the Typesetting and Viewing parts be two different tabs. Then we could add a third tab dealing with the preferences for the various environment shortcuts etc, once I get around to adding those to a nib system.
Haris Skiadas Department of Mathematics and Computer Science Hanover College