LaTeX forum ⇒ Theses, Books, Title pagesIncluding the Date When I don't Specify

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Posts: 1
Joined: Thu Jan 14, 2021 6:55 am

Including the Date When I don't Specify

Postby JohnnyBeGood » Thu Jan 14, 2021 7:06 am

Hello - I do not want to include the date on my title page, but for some reason it is automatically including it.

Here is my code -

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \begin{document}
  4. \title{My title}
  5. \maketitle
  6. \end{document}

And the document displays two lines - "My title" and then below "January 14, 2021" , which is a day ahead by the way.
Last edited by cgnieder on Sun Jan 17, 2021 10:41 pm, edited 1 time in total.
Reason: added code formatting

User avatar
Ijon Tichy
Posts: 392
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Thu Jan 14, 2021 10:02 am

article's (documented) default of the date is \today. You can explicitly set an empty date using \date{} (note the empty argument). However, this would print an empty date, so the place is used as if there would be a date. If you need a more individual title, you cannot use \maketitle but design and implement it manually. For a in-head-title (which is the default of article) with only a title but no date and no auther, you could e.g. use something simple like:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{blindtext}
  4. \begin{document}
  5. \begin{center}
  6. \LARGE\bfseries My title
  7. \bigskip
  8. \end{center}
  9. \tableofcontents
  10. \section{My first section}
  11. \blindtext
  12. \end{document}

For a document with title page instead of in-head-title you should use environment titlepage, e.g.:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{blindtext}
  4. \begin{document}
  5. \begin{titlepage}
  6. \centering
  7. \vspace*{.25\textheight}
  9. \LARGE\textbf{My title}
  11. \bigskip
  13. \large\textbf{My subtitle}
  14. \end{titlepage}
  15. \tableofcontents
  16. \section{My first section}
  17. \blindtext
  18. \end{document}

BTW: I cannot say why your date is one day in the future. TeX uses the local time reported by your system. So maybe your system clock is one day in the future.

BTW: Please always mark your code as code. You can do so, selecting the code with your mouse and then click to the Code button in the toolbar (please do not use the MWE button, because it has another meaning, nor the LaTeX button, which should be used for inline code only not for multiple lines of code). For more information about text formation in the forum, see the BBCode help page.

Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 5 guests