Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Hi I am using Texmaker to create some documents. When I use \date{text} the text being any date, and then run the .tex file I don't see the date in the PDF file. It's just blank. Not sure why. Is there a specific package to use \date?

share|improve this question
add comment

2 Answers

\date merely sets the date and doesn't print it, just like \title and \author also doesn't typeset anything. Actually, \date stores its value in \@date, which you can retrieve if you don't use \maketitle (since it acts in a self-destruct fashion, wiping out most of the title-related information after its usage). If you which to print it, you could define

\makeatletter
\newcommand{\printdate}{\@date}
\makeatother

in your preamble and use \printdate wherever you want to show the date specified through \date.

However, the best way to access the date and print it in various formats, is to use the isodate package. See Date format in LaTeX.

share|improve this answer
add comment

\date{} only sets the date but does not print it. The most common way of doing so is \maketitle

\documentclass{article}

\begin{document}

\date{24.12.2012}
\title{Some example}
\author{Uwe Ziegenhagen}

\maketitle

\end{document}

If you want to access the date (or author or title) outside the titlepage have a look at the titling package. It provides new commands such as \thedate.

BTW: TeXmaker is only the editor, it has nothing to do with LaTeX behind.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.