diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/seuthesis/seuthesis.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/seuthesis/seuthesis.cls | 97 |
1 files changed, 50 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/latex/seuthesis/seuthesis.cls b/Master/texmf-dist/tex/latex/seuthesis/seuthesis.cls index d19e94c3dde..df49aa5f5bc 100644 --- a/Master/texmf-dist/tex/latex/seuthesis/seuthesis.cls +++ b/Master/texmf-dist/tex/latex/seuthesis/seuthesis.cls @@ -6,7 +6,7 @@ %% %% seuthesis.dtx (with options: `cls') %% -%% Copyright (C) 2007-2009 by Xu Yuan <xuyuan.cn@gmail.com> +%% Copyright (C) 2007-2010 by Xu Yuan <xuyuan.cn@gmail.com> %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3a @@ -22,11 +22,8 @@ %% through LaTeX. %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] - \ProvidesClass{seuthesis}[2009/2/19 1.3.0 The LaTeX template for thesis of Southeast University] - \typeout{Document Class `seuthesis' v1.3 by Xu Yuan, Song Yihan, Huang Xiaoyu (2009/2/19)} -\newif\ifseuunicode\seuunicodetrue -\DeclareOption{gbk}{\seuunicodefalse} -\DeclareOption{unicode}{\seuunicodetrue} + \ProvidesClass{seuthesis}[2010/04/20 2.0.0 The LaTeX template for thesis of Southeast University] + \typeout{Document Class `seuthesis' v2.0.0 by Xu Yuan, Song Yihan, Huang Xiaoyu (2010/04/20)} \newif\ifbachelordegree\bachelordegreefalse \newif\ifmasterdegree\masterdegreetrue \newif\ifengineering\engineeringfalse @@ -39,16 +36,20 @@ \newif\ifdoublecover\doublecoverfalse \DeclareOption{doublecover}{\doublecovertrue} \DeclareOption{printedition}{\doublecovertrue\nocolorlinkstrue} +\newif\ifstoneside\stonesidefalse +\DeclareOption{printoneside}{% + \PassOptionsToClass{openany}{scrbook} + \stonesidetrue +} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}} \ProcessOptions \LoadClass[a4paper,10.5pt,tablecaptionabove]{scrbook} \let\todayeng\today \RequirePackage{doc} +\RequirePackage{keyval} \RequirePackage{ifpdf} \RequirePackage{ifthen} -\ifpdf -\RequirePackage{ccmap} % 当使用pdflatex编译时生成可拷贝的pdf -\else\fi + \RequirePackage{graphicx} \RequirePackage[dvipsnames]{xcolor} \RequirePackage{indentfirst} @@ -65,16 +66,20 @@ \RequirePackage{paralist}% 修改列表格式 \setdefaultenum{1)}{a)}{i.}{A.}% 设置列表模式 \setdefaultleftmargin{4ex}{}{}{}{}{} -\ifseuunicode% 使用unicode -\typeout{[seuthesis]: Using UNICODE encoding} -\RequirePackage{CJKutf8} %中文支持unicode +\RequirePackage[CJKnumber,slantfont,boldfont]{xeCJK} +\newlength\CJK@twochars +\def\CJK@spaceChar{\Unicode{48}{7}} +\def\CJKindent{% + \settowidth\CJK@twochars{\CJK@spaceChar\CJK@spaceChar}% + \parindent\CJK@twochars} + \ifpdf \RequirePackage{hyperref} \else %配置dvipdfmx \RequirePackage[dvipdfmx]{hyperref} \fi \hypersetup{unicode=true} -\AtBeginDocument{\begin{CJK*}{UTF8}{song}\CJKtilde\CJKindent\CJKcaption{zh-Hans}% +\AtBeginDocument{\CJKindent{}% \InputIfFileExists{seuthesis-utf8.cfg}% 引入配置文件 {\typeout{[seuthesis]: Load seuthesis-utf8.cfg successfully!}}% {\typeout{[seuthesis]: Load seuthesis-utf8.cfg failed!}}% @@ -82,31 +87,22 @@ \wuhao% \linespacing{\mainlineskip} } -\else% 使用GBK -\typeout{[seuthesis]: Using GBK encoding} -\RequirePackage{CJK} %中文支持gbk -\RequirePackage[CJKbookmarks=true]{hyperref} -\AtBeginDocument{\begin{CJK*}{GBK}{song}\CJKtilde\CJKindent\CJKcaption{GB}% - \InputIfFileExists{seuthesis-gbk.cfg}% 引入配置文件 - {\typeout{[seuthesis]: Load seuthesis-gbk.cfg successfully!}}% - {\typeout{[seuthesis]: Load seuthesis-gbk.cfg failed!}}% - \makeindex% - \wuhao% - \linespacing{\mainlineskip} - } -\fi -\AtEndDocument{\end{CJK*}} +\AtEndDocument{} \RequirePackage{CJKnumb} \RequirePackage[top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm]{geometry} \RequirePackage[pagestyles, rm]{titlesec} \RequirePackage{titletoc} % 设置目录 \hypersetup{bookmarksnumbered=true}%书签中章节编号 -\newcommand{\song}{\CJKfamily{song}} -\newcommand{\lishu}{\CJKfamily{li}} -\newcommand{\hei}{\CJKfamily{hei}} -\newcommand{\kai}{\CJKfamily{kai}} -\newcommand{\fs}{\CJKfamily{fs}} -\renewcommand{\rmdefault}{ptm}% 英文默认Time New Roman +\setCJKmainfont{SimSun} +\setCJKfamilyfont{zhsong}{SimSun} +\newcommand{\song}{\CJKfamily{zhsong}} +\setCJKfamilyfont{zhhei}{SimHei} +\newcommand{\hei}{\CJKfamily{zhhei}} +\setCJKfamilyfont{zhkai}{KaiTi} +\newcommand{\kai}{\CJKfamily{zhkai}} +\setCJKfamilyfont{zhfs}{FangSong} +\newcommand{\fs}{\CJKfamily{zhfs}} +\setmainfont{Times New Roman}% 英文默认Time New Roman \newcommand{\chuhao}{\fontsize{42pt}{46pt}\selectfont} \newcommand{\xiaochuhao}{\fontsize{36pt}{40pt}\selectfont} \newcommand{\yichu}{\fontsize{32pt}{36pt}\selectfont} @@ -127,6 +123,13 @@ \titlespacing{\subsection}{0pt}{3ex plus .05ex minus .01ex}{2ex plus .04ex} \titlespacing{\subsubsection}{0pt}{1.5ex plus .05ex minus .01ex}{1ex plus .01ex} \newcommand{\linespacing}[1]{\linespread{#1}\selectfont}% 行距命令 +\newcommand{\stcleardp}{% + \ifstoneside + \clearpage + \else + \cleardoublepage + \fi +} \ifnocolorlinks \hypersetup{colorlinks=false} \else @@ -141,20 +144,20 @@ urlcolor=magenta } \newpagestyle{seustyle}{ - \sethead[][{\song\xiaowuhao东南大学\@degree学位论文}][] % 偶数页 - {}{{\song\xiaowuhao\chaptertitlename\quad\chaptertitle}}{} % 奇数页 + \sethead[][{\song{}\xiaowuhao{}东南大学\@degree{}学位论文}][] % 偶数页 + {}{{\song{}\xiaowuhao{}\chaptertitlename\quad\chaptertitle}}{} % 奇数页 \setfoot{}{\thepage}{} \headrule } \newpagestyle{seufrontstyle}{ - \sethead[][{\song\xiaowuhao东南大学\@degree学位论文}][] - {}{{\song\xiaowuhao东南大学\@degree学位论文}}{} + \sethead[][{\song{}\xiaowuhao{}东南大学\@degree{}学位论文}][] + {}{{\song{}\xiaowuhao{}东南大学\@degree{}学位论文}}{} \setfoot{}{\thepage}{} \headrule } \newpagestyle{seunolabelstyle}{ - \sethead[][{\song\xiaowuhao东南大学\@degree学位论文}][] - {}{{\song\xiaowuhao\chaptertitle}}{} + \sethead[][{\song{}\xiaowuhao{}东南大学\@degree{}学位论文}][] + {}{{\song{}\xiaowuhao{}\chaptertitle}}{} \setfoot{}{\thepage}{} \headrule } @@ -256,7 +259,7 @@ \pagestyle{empty} \ifdoublecover - \cleardoublepage + \stcleardp \else\fi \chinesecover @@ -264,7 +267,7 @@ \frontmatter \else \ifdoublecover - \cleardoublepage + \stcleardp \else\fi \englishcover % 英文封面 \frontmatter % 开始正文之前的部分 @@ -475,7 +478,7 @@ { \newcommand{\@keywords}{#1} \hypersetup{pdfkeywords={\@keywords}} - \cleardoublepage + \stcleardp \phantomsection \addcontentsline{toc}{chapter}{\@abstracttitletoc} \ifbachelordegree @@ -510,7 +513,7 @@ \newenvironment{englishabstract}[1] { \newcommand{\@keywords}{#1} - \cleardoublepage + \stcleardp \phantomsection \addcontentsline{toc}{chapter}{Abstract} \ifbachelordegree @@ -542,7 +545,7 @@ } \newenvironment{terminology}[1][\@terminologytitle] { - \cleardoublepage + \stcleardp \phantomsection \addcontentsline{toc}{chapter}{#1} \chapter*{#1} @@ -552,7 +555,7 @@ } \newenvironment{Main} { - \cleardoublepage + \stcleardp {\linespacing{1.15}% \song\xiaosihao% \phantomsection @@ -589,7 +592,7 @@ \pagestyle{seufrontstyle}} % 恢复原有样式给后续部分 \newenvironment{Thanks}[1][\@thankstitle] {% - \cleardoublepage + \stcleardp \phantomsection \addcontentsline{toc}{chapter}{\@thankstitletoc} \chapter*{#1} @@ -606,7 +609,7 @@ } \newenvironment{Resume}[1][\@resumetitle] {% - \cleardoublepage + \stcleardp \phantomsection \addcontentsline{toc}{chapter}{\@resumetitletoc} \chapter*{#1} |