Hello. I'm interested in modifying the LaTeX Article template. The Article template (from Edit Templates) uses a perl one-liner to import a file called "article_in.tex," where, I assume, most of the interesting stuff lives. I can't for the life of me find "article_in.tex." Where is it? (And the metaquestion, I guess, is "if I want to make substantive changes to the latex article template, is editing article_in.tex in fact the right thing to do?)
this is the default latex article template code, BTW:
if test ! -e "$TM_NEW_FILE"; then TM_YEAR=`date +%Y` \ TM_DATE=`date +%Y-%m-%d` \ TM_USERNAME=`niutil -readprop / /users/$USER realname` \ AUTHOR_ADDR=$(RA="defaults read AddressBookMe"; cat <<EOA `$RA FirstName` `$RA LastName` \\ `$RA StreetAddr1` \\ `$RA StreetAddr2` \\ `$RA ZipPostal` `$RA City` \\ `$RA Email` \\ http://www.xxx.yyy/mysite.html EOA) \ perl -pe 's/${([^}]*)}/$ENV{$1}/g' \ < article_in.tex > "$TM_NEW_FILE" fi
thanks for your help.
--andreas
On Jun 18, 2006, at 11:07 AM, Andreas Duus Pape wrote:
Hello. I'm interested in modifying the LaTeX Article template. The Article template (from Edit Templates) uses a perl one-liner to import a file called "article_in.tex," where, I assume, most of the interesting stuff lives. I can't for the life of me find "article_in.tex." Where is it? (And the metaquestion, I guess, is "if I want to make substantive changes to the latex article template, is editing article_in.tex in fact the right thing to do?)
In the bundle editor, the template item has a little disclosure arrow on its right. Clicking that will show you the enclosed .tex file. I would suggest duplicating the template from within the bundle editor, and then editing the new version. No particular reason to mess with the built in Article template. If on the other hand you think that some of your modifications would benefit everyone, then let me know and I'll see about possibly modifying the built in article template.
Btw, if you go to the terminal and navigate to where your bundle items are stored (~/Library/Application Support/TextMate/Bundles for me) and navigate in Latex.tmbundle for example, you'll see how the templates are being stored. They are essentially just folders containing an info.plist and any other helper files. I would however strongly encourage you to work from within the bundle editor, instead of altering those files from the terminal, for a number of reasons.
Haris