diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/sjtutex/sjtuarticle.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/sjtutex/sjtuarticle.cls | 106 |
1 files changed, 85 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/sjtutex/sjtuarticle.cls b/Master/texmf-dist/tex/latex/sjtutex/sjtuarticle.cls index e879b87d259..7437662a554 100644 --- a/Master/texmf-dist/tex/latex/sjtutex/sjtuarticle.cls +++ b/Master/texmf-dist/tex/latex/sjtutex/sjtuarticle.cls @@ -28,10 +28,10 @@ Release `2020/10/01' or newer is required to\MessageBreak compile this document.\MessageBreak\MessageBreak Please update your TeX distribution}{}} -\GetIdInfo$Id: sjtutex.dtx b468d42 2024-02-18 19:15:02 +0800 Alexara Wu <alexarawu@outlook.com> $ +\GetIdInfo$Id: sjtutex.dtx ab42a74 2024-03-23 20:09:29 +0800 Alexara Wu <alexarawu@outlook.com> $ {Article document class for Shanghai Jiao Tong University (SJTUTeX)} \ProvidesExplClass{sjtuarticle} - {\ExplFileDate}{2.1}{\ExplFileDescription} + {\ExplFileDate}{2.1.1}{\ExplFileDescription} \dim_new:N \l__sjtu_tmp_dim \skip_new:N \l__sjtu_tmp_skip \box_new:N \l__sjtu_tmp_box @@ -639,6 +639,13 @@ \SJTU@style@equation@font \spread@equation } +\keys_define:nn { sjtu / style } + { + theorem-header-font .tl_set:N = \SJTU@style@thm@header@font , + theorem-header-font .initial:n = \bfseries \CJKsffamily , + theorem-body-font .tl_set:N = \SJTU@style@thm@body@font , + theorem-body-font .initial:n = \normalfont , + } \tl_set:Nn \textfraction { 0.15 } \tl_set:Nn \topfraction { 0.85 } \tl_set:Nn \bottomfraction { 0.65 } @@ -947,10 +954,16 @@ assumption, axiom, conjecture, corollary, definition, example, exercise, lemma, problem, proposition, theorem } - { \exp_args:Nnv \newtheorem {##1} { c__sjtu_name_ ##1 _tl } } + { + \cs_if_exist:cF {##1} + { \exp_args:Nnv \newtheorem {##1} { c__sjtu_name_ ##1 _tl } } + } \clist_map_inline:nn { remark, solution } - { \exp_args:NNnv \newtheorem* {##1} { c__sjtu_name_ ##1 _tl } } + { + \cs_if_exist:cF {##1} + { \exp_args:NNnv \newtheorem* {##1} { c__sjtu_name_ ##1 _tl } } + } } \ctex_at_begin_package:nn { amsthm } { @@ -969,32 +982,83 @@ \RenewDocumentEnvironment { proof } { O{ \proofname } } { \par \pushQED { \qed } - \normalfont \dim_zero:N \topsep + \SJTU@style@thm@body@font \dim_zero:N \topsep \trivlist \item [ \skip_horizontal:N \labelsep - \bfseries \CJKsffamily #1 \@addpunct { \enskip } + \SJTU@style@thm@header@font #1 \@addpunct { \enskip } ] \ignorespaces } { \popQED \endtrivlist \@endpefalse } \newtheoremstyle { sjtu } - { } { } { \normalfont } { } { \bfseries \CJKsffamily } { } { \ccwd } { } - \theoremstyle { sjtu } - \__sjtu_new_theorems: - } -\ctex_at_end_package:nn { ntheorem } - { - \__sjtu_cs_provide_eq:NN \QED \c_empty_tl - \theoremheaderfont { \bfseries \CJKsffamily } - \theorembodyfont { \normalfont } - \theoremseparator { \enskip } - \theoremsymbol { \ensuremath { \QED } } - \qedsymbol { \ensuremath { \QED } } - \newtheorem* { proof } { \proofname } - \theoremsymbol { } - \__sjtu_new_theorems: + { } { } { \SJTU@style@thm@body@font } { } + { \SJTU@style@thm@header@font } { } { \ccwd } { } + } +\ctex_at_end_preamble:n + { + \@ifpackageloaded { amsthm } + { + \theoremstyle { sjtu } + \__sjtu_new_theorems: + } + { + \@ifpackageloaded { ntheorem } + { + \__sjtu_cs_provide_eq:NN \QED \c_empty_tl + \theoremheaderfont { \SJTU@style@thm@header@font } + \theorembodyfont { \SJTU@style@thm@body@font } + \theoremseparator { \enskip } + \theoremsymbol { \ensuremath { \QED } } + \qedsymbol { \ensuremath { \QED } } + \cs_if_exist:NF \proof + { \newtheorem* { proof } { \proofname } } + \theoremsymbol { } + \__sjtu_new_theorems: + } { } + } + } +\ctex_at_end_package:nn { thmtools } + { + \newlistentry { thm } { loe } { 0 } + \newcounter { loedepth } + \setcounter { loedepth } { 1 } + \skip_set:Nn \cftthmnumwidth { 2.3 em } + \define@key { thmt-listof } { numwidth } + { \skip_set:Nn \cftthmnumwidth {#1} } + \cs_set:Npn \thmtlo@newentry + { \cs_set_eq:cN { l@ \thmt@envname } \l@thm } + \cs_set:Npn \thmtlo@chaptervspacehack { } + \RenewDocumentCommand \listoftheorems { s O{ } } + { + \group_begin: + \setlisttheoremstyle {#2} + \IfBooleanTF {#1} + { \SJTU@head* { \listtheoremname } } + { \SJTU@head { \listtheoremname } } + \cs_set:Npn \contentsline ##1 + { \use:c { thmt@contentsline@ ##1 } {##1} } + \clist_map_inline:Nn \thmt@allenvs + { + \tl_set:Nn \thmt@envname {##1} + \thmtlo@newentry + } + \@fileswfalse + \AddToHook { enddocument / afterlastpage } + { + \if@filesw + \@ifundefined { tf@loe } + { + \expandafter\newwrite\csname tf@loe\endcsname + \immediate\openout \csname tf@loe\endcsname \jobname.loe\relax + } { } + \fi + } + \cs_set:Npn \makebox [##1][##2]##3 { \, ##3 } + \@starttoc { loe } + \group_end: + } } \cs_new_protected:Npn \__sjtu_newlistof:nnnnn #1#2#3#4#5 { |