Add a version number to the title of a LaTeX document

前端 未结 8 1415
攒了一身酷
攒了一身酷 2021-02-04 07:17

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.

\         


        
8条回答
  •  情歌与酒
    2021-02-04 07:31

    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}}
    

    so that you define the version number with \Version{} and recall it with \version.

提交回复
热议问题