Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add review mode #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Style/ucasthesis.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
%---------------------------------------------------------------------------%
Expand Down
26 changes: 26 additions & 0 deletions Style/ucasthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
\ucas@plaintrue%
}
%-
%-> Rewiew
%-
\newif\ifucas@review \ucas@reviewfalse
\DeclareOption{review}{%
\ucas@reviewtrue%
}
%-
%-> Draft version info
%-
\newif\ifucas@versioninfo \ucas@versioninfofalse
Expand Down Expand Up @@ -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}\\
Expand Down Expand Up @@ -428,9 +440,15 @@

{By}

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

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

{\ucas@value@en@advisor}
\fi

\vspace*{\stretch{3}}

Expand Down Expand Up @@ -542,6 +560,14 @@
\fi
}
%---------------------------------------------------------------------------%
%->> make backmatter
%---------------------------------------------------------------------------%
\newcommand{\makebackmatter}[1]{
\unless\ifucas@review
\input{#1}
\fi
}
%---------------------------------------------------------------------------%
%->> New environments
%---------------------------------------------------------------------------%
%- define chinese keywords
Expand Down
3 changes: 2 additions & 1 deletion Thesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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|...]%
%---------------------------------------------------------------------------%
Expand Down Expand Up @@ -89,7 +90,7 @@
}{%
\printbibliography% bibliography
}
\input{Tex/Backmatter}% other information
\makebackmatter{Tex/Backmatter}% other information
\end{document}
%---------------------------------------------------------------------------%