Inspired by a [recent thread][1], I've come up with a couple of
commands to facilitate using TextMate's project features on a remote
directory. To sum up, the problem is: I want to work with files in a
TextMate project from the local filesystem (for speed, Subversion
compatibility, and other reasons), but the files I'm working on are
useless unless they're on some remote machine.
I say "remote projects" in quotes because the project is actually
local, but created from a directory that is intended to be an exact
copy of one from a remote machine. The commands are similar in spirit
to some of Dreamweaver's "Site" features, for those who care about
such things. I've been using these commands pretty heavily on a
project at work and am pleased with the results, so I thought I'd share.
The two commands are "Get Remote Project" and "Upload Project
Changes". The commands have a global scope (ideally, they would be
scoped to "files that belong to a project", but I don't know if
that's possible). They essentially save all files and call `rsync -
au` on your directory in different directions. The basic process is
that you create a project in TextMate from a local directory, then
set a variable in that project called `WHERE_I_CAME_FROM` that
contains a location rsync understands, like `user@server:/remote/
path`. When you're ready to see the changes on the server, use the
"Upload Project Changes" command.
## Setting up a project
Here are two ways to set up such a project:
(Note the trailing / on the rsync "source" path. It matters.)
* Get the files and create the project
1. Make a local copy
mkdir foo
rsync -au user@server:/remote/path/ foo
2. Open the directory as a project in TextMate
mate foo
3. Set `WHERE_I_CAME_FROM` in the project to `user@server:/
remote/path/`
4. Save the project
* Create the project and get the files
1. Create and open the project in TextMate
mkdir foo
mate foo
2. Set `WHERE_I_CAME_FROM` in the project to `user@server:/
remote/path/`
3. Run the "Get Remote Project" command (currently ⌃⌘P)
4. Watch your files appear in the drawer
5. Save the project
I prefer the second method right now, but if the final two steps in
the first method could be automated (set a project variable and save
the project), the whole process could be turned into a shell script,
or possibly a command in TextMate.
## Subversion
I haven't had any issues using this method when the remote directory
in question is a Subversion working copy. You basically end up with
another working copy (and it's normal with Subversion to have working
copies spread everywhere, so this is no big deal). I've been doing
commits and other modifications to the working copy locally and have
had no issues using rsync to update the remote side afterward
(although, theoretically, you could acheive the same thing by running
`svn update` on the remote copy).
## Outstanding Issues
* Deleted files
If you delete a file from your disk/project, the deletion won't
be replicated. You need to either remove the file in both places
manually, or if using Subversion `svn update` the other end after the
removal has been committed to the repository. There is a `--delete`
option in rsync, but I consider it too dangerous to be on by default.
* Keyboard Shortcut
⌃⌘P wasn't my first choice. I'm open to suggestions.
According to the manual, project related shortcuts should use ⌃⌘,
but I don't think this has been stricly followed which made it hard
to find something. There are other commands using ⌃⌘P and since
they have a more specific scope than these "remote project" commands,
they will win in those scopes.
As for overriding ⌘S to run these commands, that would be
convenient in many situations, but innappropriate in most. The
commands really only need to be used if you're in a project and
`WHERE_I_CAME_FROM` is set, so it wouldn't really be appropriate to
have ⌘S trigger them unconditionally as they currently exist.
* Extended Attributes
If you're going from Mac to Mac, you might consider adding the -
E option to the rsync command to be sure metadata is included. It's
not there by default because most of my remote machines are running
Solaris and -E makes rsync on Solaris poop in its pants. Perhaps
there should be another variable that could be set in TextMate or a
specific project that holds your preferred rsync options for these
commands.
* Project variable name
I'm sure I should use something more grown-up sounding than
`WHERE_I_CAME_FROM` in the long run, but what? I didn't see any
naming conventions for project variables in the manual. Are `TM_*`
variables meant to be only things that the application is aware of or
should all TextMate specific variables start with that?
## Other commands?
I've thought about adding a TextMate command that will do an `svn
update` on the remote path. This would be for deleted files or for
people who aren't comfortable updating the various `.svn` directories
using rsync (I know you're out there).
I've also considered adding a command that will run `rsync -aun` in
both directions to show you what will happen if you run one of the
commands without actually making the changes. Would either of these
be useful?
If you have need for something like this, try these commands out and
let me know what you think. Thanks.
[1]: http://thread.gmane.org/gmane.editors.textmate.general/18573
---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.
Hi Haris,
> This still doesn't answer my question. The question really is how
> does the FILENAME part look like exactly. Doesn't matter if you used
> \include or \input, but the script used to be a bit picky about the
> FILENAME. For instance it used to be that it would only work with
> files with extension .tex, though that was recently fixed.
Needless to say, Haris, this answered my issue. The template I was
using had quotes around the filenames, on removal, it all works fine.
I'm not sure whether the quotes are correct style or not, but this was
the problem, everything works now.
Perhaps if quotes are common, then these can be set to be ignored by TextMate?
Thanks again for your efforts!
Suhaib.
Hi,
A small problem using xelatex on TM:
I've just decided to use the Mactex install because the Fink XeTeX packages didn't seem to work out of the box for me. I've managed to get a sample file to compile and produce a pdf using Texshop configured with this new XeTeX installation.
When I want to process the same file with Textmate, i get an error:
This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6
...
! LaTeX Error: File `article.cls' not found.
Looking at the log file from Texshop reads, "(/usr/local/texlive/2007/texmf-dist/tex/latex/base/article.cls" where Textmate would complain and stop.
What do i need to configure for textmate to look for files in this texlive distribution?
(Pdflatex files using tetex work fine)
Best regards,
baptiste
----- Message d'origine ----
De : "textmate-request(a)lists.macromates.com" <textmate-request(a)lists.macromates.com>
À : textmate(a)lists.macromates.com
Envoyé le : Jeudi, 12 Avril 2007, 13h00mn 40s
Objet : textmate Digest, Vol 31, Issue 28
Send textmate mailing list submissions to
textmate(a)lists.macromates.com
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.macromates.com/mailman/listinfo/textmate
or, via email, send a message with subject or body 'help' to
textmate-request(a)lists.macromates.com
You can reach the person managing the list at
textmate-owner(a)lists.macromates.com
When replying, please edit your Subject line so it is more specific
than "Re: Contents of textmate digest..."
Today's Topics:
1. Re: textmate Digest, Vol 31, Issue 27 (adawson(a)vixiom.com)
2. Re: Re: Announcing LaTeX Watch 2.0, with PDF support
(Robin Houston)
3. Re: Command-backtick not working?!?! (Victor Maurice Faubert)
4. Re: Re: Announcing LaTeX Watch 2.0, with PDF support
(Alain Matthes)
5. Re: Command-backtick not working?!?! (Michael Larocque)
6. Re: Command-backtick not working?!?! (Michael Larocque)
7. Re: Command-backtick not working?!?! (Michael Larocque)
8. Re: Command-backtick not working?!?! (Charilaos Skiadas)
9. Re: Command-backtick not working?!?! (Michael Larocque)
10. Unwanted newline after Replace Selected Text (Tim Mansour)
11. Re: LaTeX Bundle: Auto-completion broken in multi-file
projects (Suhaib Fahmy)
12. LaTeX with TL2007 (Alain Matthes)
Out of Office Reply:
I'm travelling Tuesday April 10th through Thursday the 12th.
thanks,
Alastair
I'm glad it's working now, and your PGF/TikZ illustrations are beautiful!
Perhaps I should remark that I'm not _advocating_ the use of PostScript specials. It's simply that I have mundane reasons for using them, currently. The first version of Watch was written for my own use, so I made it work with the documents that I'm writing. Since then, I've tried to make it more generally useful, hence PDF being the default mode in the current version.
I look forward to the day when I never need to use another PostScript special, and I can do everything with PDFLaTeX.
Robin
At 12:00 +0000 2007-04-11, textmate-request(a)lists.macromates.com wrote:
>Content-Transfer-Encoding: 7bit
>From: Charilaos Skiadas <skiadas(a)hanover.edu>
>Precedence: list
>MIME-Version: 1.0 (Apple Message framework v752.2)
>To: TextMate users <textmate(a)lists.macromates.com>
>References: <FE72A777-CD43-45F0-91D5-6A07CFDC8EBD(a)prolumina.com>
>In-Reply-To: <FE72A777-CD43-45F0-91D5-6A07CFDC8EBD(a)prolumina.com>
>Date: Tue, 10 Apr 2007 12:49:19 -0400
>Reply-To: TextMate users <textmate(a)lists.macromates.com>
>Message-ID: <9964CE10-4767-4DCA-924D-4B36A280BB42(a)hanover.edu>
>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>Subject: Re: [TxMt] Command-backtick not working?!?!
>Message: 15
>
>
>On Apr 10, 2007, at 11:51 AM, Michael Larocque wrote:
>
>>Hi folks,
>>
>>I have a weird TextMate problem on my MacBook Pro. (My other
>>systems don't exhibit this behaviour) On this system, when I
>>command-` to switch windows in TextMate, it 'beeps' at me and
>>doesn't switch windows. All other apps (iTerm, Safari, Mail, etc)
>>work as per usual. Probably the only 'customization' that I've done
>>is that I keep svn up'ed in /Library/Application Support/TextMate.
>>I'm really at a loss as how to debug this. Any ideas greatly
>>appreciated.
>>
>I would bet that somehow by accident cmd-` has been bound to some
>bundle item. Press ctrl-cmd-T, then click on the magnifying glass
>and set it to "key equivalent", and press cmd-`, and if it shows any
>items in the list then those are your culprits.
>>Carpe viam,
>>Mike
>>
>>Michael Larocque
>>Chief Cook and Bottle Washer
>>Prolumina Communications Inc.
>>http://prolumina.com/~mlarocque/
>>
>
>Haris Skiadas
>Department of Mathematics and Computer Science
>Hanover College
I can confirm this behaviour as well. In my case, it's an old
Machine Name: Power Mac G4 (AGP graphics)
Machine Model: PowerMac3,1
CPU Type: PowerPC G4 (2.9)
running Mac OS X 10.4.9. The list shown is empty,
yet I get a beep and no window switch.
However, looking at Keyboard Shortcuts in System Preferences
shows I had Keyboard Navigation unchecked; checking it makes
it work correctly. Perhaps this is Michael's problem?
--
Vic
Le 11 avr. 07 à 14:11, Robin Houston a écrit :
> I'm glad it's working now, and your PGF/TikZ illustrations are
> beautiful!
>
> Perhaps I should remark that I'm not _advocating_ the use of
> PostScript specials. It's simply that I have mundane reasons for
> using them, currently. The first version of Watch was written for
> my own use, so I made it work with the documents that I'm writing.
> Since then, I've tried to make it more generally useful, hence PDF
> being the default mode in the current version.
>
> I look forward to the day when I never need to use another
> PostScript special, and I can do everything with PDFLaTeX.
>
> Robin
>
Thanks for your script!
If you want, you can send to me some files (.tex and .pdf) of your
work and I try to see if I can make a package with tikz for you.
I know diagrams package and I think with tikz, we can make something
more simple with only pdflatex.
I know xy and i work with it the first time but how it's possible to
work with the xy syntax ???
( very strange but I liked this package !)
Alain
On 2007-Apr-11, at 02:19 , Allan Odgaard wrote:
> On 10. Apr 2007, at 17:51, Michael Larocque wrote:
>
>> I have a weird TextMate problem on my MacBook Pro. (My other
>> systems don't exhibit this behaviour) On this system, when I
>> command-` to switch windows in TextMate, it 'beeps' at me and
>> doesn't switch windows. All other apps (iTerm, Safari, Mail, etc)
>> work as per usual. Probably the only 'customization' that I've
>> done is that I keep svn up'ed in /Library/Application Support/
>> TextMate. I'm really at a loss as how to debug this. Any ideas
>> greatly appreciated.
>
> Some things mentioned here: http://macromates.com/wiki/
> Troubleshooting/KeyBindings
>
> The key is a system key, so as such, TM itself should not see nor
> handle it, which makes it slightly more weird.
>
> Try create a new user account to test if the problem is local.
>
This is getting really weird. It is no longer a problem. Here's what
I've done since yesterday:
My TextMate project files and some of the projects are on an 2GB
encrypted disk image. As part of some 'housekeeping' duties, I wanted
more space on the disk image, so I created a new 4GB disk image and
copied all of the files over to the new disk image. Upon opening up a
couple of the projects in their new location, command-` now seems to
work. Bizarre.
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
On 2007-Apr-11, at 07:11 , Victor Maurice Faubert wrote:
>
> I can confirm this behaviour as well. In my case, it's an old
> Machine Name: Power Mac G4 (AGP graphics)
> Machine Model: PowerMac3,1
> CPU Type: PowerPC G4 (2.9)
> running Mac OS X 10.4.9. The list shown is empty,
> yet I get a beep and no window switch.
>
> However, looking at Keyboard Shortcuts in System Preferences
> shows I had Keyboard Navigation unchecked; checking it makes
> it work correctly. Perhaps this is Michael's problem?
> --
> Vic
Thanks Vic, but this wasn't my problem.
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
On 2007-Apr-11, at 10:34 , Michael Larocque wrote:
>
> On 2007-Apr-11, at 02:19 , Allan Odgaard wrote:
>
>> On 10. Apr 2007, at 17:51, Michael Larocque wrote:
>>
>>> I have a weird TextMate problem on my MacBook Pro. (My other
>>> systems don't exhibit this behaviour) On this system, when I
>>> command-` to switch windows in TextMate, it 'beeps' at me and
>>> doesn't switch windows. All other apps (iTerm, Safari, Mail, etc)
>>> work as per usual. Probably the only 'customization' that I've
>>> done is that I keep svn up'ed in /Library/Application Support/
>>> TextMate. I'm really at a loss as how to debug this. Any ideas
>>> greatly appreciated.
>>
>> Some things mentioned here: http://macromates.com/wiki/
>> Troubleshooting/KeyBindings
>>
>> The key is a system key, so as such, TM itself should not see nor
>> handle it, which makes it slightly more weird.
>>
>> Try create a new user account to test if the problem is local.
>>
>
> This is getting really weird. It is no longer a problem. Here's
> what I've done since yesterday:
>
> My TextMate project files and some of the projects are on an 2GB
> encrypted disk image. As part of some 'housekeeping' duties, I
> wanted more space on the disk image, so I created a new 4GB disk
> image and copied all of the files over to the new disk image. Upon
> opening up a couple of the projects in their new location, command-
> ` now seems to work. Bizarre.
Weirder and weirder. A few hours later and the behaviour is back! And
I haven't changed anything system or application-wise. And it's only
happening with TextMate. Does anyone have any ideas about debugging
this? Is there some utility that will allow you watch key presses and
follow their path through the system?
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
On Apr 11, 2007, at 4:40 PM, Michael Larocque wrote:
> On 2007-Apr-11, at 10:34 , Michael Larocque wrote:
>>
>> This is getting really weird. It is no longer a problem. Here's
>> what I've done since yesterday:
>>
>> My TextMate project files and some of the projects are on an 2GB
>> encrypted disk image. As part of some 'housekeeping' duties, I
>> wanted more space on the disk image, so I created a new 4GB disk
>> image and copied all of the files over to the new disk image. Upon
>> opening up a couple of the projects in their new location, command-
>> ` now seems to work. Bizarre.
>
> Weirder and weirder. A few hours later and the behaviour is back!
> And I haven't changed anything system or application-wise. And
> it's only happening with TextMate. Does anyone have any ideas
> about debugging this? Is there some utility that will allow you
> watch key presses and follow their path through the system?
What if you just open 5 new untitled windows and have no projects
open? Can you still not toggle among them with cmd-backtick?
> Carpe viam,
> Mike
Haris Skiadas
Department of Mathematics and Computer Science
Hanover College
On 2007-Apr-11, at 15:20 , Charilaos Skiadas wrote:
> On Apr 11, 2007, at 4:40 PM, Michael Larocque wrote:
>> On 2007-Apr-11, at 10:34 , Michael Larocque wrote:
>>>
>>> This is getting really weird. It is no longer a problem. Here's
>>> what I've done since yesterday:
>>>
>>> My TextMate project files and some of the projects are on an 2GB
>>> encrypted disk image. As part of some 'housekeeping' duties, I
>>> wanted more space on the disk image, so I created a new 4GB disk
>>> image and copied all of the files over to the new disk image.
>>> Upon opening up a couple of the projects in their new location,
>>> command-` now seems to work. Bizarre.
>>
>> Weirder and weirder. A few hours later and the behaviour is back!
>> And I haven't changed anything system or application-wise. And
>> it's only happening with TextMate. Does anyone have any ideas
>> about debugging this? Is there some utility that will allow you
>> watch key presses and follow their path through the system?
>
> What if you just open 5 new untitled windows and have no projects
> open? Can you still not toggle among them with cmd-backtick?
Thanks Haris. I think I've solved the problem. Of course, I thought
the issue was gone earlier today, so...
I have Menu Master installed, and I just added TextMate to the its
exclude list. That seems to have fixed it. However, I have MM
installed on my G5 and TM isn't in the exclude list, and I don't see
the problem on that system. As well, this issue only arose on my
MacBook Pro within the last week or so. So there could be some other
subtle issues.
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
Hi all,
I've written a command that performs an AppleScript to look up the
selected text in a FileMaker database. I have the command Output set to
"Replace Selected Text". It's all working well, except that the result
that's replacing my selection is always being followed by a newline--which
is definitely not being added by my AppleScript or FileMaker.
Any ideas on how to get rid of the added newline?
--
Tim Mansour <tim(a)neologica.com.au>
Hi Haris, thanks for the reply.
> When you say that you have a master file listed in the project
> options, I assume you mean that the variable TM_LATEX_MASTER is set?
> Is it the full path to the file, or just a relative path? Try with a
> full path also, see if that fixes it.
Yes, TM_LATEX_MASTER is set in the project preferences and it's the
full path. As I say, compiling the code works flawlessly.
> How do your \include commands look like?
I was just using \input{FILENAME} in the master file, but tried
\include as well, makes no difference, I get the same error. Does
anything need to be added to the chapter files? At the moment, they're
just snippets of code starting with a \chapter{}.
> Are you running the newest version of the bundle, checked out from
> svn and updated?
I just followed the instructions on your site to get this up and
running. Retrieved the LaTeX bundle and updated, now at revision 6976.
But is there anything that needs to be done to get the app to use the
new bundles or is it automatic?
> How and when was LaTeX installed in your system?
Used the i-Package installer around 2 months ago.
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
Thanks for your help
Suhaib.
Hello:)
First, actually I work with TexMate and gwtex based on TL 2007 but I
need for my work
at school a portable PC (with Ubuntu )
With Ubuntu, I installed (by hand) TL2007, because Debian and Ubuntu
works only in "experimental" with
TL 2005.
I would like to have the same distibution on OS X and Ubuntu, The
only solution is to install TL2007 on the MAC
but i would like to know if they are some difficulties :
With linux i've texmf in /$HOME and texlive in /usr/local/texlive
with now 2007/ and texmf-local/
I think there is no problem to work with TextMate and TL2007 but can
you confirm that !
Actually with gwtex, i have a problem with "documentation for
package", perhaps i need to make some adaptations for this with TL2007
Greetings Alain Matthes
_______________________________________________
textmate mailing list
textmate(a)lists.macromates.com
http://lists.macromates.com/mailman/listinfo/textmate
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
Hi Haris, thanks for the reply.
> When you say that you have a master file listed in the project
> options, I assume you mean that the variable TM_LATEX_MASTER is set?
> Is it the full path to the file, or just a relative path? Try with a
> full path also, see if that fixes it.
Yes, TM_LATEX_MASTER is set in the project preferences and it's the
full path. As I say, compiling the code works flawlessly.
> How do your \include commands look like?
I was just using \input{FILENAME} in the master file, but tried
\include as well, makes no difference, I get the same error. Does
anything need to be added to the chapter files? At the moment, they're
just snippets of code starting with a \chapter{}.
> Are you running the newest version of the bundle, checked out from
> svn and updated?
I just followed the instructions on your site to get this up and
running. Retrieved the LaTeX bundle and updated, now at revision 6976.
But is there anything that needs to be done to get the app to use the
new bundles or is it automatic?
> How and when was LaTeX installed in your system?
Used the i-Package installer around 2 months ago.
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
Thanks for your help
Suhaib.
Hi folks,
I have a weird TextMate problem on my MacBook Pro. (My other systems
don't exhibit this behaviour) On this system, when I command-` to
switch windows in TextMate, it 'beeps' at me and doesn't switch
windows. All other apps (iTerm, Safari, Mail, etc) work as per usual.
Probably the only 'customization' that I've done is that I keep svn
up'ed in /Library/Application Support/TextMate. I'm really at a loss
as how to debug this. Any ideas greatly appreciated.
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/~mlarocque/
At 12:00 +0000 2007-04-11, textmate-request(a)lists.macromates.com wrote:
>Content-Transfer-Encoding: 7bit
>From: Charilaos Skiadas <skiadas(a)hanover.edu>
>Precedence: list
>MIME-Version: 1.0 (Apple Message framework v752.2)
>To: TextMate users <textmate(a)lists.macromates.com>
>References: <FE72A777-CD43-45F0-91D5-6A07CFDC8EBD(a)prolumina.com>
>In-Reply-To: <FE72A777-CD43-45F0-91D5-6A07CFDC8EBD(a)prolumina.com>
>Date: Tue, 10 Apr 2007 12:49:19 -0400
>Reply-To: TextMate users <textmate(a)lists.macromates.com>
>Message-ID: <9964CE10-4767-4DCA-924D-4B36A280BB42(a)hanover.edu>
>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>Subject: Re: [TxMt] Command-backtick not working?!?!
>Message: 15
>
>
>On Apr 10, 2007, at 11:51 AM, Michael Larocque wrote:
>
>>Hi folks,
>>
>>I have a weird TextMate problem on my MacBook Pro. (My other
>>systems don't exhibit this behaviour) On this system, when I
>>command-` to switch windows in TextMate, it 'beeps' at me and
>>doesn't switch windows. All other apps (iTerm, Safari, Mail, etc)
>>work as per usual. Probably the only 'customization' that I've done
>>is that I keep svn up'ed in /Library/Application Support/TextMate.
>>I'm really at a loss as how to debug this. Any ideas greatly
>>appreciated.
>>
>I would bet that somehow by accident cmd-` has been bound to some
>bundle item. Press ctrl-cmd-T, then click on the magnifying glass
>and set it to "key equivalent", and press cmd-`, and if it shows any
>items in the list then those are your culprits.
>>Carpe viam,
>>Mike
>>
>>Michael Larocque
>>Chief Cook and Bottle Washer
>>Prolumina Communications Inc.
>>http://prolumina.com/~mlarocque/
>>
>
>Haris Skiadas
>Department of Mathematics and Computer Science
>Hanover College
I can confirm this behaviour as well. In my case, it's an old
Machine Name: Power Mac G4 (AGP graphics)
Machine Model: PowerMac3,1
CPU Type: PowerPC G4 (2.9)
running Mac OS X 10.4.9. The list shown is empty,
yet I get a beep and no window switch.
However, looking at Keyboard Shortcuts in System Preferences
shows I had Keyboard Navigation unchecked; checking it makes
it work correctly. Perhaps this is Michael's problem?
--
Vic
This new version uses PDFTeX by default, and will try to use TeXShop as the
previewer.
(Note that TeXShop is part of MacTeX 2007.)
The bundle is available (for the moment) here:
http://www.puffinry.demon.co.uk/LaTeX%20Watch%202.0.dmg
This version should be almost ready to be incorporated into the LaTeX
bundle, so please let
me know about any problems.
The default behaviour can be changed by setting shell variables, as follows:
1. If TM_LATEX_VIEWER=TeXniscope, it will use TeXniscope instead of TeXShop
(If you should happen to want LaTeX Watch to use a different previewer
from 'Compile and View',
you can set TM_LATEX_WATCH_VIEWER=TeXShop to override the
TM_LATEX_VIEWER setting.)
2. If TM_LATEX_WATCH_MODE=PS, then it will compile via DVI, and use GV to
preview.
3. If TM_LATEX_WATCH_DEBUG=console, additional status messages will be
printed to the console;
if TM_LATEX_WATCH_DEBUG=dialog, these status messages will pop up in
dialog boxes.
Incidentally, there is a utility in Support/bin/check_open that may be more
generally useful.
It uses the Carbon API to check whether a particular document is open in a
particular application.
(This is used to stop watching the document when you close its preview
window.) Of course
the same thing could be done with AppleScript, but that is too slow.
(Another alternative
would be to use the Perl-Carbon bindings that are included in 10.4, but that
would not work on
earlier OS versions.)
Since it's a bit of a pain to install GV, and since several
widely-distributed versions have
irritating bugs, I wondered about including a GV binary in the package. As
an experiment,
I built gv-3.5.8 as a universal binary with libXaw3d statically linked in,
and it comes to
about 3MB. Does anyone have an opinion on this?
Robin