From 4fd6e8484e74b6c2bbed270c1c305d01ca57cafd Mon Sep 17 00:00:00 2001 From: mohuangrui Date: Tue, 9 Apr 2019 20:43:55 +0800 Subject: [PATCH] New Release Former-commit-id: fd73e534d58ae75cf278a1bec1f0f809ad1396db --- README.md | 4 +- Style/artracom.sty | 2 +- Style/artratex.sty | 248 +++++++++--------- Style/ucasthesis.cls | 28 +- Tex/Backmatter.tex | 5 +- Tex/Chap_Guide.tex | 46 +--- Tex/Chap_Intro.tex | 4 +- Tex/{Frontpages.tex => Frontinfo.tex} | 29 +- Tex/Frontmatter.tex | 31 +++ Thesis.tex | 17 +- ...50\257\264\346\230\216.pdf.REMOVED.git-id" | 1 - ...50\257\264\346\230\216.pdf.REMOVED.git-id" | 1 + 12 files changed, 219 insertions(+), 197 deletions(-) rename Tex/{Frontpages.tex => Frontinfo.tex} (60%) create mode 100644 Tex/Frontmatter.tex delete mode 100644 "\346\250\241\346\235\277\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" create mode 100644 "\346\250\241\347\211\210\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" diff --git a/README.md b/README.md index 91a37cbd..44af392d 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,12 @@ ## 重要通知 -* `2019-04-04` 模板样式进行了修改,请查看下面的修改描述,以决定是否需要更新。 +* `2019-04-09` 模板样式进行了修改,请查看下面的修改描述,以决定是否需要更新。 ## 更新记录 +* `2019-04-09` 对部分宏命令进行调整,无功能及样式上的修改。若需更新,建议参考 [更新指南](https://github.com/mohuangrui/ucasthesis/wiki/更新指南)。 + * `2019-04-04` 根据 [liuy334, songchunlin, issue #134](https://github.com/mohuangrui/ucasthesis/issues/134) ,调整行距使 LaTeX 版与 Word 版的行数和每行字数相一致。 * `2019-03-28` 根据 [zssasa, allenwoods, issue #49](https://github.com/mohuangrui/ucasthesis/issues/49) ,修复 bicaption 对 longtable 的兼容性。根据 [BowenHou, issue #133](https://github.com/mohuangrui/ucasthesis/issues/133) ,使下划线能对长标题自动换行。 diff --git a/Style/artracom.sty b/Style/artracom.sty index ab6629d3..7c44ea13 100644 --- a/Style/artracom.sty +++ b/Style/artracom.sty @@ -12,7 +12,7 @@ %->> Identification %---------------------------------------------------------------------------% \NeedsTeXFormat{LaTeX2e}% -\ProvidesPackage{artracom}[2014/10/01 v0.1 LaTeX macros package]% +\ProvidesPackage{artracom}[2014/10/01 v1.0 LaTeX macros package]% %---------------------------------------------------------------------------% %->> Declare options %---------------------------------------------------------------------------% diff --git a/Style/artratex.sty b/Style/artratex.sty index 55061a2e..d2c2def1 100644 --- a/Style/artratex.sty +++ b/Style/artratex.sty @@ -12,10 +12,12 @@ %->> Identification %---------------------------------------------------------------------------% \NeedsTeXFormat{LaTeX2e}% -\ProvidesPackage{artratex}[2014/10/01 v0.1 LaTeX macros package]% +\ProvidesPackage{artratex}[2014/10/01 v1.0 LaTeX macros package]% %---------------------------------------------------------------------------% %->> Declare options %---------------------------------------------------------------------------% +\RequirePackage{ifthen}% support conditionals +\RequirePackage{etoolbox}% a toolbox of programming facilities %- %-> Platform fontset , , , , %- @@ -29,7 +31,6 @@ \newif\ifartx@adobe \artx@adobefalse \newif\ifartx@times \artx@timesfalse \newif\ifartx@others \artx@othersfalse -\RequirePackage{etoolbox}% a toolbox of programming facilities \newcommand{\artxifstreq}{\expandafter\ifstrequal\expandafter}% expansion control \artxifstreq{\artxfontset}{windows}{\artx@windowstrue\artx@timestrue}{% \artxifstreq{\artxfontset}{mac}{\artx@mactrue\artx@timestrue}{% @@ -111,9 +112,9 @@ %- %-> Header and footer %- -\newif\ifartx@myhdr \artx@myhdrfalse -\DeclareOption{myhdr}{% - \artx@myhdrtrue +\newif\ifartx@xhf \artx@xhftrue +\DeclareOption{xhf}{% + \artx@xhffalse } %- %-> Color support @@ -122,6 +123,10 @@ \DeclareOption{color}{% \artx@colortrue } +\newif\ifartx@xlink \artx@xlinkfalse +\DeclareOption{xlink}{% + \artx@xlinktrue +} %- %-> Page background %- @@ -171,8 +176,11 @@ %- \ProcessOptions\relax% %---------------------------------------------------------------------------% -%->> Detect class and counter +%->> Package macros %---------------------------------------------------------------------------% +%- +%-> Detect class and counter +%- \newcommand*{\artxifcnt}[1]{% check if counter exists \ifcsname c@#1\endcsname% \expandafter\@firstoftwo% @@ -181,6 +189,57 @@ \fi } \artxifcnt{chapter}{\def\artxmaincnt{chapter}}{\def\artxmaincnt{section}}% +%- +%-> Nomenclature item +%- +\providecommand{\nomenclatureitem}[3][ ]{% + \noindent\makebox[0.15\textwidth][l]{#2}{{#3}\hfill{#1}}\par +} +%- +%-> Macro for adding link to toc and bookmark +%- +\long\def\artxaux#1{}% auxiliary command +\newcommand{\intotocnostar}[3]{% [<\chapter|...>,<*>,] + #1#2{% excute command + \phantomsection% create bookmark link + \addcontentsline{toc}{\expandafter\artxaux\string#1}{#3}% add content #3 to toc as #1 + #3% + } + \markboth{\MakeUppercase{#3}}{}% set header mark +} +\newcommand{\intotocstar}[3][\artxmaincnt]{% [<chapter|...>,<extra commands>,<title>] + #2% excute command + \phantomsection% create bookmark link + \addcontentsline{toc}{#1}{#3}% add content #3 to toc as #1 + \markboth{\MakeUppercase{#3}}{}% set header mark +} +\newcommand{\intotoc}{\@ifstar{\intotocstar}{\intotocnostar}}% swap starred and non-starred versions +\newcommand{\intobmknostar}[4][0]{% [<level>,<\chapter|...>,<*>,<title>] + #2#3{% excute command + \phantomsection% create bookmark link + \Hy@writebookmark% write bookmark + {}% + {#4}% + {\@currentHref}% + {#1}% + {toc}% + #4% + }% + \markboth{\MakeUppercase{#4}}{}% set header mark +} +\newcommand{\intobmkstar}[3][0]{% [<level>,<extra commands>,<title>] + #2% excute command + \phantomsection% create bookmark link + \Hy@writebookmark% write bookmark + {}% + {#3}% + {\@currentHref}% + {#1}% + {toc}% + \markboth{\MakeUppercase{#3}}{}% set header mark +} +\newcommand{\intobmk}{\@ifstar{\intobmkstar}{\intobmknostar}}% swap starred and non-starred versions +%\newcommand{\rmlbk}[1]{\begingroup\def\\{\relax\ifhmode\unskip\fi\space\ignorespaces}#1\endgroup}% remove line breaks %---------------------------------------------------------------------------% %->> Required packages %---------------------------------------------------------------------------% @@ -393,7 +452,7 @@ \RequirePackage{pdflscape}% landscape environment \RequirePackage[absolute]{textpos}% rotated page number \fi -\ifartx@myhdr% header and footer style +\ifartx@xhf% header and footer style \RequirePackage{fancyhdr}% fancy headers and footers \fi %\RequirePackage{microtype}% improves general appearance of the text @@ -437,29 +496,35 @@ \def\ALG@name{\algname}% rename label \fi %- -%-> Links support -%- -\RequirePackage{hyperref}% -\hypersetup{% set hyperlinks - %bookmarks=true,% show bookmarks bar - pdfencoding=auto,% allows non-Latin based languages in bookmarks - %pdftitle={},% title - %pdfauthor={},% author - %pdfsubject={},% subject - %pdftoolbar=true,% show toolbar - %pdfmenubar=true,% show menu - pdffitwindow=false,% window fit to page when opened - pdfstartview={FitH},% fits the width of the page to the window - %pdfnewwindow=true,% links in new window - %backref=true,% do bibliographical back references - %pagebackref=true,% backreference by page number - colorlinks=true,% false: boxed links; true: colored links - linkcolor=black,% color of internal links - citecolor=blue,% color of links to bibliography - %filecolor=magenta,% color of file links - urlcolor=red,% color of external links - bookmarksnumbered=true,% put section numbers in bookmarks - %hidelinks% remove link color and border +%-> Link support +%- +\AtEndPreamble{% + \RequirePackage{hyperref}% load at last + \hypersetup{% set hyperlinks + pdfencoding=auto,% allows non-Latin based languages in bookmarks + %bookmarks=true,% show bookmarks bar + bookmarksnumbered=true,% put section numbers in bookmarks + pdftitle={\@title},% title + pdfauthor={\@author},% author + pdfsubject={\@title},% subject + %pdftoolbar=true,% show toolbar + %pdfmenubar=true,% show menu + pdffitwindow=false,% window fit to page when opened + pdfstartview={FitH},% fits the width of the page to the window + %pdfnewwindow=true,% links in new window + %backref=true,% do bibliographical back references + %pagebackref=true,% backreference by page number + colorlinks=true,% false: boxed links; true: colored links + linkcolor=black,% color of internal links + citecolor=blue,% color of links to bibliography + filecolor=blue,% color of file links + urlcolor=blue,% color of external links + } + \ifartx@xlink% set link color to black + \hypersetup{% set hyperlinks + hidelinks,% remove link color and border + } + \fi } %---------------------------------------------------------------------------% %->> Configuration command @@ -502,119 +567,67 @@ \fi \renewcommand*{\bibfont}{\small}% set font size for bibliography %- -%-> Nomenclature item -%- -\providecommand{\nomenclatureitem}[3][ ]{% - \noindent\makebox[0.15\textwidth][l]{#2}{{#3}\hfill{#1}}\par -} -%- -%-> Macro for adding link to toc and bookmark -%- -\long\def\artxaux#1{}% auxiliary command -\newcommand{\intotocnostar}[3]{% [<\chapter|...>,<*>,<title>] - #1#2{% excute command - \phantomsection% create bookmark link - \addcontentsline{toc}{\expandafter\artxaux\string#1}{#3}% add content #3 to toc as #1 - #3% - } - \markboth{\MakeUppercase{#3}}{}% set header mark -} -\newcommand{\intotocstar}[3][\artxmaincnt]{% [<chapter|...>,<extra commands>,<title>] - #2% excute command - \phantomsection% create bookmark link - \addcontentsline{toc}{#1}{#3}% add content #3 to toc as #1 - \markboth{\MakeUppercase{#3}}{}% set header mark -} -\newcommand{\intotoc}{\@ifstar{\intotocstar}{\intotocnostar}}% swap starred and non-starred versions -\newcommand{\intobmknostar}[4][0]{% [<level>,<\chapter|...>,<*>,<title>] - #2#3{% excute command - \phantomsection% create bookmark link - \Hy@writebookmark% write bookmark - {}% - {#4}% - {\@currentHref}% - {#1}% - {toc}% - #4% - }% - \markboth{\MakeUppercase{#4}}{}% set header mark -} -\newcommand{\intobmkstar}[3][0]{% [<level>,<extra commands>,<title>] - #2% excute command - \phantomsection% create bookmark link - \Hy@writebookmark% write bookmark - {}% - {#3}% - {\@currentHref}% - {#1}% - {toc}% - \markboth{\MakeUppercase{#3}}{}% set header mark -} -\newcommand{\intobmk}{\@ifstar{\intobmkstar}{\intobmknostar}}% swap starred and non-starred versions -%- %-> Page header and footer Style %- %- Page styles in Latex refers to headers and footers of a document. %- These headers/footers typically contain document titles, chapter %- or section numbers/names, and page numbers. %- Configure fancy style -\ifartx@myhdr% user defined header and footer style +\ifartx@xhf% user defined header and footer style \pagestyle{fancy}% - \providecommand{\chaptermark}{}% compatibility for non-book classes - \providecommand{\thechapter}{}% compatibility for non-book classes - \providecommand{\CTEXthechapter}{\thechapter.}% compatibility for non ctex classes - %- reset style of chapter and section mark to actual name - \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}% - \renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{#1}}{}}% - %- deactivate uppercase effect + \artxifcnt{chapter}{% + \providecommand{\CTEXthechapter}{\thechapter.}% compatibility for non ctex classes + \let\artxmark\CTEXthechapter% + \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{#1}}{}}% reset mark to actual name + \renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{#1}}{}}% reset mark to actual name + }{% + \providecommand{\CTEXthesection}{\thesection.}% compatibility for non ctex classes + \let\artxmark\CTEXthesection% + \renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{#1}}{}}% reset mark to actual name + }% + %- Deactivate uppercase effect \renewcommand{\MakeUppercase}[1]{#1}% %- Define different kinds of header and footer for different parts \fancypagestyle{frontmatterstyle}{% style for frontmatter \fancyhf{}% clear fields - \fancyhead[CE]{\footnotesize \@title}% structure elements - \fancyhead[CO]{\footnotesize \leftmark}% structure elements - \fancyfoot[CE]{\footnotesize \thepage}% page number - \fancyfoot[CO]{\footnotesize \thepage}% page number + \fancyhead[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\leftmark}{\@title}}% structure elements + \fancyfoot[C]{\footnotesize \thepage}% page number \renewcommand{\headrulewidth}{0.8pt}% header rule \renewcommand{\footrulewidth}{0pt}% footer rule } \fancypagestyle{mainmatterstyle}{% style for mainmatter \fancyhf{}% clear fields - \fancyhead[CE]{\footnotesize \@title}% structure elements - \fancyhead[CO]{\footnotesize \CTEXthechapter\ \leftmark}% structure elements - \fancyfoot[LE]{\footnotesize \thepage}% page number - \fancyfoot[RO]{\footnotesize \thepage}% page number + \fancyhead[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\artxmark\ \leftmark}{\@title}}% structure elements + \fancyfoot[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\hspace*{\fill}\thepage}{\thepage\hspace*{\fill}}}% page number \renewcommand{\headrulewidth}{0.8pt}% header rule \renewcommand{\footrulewidth}{0pt}% footer rule } \fancypagestyle{backmatterstyle}{% header and footer style for backmatter \fancyhf{}% clear fields - \fancyhead[CE]{\footnotesize \@title}% structure elements - \fancyhead[CO]{\footnotesize \leftmark}% structure elements - \fancyfoot[LE]{\footnotesize \thepage}% page number - \fancyfoot[RO]{\footnotesize \thepage}% page number + \fancyhead[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\leftmark}{\@title}}% structure elements + \fancyfoot[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\hspace*{\fill}\thepage}{\thepage\hspace*{\fill}}}% page number \renewcommand{\headrulewidth}{0.8pt}% header rule \renewcommand{\footrulewidth}{0pt}% footer rule } %- Redefine \frontmatter to include the change \providecommand{\frontmatter}{}% compatibility for non-book classes - \let\myfrontmatter\frontmatter% + \let\artxfrontmatter\frontmatter% \renewcommand{\frontmatter}{% - \myfrontmatter% + \artxfrontmatter% \pagestyle{frontmatterstyle}% } %- Redefine \mainmatter to include the change \providecommand{\mainmatter}{}% compatibility for non-book classes - \let\mymainmatter\mainmatter% + \let\artxmainmatter\mainmatter% \renewcommand{\mainmatter}{% - \mymainmatter% + \artxmainmatter% \pagestyle{mainmatterstyle}% } %- Redefine \backmatter to include the change \providecommand{\backmatter}{}% compatibility for non-book classes - \let\mybackmatter\backmatter% + \let\artxbackmatter\backmatter% \renewcommand{\backmatter}{% - \mybackmatter% + \artxbackmatter% \pagestyle{backmatterstyle}% } %- Some Latex commands, like \chapter, use the \thispagestyle command @@ -629,10 +642,8 @@ } \fancypagestyle{noheaderstyle}{% header and footer style for no header \fancyhf{}% clear fields - %\fancyhead[CE]{\footnotesize \@title}% structure elements - %\fancyhead[CO]{\footnotesize \leftmark}% structure elements - \fancyfoot[LE]{\footnotesize \thepage}% page number - \fancyfoot[RO]{\footnotesize \thepage}% page number + %\fancyhead[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\leftmark}{\@title}}% structure elements + \fancyfoot[C]{\footnotesize \ifthenelse{\isodd{\value{page}}}{\hspace*{\fill}\thepage}{\thepage\hspace*{\fill}}}% page number \renewcommand{\headrulewidth}{0pt}% header rule \renewcommand{\footrulewidth}{0pt}% footer rule } @@ -643,7 +654,7 @@ \ifartx@lscape% \fancypagestyle{lscape}{% landscape layout style \fancyhf{}% clear fields - \fancyfoot[CE,CO]{% + \fancyfoot[C]{% %- textpos: \begin{textblock}{<blockwidth>}[0.5,0.5](<hpos>,<vpos>) text... \end{textblock} %- origin of the absolute coordinate is the top-left corner of the page %- [0.5,0.5] means reference point of the block is the middle @@ -656,10 +667,13 @@ \renewcommand{\footrulewidth}{0pt}% footer rule } \fi +%- +%-> Configure list environment +%- \ifartx@list% enable enhanced list - \definecolor{mygreen}{rgb}{0,0.6,0} - \definecolor{mygray}{rgb}{0.5,0.5,0.5} - \definecolor{mymauve}{rgb}{0.58,0,0.82} + \definecolor{artxgreen}{rgb}{0,0.6,0} + \definecolor{artxgray}{rgb}{0.5,0.5,0.5} + \definecolor{artxmauve}{rgb}{0.58,0,0.82} \lstset{% numberbychapter=false,% numbered sequentially or by chapter backgroundcolor=\color{white},% background color; @@ -667,7 +681,7 @@ breakatwhitespace=false,% sets if automatic breaks should only happen at whitespace breaklines=true,% sets automatic line breaking captionpos=b,% caption-position to bottom - commentstyle=\color{mygreen},% comment style + commentstyle=\color{artxgreen},% comment style %deletekeywords={...},% delete keywords from the given language frame=single,% adds a frame around the code keepspaces=true,% keeps spaces in text for keeping indentation of code @@ -675,13 +689,13 @@ %otherkeywords={*,...},% add more keywords to the set numbers=left,% where to put the line-numbers; possible values are (none, left, right) numbersep=5pt,% how far the line-numbers are from the code - numberstyle=\tiny\color{mygray},% the style that is used for the line-numbers + numberstyle=\tiny\color{artxgray},% the style that is used for the line-numbers rulecolor=\color{black},% if not set, the frame-color may be changed on line-breaks showspaces=false,% show spaces everywhere adding particular underscores; showstringspaces=false,% underline spaces within strings only showtabs=false,% show tabs within strings adding particular underscores stepnumber=2,% the step between two line-numbers. If it's 1, each line will be numbered - stringstyle=\color{mymauve},% string literal style + stringstyle=\color{artxmauve},% string literal style tabsize=2,% sets default tabsize to 2 spaces title=\lstname% show the filename of files } diff --git a/Style/ucasthesis.cls b/Style/ucasthesis.cls index d79b9be3..32a9d4e2 100644 --- a/Style/ucasthesis.cls +++ b/Style/ucasthesis.cls @@ -19,16 +19,16 @@ %- %-> Layout %- -\DeclareOption{singlesided}{% enable single-sided printing +\DeclareOption{oneside}{% \PassOptionsToClass{oneside}{ctexbook}% } -\DeclareOption{doublesided}{% enable double-sided printing +\DeclareOption{twoside}{% \PassOptionsToClass{twoside}{ctexbook}% } -\newif\ifucas@printcopy \ucas@printcopyfalse -\DeclareOption{printcopy}{% enable print copy layout +\newif\ifucas@print \ucas@printfalse +\DeclareOption{print}{% \PassOptionsToClass{twoside}{ctexbook}% - \ucas@printcopytrue% + \ucas@printtrue% } %- %-> Language @@ -87,7 +87,7 @@ %- assuming A4 paper (210mm x 297mm) \setlength{\textwidth}{146.6mm}% set required text width first \setlength{\hoffset}{0mm}% set horizontal offset -\ifucas@printcopy% if print copy layout enabled +\ifucas@print% if print layout enabled \setlength{\oddsidemargin}{12.6mm}% binding side margin \setlength{\evensidemargin}{0mm}% ensure uniform binding side width for printing \else @@ -152,7 +152,6 @@ \def\ucas@value@ch@title{#2} %\def\ucas@value@ch@titlemark{\MakeUppercase{#1}}} \def\ucas@value@ch@titlemark{#1}} -\renewcommand{\@title}{\ucas@value@ch@titlemark} \def\ucas@value@ch@author{} \renewcommand{\author}[1]{\def\ucas@value@ch@author{#1}} \def\ucas@value@ch@advisor{} @@ -248,12 +247,21 @@ \cleardoublepage[empty] \fi \fi + \ifucas@print% + \hypersetup{% set hyperlinks + hidelinks,% remove link color and border + } + \fi } %- %-> English item commands %- \def\ucas@value@en@title{} -\newcommand{\TITLE}[1]{\def\ucas@value@en@title{#1}} +\def\ucas@value@en@titlemark{} +\newcommand{\TITLE}[2][\ucas@value@en@title]{% + \def\ucas@value@en@title{#2} + %\def\ucas@value@en@titlemark{\MakeUppercase{#1}}} + \def\ucas@value@en@titlemark{#1}} \def\ucas@value@en@author{} \newcommand{\AUTHOR}[1]{\def\ucas@value@en@author{#1}} \def\ucas@value@en@advisor{} @@ -400,6 +408,8 @@ \def\examplename{\ucas@label@en@examplename} \def\remarkname{\ucas@label@en@remarkname} \def\proofname{\ucas@label@en@proofname} + \def\@title{\ucas@value@en@titlemark} + \def\@author{\ucas@value@en@author} \else \def\contentsname{\ucas@label@ch@tocname} \def\listfigurename{\ucas@label@ch@lsfigname} @@ -420,6 +430,8 @@ \def\examplename{\ucas@label@ch@examplename} \def\remarkname{\ucas@label@ch@remarkname} \def\proofname{\ucas@label@ch@proofname} + \def\@title{\ucas@value@ch@titlemark} + \def\@author{\ucas@value@ch@author} \fi %---------------------------------------------------------------------------% %->> Structure layout diff --git a/Tex/Backmatter.tex b/Tex/Backmatter.tex index 393e0935..8845063f 100644 --- a/Tex/Backmatter.tex +++ b/Tex/Backmatter.tex @@ -1,3 +1,6 @@ +%---------------------------------------------------------------------------% +%->> Backmatter +%---------------------------------------------------------------------------% \chapter{作者简历及攻读学位期间发表的学术论文与研究成果} \textbf{本科生无需此部分}。 @@ -34,4 +37,4 @@ \section*{参加的研究项目及获奖情况:} ucasthesis国科大学位论文\LaTeX{}模板的最终成型离不开以霍明虹老师和丁云云老师为代表的国科大学位办公室老师们制定的官方指导文件和众多ucasthesis用户的热心测试和耐心反馈,在此对他们的认真付出表示感谢。特别对国科大的赵永明同学的众多有效反馈意见和建议表示感谢,对国科大本科部的陆晴老师和本科部学位办的丁云云老师的细致审核和建议表示感谢。谢谢大家的共同努力和支持,让ucasthesis为国科大学子使用\LaTeX{}撰写学位论文提供便利和高效这一目标成为可能。 \cleardoublepage[plain]% 让文档总是结束于偶数页,可根据需要设定页眉页脚样式,如 [noheaderstyle] - +%---------------------------------------------------------------------------% diff --git a/Tex/Chap_Guide.tex b/Tex/Chap_Guide.tex index d12851b9..2295e68d 100644 --- a/Tex/Chap_Guide.tex +++ b/Tex/Chap_Guide.tex @@ -31,25 +31,24 @@ \subsection{编译脚本} \item Linux或MacOS:在terminal中运行 \begin{itemize} \item \verb|./artratex.sh xa|:获得全编译后的PDF文档 - \item \verb|./artratex.sh x|:快速编译模式 + \item \verb|./artratex.sh x|:快速编译,不会生成文献引用 \end{itemize} - \item 全编译指运行 \verb|xelatex+bibtex+xelatex+xelatex| 以正确生成所有的引用链接,如目录,参考文献及引用等。在写作过程中若无添加新的引用,则可用快速编译,即只运行一遍\LaTeX{}编译引擎以减少编译时间。 \end{itemize} +全编译指运行 \verb|xelatex+bibtex+xelatex+xelatex| 以正确生成所有的引用链接,如目录,参考文献及引用等。在写作过程中若无添加新的引用,则可用快速编译,即只运行一遍\LaTeX{}编译引擎以减少编译时间。 + \subsection{Tmp文件夹} 运行编译脚本后,编译所生成的文档皆存于Tmp文件夹内,包括编译得到的PDF文档,其存在是为了保持工作空间的整洁,因为好的心情是很重要的。 \subsection{Style文件夹} -包含ucasthesis文档类的定义文件和配置文件,通过对它们的修改可以实现特定的模版设定。若需更新模板,一般只需用新的样式文件替换旧的即可。 +包含ucasthesis文档类的定义文件和配置文件,通过对它们的修改可以实现特定的模版设定。 \begin{enumerate} \item ucasthesis.cls:文档类定义文件,论文的最核心的格式即通过它来定义的。 \item ucasthesis.cfg:文档类配置文件,设定如目录显示为“目~录”而非“目录”。 - \item artratex.sty: 常用宏包及文档设定,如参考文献样式、文献引用样式、页眉页脚设定等。这些功能具有开关选项,常只需在Thesis.tex中的如下命令中进行启用即可,一般无需修改artratex.sty本身。 - - \path{\usepackage[options]{artratex}} + \item artratex.sty: 常用宏包及文档设定,如参考文献样式、文献引用样式、页眉页脚设定等。这些功能具有开关选项,常只需在Thesis.tex中进行启用即可,一般无需修改artratex.sty本身。 \item artracom.sty:自定义命令以及添加宏包的推荐放置位置。 \end{enumerate} @@ -58,10 +57,11 @@ \subsection{Tex文件夹} 文件夹内为论文的所有实体内容,正常情况下,这也是\textbf{使用ucasthesis撰写学文论文时,主要关注和修改的一个位置,注:所有文件都必须采用UTF-8编码,否则编译后将出现乱码文本},详细分类介绍如下: \begin{itemize} - \item Frontpage.tex:为论文中英文封面及中英文摘要。\textbf{论文封面会根据英文学位名称如Bachelor,Master,或是Doctor自动切换为相应的格式}。 + \item Frontinfo.tex:为论文中英文封面信息。\textbf{论文封面会根据英文学位名称如Bachelor,Master,或是Doctor自动切换为相应的格式}。 + \item Frontmatter.tex:为论文前言内容如中英文摘要等。 \item Mainmatter.tex:索引需要出现的Chapter。开始写论文时,可以只索引当前章节,以快速编译查看,当论文完成后,再对所有章节进行索引即可。 - \item Chap{\_}xxx.tex:为论文主体的各个章节,可根据需要添加和撰写。 - \item Appendix.tex:为附录内容 + \item Chap{\_}xxx.tex:为论文主体的各章,可根据需要添加和撰写。\textbf{添加新章时,可拷贝一个已有的章文件再重命名,以继承文档的 UTF8 编码}。 + \item Appendix.tex:为附录内容。 \item Backmatter.tex:为发表文章信息和致谢部分等。 \end{itemize} @@ -251,34 +251,16 @@ \subsection{参考文献引用} 更多例子如: -\citet{walls2013drought} 根据 \citet{betts2005aging} 的研究,首次提出...。其中关于... \citep{walls2013drought, betts2005aging},是当前中国...得到迅速发展的研究领域 \citep{chen1980zhongguo, bravo1990comparative}。引用同一著者在同一年份出版的多篇文献时,在出版年份之后用 -英文小写字母区别,如:\citep{yuan2012lana, yuan2012lanb, yuan2012lanc}。同一处引用多篇文献时,按出版年份由近及远依次标注,中间用 -分号分开。例如 \citep{chen1980zhongguo, stamerjohanns2009mathml, hls2012jinji, niu2013zonghe}。 +\citet{walls2013drought} 根据 \citet{betts2005aging} 的研究,首次提出...。其中关于... \citep{walls2013drought, betts2005aging},是当前中国...得到迅速发展的研究领域 \citep{chen1980zhongguo, bravo1990comparative}。引用同一著者在同一年份出版的多篇文献时,在出版年份之后用 +英文小写字母区别,如:\citep{yuan2012lana, yuan2012lanb, yuan2012lanc}。同一处引用多篇文献时,按出版年份由近及远依次标注。例如 \citep{chen1980zhongguo, stamerjohanns2009mathml, hls2012jinji, niu2013zonghe}。 使用著者-出版年制(authoryear)式参考文献样式时,中文文献必须在BibTeX索引信息的 \textbf{key} 域(请参考ref.bib文件)填写作者姓名的拼音,才能使得文献列表按照拼音排序。参考文献表中的条目(不排序号),先按语种分类排列,语种顺 序是:中文、日文、英文、俄文、其他文种。然后,中文按汉语拼音字母顺序排列,日文按第一著者的姓氏笔画排序,西文和 俄文按第一著者姓氏首字母顺序排列。如中 \citep{niu2013zonghe}、日 \citep{Bohan1928}、英 \citep{stamerjohanns2009mathml}、俄 \citep{Dubrovin1906}。 如此,即完成了文献的索引,请查看下本文档的参考文献一章,看看是不是就是这么简单呢?是的,就是这么简单! -不同文献样式和引用样式,如著者-出版年制(authoryear)、顺序编码制(numbers)、上标顺序编码制(super)可在Thesis.tex中对artratex.sty调用实现,如: -\begin{itemize} - \footnotesize - \item \verb+\usepackage[numbers]{artratex}+ $\%$ 文本: Jones [1]; 括号: [1] - \item \verb+\usepackage[super]{artratex}+ $\%$ 文本: Jones 上标[1]; 括号: 上标[1] - \item \verb+\usepackage[authoryear]{artratex}+ $\%$ 文本: Jones (1995); 括号: (Jones, 1995) - \item \verb+\usepackage[alpha]{artratex}+ $\%$ 文本: 不可用; 括号: [Jon95] -\end{itemize} - -当前文档的默认参考文献样式为\textbf{authoryear}。若在上标(\textbf{super})模式下,希望在特定位置将上标改为嵌入式标,可使用 - -文本类型:\verb|\citetns{lamport1986document,chen2005zhulu}|。 - -正如此处所示 \citetns{lamport1986document,chen2005zhulu} - -括号类型:\verb|\citepns{lamport1986document,chen2005zhulu}|。 - -正如此处所示 \citepns{lamport1986document,chen2005zhulu} +不同文献样式和引用样式,如著者-出版年制(authoryear)、顺序编码制(numbers)、上标顺序编码制(super)可在Thesis.tex中对artratex.sty调用实现,详见 \href{https://github.com/mohuangrui/ucasthesis/wiki/文献样式}{ucasthesis 知识小站之文献样式} -参考文献索引更为详细的信息,请见 \href{https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management}{WiKibook Bibliography}。\nocite{*}% 使文献列表显示所有参考文献(包括未引用文献) +参考文献索引的更多知识,请见 \href{https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management}{WiKibook Bibliography}。\nocite{*}% 使文献列表显示所有参考文献(包括未引用文献) \section{常见使用问题}\label{sec:qa} @@ -293,7 +275,7 @@ \section{常见使用问题}\label{sec:qa} 同时,取消Options -> Preferences -> Unicode中的Enable ANSI Format。 - \item 推荐选择xelatex或lualatex编译引擎编译中文文档。编译脚本的默认设定为xelatex编译引擎。你也可以选择不使用脚本编译,如直接使用 \LaTeX{}文本编辑器编译。注:\LaTeX{}文本编辑器编译的默认设定为pdflatex编译引擎,若选择xelatex或lualatex编译引擎,请进入下拉菜单选择。为正确生成引用链接,需要进行全编译。 + \item 推荐选择xelatex或lualatex编译引擎编译中文文档。编译脚本的默认设定为xelatex编译引擎。你也可以选择不使用脚本编译,如直接使用 \LaTeX{}文本编辑器编译。注:\LaTeX{}文本编辑器编译的默认设定为pdflatex编译引擎,若选择xelatex或lualatex编译引擎,请进入下拉菜单选择。为正确生成引用链接和参考文献,需要进行\textbf{全编译}。 \item Texmaker使用简介 \begin{enumerate} diff --git a/Tex/Chap_Intro.tex b/Tex/Chap_Intro.tex index b5a0bbbe..2dba4e5b 100644 --- a/Tex/Chap_Intro.tex +++ b/Tex/Chap_Intro.tex @@ -21,8 +21,8 @@ \section{系统要求}\label{sec:system} %\cline{i-j}% partial hline from column i to column j 操作系统 & \LaTeX{}编译系统 & \LaTeX{}文本编辑器\\ \hline - Linux & \href{https://www.tug.org/texlive/acquire-netinstall.html}{\TeX{}Live Full} & \href{http://www.xm1math.net/texmaker/}{Texmaker} 或 Vim (已集成于 Linux 系统)\\ - MacOS & \href{https://www.tug.org/mactex/}{Mac\TeX{} Full} & \href{http://www.xm1math.net/texmaker/}{Texmaker} 或 Texshop (已集成于 Mac\TeX{} Full)\\ + Linux & \href{https://www.tug.org/texlive/acquire-netinstall.html}{\TeX{}Live Full} & \href{http://www.xm1math.net/texmaker/}{Texmaker} 或 Vim\\ + MacOS & \href{https://www.tug.org/mactex/}{Mac\TeX{} Full} & \href{http://www.xm1math.net/texmaker/}{Texmaker} 或 Texshop\\ Windows & \href{https://www.tug.org/texlive/acquire-netinstall.html}{\TeX{}Live Full} 或 \href{https://miktex.org/download}{MiK\TeX{}} & \href{http://www.xm1math.net/texmaker/}{Texmaker}\\ \hline \end{tabular} diff --git a/Tex/Frontpages.tex b/Tex/Frontinfo.tex similarity index 60% rename from Tex/Frontpages.tex rename to Tex/Frontinfo.tex index a568cde5..bb2fee13 100644 --- a/Tex/Frontpages.tex +++ b/Tex/Frontinfo.tex @@ -1,5 +1,5 @@ %---------------------------------------------------------------------------% -%->> 封面信息及生成 +%->> Titlepage information %---------------------------------------------------------------------------% %- %-> 中文封面信息 @@ -26,31 +26,4 @@ \MAJOR{Fluid Mechanics}% 二级学科专业名称 \INSTITUTE{Institute of Mechanics, Chinese Academy of Sciences}% 院系名称 \DATE{June, 2014}% 毕业日期:夏季为June、冬季为December -%- -%-> 生成封面 -%- -\maketitle% 生成中文封面 -\MAKETITLE% 生成英文封面 -%- -%-> 作者声明 -%- -\makedeclaration% 生成声明页 -%- -%-> 中文摘要 -%- -\intobmk\chapter*{摘\quad 要}% 显示在书签但不显示在目录 -\setcounter{page}{1}% 开始页码 -\pagenumbering{Roman}% 页码符号 - -本文是中国科学院大学学位论文模板ucasthesis的使用说明文档。主要内容为介绍\LaTeX{}文档类ucasthesis的用法,以及如何使用\LaTeX{}快速高效地撰写学位论文。 - -\keywords{中国科学院大学,学位论文,\LaTeX{}模板}% 中文关键词 -%- -%-> 英文摘要 -%- -\intobmk\chapter*{Abstract}% 显示在书签但不显示在目录 - -This paper is a help documentation for the \LaTeX{} class ucasthesis, which is a thesis template for the University of Chinese Academy of Sciences. The main content is about how to use the ucasthesis, as well as how to write thesis efficiently by using \LaTeX{}. - -\KEYWORDS{University of Chinese Academy of Sciences (UCAS), Thesis, \LaTeX{} Template}% 英文关键词 %---------------------------------------------------------------------------% diff --git a/Tex/Frontmatter.tex b/Tex/Frontmatter.tex new file mode 100644 index 00000000..7be3f05f --- /dev/null +++ b/Tex/Frontmatter.tex @@ -0,0 +1,31 @@ +%---------------------------------------------------------------------------% +%->> Frontmatter +%---------------------------------------------------------------------------% +%- +%-> 生成封面 +%- +\maketitle% 生成中文封面 +\MAKETITLE% 生成英文封面 +%- +%-> 作者声明 +%- +\makedeclaration% 生成声明页 +%- +%-> 中文摘要 +%- +\intobmk\chapter*{摘\quad 要}% 显示在书签但不显示在目录 +\setcounter{page}{1}% 开始页码 +\pagenumbering{Roman}% 页码符号 + +本文是中国科学院大学学位论文模板ucasthesis的使用说明文档。主要内容为介绍\LaTeX{}文档类ucasthesis的用法,以及如何使用\LaTeX{}快速高效地撰写学位论文。 + +\keywords{中国科学院大学,学位论文,\LaTeX{}模板}% 中文关键词 +%- +%-> 英文摘要 +%- +\intobmk\chapter*{Abstract}% 显示在书签但不显示在目录 + +This paper is a help documentation for the \LaTeX{} class ucasthesis, which is a thesis template for the University of Chinese Academy of Sciences. The main content is about how to use the ucasthesis, as well as how to write thesis efficiently by using \LaTeX{}. + +\KEYWORDS{University of Chinese Academy of Sciences (UCAS), Thesis, \LaTeX{} Template}% 英文关键词 +%---------------------------------------------------------------------------% diff --git a/Thesis.tex b/Thesis.tex index 227c337a..6862bdf9 100644 --- a/Thesis.tex +++ b/Thesis.tex @@ -11,9 +11,9 @@ %---------------------------------------------------------------------------% %->> Document class declaration %---------------------------------------------------------------------------% -\documentclass[doublesided]{Style/ucasthesis}% +\documentclass[twoside]{Style/ucasthesis}% %- Multiple optional arguments: -%- [<singlesided|doublesided|printcopy>]% set one or two sided eprint or print +%- [<oneside|twoside|print>]% oneside eprint, twoside eprint, or paper print %- [fontset=<adobe|...>]% specify font set to replace automatic detection %- [plain]% thesis writing of international students %- [draftversion]% show draft version information @@ -21,7 +21,7 @@ %---------------------------------------------------------------------------% %->> Document settings %---------------------------------------------------------------------------% -\usepackage[authoryear,myhdr,list]{Style/artratex}% document settings +\usepackage[authoryear,list]{Style/artratex}% document settings %- usage: \usepackage[option1,option2,...,optionN]{artratex} %- Multiple optional arguments: %- [bibtex|biber]% set bibliography processor and package @@ -32,13 +32,14 @@ %- <alpha>: textual: not available; parenthetical: [Jon95] %- [geometry]% reconfigure page layout via geometry package %- [lscape]% provide landscape layout environment -%- [myhdr]% enable header and footer via fancyhdr package +%- [xhf]% disable header and footer via fancyhdr package %- [color]% provide color support via xcolor package %- [background]% enable page background %- [tikz]% provide complex diagrams via tikz package %- [table]% provide complex tables via ctable package %- [list]% provide enhanced list environments for algorithm and coding %- [math]% enable some extra math packages +%- [xlink]% disable link colors \usepackage{Style/artracom}% user defined commands %---------------------------------------------------------------------------% %->> Document inclusion @@ -47,12 +48,16 @@ %---------------------------------------------------------------------------% %->> Document content %---------------------------------------------------------------------------% +%- +%-> Titlepage information +%- +\input{Tex/Frontinfo}% \begin{document} %- %-> Frontmatter: title page, abstract, content list, symbol list, preface %- \frontmatter% initialize the environment -\input{Tex/Frontpages}% title page, abstract, dedication +\input{Tex/Frontmatter}% title page, abstract {% content list region \linespread{1.2}% local line space \intobmk*{\cleardoublepage}{\contentsname}% add link to bookmark @@ -62,7 +67,7 @@ \intobmk*{\cleardoublepage}{\listtablename}% add link to bookmark \listoftables% table catalog } -\input{Tex/Prematter}% list of symbols, preface content +\input{Tex/Prematter}% symbol list, preface content %- %-> Mainmatter %- diff --git "a/\346\250\241\346\235\277\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" "b/\346\250\241\346\235\277\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" deleted file mode 100644 index 36270643..00000000 --- "a/\346\250\241\346\235\277\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" +++ /dev/null @@ -1 +0,0 @@ -509428dd2da5c4e19c29e707fae594589c46e445 \ No newline at end of file diff --git "a/\346\250\241\347\211\210\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" "b/\346\250\241\347\211\210\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" new file mode 100644 index 00000000..0280d266 --- /dev/null +++ "b/\346\250\241\347\211\210\344\275\277\347\224\250\350\257\264\346\230\216.pdf.REMOVED.git-id" @@ -0,0 +1 @@ +6880c605b803411292d032a4ad6e557ba47efa02 \ No newline at end of file