This is a bit off topic, but I have added a word count command to TextMate for Latex using texWordCount.pl as described here
http://markelikalderon.com/blog/2007/12/30/latex-and-word-count-revisited/
This raised two questions.
1. Is there a "good practice" place to put such snippets of code, and
2. I put it in ~Library/Application Support/Textmate/Code
Adding the "Code" folder to the existing directory tree.
But this led me to a new problem in that I couldn't work out how to get that directory tree found when trying to run the code. In Windows, because of the space in "Application Support" I would gve the full and wrap it in quotes, but the cmbinations I tried failed to work.
At the moment, I have created a new folder ~Library/TextMate for the script and the word count seem to work well, it also picks up possible errors in your latex code, but I haven't investigated that yet. A google search confirms the need to use quotes, but I can't find an illustration of exactly where these quotes go.
Some help would be gratefully received.
Thanks,
Graham
This is a bit off topic, but I have added a word count command to TextMate for Latex using texWordCount.pl as described here
http://markelikalderon.com/blog/2007/12/30/latex-and-word-count-revisited/
This raised two questions.
Is there a "good practice" place to put such snippets of code, and
I put it in ~Library/Application Support/Textmate/Code
Adding the "Code" folder to the existing directory tree.
I am not sure I know what you mean by snippets of code. Do you mean texWordCount.pl? If so, that can live wherever you normally keep such scripts, like ~/bin or /usr/local/bin/. I normally put any commands that I write for the LaTeX bundle, not in the bundle itself, but in a separate bundle called Latex Custom or something like that (not strictly speaking necessary but neater that way.)
All the best, Mark
Mark,
Yes, I do mean texWordCount.pl, and I don't "normally"keep such things anywhere, as this is the first tme I have downloaded something like this where I needed to decide where it should go.
But /usr/local/bin/ sounds a god place, if my understanding of this directories purpose is correct.
Thanks,
Graham
On 07/03/2008, Mark Eli Kalderon eli@markelikalderon.com wrote:
This is a bit off topic, but I have added a word count command to
TextMate for Latex using texWordCount.pl as described here
http://markelikalderon.com/blog/2007/12/30/latex-and-word-count-revisited/
This raised two questions.
Is there a "good practice" place to put such snippets of code, and
I put it in ~Library/Application Support/Textmate/Code
Adding the "Code" folder to the existing directory tree.
I am not sure I know what you mean by snippets of code. Do you mean texWordCount.pl? If so, that can live wherever you normally keep such scripts, like ~/bin or /usr/local/bin/. I normally put any commands that I write for the LaTeX bundle, not in the bundle itself, but in a separate bundle called Latex Custom or something like that (not strictly speaking necessary but neater that way.)
All the best, Mark
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 7 Mar 2008, at 09:00, Graham Smith wrote:
[...]
- Is there a "good practice" place to put such snippets of code
When a bundle item requires a certain script it can be put under Support/bin in the same bundle.
The Support folder of the bundle is exposed as the TM_BUNDLE_SUPPORT environment variable (and "$TM_BUNDLE_SUPPORT/bin" is automatically put in the PATH for bundle commands w/o a shebang).
- I put it in ~Library/Application Support/Textmate/Code
Adding the "Code" folder to the existing directory tree.
But this led me to a new problem in that I couldn't work out how to get that directory tree found when trying to run the code. In Windows, because of the space in "Application Support" I would gve the full and wrap it in quotes, but the cmbinations I tried failed to work.
Not sure exactly how you call what, but you want either: ~/Library/Application\ Support/Textmate/Code or: "$HOME/Library/Application Support/Textmate/Code"
The tilde is not expanded inside quotes, likely that was your problem.
Allan,
Thanks for this, it exactly answered my question :-)
And thanks for TextMate, I really like it and even though I hadn't used it, simply reading about it influenced my decision to buy a Mac.
Graham
On 09/03/2008, Allan Odgaard throw-away-2@macromates.com wrote:
On 7 Mar 2008, at 09:00, Graham Smith wrote:
[...]
- Is there a "good practice" place to put such snippets of code
When a bundle item requires a certain script it can be put under Support/bin in the same bundle.
The Support folder of the bundle is exposed as the TM_BUNDLE_SUPPORT environment variable (and "$TM_BUNDLE_SUPPORT/bin" is automatically put in the PATH for bundle commands w/o a shebang).
- I put it in ~Library/Application Support/Textmate/Code
Adding the "Code" folder to the existing directory tree.
But this led me to a new problem in that I couldn't work out how to get that directory tree found when trying to run the code. In Windows, because of the space in "Application Support" I would gve the full and wrap it in quotes, but the cmbinations I tried failed to work.
Not sure exactly how you call what, but you want either: ~/Library/Application\ Support/Textmate/Code or: "$HOME/Library/Application Support/Textmate/Code"
The tilde is not expanded inside quotes, likely that was your problem.
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