diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hithesis/hithesis.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hithesis/hithesis.sty | 245 |
1 files changed, 242 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/hithesis/hithesis.sty b/Master/texmf-dist/tex/latex/hithesis/hithesis.sty index 11c154a8795..b1508de9c77 100644 --- a/Master/texmf-dist/tex/latex/hithesis/hithesis.sty +++ b/Master/texmf-dist/tex/latex/hithesis/hithesis.sty @@ -1,17 +1,40 @@ -\ProvidesPackage{hithesis}[2017/08/25 1.0.0 Harbin Institute of Technology +\ProvidesPackage{hithesis}[2018/02/19 1.0.10 Harbin Institute of Technology 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}} + % 处理数学公式中的黑斜体的宏包 \RequirePackage{bm} % 不同于 \mathcal \mathfrak 之类的英文花体字体 \RequirePackage{mathrsfs} % 支持彩色 -\RequirePackage{color} +\RequirePackage{xcolor} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% set global color theme of thesis % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\definecolor{colorzero}{rgb}{0, 0, 0} +\definecolor{colorone}{rgb}{1, 0, 0} +\definecolor{colortwo}{rgb}{0, 0, 1} +\definecolor{colorthree}{rgb}{0, 1, 0} % 图形和表格的控制旋转 \RequirePackage{rotating} + + % 算法的宏包,注意宏包兼容性,先后顺序为float、hyperref、algorithm(2e),否则无法 % 生成算法列表。我工算法混乱问题详见hithesis文档。各个实验室设置具体方法详见 % hithesis文档或者示例中给出的地址。 @@ -58,9 +81,19 @@ breaklines=true % 术语宏包,用来处理首次全写,之后缩写的问题 \RequirePackage{glossaries} +\setacronymstyle{short-long} +\renewcommand*{\genacrfullformat}[2]{% + \glsentrylong{#1}% +} \makeglossaries % 添加术语举例 -% \newacronym{dual}{DLP}{对偶规划(Dual linear programming, DLP)} + +\newacronym{tssbp}{树结构折筷过程}{树结构折筷过程(Tree-structured Stick-breaking process)} +\def\gtssbp{\gls{tssbp}\sindex[china]{shu!树结构折筷过程}\sindex[english]{Tree-structured Stick-breaking process}} + +\newacronym[shortplural=SCNAs,longplural={体细胞拷贝数变异(Somatic copy number alternation,SCNA)}]{scna}{SCNA}{体细胞拷贝数变异(Somatic copy number alternation,SCNA)} +\def\gscna{\gls{scna}\sindex[china]{ti!体细胞拷贝数变异}\sindex[english]{Somatic copy number alternation}\ignorespaces} +\def\gscnas{\glspl{scna}\sindex[china]{ti!体细胞拷贝数变异}\sindex[english]{Somatic copy number alternation}\ignorespaces} % tikz做图宏宏包 \usepackage{tikz} @@ -68,6 +101,212 @@ breaklines=true % \tikzstyle{nodestyle}= [circle, fill=gray!60] % \tikzstyle{edgestyle}= [-latex] +\tikzstyle{maternal}= [colorone] +\tikzstyle{paternal}= [colortwo] +\tikzstyle{variant}= [colorthree!80!colorzero] +\tikzstyle{reference}= [colorzero] + +\tikzstyle{aallele}= [colorzero,rotate=90] +\tikzstyle{ballele}= [colorthree!80!colorzero,rotate=90] + +\tikzstyle{refseg}= [colorzero,draw=colorzero, opacity=0.2] +\tikzstyle{mseg}= [colorone,draw=colorone, opacity=0.2] +\tikzstyle{pseg}= [colortwo,draw=colortwo, opacity=0.2] +\tikzstyle{vseg}= [colorthree!80!colorzero,draw=colorthree!80!colorzero, opacity=0.6] + +\tikzstyle{bncell}= [draw=colorzero,opacity=0.2,line width=2pt, rounded corners=1pt] +\tikzstyle{btcell}= [draw=colorone,opacity=0.6, line width=2pt, rounded corners=1pt] + +\tikzstyle{tncell}= [colorzero,opacity=0.9] +\tikzstyle{ttcell}= [colorone,opacity=0.6] +\tikzstyle{tscell}= [colorzero] +\tikzstyle{refcell}= [colorzero] + +\tikzstyle{evolve}= [->,draw=colortwo,opacity=0.3,line width=1.5pt] +\tikzstyle{fakeevolve}= [->,draw=colorzero,opacity=0.3,line width=1.5pt] + +\tikzstyle{refline}= [dashed,draw=colorzero,line width=1pt] +\tikzstyle{tnline}= [dashed,draw=colorzero,opacity=0.3,line width=1pt] + +\newcommand{\gseg}[9]{% + \pgfmathsetmacro{\sstartx}{#1} + \pgfmathsetmacro{\slengx}{#2} + \pgfmathsetmacro{\sy}{#3} + \pgfmathsetmacro{\sdy}{#4} + \pgfmathsetmacro{\sdx}{#5} + \pgfmathsetmacro{\sdxh}{#7} + \pgfmathsetmacro{\sdxt}{#8} + \fill[#6](\sstartx,\sy)--(\sstartx-\sdx,\sy+\sdy)-- + (\slengx+\sstartx+1.5-\sdx,\sy+\sdy)--(\slengx+\sstartx+1.5,\sy)-- + (\slengx+\sstartx+1.5-\sdx,\sy-\sdy)--(\sstartx-\sdx,\sy-\sdy)--cycle; + \draw[#9] (\sstartx-\sdxh,\sy) -- (\sstartx, \sy); + \draw[#9] (\slengx+\sstartx+1.5, \sy) -- (\slengx+\sstartx+1.5+\sdxt,\sy); +} +\newcommand{\gsegr}[9]{% + \pgfmathsetmacro{\sstartx}{#1} + \pgfmathsetmacro{\slengx}{#2} + \pgfmathsetmacro{\sy}{#3} + \pgfmathsetmacro{\sdy}{#4} + \pgfmathsetmacro{\sdx}{#5} + \pgfmathsetmacro{\sdxh}{#7} + \pgfmathsetmacro{\sdxt}{#8} + \fill[#6](\sstartx-0.5,\sy)--(\sstartx+\sdx-0.5,\sy+\sdy)-- + (\slengx+\sstartx+1.5+\sdx-0.5,\sy+\sdy)--(\slengx+\sstartx+1.5-0.5,\sy)-- + (\slengx+\sstartx+1.5+\sdx-0.5,\sy-\sdy)--(\sstartx+\sdx-0.5,\sy-\sdy)--cycle; + \draw[#9] (\sstartx-\sdxh-0.5,\sy) -- (\sstartx-0.5, \sy); + \draw[#9] (\slengx+\sstartx+1.5-0.5, \sy) -- (\slengx+\sstartx+1.5+\sdxt-0.5,\sy); +} + +\newcommand{\rcell}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node at (\x+10, \y) {Reference}; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[aallele]{C}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{refseg}{1.5}{1}{reference}; +} + +\newcommand{\ncell}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [paternal] at (\x+8, \y-0.5) {P}; + \draw[bncell](\x-2,\y+0.5)--(\x+7,\y+0.5)-- + (\x+7,\y-1)--(\x-2,\y-1)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[ballele]{T}; + \draw (\x+2,\y-0.5) node[aallele]{C}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{A}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcellone}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [maternal] at (\x+8, \y-0.5) {M}; + %\node [paternal] at (\x+8, \y-1) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+7,\y+0.5)-- + (\x+7,\y-1.5)--(\x-2,\y-1.5)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[aallele]{A}; + \draw (\x+2,\y-0.5) node[ballele]{G}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[aallele]{C}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-1) node[ballele]{T}; + \draw (\x+2,\y-1) node[aallele]{C}; + \draw (\x+3,\y-1) node[aallele]{T}; + \draw (\x+4,\y-1) node[ballele]{A}; + \gseg{\x}{4}{\y-1}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcellthree}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+12, \y) {M}; + %\node [paternal] at (\x+12, \y-0.5) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+11,\y+0.5)-- + (\x+11,\y-1)--(\x-2,\y-1)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \gseg{\x}{2}{\y}{0.2}{0.5}{mseg}{1.5}{0}{maternal}; + \gseg{\x+4}{0}{\y}{0.2}{0.5}{vseg}{0.5}{0.5}{variant}; + \draw (\x+7,\y) node[aallele]{T}; + \draw (\x+8,\y) node[aallele]{C}; + \gseg{\x+6}{2}{\y}{0.2}{0.5}{mseg}{0}{1}{maternal}; + \draw (\x+1,\y-0.5) node[ballele]{T}; + \draw (\x+2,\y-0.5) node[aallele]{C}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{A}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcellfour}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+18, \y) {M}; + %\node [paternal] at (\x+18, \y-0.5) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+15,\y+0.5)-- + (\x+15,\y-1)--(\x-2,\y-1)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \gseg{\x}{2}{\y}{0.2}{0.5}{mseg}{1.5}{0}{maternal}; + \gseg{\x+4}{0}{\y}{0.2}{0.5}{vseg}{0.5}{0.5}{variant}; + \draw (\x+7,\y) node[aallele]{T}; + \gseg{\x+6}{1}{\y}{0.2}{0.5}{mseg}{0}{0}{maternal}; + \gseg{\x+9}{0}{\y}{0.2}{0.5}{vseg}{0.5}{0.5}{variant}; + \draw (\x+12,\y) node[aallele]{C}; + \gseg{\x+11}{1}{\y}{0.2}{0.5}{mseg}{0}{1}{maternal}; + \draw (\x+1,\y-0.5) node[ballele]{T}; + \draw (\x+2,\y-0.5) node[aallele]{C}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{A}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + +\newcommand{\tcelltwo}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [maternal] at (\x+8, \y-0.5) {M}; + %\node [paternal] at (\x+8, \y-1) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+7,\y+0.5)-- + (\x+7,\y-1.5)--(\x-2,\y-1.5)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[aallele]{A}; + \draw (\x+2,\y-0.5) node[ballele]{G}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[ballele]{G}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-1) node[ballele]{T}; + \draw (\x+2,\y-1) node[aallele]{C}; + \draw (\x+3,\y-1) node[aallele]{T}; + \draw (\x+4,\y-1) node[ballele]{A}; + \gseg{\x}{4}{\y-1}{0.2}{0.5}{pseg}{1.5}{1}{paternal}; +} + + +\newcommand{\tcellfive}[2]{% + \pgfmathsetmacro{\x}{#1} + \pgfmathsetmacro{\y}{#2} + %\node [maternal] at (\x+8, \y) {M}; + %\node [maternal] at (\x+8, \y-0.5) {M}; + %\node [paternal] at (\x+8, \y-1) {P}; + \draw[btcell](\x-2,\y+0.5)--(\x+9.5,\y+0.5)-- + (\x+9.5,\y-1.5)--(\x-2,\y-1.5)--cycle; + \draw (\x+1,\y) node[aallele]{A}; + \draw (\x+2,\y) node[ballele]{G}; + \draw (\x+3,\y) node[aallele]{T}; + \draw (\x+4,\y) node[aallele]{C}; + \gseg{\x}{4}{\y}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-0.5) node[aallele]{A}; + \draw (\x+2,\y-0.5) node[ballele]{G}; + \draw (\x+3,\y-0.5) node[aallele]{T}; + \draw (\x+4,\y-0.5) node[aallele]{C}; + \gseg{\x}{4}{\y-0.5}{0.2}{0.5}{mseg}{1.5}{1}{maternal}; + \draw (\x+1,\y-1) node[ballele]{T}; + \gseg{\x}{1}{\y-1}{0.2}{0.5}{pseg}{1.5}{0}{paternal}; + \draw (\x+4.5,\y-1) node[ballele]{A}; + \draw (\x+5.5,\y-1) node[aallele]{T}; + \draw (\x+6.5,\y-1) node[aallele]{C}; + \gsegr{\x+3.5}{3}{\y-1}{0.2}{0.5}{pseg}{0.5}{1.5}{paternal}; +} % 最后定义一些常见的数学公式样式。格式和内容分离,是LaTeX的巨大优势 % 例如如下定义: |