Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a version number to the title of a LaTeX document

The title section of my LaTeX documents usually look like

\title{Title}
\author{Me}
%\date{}      %// Today's date will appear when this is commented out.

\begin{document}
\maketitle

I'd really like to add another line in the title section for a version number:

\title{Title}
\author{Me}
\version{v1.2}
%\date{}      %// Today's date will appear when this is commented out.

\begin{document}
\maketitle

It doesn't necessarily have to be a command named version, but how can I get a version number to appear after the date (which is after the author)? I can manually set the version number.

So:

Title

Me

4/13/2010

v1.2

like image 729
physicsmichael Avatar asked Apr 13 '10 23:04

physicsmichael


People also ask

What does the document version number mean in latex?

Essentially, it numbers the .dvi file, i.e the number is increased every time Latex is run. Personally, I use this as a simple work around for the lack of a human-friendly document version number from Git.

How do I create a title page in latex?

LaTeX title page By using LaTeX there is the possibility to create a title page automatically. To fill the title following commands are set: title {...} title of document

How to display the version number only in the titlepage?

If you need to display the version number only in the titlepage, you just need to modify it using \begin{titlepage} ... Version 1.x ... \end{titlepage} after issuing the command \maketitle. Otherwise, if you need to recall it in several times throughout the document, it's better to define a variable: \def\Version#1{\def\version{#1}}

Should I put the version number in the title of my article?

If you don't need it in the title per se you could add it as a footnote to the date (both of those properties related to the freshness of the resource so it makes some sense to put them together. itle{My article} \version{v1.2} \date{ oday hanks{ heversion}}


1 Answers

The easiest way to do exactly what I wanted to do was to simply use:

\title{Title}
\author{Me}
\date{\today\\v1.2}

\begin{document}
\maketitle
like image 185
physicsmichael Avatar answered Sep 21 '22 19:09

physicsmichael