├── Rmd ├── 020-relatedwork.Rmd ├── 010-introduction.Rmd ├── 030-figure.Rmd └── 040-table.Rmd ├── docs ├── SJTUThesis.pdf └── images │ └── doctor.png ├── images ├── sjtubadge.pdf ├── sjtubanner.pdf └── sjtulogo.pdf ├── _bookdown.yml ├── documentation ├── user.md └── dev.md ├── bib └── thesis.bib ├── Makefile ├── _output.yml ├── SJTUThesis-Markdown.Rproj ├── index.Rmd ├── README.md ├── LICENSE ├── _render.R ├── template └── template.tex ├── .gitignore ├── latex └── abstract.tex ├── sjtuthesis.cfg └── sjtuthesis.cls /Rmd/020-relatedwork.Rmd: -------------------------------------------------------------------------------- 1 | # 相关工作 2 | 3 | 这里是相关工作 4 | -------------------------------------------------------------------------------- /Rmd/010-introduction.Rmd: -------------------------------------------------------------------------------- 1 | # 引言 2 | 3 | 这里是引言部分\cite{IEEE-1363} 4 | -------------------------------------------------------------------------------- /docs/SJTUThesis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyweb/SJTUThesis-Markdown/HEAD/docs/SJTUThesis.pdf -------------------------------------------------------------------------------- /images/sjtubadge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyweb/SJTUThesis-Markdown/HEAD/images/sjtubadge.pdf -------------------------------------------------------------------------------- /images/sjtubanner.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyweb/SJTUThesis-Markdown/HEAD/images/sjtubanner.pdf -------------------------------------------------------------------------------- /images/sjtulogo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyweb/SJTUThesis-Markdown/HEAD/images/sjtulogo.pdf -------------------------------------------------------------------------------- /docs/images/doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dyweb/SJTUThesis-Markdown/HEAD/docs/images/doctor.png -------------------------------------------------------------------------------- /_bookdown.yml: -------------------------------------------------------------------------------- 1 | book_filename: SJTUThesis 2 | rmd_subdir: TRUE 3 | clean: [packages.bib, bookdown.bbl] 4 | delete_merged_file: TRUE 5 | -------------------------------------------------------------------------------- /documentation/user.md: -------------------------------------------------------------------------------- 1 | # 使用指南 2 | 3 | 使用这一模板,共有两处地方需要修改,分别是 `index.Rmd` 和 `Rmd` 目录。 4 | 5 | ## `index.Rmd` 6 | 7 | 修改其中的个性化配置,比如姓名等。 8 | 9 | ## `Rmd` 10 | 11 | 该目录是真正书写论文的地方。 12 | -------------------------------------------------------------------------------- /bib/thesis.bib: -------------------------------------------------------------------------------- 1 | @book{IEEE-1363, 2 | author={IEEE Std 1363-2000}, 3 | title={IEEE Standard Specifications for Public-Key Cryptography}, 4 | address={New York}, 5 | publisher={IEEE}, 6 | year={2000} 7 | } 8 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TEX_DIR = tex 2 | RMD_DIR = Rmd 3 | 4 | pdf: 5 | Rscript --quiet _render.R "bookdown::pdf_book" 6 | 7 | gitbook: 8 | Rscript --quiet _render.R "bookdown::gitbook" 9 | 10 | all: 11 | Rscript --quiet _render.R 12 | -------------------------------------------------------------------------------- /_output.yml: -------------------------------------------------------------------------------- 1 | bookdown::pdf_book: 2 | keep_tex: yes 3 | dev: "cairo_pdf" 4 | latex_engine: xelatex 5 | citation_package: biblatex 6 | template: template/template.tex 7 | pandoc_args: "--top-level-division=chapter" 8 | toc_depth: 3 9 | toc_unnumbered: no 10 | toc_appendix: yes 11 | -------------------------------------------------------------------------------- /SJTUThesis-Markdown.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Makefile 16 | -------------------------------------------------------------------------------- /Rmd/030-figure.Rmd: -------------------------------------------------------------------------------- 1 | # 示例图 2 | 3 | 这里是插入图片的示例,如不想显示代码在 option 里添加 `echo=FALSE`。比如 `{r logo, out.width='32.8%', fig.show='hold', fig.cap='logo', fig.align="center, echo=FALSE"}` 4 | 5 | 6 | ```{r logo, out.width='32.8%', fig.show='hold', fig.cap='logo', fig.align="center"} 7 | knitr::include_graphics("images/sjtulogo.pdf") 8 | ``` 9 | -------------------------------------------------------------------------------- /Rmd/040-table.Rmd: -------------------------------------------------------------------------------- 1 | # 表格示例 2 | 3 | 如表 \@ref(tab:tab-single) 所示,这里是插入表格的示例,如不想显示代码在 option 里添加 `echo=FALSE`。比如 `{r table-single, tidy=FALSE, echo=FALSE}` 4 | 5 | 6 | ```{r tab-single, tidy=FALSE} 7 | knitr::kable( 8 | head(mtcars[, 1:8], 10), booktabs = TRUE, 9 | caption = 'A table of the first 10 rows of the mtcars data.' 10 | ) 11 | ``` 12 | -------------------------------------------------------------------------------- /documentation/dev.md: -------------------------------------------------------------------------------- 1 | # 开发者指南 2 | 3 | 本模板使用 bookdown 实现了由 R Markdown -> LaTeX -> PDF 的一系列转换,其中用到的依赖有: 4 | 5 | - bookdown 6 | - pandoc 7 | - Tex Live 8 | 9 | ## 实现原理 10 | 11 | 在 `template` 目录下定义了一个模板文件 `template.tex`,其利用 pandoc 的模板功能对 SJTUThesis 的 `thesis.tex` 文件进行了模板化的定义。在编译的过程中,bookdown 会将 `index.Rmd`中的配置注入到模板中并且在 `_book` 目录下生成真正的 tex 文件,随后对其进行编译。最后在 `_book` 中产生 PDF 文件 12 | 13 | ## 设计上的权衡 14 | 15 | 由于 bookdown 对 abstract 标签不支持,因此采取了一个 workaround,针对 abstract 一节保留了 tex 的编辑方式。 16 | -------------------------------------------------------------------------------- /index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "上海交通大学论文 bookdown 模板示例文档" 3 | author: "周杰伦" 4 | documentclass: sjtuthesis 5 | classoption: [doctor,oneside] 6 | studentnumber: "116037910024" 7 | school: "软件学院" 8 | advisor: "周星驰" 9 | major: "软件工程" 10 | defenddate: "`r format(Sys.Date(),format='%Y年%m月%d日')`" 11 | date: "`r format(Sys.Date(),format='%Y年%m月%d日')`" 12 | 13 | englishauthor: "Jay Zhou" 14 | englishadvisor: "Xingchi Zhou" 15 | englishinstitute: "School of Software" 16 | englishdate: "`r format(Sys.Date(),format='%b. %d, %Y')`" 17 | englishtitle: "A Sample Document for Bookdown-Based SJTU Thesis Template" 18 | englishmajor: "Software Engineering" 19 | 20 | bibliography: [bib/thesis.bib] 21 | 22 | link-citations: yes 23 | colorlinks: yes 24 | lot: no 25 | lof: no 26 | --- 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SJTUThesis-Markdown 2 | 3 | 上海交通大学学位论文 R Markdown (bookdown) 模板,示例文档可见 [SJTUThesis.pdf](https://dongyueweb.com/SJTUThesis-Markdown/SJTUThesis.pdf)。 4 | 5 | ## 效果展示 6 | 7 |
8 | 9 |
10 | 11 | ## 如何使用 12 | 13 | 请见[使用文档](./documentation/user.md) 14 | 15 | ## 如何贡献 16 | 17 | 请见[开发者指南](./documentation/dev.md) 18 | 19 | ## 致谢 20 | 21 | - 感谢 [sjtug/SJTUThesis](https://github.com/sjtug/sjtuthesis) 维护了交大学位论文的 XeLaTeX 模板 22 | - 感谢 [RStudio/bookdown](https://github.com/rstudio/bookdown) 提供了使用 R Markdown 进行文档编辑的可能 23 | - 感谢 [bubifengyun/SJTUThesis-Rmd](https://github.com/bubifengyun/SJTUThesis-Rmd) 首先实现了交大论文的 R Markdown 的模板 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2018, Dongyue Studio 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /_render.R: -------------------------------------------------------------------------------- 1 | quiet = "--quiet" %in% commandArgs(FALSE) 2 | formats = commandArgs(TRUE) 3 | travis = !is.na(Sys.getenv('CI', NA)) 4 | 5 | src = (function() { 6 | attr(body(sys.function()), 'srcfile') 7 | })()$filename 8 | if (is.null(src) || src == '') src = '.' 9 | owd = setwd(dirname(src)) 10 | 11 | # provide default formats if necessary 12 | if (length(formats) == 0) formats = c( 13 | 'bookdown::pdf_book', 'bookdown::epub_book', 'bookdown::gitbook' 14 | ) 15 | # render the book to all formats unless they are specified via command-line args 16 | for (fmt in formats) { 17 | cmd = sprintf("bookdown::render_book('index.Rmd', '%s', quiet = %s)", fmt, quiet) 18 | res = bookdown:::Rscript(c('-e', shQuote(cmd))) 19 | if (res != 0) stop('Failed to compile the book to ', fmt) 20 | if (!travis && fmt == 'bookdown::epub_book') 21 | bookdown::calibre('_book/bookdown.epub', 'mobi') 22 | } 23 | 24 | r = '' 25 | for (f in list.files('_book', '[.]html$', full.names = TRUE)) { 26 | x = readLines(f) 27 | if (length(i <- grep('^\\s*\\s*$', x)) == 0) next 28 | # patch HTML files in gh-pages if built on Travis, to redirect to bookdown.org 29 | if (travis) x[i[1]] = r 30 | i = grep('.+', x)[1] 31 | # shorter title on the toolbar 32 | if (!is.na(i)) x[i] = gsub('bookdown: ', '', x[i], fixed = TRUE) 33 | i = c( 34 | grep('^\\s*$', x), 35 | grep('^$', x) 36 | ) 37 | if (travis && length(i)) x = x[-i] 38 | writeLines(x, f) 39 | } 40 | 41 | if (length(formats) > 1) bookdown::publish_book() 42 | 43 | setwd(owd) 44 | -------------------------------------------------------------------------------- /template/template.tex: -------------------------------------------------------------------------------- 1 | \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} 2 | 3 | $if(highlighting-macros)$ 4 | $highlighting-macros$ 5 | $endif$ 6 | 7 | $for(bibliography)$ 8 | \addbibresource{$bibliography$} 9 | $endfor$ 10 | 11 | \providecommand{\tightlist}{% 12 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 13 | 14 | \begin{document} 15 | 16 | $if(title)$ 17 | \title{$title$} 18 | $endif$ 19 | $if(author)$ 20 | \author{$author$} 21 | $endif$ 22 | $if(advisor)$ 23 | \advisor{$advisor$} 24 | $endif$ 25 | $if(coadvisor)$ 26 | \coadvisor{$coadvisor$} 27 | $endif$ 28 | $if(defenddate)$ 29 | \defenddate{$defenddate$} 30 | $endif$ 31 | $if(school)$ 32 | \school{$school$} 33 | $endif$ 34 | $if(institute)$ 35 | \institute{$institute$} 36 | $endif$ 37 | $if(studentnumber)$ 38 | \studentnumber{$studentnumber$} 39 | $endif$ 40 | $if(major)$ 41 | \major{$major$} 42 | $endif$ 43 | 44 | $if(englishtitle)$ 45 | \englishtitle{$englishtitle$} 46 | $endif$ 47 | $if(englishauthor)$ 48 | \englishauthor{\textsc{$englishauthor$}} 49 | $endif$ 50 | $if(englishadvisor)$ 51 | \englishadvisor{Prof. \textsc{$englishadvisor$}} 52 | $endif$ 53 | $if(englishcoadvisor)$ 54 | \englishcoadvisor{Prof. \textsc{$englishcoadvisor$}} 55 | $endif$ 56 | $if(englishschool)$ 57 | \englishschool{$englishschool$} 58 | $endif$ 59 | $if(englishinstitute)$ 60 | \englishinstitute{\textsc{$englishinstitute$} \\ 61 | \textsc{Shanghai Jiao Tong University} \\ 62 | \textsc{Shanghai, P.R.China}} 63 | $endif$ 64 | $if(englishmajor)$ 65 | \englishmajor{$englishmajor$} 66 | $endif$ 67 | $if(englishdate)$ 68 | \englishdate{$englishdate$} 69 | $endif$ 70 | \maketitle 71 | 72 | \makeatletter 73 | \ifsjtu@submit\relax 74 | \includepdf{handed_pdf/original.pdf} 75 | \cleardoublepage 76 | \includepdf{handed_pdf/authorization.pdf} 77 | \cleardoublepage 78 | \else 79 | \ifsjtu@review\relax 80 | % exclude the original claim and authorization 81 | \else 82 | \makeDeclareOriginal 83 | \makeDeclareAuthorization 84 | \fi 85 | \fi 86 | \makeatother 87 | 88 | \frontmatter % 使用罗马数字对前言编号 89 | 90 | %% 摘要 91 | \pagestyle{main} 92 | 93 | \input{latex/abstract.tex} 94 | 95 | %% 目录、插图目录、表格目录 96 | \tableofcontents 97 | % \listoffigures 98 | % \addcontentsline{toc}{chapter}{\listfigurename} %将插图目录加入全文目录 99 | % \listoftables 100 | % \addcontentsline{toc}{chapter}{\listtablename} %将表格目录加入全文目录 101 | % \listofalgorithms 102 | % \addcontentsline{toc}{chapter}{\listalgorithmname} %将算法目录加入全文目录 103 | 104 | % \include{latex/symbol} % 主要符号、缩略词对照表 105 | 106 | \mainmatter % 使用阿拉伯数字对正文编号 107 | 108 | %% 正文内容 109 | \pagestyle{main} 110 | 111 | $body$ 112 | 113 | \appendix % 使用英文字母对附录编号,重新定义附录中的公式、图图表编号样式 114 | \renewcommand\theequation{\Alph{chapter}--\arabic{equation}} 115 | \renewcommand\thefigure{\Alph{chapter}--\arabic{figure}} 116 | \renewcommand\thetable{\Alph{chapter}--\arabic{table}} 117 | \renewcommand\thealgorithm{\Alph{chapter}--\arabic{algorithm}} 118 | \renewcommand\thelstlisting{\Alph{chapter}--\arabic{lstlisting}} 119 | 120 | 121 | \backmatter % 文后无编号部分 122 | 123 | %% 参考资料 124 | \printbibliography[heading=bibintoc] 125 | 126 | %% 致谢、发表论文、申请专利、参与项目、简历 127 | %% 用于盲审的论文需隐去致谢、发表论文、申请专利、参与的项目 128 | \makeatletter 129 | 130 | %% 131 | % "研究生学位论文送盲审印刷格式的统一要求" 132 | % http://www.gs.sjtu.edu.cn/inform/3/2015/20151120_123928_738.htm 133 | 134 | % 盲审删去删去致谢页 135 | \ifsjtu@review\relax\else 136 | \include{latex/ack} %% 致谢 137 | \fi 138 | 139 | \ifsjtu@bachelor 140 | % 学士学位论文要求在最后有一个英文大摘要,单独编页码 141 | \pagestyle{biglast} 142 | \include{latex/end_english_abstract} 143 | \else 144 | % 盲审论文中,发表学术论文及参与科研情况等仅以第几作者注明即可,不要出现作者或他人姓名 145 | \ifsjtu@review\relax 146 | \include{latex/pubreview} 147 | \include{latex/projectsreview} 148 | \else 149 | \include{latex/pub} %% 发表论文 150 | \include{latex/projects} %% 参与的项目 151 | \fi 152 | \fi 153 | 154 | % \include{latex/patents} %% 申请专利 155 | % \include{latex/resume} %% 个人简历 156 | 157 | \makeatother 158 | 159 | \end{document} 160 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project Specific files 2 | 3 | _book/ 4 | 5 | # Latex 6 | 7 | ## Core latex/pdflatex auxiliary files: 8 | *.aux 9 | *.lof 10 | *.log 11 | *.lot 12 | *.fls 13 | *.out 14 | *.toc 15 | *.fmt 16 | *.fot 17 | *.cb 18 | *.cb2 19 | .*.lb 20 | 21 | ## Intermediate documents: 22 | *.dvi 23 | *.xdv 24 | *-converted-to.* 25 | # these rules might exclude image files for figures etc. 26 | # *.ps 27 | # *.eps 28 | # *.pdf 29 | 30 | ## Generated if empty string is given at "Please type another file name for output:" 31 | .pdf 32 | 33 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 34 | *.bbl 35 | *.bcf 36 | *.blg 37 | *-blx.aux 38 | *-blx.bib 39 | *.run.xml 40 | 41 | ## Build tool auxiliary files: 42 | *.fdb_latexmk 43 | *.synctex 44 | *.synctex(busy) 45 | *.synctex.gz 46 | *.synctex.gz(busy) 47 | *.pdfsync 48 | 49 | ## Build tool directories for auxiliary files 50 | # latexrun 51 | latex.out/ 52 | 53 | ## Auxiliary and intermediate files from other packages: 54 | # algorithms 55 | *.alg 56 | *.loa 57 | 58 | # achemso 59 | acs-*.bib 60 | 61 | # amsthm 62 | *.thm 63 | 64 | # beamer 65 | *.nav 66 | *.pre 67 | *.snm 68 | *.vrb 69 | 70 | # changes 71 | *.soc 72 | 73 | # cprotect 74 | *.cpt 75 | 76 | # elsarticle (documentclass of Elsevier journals) 77 | *.spl 78 | 79 | # endnotes 80 | *.ent 81 | 82 | # fixme 83 | *.lox 84 | 85 | # feynmf/feynmp 86 | *.mf 87 | *.mp 88 | *.t[1-9] 89 | *.t[1-9][0-9] 90 | *.tfm 91 | 92 | #(r)(e)ledmac/(r)(e)ledpar 93 | *.end 94 | *.?end 95 | *.[1-9] 96 | *.[1-9][0-9] 97 | *.[1-9][0-9][0-9] 98 | *.[1-9]R 99 | *.[1-9][0-9]R 100 | *.[1-9][0-9][0-9]R 101 | *.eledsec[1-9] 102 | *.eledsec[1-9]R 103 | *.eledsec[1-9][0-9] 104 | *.eledsec[1-9][0-9]R 105 | *.eledsec[1-9][0-9][0-9] 106 | *.eledsec[1-9][0-9][0-9]R 107 | 108 | # glossaries 109 | *.acn 110 | *.acr 111 | *.glg 112 | *.glo 113 | *.gls 114 | *.glsdefs 115 | 116 | # gnuplottex 117 | *-gnuplottex-* 118 | 119 | # gregoriotex 120 | *.gaux 121 | *.gtex 122 | 123 | # htlatex 124 | *.4ct 125 | *.4tc 126 | *.idv 127 | *.lg 128 | *.trc 129 | *.xref 130 | 131 | # hyperref 132 | *.brf 133 | 134 | # knitr 135 | *-concordance.tex 136 | # TODO Comment the next line if you want to keep your tikz graphics files 137 | *.tikz 138 | *-tikzDictionary 139 | 140 | # listings 141 | *.lol 142 | 143 | # makeidx 144 | *.idx 145 | *.ilg 146 | *.ind 147 | *.ist 148 | 149 | # minitoc 150 | *.maf 151 | *.mlf 152 | *.mlt 153 | *.mtc[0-9]* 154 | *.slf[0-9]* 155 | *.slt[0-9]* 156 | *.stc[0-9]* 157 | 158 | # minted 159 | _minted* 160 | *.pyg 161 | 162 | # morewrites 163 | *.mw 164 | 165 | # nomencl 166 | *.nlg 167 | *.nlo 168 | *.nls 169 | 170 | # pax 171 | *.pax 172 | 173 | # pdfpcnotes 174 | *.pdfpc 175 | 176 | # sagetex 177 | *.sagetex.sage 178 | *.sagetex.py 179 | *.sagetex.scmd 180 | 181 | # scrwfile 182 | *.wrt 183 | 184 | # sympy 185 | *.sout 186 | *.sympy 187 | sympy-plots-for-*.tex/ 188 | 189 | # pdfcomment 190 | *.upa 191 | *.upb 192 | 193 | # pythontex 194 | *.pytxcode 195 | pythontex-files-*/ 196 | 197 | # thmtools 198 | *.loe 199 | 200 | # TikZ & PGF 201 | *.dpth 202 | *.md5 203 | *.auxlock 204 | 205 | # todonotes 206 | *.tdo 207 | 208 | # easy-todo 209 | *.lod 210 | 211 | # xmpincl 212 | *.xmpi 213 | 214 | # xindy 215 | *.xdy 216 | 217 | # xypic precompiled matrices 218 | *.xyc 219 | 220 | # endfloat 221 | *.ttt 222 | *.fff 223 | 224 | # Latexian 225 | TSWLatexianTemp* 226 | 227 | ## Editors: 228 | # WinEdt 229 | *.bak 230 | *.sav 231 | 232 | # Texpad 233 | .texpadtmp 234 | 235 | # Kile 236 | *.backup 237 | 238 | # KBibTeX 239 | *~[0-9]* 240 | 241 | # auto folder when using emacs and auctex 242 | ./auto/* 243 | *.el 244 | 245 | # expex forward references with \gathertags 246 | *-tags.tex 247 | 248 | # standalone packages 249 | *.sta 250 | 251 | # generated if using elsarticle.cls 252 | *.spl 253 | 254 | # R 255 | 256 | # History files 257 | .Rhistory 258 | .Rapp.history 259 | 260 | # Session Data files 261 | .RData 262 | 263 | # Example code in package build process 264 | *-Ex.R 265 | 266 | # Output files from R CMD build 267 | /*.tar.gz 268 | 269 | # Output files from R CMD check 270 | /*.Rcheck/ 271 | 272 | # RStudio files 273 | .Rproj.user/ 274 | 275 | # produced vignettes 276 | vignettes/*.html 277 | vignettes/*.pdf 278 | 279 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 280 | .httr-oauth 281 | 282 | # knitr and R markdown default cache directories 283 | /*_cache/ 284 | /cache/ 285 | 286 | # Temporary files created by R markdown 287 | *.utf8.md 288 | *.knit.md 289 | 290 | # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html 291 | rsconnect/ 292 | .Rproj.user 293 | -------------------------------------------------------------------------------- /latex/abstract.tex: -------------------------------------------------------------------------------- 1 | %# -*- coding: utf-8-unix -*- 2 | % !TEX program = xelatex 3 | % !TEX encoding = UTF-8 Unicode 4 | %%================================================== 5 | %% abstract.tex for SJTU Thesis 6 | %%================================================== 7 | 8 | \begin{abstract} 9 | 10 | 上海交通大学是我国历史最悠久的高等学府之一,是教育部直属、教育部与上海市共建的全国重点大学,是国家 “七五”、“八五”重点建设和“211工程”、“985工程”的首批建设高校。经过115年的不懈努力,上海交通大学已经成为一所“综合性、研究型、国际化”的国内一流、国际知名大学,并正在向世界一流大学稳步迈进。 11 | 12 | 十九世纪末,甲午战败,民族危难。中国近代著名实业家、教育家盛宣怀和一批有识之士秉持“自强首在储才,储才必先兴学”的信念,于1896年在上海创办了交通大学的前身——南洋公学。建校伊始,学校即坚持“求实学,务实业”的宗旨,以培养“第一等人才”为教育目标,精勤进取,笃行不倦,在二十世纪二三十年代已成为国内著名的高等学府,被誉为“东方MIT”。抗战时期,广大师生历尽艰难,移转租界,内迁重庆,坚持办学,不少学生投笔从戎,浴血沙场。解放前夕,广大师生积极投身民主革命,学校被誉为“民主堡垒”。 13 | 14 | 新中国成立初期,为配合国家经济建设的需要,学校调整出相当一部分优势专业、师资设备,支持国内兄弟院校的发展。五十年代中期,学校又响应国家建设大西北的号召,根据国务院决定,部分迁往西安,分为交通大学上海部分和西安部分。1959年3月两部分同时被列为全国重点大学,7月经国务院批准分别独立建制,交通大学上海部分启用“上海交通大学”校名。历经西迁、两地办学、独立办学等变迁,为构建新中国的高等教育体系,促进社会主义建设做出了重要贡献。六七十年代,学校先后归属国防科工委和六机部领导,积极投身国防人才培养和国防科研,为“两弹一星”和国防现代化做出了巨大贡献。 15 | 16 | 改革开放以来,学校以“敢为天下先”的精神,大胆推进改革:率先组成教授代表团访问美国,率先实行校内管理体制改革,率先接受海外友人巨资捐赠等,有力地推动了学校的教学科研改革。1984年,邓小平同志亲切接见了学校领导和师生代表,对学校的各项改革给予了充分肯定。在国家和上海市的大力支持下,学校以“上水平、创一流”为目标,以学科建设为龙头,先后恢复和兴建了理科、管理学科、生命学科、法学和人文学科等。1999年,上海农学院并入;2005年,与上海第二医科大学强强合并。至此,学校完成了综合性大学的学科布局。近年来,通过国家“985工程”和“211工程”的建设,学校高层次人才日渐汇聚,科研实力快速提升,实现了向研究型大学的转变。与此同时,学校通过与美国密西根大学等世界一流大学的合作办学,实施国际化战略取得重要突破。1985年开始闵行校区建设,历经20多年,已基本建设成设施完善,环境优美的现代化大学校园,并已完成了办学重心向闵行校区的转移。学校现有徐汇、闵行、法华、七宝和重庆南路(卢湾)5个校区,总占地面积4840亩。通过一系列的改革和建设,学校的各项办学指标大幅度上升,实现了跨越式发展,整体实力显著增强,为建设世界一流大学奠定了坚实的基础。 17 | 18 | 交通大学始终把人才培养作为办学的根本任务。一百多年来,学校为国家和社会培养了20余万各类优秀人才,包括一批杰出的政治家、科学家、社会活动家、实业家、工程技术专家和医学专家,如江泽民、陆定一、丁关根、汪道涵、钱学森、吴文俊、徐光宪、张光斗、黄炎培、邵力子、李叔同、蔡锷、邹韬奋、陈敏章、王振义、陈竺等。在中国科学院、中国工程院院士中,有200余位交大校友;在国家23位“两弹一星”功臣中,有6位交大校友;在18位国家最高科学技术奖获得者中,有3位来自交大。交大创造了中国近现代发展史上的诸多“第一”:中国最早的内燃机、最早的电机、最早的中文打字机等;新中国第一艘万吨轮、第一艘核潜艇、第一艘气垫船、第一艘水翼艇、自主设计的第一代战斗机、第一枚运载火箭、第一颗人造卫星、第一例心脏二尖瓣分离术、第一例成功移植同种原位肝手术、第一例成功抢救大面积烧伤病人手术等,都凝聚着交大师生和校友的心血智慧。改革开放以来,一批年轻的校友已在世界各地、各行各业崭露头角。 19 | 20 | 截至2011年12月31日,学校共有24个学院/直属系(另有继续教育学院、技术学院和国际教育学院),19个直属单位,12家附属医院,全日制本科生16802人、研究生24495人(其中博士研究生5059人);有专任教师2979名,其中教授835名;中国科学院院士15名,中国工程院院士20名,中组部“千人计划”49名,“长江学者”95名,国家杰出青年基金获得者80名,国家重点基础研究发展计划(973计划)首席科学家24名,国家重大科学研究计划首席科学家9名,国家基金委创新研究群体6个,教育部创新团队17个。 21 | 22 | 学校现有本科专业68个,涵盖经济学、法学、文学、理学、工学、农学、医学、管理学和艺术等九个学科门类;拥有国家级教学及人才培养基地7个,国家级校外实践教育基地5个,国家级实验教学示范中心5个,上海市实验教学示范中心4个;有国家级教学团队8个,上海市教学团队15个;有国家级教学名师7人,上海市教学名师35人;有国家级精品课程46门,上海市精品课程117门;有国家级双语示范课程7门;2001、2005和2009年,作为第一完成单位,共获得国家级教学成果37项、上海市教学成果157项。 23 | 24 | \keywords{\large 上海交大 \quad 饮水思源 \quad 爱国荣校} 25 | \end{abstract} 26 | 27 | \begin{englishabstract} 28 | 29 | An imperial edict issued in 1896 by Emperor Guangxu, established Nanyang Public School in Shanghai. The normal school, school of foreign studies, middle school and a high school were established. Sheng Xuanhuai, the person responsible for proposing the idea to the emperor, became the first president and is regarded as the founder of the university. 30 | 31 | During the 1930s, the university gained a reputation of nurturing top engineers. After the foundation of People's Republic, some faculties were transferred to other universities. A significant amount of its faculty were sent in 1956, by the national government, to Xi'an to help build up Xi'an Jiao Tong University in western China. Afterwards, the school was officially renamed Shanghai Jiao Tong University. 32 | 33 | Since the reform and opening up policy in China, SJTU has taken the lead in management reform of institutions for higher education, regaining its vigor and vitality with an unprecedented momentum of growth. SJTU includes five beautiful campuses, Xuhui, Minhang, Luwan Qibao, and Fahua, taking up an area of about 3,225,833 m2. A number of disciplines have been advancing towards the top echelon internationally, and a batch of burgeoning branches of learning have taken an important position domestically. 34 | 35 | Today SJTU has 31 schools (departments), 63 undergraduate programs, 250 masters-degree programs, 203 Ph.D. programs, 28 post-doctorate programs, and 11 state key laboratories and national engineering research centers. 36 | 37 | SJTU boasts a large number of famous scientists and professors, including 35 academics of the Academy of Sciences and Academy of Engineering, 95 accredited professors and chair professors of the "Cheung Kong Scholars Program" and more than 2,000 professors and associate professors. 38 | 39 | Its total enrollment of students amounts to 35,929, of which 1,564 are international students. There are 16,802 undergraduates, and 17,563 masters and Ph.D. candidates. After more than a century of operation, Jiao Tong University has inherited the old tradition of "high starting points, solid foundation, strict requirements and extensive practice." Students from SJTU have won top prizes in various competitions, including ACM International Collegiate Programming Contest, International Mathematical Contest in Modeling and Electronics Design Contests. Famous alumni include Jiang Zemin, Lu Dingyi, Ding Guangen, Wang Daohan, Qian Xuesen, Wu Wenjun, Zou Taofen, Mao Yisheng, Cai Er, Huang Yanpei, Shao Lizi, Wang An and many more. More than 200 of the academics of the Chinese Academy of Sciences and Chinese Academy of Engineering are alumni of Jiao Tong University. 40 | 41 | \englishkeywords{\large SJTU, master thesis, XeTeX/LaTeX template} 42 | \end{englishabstract} 43 | -------------------------------------------------------------------------------- /sjtuthesis.cfg: -------------------------------------------------------------------------------- 1 | %# -*- coding: utf-8-unix -*- 2 | %%================================================== 3 | %% sjtuthesis.cfg for SJTU Thesis 4 | %%================================================== 5 | 6 | \ProvidesFile{sjtuthesis.cfg}[2016/04/06 v0.9 sjtuthesis configuration file] 7 | 8 | %% labels in the title page 9 | \def\sjtu@label@major{专业} 10 | \def\sjtu@label@title{论文题目} 11 | \def\sjtu@label@thesis{学位论文} 12 | \def\sjtu@label@coadvisor{副导师} 13 | \def\sjtu@label@defenddate{答辩日期} 14 | \def\sjtu@label@institute{学院(系)} 15 | \ifsjtu@bachelor 16 | \def\sjtu@label@author{学生姓名} 17 | \def\sjtu@label@studentnumber{学生学号} 18 | \def\sjtu@label@advisor{指导教师} 19 | \else 20 | \def\sjtu@label@author{论文作者} 21 | \def\sjtu@label@studentnumber{学号} 22 | \def\sjtu@label@advisor{导师} 23 | \fi 24 | 25 | %% string values filled in the title page 26 | \def\sjtu@value@classification{} 27 | \def\sjtu@value@confidential{} 28 | \def\sjtu@value@serialnumber{} 29 | \def\sjtu@value@school{} 30 | \ifsjtu@bachelor 31 | \def\sjtu@value@chinesedegree{学士} 32 | \def\sjtu@value@englishdegree{Bachelor} 33 | \else 34 | \ifsjtu@master 35 | \def\sjtu@value@chinesedegree{硕士} 36 | \def\sjtu@value@englishdegree{Master} 37 | \else 38 | \ifsjtu@doctor 39 | \def\sjtu@value@chinesedegree{博士} 40 | \def\sjtu@value@englishdegree{Doctor} 41 | \else 42 | \ClassError{sjtuthesis}% 43 | {Unknown value for degree.}{} 44 | \fi 45 | \fi 46 | \fi 47 | \def\sjtu@label@statement{申请\sjtu@value@school\sjtu@value@chinesedegree\sjtu@label@thesis} 48 | 49 | %% 论文原创性声明 50 | \def\sjtu@label@original{学位论文原创性声明} 51 | \def\sjtu@label@authorization{学位论文版权使用授权书} 52 | \def\sjtu@label@authorsign{学位论文作者签名:} 53 | \def\sjtu@label@Supervisorsign{指导教师签名:} 54 | \def\sjtu@label@originalDate{日\hspace{1em}期:\hrulefill\hrulefill 年 \hrulefill 月 \hrulefill 日} 55 | \def\sjtu@label@originalcontent{本人郑重声明:所呈交的学位论文,是本人在导师的指导下, 独立进行研究工作所取得的成果。除文中已经注明引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写过的作品成果。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人完全意识到本声明的法律结果由本人承担。 56 | } 57 | \def\sjtu@label@authorizationcontent{本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被查阅和借阅。本人授权上海交通大学可以将本学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存和汇编本学位论文。\par 58 | 本学位论文属于\\ 59 | \hspace*{9em}\textbf{保\hspace{1em}密} $\square$,在~\hrulefill~年解密后适用本授权书。\\ 60 | \hspace*{9em}\textbf{不保密} $\square$。\\ 61 | (请在以上方框内打$\checked$) 62 | } 63 | 64 | %% labels in the english title page 65 | \def\sjtu@label@englishadvisor{Advisor} 66 | \def\sjtu@label@englishcoadvisor{Co-advisor} 67 | \def\sjtu@label@englishstatement{Submitted in total fulfillment 68 | of the requirements for the degree of \sjtu@value@englishdegree \\ 69 | in \sjtu@value@englishmajor} 70 | 71 | %% labels in the abstracts 72 | \def\sjtu@label@chineseabstract{摘~~~~要} 73 | \def\sjtu@label@englishabstract{Abstract} 74 | \def\sjtu@label@keywords{关键词:} 75 | \def\sjtu@label@englishkeywords{KEY WORDS:~} 76 | 77 | \ifsjtu@english 78 | 79 | %% labels in the titlepage, contents, lists, etc. 80 | \def\sjtu@titlepage{Title Page} 81 | \def\sjtu@label@abstract{\sjtu@label@englishabstract} 82 | \def\sjtu@contentsname{Contents} 83 | \def\sjtu@figurename{Figure} 84 | \def\sjtu@listfigurename{List of Figures} 85 | \def\sjtu@tablename{Table} 86 | \def\sjtu@listtablename{List of Tables} 87 | \def\sjtu@algorithmicrequire{Input:} 88 | \def\sjtu@algorithmicensure{Output:} 89 | \def\sjtu@listalgorithmname{List of Algorithms} 90 | \def\sjtu@nomenclature{Nomenclature} 91 | \DefineBibliographyStrings{english}{% 92 | bibliography = {Bibliography} 93 | } 94 | %% labels in the summary 95 | \def\sjtu@label@summary{Summary} 96 | %% labels in the publications 97 | \def\sjtu@label@publications{Publications} 98 | %% labels in the publications 99 | \def\sjtu@label@patents{Patents} 100 | %% labels in the projects 101 | \def\sjtu@label@projects{Projects} 102 | %% labels in the resume 103 | \def\sjtu@label@resume{Resume} 104 | %% labels in the thanks 105 | \def\sjtu@label@thanks{Acknowledgements} 106 | %% listings name 107 | \def\sjtu@value@listingname{Code} 108 | %% the theorem name definitions 109 | \def\sjtu@label@algo{Algorithm} 110 | \def\sjtu@label@thm{Theorem} 111 | \def\sjtu@label@lem{Lemma} 112 | \def\sjtu@label@prop{Proposition} 113 | \def\sjtu@label@cor{Corollary} 114 | \def\sjtu@label@defn{Definition} 115 | \def\sjtu@label@conj{Conjecture} 116 | \def\sjtu@label@exmp{Example} 117 | \def\sjtu@label@rem{Remark} 118 | \def\sjtu@label@case{Case} 119 | \def\sjtu@label@proof{Proof} 120 | 121 | \else 122 | 123 | %% 目录、插图索引、表格索引 124 | \def\sjtu@titlepage{扉~~~~页} 125 | \def\sjtu@label@abstract{\sjtu@label@chineseabstract} 126 | \def\sjtu@contentsname{目~~~~录} 127 | \def\sjtu@figurename{图} 128 | \def\sjtu@listfigurename{插图索引} 129 | \def\sjtu@tablename{表} 130 | \def\sjtu@listtablename{表格索引} 131 | \def\sjtu@algorithmicrequire{输入:} 132 | \def\sjtu@algorithmicensure{输出:} 133 | \def\sjtu@listalgorithmname{算法索引} 134 | \def\sjtu@nomenclature{主要符号对照表} 135 | %% labels in the summary 136 | \def\sjtu@label@summary{全文总结} 137 | %% labels in the publications 138 | \def\sjtu@label@publications{攻读学位期间发表的学术论文} 139 | %% labels in the publications 140 | \def\sjtu@label@patents{攻读学位期间申请的专利} 141 | %% labels in the projects 142 | \def\sjtu@label@projects{攻读学位期间参与的项目} 143 | %% labels in the resume 144 | \def\sjtu@label@resume{简~~~~历} 145 | %% labels in the thanks 146 | \def\sjtu@label@thanks{致~~~~谢} 147 | %% listings name 148 | \def\sjtu@value@listingname{代码} 149 | %% the theorem name definitions 150 | \def\sjtu@label@algo{算法} 151 | \def\sjtu@label@thm{定理} 152 | \def\sjtu@label@lem{引理} 153 | \def\sjtu@label@prop{命题} 154 | \def\sjtu@label@cor{推论} 155 | \def\sjtu@label@defn{定义} 156 | \def\sjtu@label@conj{猜想} 157 | \def\sjtu@label@exmp{例} 158 | \def\sjtu@label@rem{注} 159 | \def\sjtu@label@case{情形} 160 | \def\sjtu@label@proof{证明} 161 | 162 | \fi 163 | 164 | \endinput 165 | 166 | %% End of file `sjtuthesis.cfg'. 167 | -------------------------------------------------------------------------------- /sjtuthesis.cls: -------------------------------------------------------------------------------- 1 | %# -*- coding: utf-8-unix -*- 2 | %================================================== 3 | %% sjtuthesis.cls for SJTU Master Thesis 4 | %%================================================== 5 | 6 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 7 | \ProvidesClass{sjtuthesis}[2018/01/09 v0.10 Shanghai Jiao Tong University Template] 8 | \def\version{v0.10} 9 | \newif\ifsjtu@bachelor\sjtu@bachelorfalse 10 | \newif\ifsjtu@master\sjtu@masterfalse 11 | \newif\ifsjtu@doctor\sjtu@doctorfalse 12 | \newif\ifsjtu@english\sjtu@englishfalse 13 | \newif\ifsjtu@review\sjtu@reviewfalse 14 | \newif\ifsjtu@submit\sjtu@submitfalse 15 | \DeclareOption{bachelor}{\sjtu@bachelortrue} 16 | \DeclareOption{master}{\sjtu@mastertrue} 17 | \DeclareOption{doctor}{\sjtu@doctortrue} 18 | \DeclareOption{english}{\sjtu@englishtrue} 19 | \DeclareOption{review}{\sjtu@reviewtrue} 20 | \DeclareOption{submit}{\sjtu@submittrue} 21 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}} 22 | \ProcessOptions\relax 23 | \ifsjtu@english 24 | \PassOptionsToClass{scheme=plain}{ctexbook} 25 | \else 26 | \PassOptionsToClass{scheme=chinese}{ctexbook} 27 | \fi 28 | \ifsjtu@bachelor 29 | \PassOptionsToClass{zihao=5}{ctexbook} 30 | \else 31 | \PassOptionsToClass{zihao=-4}{ctexbook} 32 | \ifsjtu@master\relax\else 33 | \ifsjtu@doctor\relax\else 34 | \ClassError{sjtuthesis}% 35 | {You have to specify one of thesis options: bachelor, master or doctor.}{} 36 | \fi 37 | \fi 38 | \fi 39 | \PassOptionsToPackage{no-math}{fontspec} 40 | \LoadClass[a4paper,UTF8]{ctexbook} 41 | 42 | %% sjtuthesis.cls segments 43 | % 0. Import sjtuthesis.cfg 44 | % 1. Import and configure LaTeX packages. 45 | % 2. Define general-purpose LaTeX commands. 46 | % 3. Configure the imported packages, also extend LaTeX command in sjtuthesis 47 | % 4. Draw the sjtuthesis 48 | 49 | %========== 50 | % Segment 0. Import sjtuthesis.cfg 51 | %========== 52 | 53 | %% 导入 sjtuthesis.cfg 文件 54 | \AtEndOfClass{\input{sjtuthesis.cfg}} 55 | 56 | %========== 57 | % Segment 1. Import LaTeX packages. 58 | %========== 59 | 60 | \RequirePackage{etoolbox} 61 | \RequirePackage[centering,a4paper,body={16cm,22cm}]{geometry} %设置版面 62 | \RequirePackage{fancyhdr} 63 | \RequirePackage{pageslts} 64 | \RequirePackage{mathtools,amsthm,amsfonts,amssymb,bm} 65 | \RequirePackage[defaultsups]{newtxtext} 66 | \RequirePackage{newtxmath} 67 | \RequirePackage[opentype]{sourcecodepro} 68 | \RequirePackage{upgreek} 69 | \RequirePackage{wasysym} 70 | \RequirePackage{anyfontsize} 71 | \RequirePackage{metalogo,doc} 72 | \RequirePackage{array} 73 | \RequirePackage{threeparttable} 74 | \RequirePackage{dcolumn} 75 | \RequirePackage{multirow} 76 | \RequirePackage{booktabs} 77 | \RequirePackage{graphicx} 78 | \RequirePackage{caption} 79 | \RequirePackage[list=off]{bicaption} 80 | \RequirePackage{subcaption} 81 | \RequirePackage[backend=biber,style=gb7714-2015]{biblatex} 82 | \RequirePackage{xcolor} 83 | \RequirePackage{listings} 84 | \RequirePackage[xetex, bookmarksnumbered, colorlinks, urlcolor=black, linkcolor=black, citecolor=black, plainpages=false, pdfstartview=FitH]{hyperref} 85 | \RequirePackage{longtable} 86 | \RequirePackage[perpage, bottom]{footmisc} 87 | \RequirePackage[inline]{enumitem} 88 | \RequirePackage{pdfpages} 89 | \RequirePackage{calc} 90 | \RequirePackage{algorithm, algorithmicx, algpseudocode} 91 | \RequirePackage{siunitx} 92 | \RequirePackage{tikz} 93 | \usetikzlibrary{shapes.geometric, arrows} 94 | 95 | %========== 96 | % Segment 2. Define general-purpose LaTeX commands. 97 | %========== 98 | 99 | \setcounter{secnumdepth}{4} % 章节编号深度 (part 对应 -1) 100 | \setcounter{tocdepth}{2} % 目录深度 (part 对应 -1) 101 | 102 | % User defined command list 103 | %% \me \mi \mj \dif \cleardoublepage \cndash \CJKLaTeX 104 | 105 | % A new column type 106 | \newcolumntype{d}[1]{D{.}{.}{#1}}% or D{.}{,}{#1} or D{.}{\cdot}{#1} 107 | 108 | % upper math letter 109 | \newcommand{\me}{\mathrm{e}} 110 | \newcommand{\mi}{\mathrm{i}} 111 | \newcommand{\mj}{\mathrm{j}} 112 | \newcommand{\dif}{\mathrm{d}} 113 | 114 | % patch commands 115 | \patchcmd\cleardoublepage 116 | {\newpage} 117 | {\thispagestyle{empty}\newpage} 118 | {}{} 119 | \patchcmd\chapter 120 | {\thispagestyle{\CTEX@chapter@pagestyle}} 121 | {}{}{} 122 | \patchcmd\@chapter 123 | {\if@twocolumn} 124 | {\addtocontents{loa}{\protect\addvspace{10\p@}}% 125 | \if@twocolumn} 126 | {}{} 127 | \patchcmd\tableofcontents 128 | {\chapter} 129 | {\cleardoublepage% 130 | \pdfbookmark[0]{\contentsname}{toc}% 131 | \chapter} 132 | {}{} 133 | 134 | % CJK-LaTeX Logo \CJKLaTeX 135 | \newcommand{\CJKLaTeX}{CJK--\LaTeX} 136 | 137 | % cndash 138 | \newcommand{\cndash}{\rule{0.0em}{0pt}\rule[0.35em]{1.4em}{0.05em}\rule{0.2em}{0pt}} 139 | 140 | %========== 141 | % Segment 3. Configure the imported packages, also extend LaTeX command in sjtuthesis 142 | %========== 143 | 144 | %% 行距缩放因子 145 | \linespread{1.3} 146 | 147 | %% CTeX Settings 148 | % 名称:目录、表格索引、插图索引、算法、算法索引、代码 149 | \ctexset{% 150 | contentsname = \sjtu@contentsname, 151 | listfigurename = \sjtu@listfigurename, 152 | listtablename = \sjtu@listtablename, 153 | autoindent = true, 154 | chapter={% 155 | format = \zihao{3}\bfseries\centering, 156 | nameformat = {}, 157 | titleformat = {}, 158 | aftername = \quad, 159 | afterindent = true, 160 | beforeskip = {15\p@}, 161 | afterskip = {12\p@}, 162 | }, 163 | section={% 164 | format = \zihao{4}\bfseries, 165 | afterindent = true, 166 | afterskip = {1.0ex \@plus .2ex}, 167 | }, 168 | subsection={% 169 | format = \zihao{-4}\bfseries, 170 | afterindent = true, 171 | afterskip = {1.0ex \@plus .2ex}, 172 | }, 173 | subsubsection={% 174 | format = \normalfont\normalsize, 175 | afterindent = true, 176 | afterskip = {1.0ex \@plus .2ex}, 177 | }, 178 | paragraph/afterindent = true, 179 | subparagraph/afterindent = true, 180 | } 181 | 182 | \floatname{algorithm}{\sjtu@label@algo} 183 | \renewcommand{\algorithmicrequire}{\textbf{\sjtu@algorithmicrequire}} 184 | \renewcommand{\algorithmicensure}{\textbf{\sjtu@algorithmicensure}} 185 | \renewcommand{\listalgorithmname}{\sjtu@listalgorithmname} 186 | \renewcommand{\lstlistingname}{\sjtu@value@listingname} 187 | 188 | % bullets in the item 189 | \renewcommand{\labelitemi}{\ensuremath{\bullet}} 190 | 191 | %% Graphic path & file extension 192 | \graphicspath{{fig/}{figure/}{figures/}{logo/}{logos/}{graph/}{graphs}} 193 | \DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.jpeg} 194 | 195 | % Caption setting in caption and bicaption pacakge 196 | \DeclareCaptionFont{kaishu}{\kaishu} 197 | \captionsetup{format=plain,labelformat=simple,labelsep=space,justification=centering,font={small,kaishu}} 198 | \captionsetup[bi-first]{bi-first} 199 | \captionsetup[bi-second]{bi-second} 200 | \captionsetup[sub]{font=footnotesize} 201 | 202 | \DeclareCaptionOption{bi-first}[]{% 203 | \def\tablename{\sjtu@tablename} 204 | \def\figurename{\sjtu@figurename} 205 | } 206 | \DeclareCaptionOption{bi-second}[]{% 207 | \def\tablename{Table} 208 | \def\figurename{Figure} 209 | } 210 | 211 | % Set fontnote font size in threeparttable 212 | \appto\TPTnoteSettings{\footnotesize} 213 | 214 | % Ref https://github.com/sjtug/SJTUThesis/issues/186 215 | \@addtoreset{algorithm}{chapter}% algorithm counter resets every chapter 216 | 217 | % Floating parameters 218 | \renewcommand{\textfraction}{0.15} 219 | \renewcommand{\topfraction}{0.85} 220 | \renewcommand{\bottomfraction}{0.65} 221 | \renewcommand{\floatpagefraction}{0.60} 222 | 223 | % 定公式、图、表、算法、代码的编号为"3-1"的形式,即分隔符由.变为短杠 224 | \AtBeginDocument{% 225 | \renewcommand{\theequation}{\thechapter--\arabic{equation}} 226 | \renewcommand{\thefigure}{\thechapter--\arabic{figure}} 227 | \renewcommand\p@subfigure{\thefigure} 228 | \renewcommand{\thetable}{\thechapter--\arabic{table}} 229 | \renewcommand{\thealgorithm}{\thechapter--\arabic{algorithm}} 230 | \renewcommand{\thelstlisting}{\thechapter--\arabic{lstlisting}} 231 | } 232 | 233 | % 使用enumitem宏包配制列表环境 234 | % 紧凑间距 235 | \setlist{nosep} 236 | % 列表和段落头对齐 237 | \setlist*{leftmargin=*} 238 | \setlist[1]{labelindent=\parindent} % Only the level 1 239 | 240 | % 流程图定义基本形状 241 | \tikzstyle{startstop} = [rectangle, rounded corners, minimum width=2cm, minimum height=1cm, text centered, draw=black] 242 | \tikzstyle{io} = [trapezium, trapezium left angle=75, trapezium right angle=105, minimum width=1cm, minimum height=1cm, text centered, draw=black] 243 | \tikzstyle{process} = [rectangle, minimum width=2cm, minimum height=1cm, text centered, draw=black] 244 | \tikzstyle{decision} = [diamond, minimum width=2cm, minimum height=1cm, text centered, draw=black] 245 | \tikzstyle{arrow} = [thick,->,>=stealth] 246 | 247 | % Setting Package listings/lstlistings 248 | \lstset{tabsize=4, % 249 | frame=shadowbox, %把代码用带有阴影的框圈起来 250 | commentstyle=\color{red!50!green!50!blue!50},%浅灰色的注释 251 | rulesepcolor=\color{red!20!green!20!blue!20},%代码块边框为淡青色 252 | keywordstyle=\color{blue!90}\bfseries, %代码关键字的颜色为蓝色,粗体 253 | showstringspaces=false,%不显示代码字符串中间的空格标记 254 | stringstyle=\ttfamily, % 代码字符串的特殊格式 255 | keepspaces=true, % 256 | breakindent=22pt, % 257 | numbers=left,%左侧显示行号 258 | stepnumber=1,% 259 | numberstyle=\tiny, %行号字体用小号 260 | basicstyle={\footnotesize\ttfamily}, % 261 | showspaces=false, % 262 | flexiblecolumns=true, % 263 | breaklines=true, %对过长的代码自动换行 264 | breakautoindent=true,% 265 | breakindent=4em, % 266 | aboveskip=1em, %代码块边框 267 | %% added by http://bbs.ctex.org/viewthread.php?tid=53451 268 | fontadjust, 269 | captionpos=t, 270 | framextopmargin=2pt,framexbottommargin=2pt,abovecaptionskip=-9pt,belowcaptionskip=9pt, 271 | xleftmargin=4em,xrightmargin=4em, % 设定listing左右的空白 272 | texcl=true, 273 | % 设定中文冲突,断行,列模式,数学环境输入,listing数字的样式 274 | extendedchars=false,columns=flexible,mathescape=true 275 | numbersep=-1em 276 | } 277 | 278 | % Setting Package siunitx 279 | \sisetup{detect-all} % Detecting fonts 280 | 281 | % 定理环境 282 | \newtheoremstyle{break}% name 283 | {}% Space above, empty = `usual value' 284 | {}% Space below 285 | {\itshape}% Body font 286 | {}% Indent amount (empty = no indent, \parindent = para indent) 287 | {\bfseries}% Thm head font 288 | {.}% Punctuation after thm head 289 | {\newline}% Space after thm head: \newline = linebreak 290 | {}% Thm head spec 291 | \theoremstyle{plain} 292 | \newtheorem{algo}{\sjtu@label@algo~}[chapter] 293 | \newtheorem{thm}{\sjtu@label@thm~}[chapter] 294 | \newtheorem{lem}[thm]{\sjtu@label@lem~} 295 | \newtheorem{prop}[thm]{\sjtu@label@prop~} 296 | \newtheorem{cor}[thm]{\sjtu@label@cor~} 297 | \theoremstyle{definition} 298 | \newtheorem{defn}{\sjtu@label@defn~}[chapter] 299 | \newtheorem{conj}{\sjtu@label@conj~}[chapter] 300 | \newtheorem{exmp}{\sjtu@label@exmp~}[chapter] 301 | \newtheorem{rem}{\sjtu@label@rem~} 302 | \newtheorem{case}{\sjtu@label@case~} 303 | \theoremstyle{break} 304 | \newtheorem{bthm}[thm]{\sjtu@label@thm~} 305 | \newtheorem{blem}[thm]{\sjtu@label@lem~} 306 | \newtheorem{bprop}[thm]{\sjtu@label@prop~} 307 | \newtheorem{bcor}[thm]{\sjtu@label@cor~} 308 | \renewcommand{\proofname}{\bfseries\sjtu@label@proof} 309 | 310 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 311 | % The following definitions add Switch statement to LaTeX algorithmicx package 312 | % It's based on Werner's answer on stackoverflow 313 | % http://tex.stackexchange.com/questions/53357/switch-cases-in-algorithmic 314 | 315 | % New definitions 316 | \algnewcommand\algorithmicswitch{\textbf{switch}} 317 | \algnewcommand\algorithmiccase{\textbf{case}} 318 | \algnewcommand\algorithmicdefault{\textbf{default}} 319 | 320 | % New "environments" 321 | % using \algtext*{} removes any typesetting of that command 322 | \algdef{SE}[SWITCH]{Switch}{EndSwitch}[1]{\algorithmicswitch\ (#1)}{\algorithmicend\ \algorithmicswitch}% 323 | %\algtext*{EndSwitch}% 324 | \algdef{SE}[CASE]{Case}{EndCase}[1]{\algorithmiccase\ #1:}{\algorithmicend\ \algorithmiccase}% 325 | \algtext*{EndCase}% 326 | \algdef{SE}[DEFAULT]{Default}{EndDefault}{\algorithmicdefault\ :}{\algorithmicend\ \algorithmicdefault}% 327 | \algtext*{EndDefault}% 328 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 329 | 330 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 331 | % The following add some extra commands to LaTeX algorithmicx package 332 | 333 | % Assert 334 | \algnewcommand\algorithmicassert{\texttt{assert}} 335 | \algnewcommand\Assert[1]{\State \algorithmicassert(#1)}% 336 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 337 | 338 | %========== 339 | % Segment 4. Draw the sjtuthesis 340 | %========== 341 | 342 | \renewcommand\maketitle{% 343 | \pdfbookmark[0]{\sjtu@titlepage}{titlepage} 344 | \ifsjtu@bachelor 345 | \makechinesetitle@bachelor 346 | \else 347 | \makechinesetitle 348 | \makeenglishtitle 349 | \fi 350 | } 351 | 352 | \newcommand\classification[1]{\def\sjtu@value@classification{#1}} 353 | \newcommand\studentnumber[1]{\def\sjtu@value@studentnumber{#1}} 354 | \newcommand\confidential[1]{\def\sjtu@value@confidential{#1}} 355 | \newcommand\school[1]{\def\sjtu@value@school{#1}} 356 | \newcommand\chinesedegree[1]{\def\sjtu@value@chinesedegree{#1}} 357 | \renewcommand\title[1]{\def\sjtu@value@chinesetitle{#1}} 358 | \renewcommand\author[1]{\def\sjtu@value@author{#1}} 359 | \newcommand\advisor[1]{\def\sjtu@value@advisor{#1}} 360 | \newcommand\coadvisor[1]{\def\sjtu@value@coadvisor{#1}} 361 | \newcommand\major[1]{\def\sjtu@value@major{#1}} 362 | \newcommand\submitdate[1]{\def\sjtu@value@submitdate{#1}} 363 | \newcommand\defenddate[1]{\def\sjtu@value@defenddate{#1}} 364 | \newcommand\institute[1]{\def\sjtu@value@institute{#1}} 365 | \newcommand\chairman[1]{\def\sjtu@value@chairman{#1}} 366 | 367 | % “绘制”中文标题页 368 | \newcommand\makechinesetitle{% 369 | \cleardoublepage 370 | \thispagestyle{empty} 371 | \begin{center} 372 | {\songti\zihao{-3}\sjtu@label@statement} 373 | \vskip\stretch{1} 374 | {\heiti\zihao{3}\sjtu@value@chinesetitle} 375 | \vskip\stretch{1} 376 | {\fangsong\zihao{4}} 377 | \def\tabcolsep{1pt} 378 | \def\arraystretch{1.5} 379 | \begin{tabular}{>{\begin{CJKfilltwosides}{4\ccwd}\heiti}r<{\end{CJKfilltwosides}}l} 380 | \ifsjtu@review 381 | \sjtu@label@author & \underline{\makebox[150pt]{}} \\ 382 | \sjtu@label@studentnumber & \underline{\makebox[150pt]{}} \\ 383 | \sjtu@label@advisor & \underline{\makebox[150pt]{}} \\ 384 | \ifx\sjtu@value@coadvisor\undefined\else 385 | \sjtu@label@coadvisor & \underline{\makebox[150pt]{}} \\ 386 | \fi 387 | \else 388 | \sjtu@label@author & \underline{\makebox[150pt]{\sjtu@value@author}} \\ 389 | \sjtu@label@studentnumber & \underline{\makebox[150pt]{\sjtu@value@studentnumber}} \\ 390 | \sjtu@label@advisor & \underline{\makebox[150pt]{\sjtu@value@advisor}} \\ 391 | \ifx\sjtu@value@coadvisor\undefined\else 392 | \sjtu@label@coadvisor & \underline{\makebox[150pt]{\sjtu@value@coadvisor}} \\ 393 | \fi 394 | \fi 395 | \sjtu@label@major & \underline{\makebox[150pt]{\sjtu@value@major}} \\ 396 | \sjtu@label@defenddate & \underline{\makebox[150pt]{\sjtu@value@defenddate}} 397 | \end{tabular} 398 | \end{center} 399 | \vskip \stretch{0.5} 400 | \cleardoublepage 401 | } 402 | 403 | % English Title Page 404 | \newcommand\englishtitle[1]{\def\sjtu@value@englishtitle{#1}} 405 | \newcommand\englishauthor[1]{\def\sjtu@value@englishauthor{#1}} 406 | \newcommand\englishadvisor[1]{\def\sjtu@value@englishadvisor{#1}} 407 | \newcommand\englishcoadvisor[1]{\def\sjtu@value@englishcoadvisor{#1}} 408 | \newcommand\englishschool[1]{\def\sjtu@value@englishschool{#1}} 409 | \newcommand\englishinstitute[1]{\def\sjtu@value@englishinstitute{#1}} 410 | \newcommand\englishdate[1]{\def\sjtu@value@englishdate{#1}} 411 | \newcommand\englishdegree[1]{\def\sjtu@value@englishdegree{#1}} 412 | \newcommand\englishmajor[1]{\def\sjtu@value@englishmajor{#1}} 413 | 414 | % “绘制”英文标题页 415 | \newcommand\makeenglishtitle{% 416 | \cleardoublepage 417 | \thispagestyle{empty} 418 | \begin{center} 419 | {\normalfont\zihao{4} \sjtu@label@englishstatement} 420 | \vspace{20pt} \vskip\stretch{1} 421 | {\huge\sjtu@value@englishtitle \vskip 1pt} 422 | \vskip \stretch{1} 423 | \ifsjtu@review 424 | \vskip \stretch{1} 425 | \vskip 3pt 426 | \vskip \stretch{2} 427 | \else 428 | {\normalfont\zihao{4}\sjtu@value@englishauthor} 429 | \vskip \stretch{1} 430 | {\normalfont\zihao{4}\sjtu@label@englishadvisor} 431 | \vskip 2pt 432 | {\normalfont\zihao{4}\sjtu@value@englishadvisor} 433 | \vskip 5pt 434 | \ifx\sjtu@value@englishcoadvisor\undefined\else 435 | {\normalfont\zihao{4}\sjtu@label@englishcoadvisor} 436 | \vskip 2pt 437 | {\normalfont\zihao{4}\sjtu@value@englishcoadvisor} 438 | \vskip \stretch{2} 439 | \fi 440 | \fi 441 | \normalfont\sjtu@value@englishinstitute \vskip 30pt 442 | \normalfont\sjtu@value@englishdate \vskip 20pt 443 | \end{center} 444 | \cleardoublepage 445 | } 446 | 447 | % “绘制”学士论文中文标题页 448 | \newcommand\makechinesetitle@bachelor{% 449 | \cleardoublepage 450 | \thispagestyle{empty} 451 | \begin{center} 452 | \vspace*{20pt} \vskip 7pt 453 | \includegraphics{sjtulogo} 454 | \vskip 30pt 455 | {\fontsize{32}{32}\kaishu\sjtu@value@chinesedegree\sjtu@label@thesis} 456 | \vskip 15pt 457 | {\zihao{-2}\MakeUppercase{Thesis of \sjtu@value@englishdegree}} 458 | \vskip 15pt 459 | \includegraphics{sjtubadge} 460 | \vskip \stretch{2} 461 | {\kaishu\zihao{2} 462 | \begin{tabular}{r@{:}l} 463 | \sjtu@label@title & 464 | {\zihao{-2}\underline{\begin{minipage}{360pt}\centering\sjtu@value@chinesetitle\end{minipage}}} 465 | \end{tabular}} 466 | \vskip \stretch{1} 467 | {\kaishu\zihao{3} 468 | \def\arraystretch{1.1} 469 | \begin{tabular}{>{\begin{CJKfilltwosides}{4\ccwd}}r<{\end{CJKfilltwosides}}@{:}l} 470 | \ifsjtu@review 471 | \sjtu@label@author & \underline{\makebox[180pt]{}} \\ 472 | \sjtu@label@studentnumber & \underline{\makebox[180pt]{}} \\ 473 | \else 474 | \sjtu@label@author & \underline{\makebox[180pt]{\sjtu@value@author}} \\ 475 | \sjtu@label@studentnumber & \underline{\makebox[180pt]{\sjtu@value@studentnumber}} \\ 476 | \fi 477 | \sjtu@label@major & \underline{\makebox[180pt]{\sjtu@value@major}} \\ 478 | \ifsjtu@review 479 | \sjtu@label@advisor & \underline{\makebox[180pt]{}} \\ 480 | \else 481 | \sjtu@label@advisor & \underline{\makebox[180pt]{\sjtu@value@advisor}} \\ 482 | \fi 483 | \sjtu@label@institute & \underline{\makebox[180pt]{\sjtu@value@institute}} 484 | \end{tabular}} 485 | \end{center} 486 | \cleardoublepage 487 | } 488 | 489 | % 原创性声明 490 | \newcommand\makeDeclareOriginal{% 491 | \cleardoublepage 492 | \thispagestyle{empty} 493 | \begin{center} 494 | {\bfseries\zihao{3} \sjtu@value@school}\\ 495 | {\bfseries\zihao{3} \sjtu@label@original} 496 | \end{center} 497 | \vskip 10pt 498 | {\par\zihao{-4}\sjtu@label@originalcontent\par} 499 | \vskip 60pt 500 | \hspace{13em}\sjtu@label@authorsign\hrulefill\hspace{1.5em} 501 | \vskip 15pt 502 | \hspace{16em}\sjtu@label@originalDate\hspace{1em} 503 | \cleardoublepage 504 | } 505 | 506 | % 授权声明 507 | \newcommand\makeDeclareAuthorization{% 508 | \cleardoublepage 509 | \thispagestyle{empty} 510 | \begin{center} 511 | {\bfseries\zihao{3} \sjtu@value@school}\\ 512 | {\bfseries\zihao{3} \sjtu@label@authorization} 513 | \end{center} 514 | \vskip 10pt 515 | {\par\zihao{-4}\sjtu@label@authorizationcontent\par} 516 | \vskip 60pt 517 | \sjtu@label@authorsign\hrulefill\hspace{3em}\sjtu@label@Supervisorsign\hrulefill 518 | \vskip 15pt 519 | \sjtu@label@originalDate\hfill\hspace{3em}\sjtu@label@originalDate 520 | \cleardoublepage 521 | } 522 | 523 | % fancyhdr页眉页脚设置 524 | \ifsjtu@english 525 | \def\sjtu@value@titlemark{\sjtu@value@englishtitle} 526 | \newcommand\sjtu@fancyhead{\footnotesize\kaishu} 527 | \newcommand\sjtu@fancyfoot[2]{\small --~~Page~~{\bfseries{#1}}~~of~~{\bfseries{#2}}~~--} 528 | \else 529 | \def\sjtu@value@titlemark{\sjtu@value@chinesetitle} 530 | \newcommand\sjtu@fancyhead{\small\kaishu} 531 | \newcommand\sjtu@fancyfoot[2]{\small 第~{\bfseries{#1}}~页\,共~{\bfseries{#2}}~页} 532 | \fi 533 | \def\markboxwidth{0.75\textwidth} 534 | \AtBeginDocument{\pagenumbering{Alph}} 535 | \ifsjtu@bachelor 536 | %% 本科学位论文页眉页脚设置 537 | %% 前言页眉页脚 538 | \fancypagestyle{front}{% 539 | \fancyhf{} 540 | \fancyhead[L]{\includegraphics{figure/sjtubanner}} 541 | \fancyhead[R]{\parbox[b]{\markboxwidth}{\raggedleft\nouppercase{\sjtu@fancyhead\sjtu@value@titlemark}}} 542 | \fancyfoot[C]{\sjtu@fancyfoot{\thepage}{\lastpageref{pagesLTS.Roman}}} 543 | \renewcommand{\headheight}{32pt} 544 | } 545 | %% 正文页眉页脚 546 | \fancypagestyle{main}{% 547 | \fancyhf{} 548 | \fancyhead[L]{\includegraphics{figure/sjtubanner}} 549 | \fancyhead[R]{\parbox[b]{\markboxwidth}{\raggedleft\nouppercase{\sjtu@fancyhead\sjtu@value@titlemark}}} 550 | \fancyfoot[C]{\sjtu@fancyfoot{\thepage}{\lastpageref{pagesLTS.arabic}}} 551 | \renewcommand{\headheight}{32pt} 552 | } 553 | %% 英文大摘要 554 | \fancypagestyle{biglast}{% 555 | \fancyhf{} 556 | \fancyhead[L]{\includegraphics{figure/sjtubanner}} 557 | \fancyhead[R]{\parbox[b]{\markboxwidth}{\raggedleft\nouppercase{\sjtu@fancyhead\sjtu@value@titlemark}}} 558 | \fancyfoot[C]{\sjtu@fancyfoot{\theCurrentPageLocal}{\lastpageref{pagesLTS.roman.local}}} 559 | \renewcommand{\headheight}{32pt} 560 | } 561 | \else 562 | %% 研究生学位论文页眉页脚设置 563 | \if@twoside 564 | %% 双面打印页眉页脚 565 | \fancypagestyle{front}{% 566 | \fancyhf{} 567 | \fancyhead[LO,RE]{\small\kaishu\sjtu@value@school\sjtu@value@chinesedegree\sjtu@label@thesis} 568 | \fancyhead[LE,RO]{\nouppercase{\sjtu@fancyhead\leftmark}} 569 | \fancyfoot[C]{\small ---~{\bfseries\thepage}~---} 570 | \renewcommand{\headheight}{32pt} 571 | } 572 | \fancypagestyle{main}{% 573 | \fancyhf{} 574 | \fancyhead[LO,RE]{\small\kaishu\sjtu@value@school\sjtu@value@chinesedegree\sjtu@label@thesis} 575 | \fancyhead[LE,RO]{\nouppercase{\sjtu@fancyhead\leftmark}} 576 | \fancyfoot[C]{\small ---~{\bfseries\thepage}~---} 577 | \renewcommand{\headheight}{32pt} 578 | } 579 | \else 580 | %% 单面打印页眉页脚 581 | \fancypagestyle{front}{% 582 | \fancyhf{} 583 | \fancyhead[L]{\small\kaishu\sjtu@value@school\sjtu@value@chinesedegree\sjtu@label@thesis} 584 | \fancyhead[R]{\nouppercase{\sjtu@fancyhead\leftmark}} 585 | \fancyfoot[C]{\small ---~{\bfseries\thepage}~---} 586 | \renewcommand{\headheight}{32pt} 587 | } 588 | \fancypagestyle{main}{% 589 | \fancyhf{} 590 | \fancyhead[L]{\small\kaishu\sjtu@value@school\sjtu@value@chinesedegree\sjtu@label@thesis} 591 | \fancyhead[R]{\nouppercase{\sjtu@fancyhead\leftmark}} 592 | \fancyfoot[C]{\small ---~{\bfseries\thepage}~---} 593 | \renewcommand{\headheight}{32pt} 594 | } 595 | \fi 596 | \fi 597 | 598 | \renewcommand\frontmatter{% 599 | \cleardoublepage 600 | \@mainmatterfalse 601 | \ifsjtu@bachelor 602 | \pagestyle{front} 603 | \else 604 | \pagestyle{main} 605 | \fi 606 | \pagenumbering{Roman} 607 | } 608 | \renewcommand\mainmatter{% 609 | \cleardoublepage 610 | \@mainmattertrue 611 | \pagestyle{main} 612 | \pagenumbering{arabic} 613 | } 614 | 615 | % 中英文摘要 616 | \newenvironment{abstract}{% 617 | \cleardoublepage 618 | \pdfbookmark[0]{\sjtu@label@abstract}{abstract} 619 | \chapter*{% 620 | \sjtu@value@chinesetitle 621 | \vskip 20pt 622 | \sjtu@label@chineseabstract 623 | } 624 | \markboth{\sjtu@label@chineseabstract}{} 625 | }{} 626 | \newcommand\keywords[1]{% 627 | \vspace{2ex} 628 | \noindent{\bfseries\large \sjtu@label@keywords}{#1} 629 | } 630 | \newenvironment{englishabstract}{% 631 | \cleardoublepage 632 | \chapter*{% 633 | \MakeUppercase\sjtu@value@englishtitle 634 | \vskip 20pt 635 | \MakeUppercase\sjtu@label@englishabstract 636 | } 637 | \markboth{\sjtu@label@englishabstract}{} 638 | }{} 639 | \newcommand\englishkeywords[1]{% 640 | \vspace{2ex} 641 | \noindent{\bfseries\large \sjtu@label@englishkeywords}{#1} 642 | } 643 | 644 | % 主要符号对照表 645 | \newenvironment{nomenclaturename}{\cleardoublepage 646 | \chapter{\sjtu@nomenclature}{}}{} 647 | 648 | \newenvironment{publications}[1] 649 | {\chapter{\sjtu@label@publications}% 650 | \@mkboth{\MakeUppercase\sjtu@label@publications} 651 | {\MakeUppercase\sjtu@label@publications}% 652 | \list{\@biblabel{\@arabic\c@enumiv}}% 653 | {\settowidth\labelwidth{\@biblabel{#1}}% 654 | \leftmargin\labelwidth 655 | \advance\leftmargin\labelsep 656 | \@openbib@code 657 | \usecounter{enumiv}% 658 | \let\p@enumiv\@empty 659 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 660 | \sloppy 661 | \clubpenalty4000 662 | \@clubpenalty \clubpenalty 663 | \widowpenalty4000% 664 | \sfcode`\.\@m} 665 | {\def\@noitemerr 666 | {\@latex@warning{Empty `publications' environment}}% 667 | \endlist} 668 | 669 | \newenvironment{patents}[1] 670 | {\chapter{\sjtu@label@patents}% 671 | \@mkboth{\MakeUppercase\sjtu@label@patents} 672 | {\MakeUppercase\sjtu@label@patents}% 673 | \list{\@biblabel{\@arabic\c@enumiv}}% 674 | {\settowidth\labelwidth{\@biblabel{#1}}% 675 | \leftmargin\labelwidth 676 | \advance\leftmargin\labelsep 677 | \@openbib@code 678 | \usecounter{enumiv}% 679 | \let\p@enumiv\@empty 680 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 681 | \sloppy 682 | \clubpenalty4000 683 | \@clubpenalty \clubpenalty 684 | \widowpenalty4000% 685 | \sfcode`\.\@m} 686 | {\def\@noitemerr 687 | {\@latex@warning{Empty `patents' environment}}% 688 | \endlist} 689 | 690 | \newenvironment{projects}[1] 691 | {\chapter{\sjtu@label@projects}% 692 | \@mkboth{\MakeUppercase\sjtu@label@projects} 693 | {\MakeUppercase\sjtu@label@projects}% 694 | \list{\@biblabel{\@arabic\c@enumiv}}% 695 | {\settowidth\labelwidth{\@biblabel{#1}}% 696 | \leftmargin\labelwidth 697 | \advance\leftmargin\labelsep 698 | \@openbib@code 699 | \usecounter{enumiv}% 700 | \let\p@enumiv\@empty 701 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 702 | \sloppy 703 | \clubpenalty4000 704 | \@clubpenalty \clubpenalty 705 | \widowpenalty4000% 706 | \sfcode`\.\@m} 707 | {\def\@noitemerr 708 | {\@latex@warning{Empty `projects' environment}}% 709 | \endlist} 710 | 711 | \newenvironment{resume} 712 | {\chapter{\sjtu@label@resume}} 713 | {} 714 | 715 | \newenvironment{resumesection}[1] 716 | {{\noindent\normalfont\bfseries #1} 717 | \list{}{\labelwidth\z@ 718 | \leftmargin 2\ccwd} 719 | \item\relax} 720 | {\endlist} 721 | 722 | \newenvironment{resumelist}[1] 723 | {{\noindent\normalfont\bfseries #1} 724 | \list{}{\labelwidth\z@ 725 | \leftmargin 4\ccwd 726 | \itemindent -2\ccwd 727 | \listparindent\itemindent} 728 | \item\relax} 729 | {\endlist} 730 | 731 | \renewenvironment{thanks}{% 732 | \chapter*{% 733 | \sjtu@label@thanks 734 | \markboth{\sjtu@label@thanks}{} 735 | } 736 | \addcontentsline{toc}{chapter}{\sjtu@label@thanks} 737 | }{} 738 | 739 | \newenvironment{summary}{% 740 | \chapter*{% 741 | \sjtu@label@summary 742 | \markboth{\sjtu@label@summary}{} 743 | } 744 | \addcontentsline{toc}{chapter}{\sjtu@label@summary} 745 | }{} 746 | 747 | \newenvironment{bigabstract}{% 748 | \cleardoublepage 749 | \pagenumbering{roman} 750 | \pagestyle{biglast} 751 | \chapter*{% 752 | \bfseries 753 | \MakeUppercase\sjtu@value@englishtitle 754 | \vskip 20pt 755 | } 756 | }{\cleardoublepage} 757 | 758 | \endinput 759 | 760 | %% 761 | %% End of file `sjtuthesis.cls'. 762 | --------------------------------------------------------------------------------