Skip to content

Commit

Permalink
adjust year automatically
Browse files Browse the repository at this point in the history
fix #3
  • Loading branch information
miRoox committed Jul 24, 2021
1 parent d9e9553 commit 9ed7a15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hitgsrep.cls
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
\renewcommand{\footrulewidth}{0.5bp}

% 封面选项
\DeclareStringOption[\the\year]{year}
\DeclareStringOption[\hit@auto@year]{year}
\DeclareStringOption[\hit@auto@semester]{semester}
\DeclareStringOption{course}
\DeclareStringOption{affiliation}
Expand All @@ -53,6 +53,7 @@

% 自动生成当前学期
\newcommand{\hit@auto@semester}{\ifcase \month \or\or\or\or\or\or\or\or\or\or\or\or\fi}
\newcommand{\hit@auto@year}{\ifnum\month>1 {\the\year}\else {\the\numexpr\year-1\relax}\fi}

% 封面
\newcommand{\hit@putinfo}[2][3.81cm]{\begin{CJKfilltwosides}[b]{#1}#2\end{CJKfilltwosides}}%
Expand Down

0 comments on commit 9ed7a15

Please sign in to comment.