Page LayoutHow do I insert a customized date in latex?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
pikkip
Posts: 2
Joined: Wed Apr 05, 2017 7:43 am

How do I insert a customized date in latex?

Post by pikkip »

\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space \number\year}

How do I customize this to get a specific month and year? For example, I need the result "May 2017" for this. Currently, I am getting it as "April 2017" since I am doing it in April. Since I am new to Latex, I am not able to figure out the reason.:?
Last edited by pikkip on Thu Apr 06, 2017 9:07 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How do I insert a customized date in latex?

Post by Johannes_B »

I think the reason for this is clear.

Use \date{May 2017}.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
pikkip
Posts: 2
Joined: Wed Apr 05, 2017 7:43 am

How do I insert a customized date in latex?

Post by pikkip »

Thank you, it worked. :D
Post Reply