Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add review mode
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Hu <huqi@loongson.cn>
specialpointcentral committed Jun 19, 2023
1 parent aec46ba commit 26bf37e
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Style/ucasthesis.cfg
Original file line number Diff line number Diff line change
@@ -105,6 +105,8 @@
\def\ucas@label@en@proofname{Proof}
\def\ucas@label@ch@keywords{关键词:}
\def\ucas@label@en@keywords{Keywords:}

\def\ucas@value@review{***}
%---------------------------------------------------------------------------%
%->> Author's declaration
%---------------------------------------------------------------------------%
27 changes: 26 additions & 1 deletion Style/ucasthesis.cls
Original file line number Diff line number Diff line change
@@ -43,6 +43,13 @@
\ucas@plaintrue%
}
%-
%-> Rewiew
%-
\newif\ifucas@review \ucas@reviewfalse
\DeclareOption{review}{%
\ucas@reviewtrue%
}
%-
%-> Draft version info
%-
\newif\ifucas@versioninfo \ucas@versioninfofalse
@@ -309,8 +316,13 @@
\def\tabcolsep{1pt}
\def\arraystretch{1.3}
\begin{tabular}{lc}
\ifucas@review
\ucas@label@ch@author & \ulenhance[1.2pt]{\ulextend{\ucas@value@review}}\\
\ucas@label@ch@advisor & \ucaslntotab[1.2pt]{\ucas@value@review}\\
\else
\ucas@label@ch@author & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@author}}\\
\ucas@label@ch@advisor & \ucaslntotab[1.2pt]{\ucas@value@ch@advisor}\\
\fi
\ucas@label@ch@degree & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@degreetype\ucas@value@ch@degree}}\\
\ucas@label@ch@major & \ulenhance[1.2pt]{\ulextend{\ucas@value@ch@major}}\\
\ucas@label@ch@institute & \ucaslntotab[1.2pt]{\ucas@value@ch@institute}\\
@@ -428,10 +440,15 @@

{By}

\ifucas@review
{\ucas@value@review}

{\ucas@value@review}
\else
{\ucas@value@en@author}

{\ucas@value@en@advisor}

\fi
\vspace*{\stretch{3}}

{\ucas@value@en@institute}
@@ -542,6 +559,14 @@
\fi
}
%---------------------------------------------------------------------------%
%->> make backmatter
%---------------------------------------------------------------------------%
\newcommand{\makebackmatter}[1]{
\unless\ifucas@review
\input{#1}
\fi
}
%---------------------------------------------------------------------------%
%->> New environments
%---------------------------------------------------------------------------%
%- define chinese keywords
3 changes: 2 additions & 1 deletion Thesis.tex
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
%- [<oneside|twoside|print>]% oneside eprint, twoside eprint, or paper print
%- [fontset=<adobe|none|...>]% specify font set instead of automatic detection
%- [scheme=plain]% thesis writing of international students
%- [review]% generate review version
%- [draftversion]% show draft version information
%- [standard options for ctex book class: draft|paper size|font size|...]%
%---------------------------------------------------------------------------%
@@ -89,7 +90,7 @@
}{%
\printbibliography% bibliography
}
\input{Tex/Backmatter}% other information
\makebackmatter{Tex/Backmatter}% other information
\end{document}
%---------------------------------------------------------------------------%

0 comments on commit 26bf37e

Please sign in to comment.