Skip to content

Commit

Permalink
Merge branch 'dev' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
weijianwen committed Aug 25, 2016
2 parents f757c2b + 82bb223 commit d3980b9
Show file tree
Hide file tree
Showing 8 changed files with 351 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ README.pdf
*.aux
*.log
*.lot
*.loa
*.out
*.toc
*.blg
Expand Down
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# What is SJTUThesis?

SJTUThesis is an *unofficial* XeLaTeX template for preparing bachelor, master, or doctor thesis in Shanghai Jiao Tong University.

# 上海交通大学学位论文模板

[English README](README_en-US.md)

这是为撰写上海交通大学学士、硕士或博士论文而准备的 XeLaTeX 模板,非官方出品。生成的学位论文文件参见 [README.pdf][README],详细使用说明参见 [SJTUThesis Wiki](https://github.com/weijianwen/SJTUThesis/wiki),欢迎大家分享使用经验。

Expand Down Expand Up @@ -49,9 +46,9 @@ SJTUThesis提供了多个稳定版供您使用,这些版本的输出结果具

| TeXLive发行版 | 参考文献处理程序 | SJTUThesis版本 |
|---------------|------------------------------|----------------|
| 2015 | biber+biblatex+caspervector | [0.9.3][0.9.3] |
| 2015 | bibtex+GBT7714-2005NLang.bst | [0.7.7][0.7.7] |
| 2014 | biber+biblatex+caspervector | [0.8.7][0.8.7] |
| 2015 | biber+biblatex+caspervector | [0.9.4][0.9.4] |
| 2015 | bibtex+GBT7714-2005NLang.bst | [0.7.8][0.7.8] |
| 2014 | biber+biblatex+caspervector | [0.8.8][0.8.8] |
| 2013 | bibtex+GBT7714-2005NLang.bst | [0.7.1][0.7.1] |

### 编译模板
Expand Down Expand Up @@ -101,7 +98,7 @@ SJTUThesis提供了多个稳定版供您使用,这些版本的输出结果具
上海交通大学校徽图片(`sjtulog.png`)和横幅图片(`sjtubanner.png`)的版权归原作者所有。其他部分使用 [Apache License 2.0](LICENSE) 授权。

[README]: https://s3.amazonaws.com/sjtuthesis/README.pdf
[0.9.3]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.9.3
[0.8.7]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.8.7
[0.7.7]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.7.7
[0.9.4]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.9.4
[0.8.8]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.8.8
[0.7.8]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.7.8
[0.7.1]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.7.1
116 changes: 116 additions & 0 deletions README_en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# What is SJTUThesis?

SJTUThesis is an *unofficial* XeLaTeX template for preparing bachelor, master, or doctor thesis in Shanghai Jiao Tong University.

The generated thesis example PDF file can be found at `README.pdf` (this file has been removed, see weijianwen/SJTUThesis/#26 contributing PDF into repo will increase the repo size) . The user guide will be found at [SJTUThesis Wiki](https://github.com/weijianwen/SJTUThesis/wiki),welcome for contribution。

## User Guide

`SJTUThesis` can be compile at your local machine, or on the Cloud service.

### System Requirement of Locally Compile

#### TeX Distribution

SJTUThesis requires XeTeX。[TeXLive](https://www.tug.org/texlive/) distributed on 2014 and 2015, [MacTeX](https://www.tug.org/mactex/) released distribution can be used for compile this Template. CTeX(2.9.2) in Windows can be also compile this successfully.

[Babun](http://babun.github.io/) is recommended for **Windows User** as the `bash` terminal, which contains `git`, `GNUmake` and `perl` by default.

#### Fonts

Chinese contents depend on four Adobe Simplified Chinese fonts, and English depends on TeX Gyre Termes font. Tex Gyre Termes can be found from [CTAN](http://www.ctan.org/tex-archive/fonts/tex-gyre/fonts/opentype/public/tex-gyre) . However, in order NOT to violate the font license, we don't provide AdobeSongStd, AdobeKaitiStd, AdobeHeitiStd or AdobeFangsongStd. (see weijianwen/SJTUThesis/#74 )

### Cloud Compiling by ShareLaTeX

[ShareLaTeX](https://www.sharelatex.com/) can be used for compiling the SJTUThesis 0.8.1.
Copy the page named [SJTUThesis-0.8](https://www.sharelatex.com/project/56701ac8d63cd1d9646a622f) and then start to write your thesis.

For details, please read [Usage](https://github.com/weijianwen/SJTUThesis/wiki/Usage).

### Get the Template

Determine the `git branch` you will use depending on your system environment. `clone` this repo or download the stable distribution package.

#### Git Clone

# clone a new copy
cd
git clone https://github.com/weijianwen/SJTUThesis.git
# OR update the latest code from Github
git pull origin master
# OR update to your fork repo
git pull upstream master


#### Release Package

SJTUThesis provides multiple stale release package, the are used under different TeXLive distribution and different `bib` compiler:

| TeXLive distribution | bibliography compiler | SJTUThesis version |
|---------------|------------------------------|----------------|
| 2015 | biber+biblatex+caspervector | [0.9.3][0.9.3] |
| 2015 | bibtex+GBT7714-2005NLang.bst | [0.7.7][0.7.7] |
| 2014 | biber+biblatex+caspervector | [0.8.7][0.8.7] |
| 2013 | bibtex+GBT7714-2005NLang.bst | [0.7.1][0.7.1] |

### Compiling the SJTUThesis

# compile the SJTUThesis on --watch mode
make pvc
# compile, build and release the final PDF
make clean thesis.pdf

Adding `review` option in `thesis.tex` can remove the name of your supervisor and you
in order to submit for blind review.

\documentclass[master, adobefonts, review]{sjtuthesis}

The location of _Original Work Declaration_ and _Authorization_ must be `./pdf`:

\includepdf{pdf/original.pdf}
\cleardoublepage
\includepdf{pdf/authorization.pdf}
\cleardoublepage


#### Windows User Guide

Double click the `complie.bat`, the final PDF file will be named as `thesis.pdf`.


### Word Count

make wordcount

### Diagnosis

# compile manully when fail to `make`
xelatex -no-pdf thesis
biber --debug thesis
xelatex thesis
xelatex thesis

## Feedback

We are hearing from:

* [issue page of Github](https://github.com/weijianwen/SJTUThesis/issues)
* [SJTU BBS](https://bbs.sjtu.edu.cn/bbsdoc?board=TeX_LaTeX)

## Further Plan

* Code refactor,
* Improve the style of Chapter title page

## License

The copyright of image sources including SJTU badge (`sjtulog.png`) and
banner (`sjtubanner.png`) belongs to the original owner.

The remain part is under [Apache License 2.0](LICENSE)

[README]: https://s3.amazonaws.com/sjtuthesis/README.pdf
[0.9.3]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.9.3
[0.8.7]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.8.7
[0.7.7]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.7.7
[0.7.1]: https://github.com/weijianwen/SJTUThesis/releases/tag/0.7.1
12 changes: 6 additions & 6 deletions compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ if exist thesis.pdf (

echo Compile...
echo xelatex -no-pdf thesis...
xelatex -no-pdf thesis >nul
xelatex -no-pdf thesis > nul
echo biber --debug thesis...
biber --debug thesis >nul
biber --debug thesis > nul
echo xelatex thesis...
xelatex thesis >nul
xelatex thesis >nul
xelatex thesis > nul
xelatex thesis > nul
echo clean files...
del *.aux *.run.xml *.bcf *.log *.xdv *.bbl *.bak *.blg *.out *.thm *.toc *.synctex* *.glg *.glo *.gls *.ist *.idx *.ilg *.ind *.acn *.acr *.lof *.lot *.alg *.glsdefs >nul 2>nul
del *.aux *.run.xml *.bcf *.log *.xdv *.bbl *.bak *.blg *.out *.thm *.toc *.synctex* *.glg *.glo *.gls *.ist *.idx *.ilg *.ind *.acn *.acr *.lof *.lot *.loa *.alg *.glsdefs >nul 2>nul
cd tex
del *.aux *.run.xml *.bcf *.log *.xdv *.bbl *.bak *.blg *.out *.thm *.toc *.synctex* *.glg *.glo *.gls *.ist *.idx *.ilg *.ind *.acn *.acr *.lof *.lot *.alg *.glsdefs >nul 2>nul
del *.aux *.run.xml *.bcf *.log *.xdv *.bbl *.bak *.blg *.out *.thm *.toc *.synctex* *.glg *.glo *.gls *.ist *.idx *.ilg *.ind *.acn *.acr *.lof *.lot *.loa *.alg *.glsdefs >nul 2>nul
echo finish...
pause
93 changes: 68 additions & 25 deletions sjtuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
\RequirePackage[inline]{enumitem}
\RequirePackage{pdfpages}
\RequirePackage{calc}
\RequirePackage{algorithm, algorithmic}
\RequirePackage{algorithm, algorithmicx, algpseudocode}
\RequirePackage{siunitx}
\RequirePackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
Expand Down Expand Up @@ -128,8 +128,11 @@
\ctexset{listfigurename={\sjtu@listfigurename}}
\ctexset{listtablename={\sjtu@listtablename}}
\floatname{algorithm}{\sjtu@label@algo}
\renewcommand{\algorithmicrequire}{\textbf{输入:}}
\renewcommand{\algorithmicensure}{\textbf{输出:}}
\renewcommand{\listalgorithmname}{\sjtu@listalgorithmname}
\renewcommand{\lstlistingname}{\sjtu@value@listingname}

% Title Settings at the chapter Level
\ctexset{chapter={
nameformat={\Large\bfseries},
Expand Down Expand Up @@ -258,25 +261,33 @@
\newtheorem{bcor}[thm]{\sjtu@label@cor~}
\renewcommand{\proofname}{\bf\sjtu@label@proof}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following definitions are to extend the LaTeX algorithmic
% package with SWITCH statements and one-line structures.
% The extension is by
% Prof. Farn Wang
% Dept. of Electrical Engineering,
% National Taiwan University.
%
\newcommand{\SWITCH}[1]{\STATE \textbf{switch} (#1)}
\newcommand{\ENDSWITCH}{\STATE \textbf{end switch}}
\newcommand{\CASE}[1]{\STATE \textbf{case} #1\textbf{:} \begin{ALC@g}}
\newcommand{\ENDCASE}{\end{ALC@g}}
\newcommand{\CASELINE}[1]{\STATE \textbf{case} #1\textbf{:} }
\newcommand{\DEFAULT}{\STATE \textbf{default:} \begin{ALC@g}}
\newcommand{\ENDDEFAULT}{\end{ALC@g}}
\newcommand{\DEFAULTLINE}[1]{\STATE \textbf{default:} }
%
% End of the LaTeX algorithmic package extension.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following definitions add Switch statement to LaTeX algorithmicx package
% It's based on Werner's answer on stackoverflow
% http://tex.stackexchange.com/questions/53357/switch-cases-in-algorithmic

% New definitions
\algnewcommand\algorithmicswitch{\textbf{switch}}
\algnewcommand\algorithmiccase{\textbf{case}}
\algnewcommand\algorithmicdefault{\textbf{default}}

% New "environments"
% using \algtext*{<env>} removes any typesetting of that command
\algdef{SE}[SWITCH]{Switch}{EndSwitch}[1]{\algorithmicswitch\ (#1)}{\algorithmicend\ \algorithmicswitch}%
%\algtext*{EndSwitch}%
\algdef{SE}[CASE]{Case}{EndCase}[1]{\algorithmiccase\ #1:}{\algorithmicend\ \algorithmiccase}%
\algtext*{EndCase}%
\algdef{SE}[DEFAULT]{Default}{EndDefault}{\algorithmicdefault\ :}{\algorithmicend\ \algorithmicdefault}%
\algtext*{EndDefault}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following add some extra commands to LaTeX algorithmicx package

% Assert
\algnewcommand\algorithmicassert{\texttt{assert}}
\algnewcommand\Assert[1]{\State \algorithmicassert(#1)}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%==========
% Segment 4. Draw the sjtuthesis
Expand Down Expand Up @@ -422,15 +433,23 @@
\fancyhf{}
\fancyhead[L]{\includegraphics[width=0.22\textwidth]{figure/sjtubanner}}
\fancyhead[R]{\nouppercase{\small\kaishu\sjtu@value@titlemark}}
\fancyfoot[C]{\small 第~{\bfseries\thepage}~页\,共~{\bfseries\pageref{LastPage}}~页}
\fancyfoot[C]{\small 第~{\bfseries\thepage}~页\,共~{\bfseries\pageref{last}}~页}
\renewcommand{\headheight}{32pt}
}
%% 英文大摘要
\fancypagestyle{biglast}{
\fancyhf{}
\fancyhead[L]{\includegraphics[width=0.22\textwidth]{figure/sjtubanner}}
\fancyhead[R]{\nouppercase{\small\kaishu\sjtu@value@titlemark}}
\fancyfoot[C]{\small 第~{\bfseries\thepage}~页\,共~{\bfseries\pageref{biglast}}~页}
\renewcommand{\headheight}{32pt}
}
%% 开章页页眉页脚
\fancypagestyle{plain}{% 设置开章页页眉页脚风格(只有页码作为页脚)
\fancyhf{}%
\fancyhf{}
\fancyhead[L]{\nouppercase{\small\kaishu\includegraphics[width=0.22\textwidth]{figure/sjtubanner}}}
\fancyhead[R]{\nouppercase{\small\kaishu\sjtu@value@titlemark}}
\fancyfoot[C]{\small 第~{\bf\thepage}~页\,共~{\bf\pageref{LastPage}}~页}
\fancyfoot[C]{\small 第~{\bf\thepage}~页\,共~{\bf\pageref{last}}~页}
\renewcommand{\headheight}{32pt}
}
\else
Expand Down Expand Up @@ -570,14 +589,38 @@
{\endlist}

\renewenvironment{thanks}
{\chapter{\sjtu@label@thanks}}
{\chapter{\sjtu@label@thanks}\label{last}}
{}

\newenvironment{summary}
{\chapter*{\sjtu@label@summary\markboth{\sjtu@label@summary}{}}\addcontentsline{toc}{chapter}{\sjtu@label@summary}
}{}

\newenvironment{symbolnote}{\chapter{\sjtu@label@symbolnote}}{}
\newenvironment{symbolnote}{\chapter{\sjtu@label@symbolnote}
}{}

\newenvironment{bigabstract}
{
\setcounter{page}{1}
\fancypagestyle{biglast}{
\fancyhf{}
\fancyhead[L]{\includegraphics[width=0.22\textwidth]{figure/sjtubanner}}
\fancyhead[R]{\nouppercase{\small\kaishu\sjtu@value@titlemark}}
\fancyfoot[C]{\small 第~{\bfseries\thepage}~页\,共~{\bfseries\pageref{biglast}}~页}
\renewcommand{\headheight}{32pt}
}

\fancypagestyle{plain}{% 设置开章页页眉页脚风格(只有页码作为页脚)
\fancyhf{}
\fancyhead[L]{\includegraphics[width=0.22\textwidth]{figure/sjtubanner}}
\fancyhead[R]{\nouppercase{\small\kaishu\sjtu@value@titlemark}}
\fancyfoot[C]{\small 第~{\bf\thepage}~页\,共~{\bf\pageref{biglast}}~页}
\renewcommand{\headheight}{32pt}
}

\chapter*{\bf\MakeUppercase{\sjtu@value@englishtitle}\vskip 20pt }
}
{\label{biglast}}

\endinput

Expand Down
23 changes: 23 additions & 0 deletions tex/end_english_abstract.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%# -*- coding: utf-8-unix -*-
\begin{bigabstract}
Affronting discretion as do is announcing. Now months esteem oppose nearer enable too six. She numerous unlocked you perceive speedily. Affixed offence spirits or ye of offices between. Real on shot it were four an as. Absolute bachelor rendered six nay you juvenile. Vanity entire an chatty to.

Admiration we surrounded possession frequently he. Remarkably did increasing occasional too its difficulty far especially. Known tiled but sorry joy balls. Bed sudden manner indeed fat now feebly. Face do with in need of wife paid that be. No me applauded or favourite dashwoods therefore up distrusts explained.

Is education residence conveying so so. Suppose shyness say ten behaved morning had. Any unsatiable assistance compliment occasional too reasonably advantages. Unpleasing has ask acceptance partiality alteration understood two. Worth no tiled my at house added. Married he hearing am it totally removal. Remove but suffer wanted his lively length. Moonlight two applauded conveying end direction old principle but. Are expenses distance weddings perceive strongly who age domestic.

Unpleasant astonished an diminution up partiality. Noisy an their of meant. Death means up civil do an offer wound of. Called square an in afraid direct. Resolution diminution conviction so mr at unpleasing simplicity no. No it as breakfast up conveying earnestly immediate principle. Him son disposed produced humoured overcame she bachelor improved. Studied however out wishing but inhabit fortune windows.

Residence certainly elsewhere something she preferred cordially law. Age his surprise formerly mrs perceive few stanhill moderate. Of in power match on truth worse voice would. Large an it sense shall an match learn. By expect it result silent in formal of. Ask eat questions abilities described elsewhere assurance. Appetite in unlocked advanced breeding position concerns as. Cheerful get shutters yet for repeated screened. An no am cause hopes at three. Prevent behaved fertile he is mistake on.

Rendered her for put improved concerns his. Ladies bed wisdom theirs mrs men months set. Everything so dispatched as it increasing pianoforte. Hearing now saw perhaps minutes herself his. Of instantly excellent therefore difficult he northward. Joy green but least marry rapid quiet but. Way devonshire introduced expression saw travelling affronting. Her and effects affixed pretend account ten natural. Need eat week even yet that. Incommode delighted he resolving sportsmen do in listening.

Sex and neglected principle ask rapturous consulted. Object remark lively all did feebly excuse our wooded. Old her object chatty regard vulgar missed. Speaking throwing breeding betrayed children my to. Me marianne no he horrible produced ye. Sufficient unpleasing an insensible motionless if introduced ye. Now give nor both come near many late.

Is branched in my up strictly remember. Songs but chief has ham widow downs. Genius or so up vanity cannot. Large do tried going about water defer by. Silent son man she wished mother. Distrusts allowance do knowledge eagerness assurance additions to.

Fat son how smiling mrs natural expense anxious friends. Boy scale enjoy ask abode fanny being son. As material in learning subjects so improved feelings. Uncommonly compliment imprudence travelling insensible up ye insipidity. To up painted delight winding as brandon. Gay regret eat looked warmth easily far should now. Prospect at me wandered on extended wondered thoughts appetite to. Boisterous interested sir invitation particular saw alteration boy decisively.

Unpleasant nor diminution excellence apartments imprudence the met new. Draw part them he an to he roof only. Music leave say doors him. Tore bred form if sigh case as do. Staying he no looking if do opinion. Sentiments way understood end partiality and his.

\end{bigabstract}
Loading

0 comments on commit d3980b9

Please sign in to comment.