Hello everybody,
I am almost sure that this has been discusse on the list some time ago, but I did not find anything right now.
For my Ph.D. dissertation, I am working with a LaTeX document which is split up to many small files, one for each chapter. I am using the TM_LATEX_MASTER variable which is set as a project preference, and which points to the master document.
Now I would like to do the following: In order to print only a single chapter of my dissertation I would like to use another central document which ignores the TM_LATEX_MASTER variable. It should be part of my project, however.
Is it possible to set the TM_LATEX_MASTER to a different value only for this file? TeXShop allows setting the main document by putting something like
%!TEX root = ../main.tex
at the beginning of a document. Does something like this exist in TM as well?
(I know that I could also use the includeonly command, but that does not work too well, since I also would like to change some things in the central document for this specific file.)
Thanks in advance, best regards
Matthias
On 31/7/2006, at 15:57, Matthias Damm wrote:
[...] Is it possible to set the TM_LATEX_MASTER to a different value only for this file?
Sort of, yes :)
In your document folder, create a file named .textmate_init and let it contain:
if [[ "$TM_FILENAME" == "chapter_or_whatever" ]]; then export TM_LATEX_MASTER=master_file_or_whatever fi
This file is sourced just before running the actual command so it can tamper with the variables already setup.
Am 31.07.2006 um 16:16 schrieb Allan Odgaard:
[...] Is it possible to set the TM_LATEX_MASTER to a different value only for this file?
Sort of, yes :)
In your document folder, create a file named .textmate_init and let it contain:
Works great, thanks a lot!
Best regards, Matthias