I would like to make a table using the tabular environment, and in one of the cells in my table I need to include the actual date. A clever approach would then be using the \date{} command - but I cannot make it work to include the \date{} command inside the tabular environment...is that not possible??
Cheers,
Karsten
\date
doesn't get the date, it sets the date of the document. If you browse the latex.ltx
source code you find:
\def\date#1{\gdef\@date{#1}}
So if the date of the document is set in the preamble, you can get it by using \@date
. Unfortunately (for you) that macro has an @
in it so you can't use it directly in regular document text. So you would have to put this in your preamble:
\makeatletter
\let\insertdate\@date
\makeatother
Then \insertdate
is an alias to \@date
and will insert the date specified in the preamble into the current text.
But you also mentioned the "actual" date, which may mean the current date as of the compilation of the document. That information is stored by TeX in \today
.
BTW, You can find an entire community on the TeX StackExchange, where no TeX-related question is too small.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With