[TxMt] latex_watch.pl modification?

Zvi Biener zvistrash at gmail.com
Thu Mar 26 15:18:53 UTC 2015


Hi TextMaters,

I have a very superficial knowledge of perl, so I wonder if someone can 
help.
Setup: before I compile my LaTeX document, I need to run a shell script 
(using sed) to find/replace certain strings. [There is a long story for 
why I need to do this, and why its not easily avoidable.]

Possible solution: I was wondering if I can insert something in the 
latex_watch.pl script that would run this shell script, without causing 
latex_watch to go into an infinite loop (since the shell script changes 
the underlying LaTeX file/s).

I've tried inserting the relevant code in several locations, but I can't 
seem to avoid the loop. That's not surprising, since I don't really know 
perl. Does anyone know if there is easy way to

1) modify latex_watch.pl so it executes a shell script that modifies the 
underlying LaTeX file without going in to a loop?
or
2) cause the shell script to run on the file whenever the file changes 
by some other means?

Thanks!
Zvi


More information about the textmate mailing list