I'd like to automate the date entries for a journal I write in "LaTeX" and have come up with this snippet:
\subsection{${1:`date +%A`, `date +%d` `date +%B` `date +%Y`}}
which gives me the date as follows in my files (example):
\subsection{Wednesday, 10 October 2007}
It works--that is, it gives me the spaces I want between the elements of the date, but it looks cumbersome to me to invoke the date command repeatedly to get these spaces and I wonder if someone could supply a more elegant way to get the same result. Thanks. --Gildas Hamel
Gildas Hamel asked:
\subsection{${1:`date +%A`, `date +%d` `date +%B` `date +%Y`}} which gives me the date as follows in my files (example):
\subsection{Wednesday, 10 October 2007}
Just use a "big" format string for a single date command:
date +"%A, %d %B %Y"
should do the trick.
Cheers, Paul
Ah, ok,
`date +"%A, %d %B %Y"`
works. Thanks. --Gildas
* Paul McCann (paul.mccann@adelaide.edu.au) wrote:
Date: Thu, 11 Oct 2007 14:29:13 +0930 From: Paul McCann paul.mccann@adelaide.edu.au To: TextMate users textmate@lists.macromates.com Reply-To: TextMate users textmate@lists.macromates.com Subject: Re: [TxMt] Date snippet for Latex Gildas Hamel asked:
\subsection{${1:`date +%A`, `date +%d` `date +%B` `date +%Y`}} which gives me the date as follows in my files (example):
\subsection{Wednesday, 10 October 2007}
Just use a "big" format string for a single date command: date +"%A, %d %B %Y" should do the trick. Cheers, Paul ______________________________________________________________________ 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 Oct 10, 2007, at 11:42 PM, Gildas Hamel wrote:
I'd like to automate the date entries for a journal I write in "LaTeX" and have come up with this snippet:
\subsection{${1:`date +%A`, `date +%d` `date +%B` `date +%Y`}}
Try: `date "+%A, %d %B %Y"`
which gives me the date as follows in my files (example):
\subsection{Wednesday, 10 October 2007}
It works--that is, it gives me the spaces I want between the elements of the date, but it looks cumbersome to me to invoke the date command repeatedly to get these spaces and I wonder if someone could supply a more elegant way to get the same result. Thanks. --Gildas Hamel
Haris Skiadas Department of Mathematics and Computer Science Hanover College