summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx')
-rw-r--r--Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx204
1 files changed, 108 insertions, 96 deletions
diff --git a/Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx b/Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx
index ec18e360d41..13f50f1e594 100644
--- a/Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx
+++ b/Master/texmf-dist/source/latex/seuthesis/seuthesis.dtx
@@ -1,9 +1,8 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2008, 2009 by Xu Yuan <xuyuan.cn@gmail.com>
+% Copyright (C) 2007 - 2010 by Xu Yuan <xuyuan.cn@gmail.com>
% Song Yihan <syhannnn@gmail.com>
% Nobel Huang <nobel1984@gmail.com>
-% $Id$
%
% This file is part of the seuthesis package project.
% http://seuthesis.googlecode.com/
@@ -37,7 +36,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{seuthesis.dtx}[2009/2/19 1.3.0 Southeast University Thesis Template]
+\ProvidesFile{seuthesis.dtx}[2010/04/20 2.0.0 Southeast University Thesis Template]
\documentclass{seuthesis}
\usepackage{color}
\usepackage{manfnt}
@@ -65,12 +64,12 @@
\secretlevel{公开} %学位论文密级分为“公开”、“内部”、“秘密”和“机密”四种
\studentid{050962} %学号要完整,前面的零不能省略。
-\title{\seuthesis{}~宏包(\fileversion版)} % 中文标题
+\title{\seuthesis{}~宏包(\fileversion{}版)} % 中文标题
{——东南大学学位论文~\LaTeX{}~模板} % 中文副标题
{The \seuthesis{} class (version \fileversion)} % 英文标题
{--- The \LaTeX{} template for thesis of Southeast University}%英文副标题
-\author{许~元}{XU Yuan}
+\author{许\quad{}元}{XU Yuan}
\advisor{导师姓名}{教授}{Advisor's Name}{Prof.}
\coadvisor{副导师}{副教授}{Co-advisor's Name}{Associate Prof.}
@@ -130,20 +129,19 @@
\chapter{简介}
\label{cha:intro}
- 在硕士论文完成之际,\seuthesis{}的第一个完整版也诞生了,同时支
- 持~UNICODE~和~GBK~编码,宋翊涵同学为模板加入了对东南大学本科论文的支
- 持。模板的格式尽量满足东南大学研究生院和教务处的要求,当然由于水平有
- 限其中错漏在所难免,我们已在google建立项
- 目:\url{http://seuthesis.googlecode.com/},欢迎东大的\LaTeX{}er一起参
- 加开发和完善。
+ 在硕士论文完成之际,\seuthesis{}的第一个完整版也诞生了,使用CJK实现中
+ 文支持,并在在google建立项目:\url{http://seuthesis.googlecode.com/}。
+ 之后宋翊涵同学为模板加入了对东南大学本科论文的支持,黄小雨同学在写硕
+ 士论文期间对模板进行了完善。
- 如果您对开发和完善\seuthesis{}感兴趣、有任何想法或建议,请与我
- 们联系。
+ 模板的格式尽量满足东南大学研究生院和教务处的要求,当然由于水平有限其
+ 中错漏在所难免,我们欢迎东大的\LaTeX{}er一起参加开发和完善。如果您对
+ 开发和完善\seuthesis{}感兴趣、有任何想法或建议,请与我们联系。
\section{版权声明}
\begin{flushleft}
\begin{tabular*}{1.0\linewidth}{lcl}
- 版权所有\textcopyright 2007, 2008, 2009 & 许元 & (\url{xuyuan.cn@gmail.com}) \\
+ 版权所有\textcopyright 2007 - \the\year & 许\quad{}元 & (\url{xuyuan.cn@gmail.com}) \\
& 宋翊涵 & (\url{syhannnn@gmail.com}) \\
& 黄小雨 & (\url{nobel1984@gmail.com}) \\
\end{tabular*}
@@ -157,6 +155,7 @@
\section{版本历史}
\begin{description}
+ \item[2.0] 2010/04/20,使用xeCJK,避免字体安装。
\item[1.3] 2009/02/19,增加A3封面制作工具,优化版式。
\item[1.2] 2008/08/12,启用研究生学位论文新封面,完善对东南大学本科论文的支持。
\item[1.1] 2008/05/16,增加对东南大学本科论文的支持。
@@ -184,8 +183,8 @@
将宏包中的文件与~\TeX{}~主文件放在同一目录下即可,当然也可以安装
到~\TeX{}~系统中,不过需要注意是参考文献样式文件 \texttt{.bst} 必须置于 \texttt{TEXMF/bibtex/bst}目录或子目录下。
- 本模板在~\texttt{texlive2008}~和~\texttt{MiKTex2.7}~下编译通过。如有您在使用中有
- 任何问题,欢迎与我联系。
+ 本模板在~\texttt{texlive2009}~和~\texttt{MiKTex2.7}~下使用 XeLaTeX 编译通过。如有
+ 您在使用中有任何问题,欢迎与我联系。
\chapter{使用说明}
\begin{quote}
@@ -227,20 +226,12 @@
\section{例子} 也许一个例子更能说清楚,下面就是使用本宏包的简要例子。
这个例子就是宏包中的~\texttt{sample.tex}~文件,可以使用~\texttt{make
- sample}~命令来编译这个例子。
+ sample}~或者~\texttt{xelatex sample}~命令来编译这个例子。
\verbatiminput{sample}
\section{选项}
\label{sec:use:opt}
- \subsection{编码选项}
- \newcommand{\OPTunicode}{\IndexOpt{unicode}}
- \newcommand{\OPTgbk}{\IndexOpt{gbk}}
- \begin{description}
- \item[\OPTunicode] (默认)使用~UNICODE~编码;
- \item[\OPTgbk] 使用~GBK~编码。
- \end{description}
-
\subsection{学位选项}
\newcommand{\OPTbachelor}{\IndexOpt{bachelor}}
\newcommand{\OPTmaster}{\IndexOpt{master}}
@@ -518,7 +509,7 @@
\begin{flushright}
\kai
- \makebox[6cm][c]{许~元}\\
+ \makebox[6cm][c]{许\quad{}元}\\
2008年3月19日于东南大学河海院
\end{flushright}
\end{Thanks}
@@ -526,6 +517,24 @@
\bibliography{seuthesis}
\begin{Appendix}
+ \chapter{常见问题}
+
+ \section{为什么我的 sample.tex 之类的文件打开是乱码?}
+
+ seuthesis 默认为 utf-8 编码。如果您是 windows用户,推荐您也使
+ 用 utf-8 编码您的论文,这样做会减少很多问题。
+
+ \section{在使用seuthesis写论文时,当论文中出现中英文摘要、列出所有图
+ 表(\texttt{\textbackslash{}listoftables}、
+ \texttt{\textbackslash{}listoffigures}、
+ \texttt{\textbackslash{}listoflistings})时出现一些空白页,即使第二
+ 页没有内容仍然会产生出来,这样很影响美观。}
+
+ 其实这个不是问题,空白页是因为模板默认为双面打印,插入空白页保证每一
+ 章的第一页在奇数页,这样设计是为了美观。如果想去掉加参数就可以
+ 了 \texttt{\textbackslash{}documentclass[oneside]{seuthesis}}。 使用
+ 时,可以编译一个“电子版” 一个“打印版”。
+
\chapter{文件}
\begin{itemize}
\item 源文件:
@@ -549,6 +558,7 @@
\end{itemize}
\end{Appendix}
+\renewcommand\indexname{索引}
\printindex
\backcover
@@ -557,25 +567,16 @@
%</driver>
%
%<cls> \NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<cls> \ProvidesClass{seuthesis}[2009/2/19 1.3.0 The LaTeX template for thesis of Southeast University]
-%<cls> \typeout{Document Class `seuthesis' v1.3 by Xu Yuan, Song Yihan, Huang Xiaoyu (2009/2/19)}
+%<cls> \ProvidesClass{seuthesis}[2010/04/20 2.0.0 The LaTeX template for thesis of Southeast University]
+%<cls> \typeout{Document Class `seuthesis' v2.0.0 by Xu Yuan, Song Yihan, Huang Xiaoyu (2010/04/20)}
% \fi
%
% \section{本宏包的选项}
-% \begin{macro}{unicode/gbk}
-% 默认使用\OPTunicode编码,\OPTgbk作为可选项
-% \begin{macrocode}
-%<*cls>
-\newif\ifseuunicode\seuunicodetrue
-\DeclareOption{gbk}{\seuunicodefalse}
-\DeclareOption{unicode}{\seuunicodetrue}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{bachelor/master/doctor}
% 默认为申请硕士学位(\OPTmaster),博士(\OPTdoctor)、本科学
% 位(\OPTbachelor)、工程硕士(\OPTengineering)作为可选项。
% \begin{macrocode}
+%<*cls>
\newif\ifbachelordegree\bachelordegreefalse
\newif\ifmasterdegree\masterdegreetrue
\newif\ifengineering\engineeringfalse
@@ -605,6 +606,16 @@
\DeclareOption{printedition}{\doublecovertrue\nocolorlinkstrue}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{printoneside}
+% 单面打印。注意不要使用标准的 \emph{oneside} 选项。
+% \begin{macrocode}
+\newif\ifstoneside\stonesidefalse
+\DeclareOption{printoneside}{%
+ \PassOptionsToClass{openany}{scrbook}
+ \stonesidetrue
+}
+% \end{macrocode}
+% \end{macro}
% 将选项传递给\emph{scrbook}类。
% \begin{macrocode}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}}
@@ -616,11 +627,10 @@
% \section{依赖的其它宏包}
% \begin{macrocode}
\RequirePackage{doc}
+\RequirePackage{keyval}
\RequirePackage{ifpdf}
\RequirePackage{ifthen}
-\ifpdf
-\RequirePackage{ccmap} % 当使用pdflatex编译时生成可拷贝的pdf
-\else\fi
+
\RequirePackage{graphicx}
\RequirePackage[dvipsnames]{xcolor}
\RequirePackage{indentfirst}
@@ -640,20 +650,22 @@
\setdefaultenum{1)}{a)}{i.}{A.}% 设置列表模式
\setdefaultleftmargin{4ex}{}{}{}{}{}
% \end{macrocode}
-%
-% \subsection{编码}
-% 选择\OPTgbk编码还是\OPTunicode编码
+%
% \begin{macrocode}
-\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!}}%
@@ -661,20 +673,7 @@
\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}
% \end{macrocode}
%
@@ -698,12 +697,16 @@
%
% \subsection{字体}
% \begin{macrocode}
-\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
% \end{macrocode}
% \subsection{字号及间距}
% \begin{macrocode}
@@ -732,6 +735,17 @@
\newcommand{\linespacing}[1]{\linespread{#1}\selectfont}% 行距命令
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\stcleardp}\IndexCmd{stcleardp}
+% \begin{macrocode}
+\newcommand{\stcleardp}{%
+ \ifstoneside
+ \clearpage
+ \else
+ \cleardoublepage
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsection{超文本格式}
% \begin{macrocode}
@@ -759,20 +773,20 @@
% \end{quote}
% \begin{macrocode}
\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
}
@@ -978,7 +992,7 @@
\pagestyle{empty}
\ifdoublecover
- \cleardoublepage
+ \stcleardp
\else\fi
\chinesecover
@@ -986,7 +1000,7 @@
\frontmatter
\else
\ifdoublecover
- \cleardoublepage
+ \stcleardp
\else\fi
\englishcover % 英文封面
\frontmatter % 开始正文之前的部分
@@ -1227,7 +1241,7 @@
{
\newcommand{\@keywords}{#1}
\hypersetup{pdfkeywords={\@keywords}}
- \cleardoublepage
+ \stcleardp
\phantomsection
\addcontentsline{toc}{chapter}{\@abstracttitletoc}
\ifbachelordegree
@@ -1267,7 +1281,7 @@
\newenvironment{englishabstract}[1]
{
\newcommand{\@keywords}{#1}
- \cleardoublepage
+ \stcleardp
\phantomsection
\addcontentsline{toc}{chapter}{Abstract}
\ifbachelordegree
@@ -1306,7 +1320,7 @@
% \begin{macrocode}
\newenvironment{terminology}[1][\@terminologytitle]
{
- \cleardoublepage
+ \stcleardp
\phantomsection
\addcontentsline{toc}{chapter}{#1}
\chapter*{#1}
@@ -1322,7 +1336,7 @@
% \begin{macrocode}
\newenvironment{Main}
{
- \cleardoublepage
+ \stcleardp
{\linespacing{1.15}%
\song\xiaosihao%
\phantomsection
@@ -1387,7 +1401,7 @@
% \begin{macrocode}
\newenvironment{Thanks}[1][\@thankstitle]
{%
- \cleardoublepage
+ \stcleardp
\phantomsection
\addcontentsline{toc}{chapter}{\@thankstitletoc}
\chapter*{#1}
@@ -1416,7 +1430,7 @@
% \begin{macrocode}
\newenvironment{Resume}[1][\@resumetitle]
{%
- \cleardoublepage
+ \stcleardp
\phantomsection
\addcontentsline{toc}{chapter}{\@resumetitletoc}
\chapter*{#1}
@@ -1468,7 +1482,7 @@
\newcommand{\@authorizeorganization}{~~东~南~大~学~~}
\newcommand{\authorizedatepre}{学位授予日期}
\newcommand{\committeechairpre}{答辩委员会主席}
-\newcommand{\readerpre}{评~~~~~~~~~阅~~~~~~~~~人}
+\newcommand{\readerpre}{评~~~~~~~阅~~~~~~~人}
\newcommand{\@abstracttitle}{摘\quad 要}
\newcommand{\@abstracttitletoc}{摘要}
\newcommand{\@terminologytitle}{本论文专用术语的注释表}
@@ -1499,7 +1513,7 @@
\newcommand{\academicdegreeeng}{Doctor of Engineering}\relax
\fi
\fi
-\newcommand{\@academicdegree}{\@degree学位论文}
+\newcommand{\@academicdegree}{\@degree{}学位论文}
\makeatother
% \end{macrocode}
%
@@ -1520,12 +1534,11 @@
{\hei\sanhao 东南大学学位论文独创性声明}
\end{center}
- {\CJKindent 本人声明所呈交的学位论文是我个人在导师指导下
- 进行的研究工作及取得的研究成果。尽我所知,除了文中特别加以标注和致
- 谢的地方外,论文中不包含其他人已经发表或撰写过的研究成果,也不包含
- 为获得东南大学或其它教育机构的学位或证书而使用过的材料。与我一同工
- 作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示了谢
- 意。\par}
+ { 本人声明所呈交的学位论文是我个人在导师指导下进行的研究工作及取得的
+ 研究成果。尽我所知,除了文中特别加以标注和致谢的地方外,论文中不包
+ 含其他人已经发表或撰写过的研究成果,也不包含为获得东南大学或其它教
+ 育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做的
+ 任何贡献均已在论文中作了明确的说明并表示了谢意。\par}
\begin{flushright}
研究生签名:\signline 日~期:\signline
@@ -1537,12 +1550,11 @@
{\hei\sanhao 东南大学学位论文使用授权声明}
\end{center}
- {\CJKindent 东南大学、中国科学技术信息研究所、国家图书馆
- 有权保留本人所送交学位论文的复印件和电子文档,可以采用影印、缩印或
- 其他复制手段保存论文。本人电子文档的内容和纸质论文的内容相一致。除
- 在保密期内的保密论文外,允许论文被查阅和借阅,可以公布(包括刊
- 登)论文的全部或部分内容。论文的公布(包括刊登)授权东南大学研究生
- 院办理。\par}
+ { 东南大学、中国科学技术信息研究所、国家图书馆有权保留本人所送交学位
+ 论文的复印件和电子文档,可以采用影印、缩印或其他复制手段保存论文。
+ 本人电子文档的内容和纸质论文的内容相一致。除在保密期内的保密论文
+ 外,允许论文被查阅和借阅,可以公布(包括刊登)论文的全部或部分内容。
+ 论文的公布(包括刊登)授权东南大学研究生院办理。\par}
\begin{flushright}
研究生签名:\signline 导师签名:\signline 日~期:\signline