7

I have the following code:

\shortdayofweekname{<day>}{<month>}{<year>}.

Packages:

\documentclass[a4paper]{article}  
\usepackage[english]{babel}  
\usepackage[utf8]{inputenc}  
\usepackage{amsmath}  
\usepackage{graphicx}  
\usepackage[colorinlistoftodos]{todonotes}  
\usepackage{amsthm}  
\usepackage{amssymb}  
\newtheorem{thm}{Theorem}  
\newtheorem{lma}{Lemma}  
\newtheorem{df}{Definition}  
 \newtheorem{axiom}{Axiom}  
\theoremstyle{definition}  
 \newtheorem{exmp}{Example}[section]  
\usepackage{amsthm}  
\newtheorem{theorem}{Theorem}  

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.

Werner
  • 603,163
user65422
  • 267

3 Answers3

5

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:

\documentclass[a4paper]{article}  
\usepackage[english]{babel}  
\usepackage[utf8]{inputenc}  

%...

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

\begin{document}

\mydate\today

\end{document}

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

\newdateformat{mydate}{\Huge\textbf{\shortmonthname[\the\month]  \the\year}}
SLx64
  • 2,823
5

You can use the isodate package:

\documentclass[a4paper]{article}

\usepackage[english]{isodate}

\title{Your Paper}    
\author{You}    
\date{\printdayoff\today}

\begin{document}
\maketitle  

\end{document}

Printing the day is switched off using \printdayoff

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

\date{\Huge\printdayoff\today}

example

sergej
  • 6,461
  • 32
  • 62
5

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.

Werner
  • 603,163