diff options
Diffstat (limited to 'macros/latex/contrib/hithesis/hithesis.sty')
-rw-r--r-- | macros/latex/contrib/hithesis/hithesis.sty | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/macros/latex/contrib/hithesis/hithesis.sty b/macros/latex/contrib/hithesis/hithesis.sty index b1508de9c7..d92ef07e6c 100644 --- a/macros/latex/contrib/hithesis/hithesis.sty +++ b/macros/latex/contrib/hithesis/hithesis.sty @@ -3,17 +3,12 @@ Thesis Template Extension] % 此文件声明不在规范中要求的格式所使用的宏包。 % (所以,格式基本上是自由发挥的。) - -\setCJKfamilyfont{siyuan}[]{SourceHanSerifCN-Regular} -\newcommand{\highlight}[1]{{\CJKfamily{siyuan}\textbf{#1}}} - - - % 根据窝工规范中对数字书写规范的规定(6): % 凡4位或4位以上的数都从个位起每3位数空半个数码(1/4汉字)。 % 注意此处,除此任何空格都是错误的(包括\:\;\ 等) \RequirePackage{siunitx} \sisetup{group-minimum-digits=4, group-separator= \hspace{0.25em}} +\sisetup{detect-weight,detect-mode,detect-family} % 处理数学公式中的黑斜体的宏包 \RequirePackage{bm} @@ -38,17 +33,21 @@ Thesis Template Extension] % 算法的宏包,注意宏包兼容性,先后顺序为float、hyperref、algorithm(2e),否则无法 % 生成算法列表。我工算法混乱问题详见hithesis文档。各个实验室设置具体方法详见 % hithesis文档或者示例中给出的地址。 -\RequirePackage[boxed,linesnumbered,algochapter]{algorithm2e} +\RequirePackage[algoruled,linesnumbered,algochapter]{algorithm2e} +\SetAlCapSty{} +\newcommand{\foocaption}[1]{ \def\@algocf@pre@plainruled{\hrule height1.5pt depth0pt\kern\interspacetitleruled #1 \kern\interspacealgoruled\hrule height1pt depth0pt\kern\interspacetitleruled} } +\def\@algocf@post@ruled{\kern\interspacealgoruled\hrule height1.5pt\relax}% + \newcommand{\algoenname}{Algo.} %算法英文标题 \newfloatlist[chapter]{algoen}{aen}{\listalgoenname}{\algoenname} \newfixedcaption{\algoencaption}{algoen} \renewcommand{\thealgoen}{\thechapter-\arabic{algocf}} -\renewcommand{\@cftmakeaentitle}{\chapter*{\listalgoenname\@mkboth{\bfseries\listalgoenname}{\bfseries\listalgoenname}} +\renewcommand{\@cftmakeaentitle}{\chapter*{\listalgoenname\@mkboth{\listalgoenname}{\listalgoenname}} } \renewcommand{\algorithmcfname}{算法} \setlength\AlCapSkip{1.2ex} \SetAlgoSkip{1pt} -\renewcommand{\algocf@captiontext}[2]{\wuhao#1\algocf@typo ~ \AlCapFnt{}#2} % text of caption +\renewcommand{\algocf@captiontext}[2]{\wuhao#1\algocf@typo~\AlCapFnt{}#2} % text of caption \expandafter\ifx\csname algocf@within\endcsname\relax% if \algocf@within doesn't exist \renewcommand\thealgocf{\@arabic\c@algocf} % and the way it is printed \else% else @@ -62,7 +61,7 @@ Thesis Template Extension] \addtolength{\hsize}{-\algomargin}% } \newcommand{\AlgoBiCaption}[2]{%直接取出自定义的中英文标题条目加入到真正的\caption 中 - \caption[#1]{\protect\setlength{\baselineskip}{1.5em}#1 \protect \\ Algo. \thealgocf~~ #2} % \algoencaption{#2} + \caption[#1]{\protect\setlength{\baselineskip}{1.5em}#1 \protect \\ Algo.\thealgocf~#2} % \algoencaption{#2} \addcontentsline{aen}{algoen}{\protect\numberline{\thealgoen}{#2}} } |