I have the following code:




I want to customize the date on my paper so that it only says "May 2014" with custom size. How can I do this? I don't have any special packages imported. I'm also using writeLatex. Help is much appreciated.

  • Please provide the Minimum (Non)Working Example so that helpers will try to help you without any guessing on what your code is. – Jesse May 25 '14 at 5:43
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – user31729 May 25 '14 at 5:44
  • I just started using LaTeX today. I don't know what I can show aside from what I grab off the web. I have no MWE as I don't know what to code up for the date. – user65422 May 25 '14 at 5:54
  • Where should that short date appear? What do you mean by 'custom size'? How could/should others help without starting point? ;-) – user31729 May 25 '14 at 6:12

You can use the isodate package:



\title{Your Paper}    



Printing the day is switched off using \printdayoff

If you want to change the font size use something like:




You can use the following commands to customize your date:

day: \the\day
month: \the\month
year: \the\year

If you want the month displayed as a word instead of the number, you can use the datetime package:



\newdateformat{mydate}{\shortmonthname[\the\month]  \the\year}




You can make it fat or change the fontsize by adding the commands in \newdateformat

\newdateformat{mydate}{\Huge\textbf{\shortmonthname[\the\month]  \the\year}}

Most document classes (article included) provide the \date{<date>} macro which sole purpose is to store <date> in another macro called \@date. The latter is used when the title is made.

While one might think a date is required with \date{<date>} you can include almost anything. As such, a simple solution is just to supply the formatting and date style you want:

\date{{\Large May 2014}}

The internal bracing makes sure that the \Large scope is limited only to the use of \@date (wherever that may be). Typically one would require a \par as well to enforce the \Large fontsize baseline skip to be properly set. However, in a title, such specifics are rarely needed and most likely overridden by other vertical spacing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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