Add a version number to the title of a LaTeX document

前端 未结 8 1515
攒了一身酷
攒了一身酷 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:41

    Simple manual method:

    1. Create a file called (say) version.tex:

      \providecommand{\versionnumber}{3.0.1}

    2. Where you need to use it:

      \input{version}
      \title{Title\\\normalsize Version \versionnumber}

    This will give you a single common place in your project or projects to update the version manually.

提交回复
热议问题