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:
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.
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
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}}
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}}
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With