diff --git a/README.md b/README.md index ad98e600..09da41ad 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,13 @@ ## 重要通知 -* `2019-03-14` 模板样式进行了修改,请查看下面的修改描述,以决定是否需要更新。 +* `2019-03-25` 模板样式进行了修改,请查看下面的修改描述,以决定是否需要更新。 ## 更新记录 -* `2019-03-14` 根据 [opt-gaobin, issue #121](https://github.com/mohuangrui/ucasthesis/issues/121) ,修正中文标点使下划线断掉的问题。根据 [Guoqiang Zhang, email; weili-ict, issue #120](https://github.com/mohuangrui/ucasthesis/issues/120) ,修复 \proofname 命令对2015年及更早 LaTeX 编译器的兼容性问题。根据 [muzimuzhi, issue #130](https://github.com/mohuangrui/ucasthesis/issues/130) ,修正对\voffset的使用。 +* `2019-03-25` 根据 [DRjy, muzimuzhi, issue #127](https://github.com/mohuangrui/ucasthesis/issues/127) ,为“摘要”等无需在目录中显示的结构元素建立书签。根据 [muzimuzhi, issue #130](https://github.com/mohuangrui/ucasthesis/issues/130) ,修正对\voffset的使用。 + +* `2019-03-14` 根据 [opt-gaobin, issue #121](https://github.com/mohuangrui/ucasthesis/issues/121) ,修正中文标点使下划线断掉的问题。根据 [Guoqiang Zhang, email; weili-ict, issue #120](https://github.com/mohuangrui/ucasthesis/issues/120) ,修复 \proofname 命令对2015年及更早 LaTeX 编译器的兼容性问题。 * `2019-02-20` 根据 [opt-gaobin, issue #100](https://github.com/mohuangrui/ucasthesis/issues/100) ,增加定理、定义、证明等数学环境。根据 [DRjy, issue #102](https://github.com/mohuangrui/ucasthesis/issues/102) ,调整 \mathcal 字体样式。根据 [zike Liu, email] ,适当缩减目录列表的缩进。根据 [xiaoyaoE, issue #105](https://github.com/mohuangrui/ucasthesis/issues/105) ,使数字字体和英文字体一致。完善中文版和国际版之间的中英格式切换。 diff --git a/Style/artratex.sty b/Style/artratex.sty index 82007960..9957aa73 100644 --- a/Style/artratex.sty +++ b/Style/artratex.sty @@ -505,14 +505,49 @@ \noindent\makebox[0.15\textwidth][l]{#2}{{#3}\hfill{#1}}\par } %- -%-> Macro for adding content link to the table of content and bookmark -%- -\providecommand{\intotoc}[2][\maincounter]{% - \cleardoublepage% ensure correct page reference - \markboth{\MakeUppercase{#2}}{}% set the leftmark - \phantomsection% create link in bookmarks - \addcontentsline{toc}{#1}{#2}% add content #2 to toc as #1 +%-> Macro for adding link to toc and bookmark +%- +\def\munch#1{}% auxiliary command +\newcommand{\intotocnostar}[3]{% [<\chapter|...>,<*>,] + #1#2{% excute command + \phantomsection% create bookmark link + \addcontentsline{toc}{\expandafter\munch\string#1}{#3}% add content #3 to toc as #1 + #3% + } + \markboth{\MakeUppercase{#3}}{}% set header mark +} +\newcommand{\intotocstar}[3]{% [<\chapter|...>,<extra commands>,<title>] + #2% excute command + \phantomsection% create bookmark link + \addcontentsline{toc}{\expandafter\munch\string#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>,<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 %- diff --git a/Tex/Frontpages.tex b/Tex/Frontpages.tex index f9f6a91d..a568cde5 100644 --- a/Tex/Frontpages.tex +++ b/Tex/Frontpages.tex @@ -38,7 +38,7 @@ %- %-> 中文摘要 %- -\chapter*{摘\quad 要}\chaptermark{摘\quad 要}% 摘要标题 +\intobmk\chapter*{摘\quad 要}% 显示在书签但不显示在目录 \setcounter{page}{1}% 开始页码 \pagenumbering{Roman}% 页码符号 @@ -48,7 +48,7 @@ \chapter*{摘\quad 要}\chaptermark{摘\quad 要}% 摘要标题 %- %-> 英文摘要 %- -\chapter*{Abstract}\chaptermark{Abstract}% 摘要标题 +\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{}. diff --git a/Tex/Prematter.tex b/Tex/Prematter.tex index 17b9a495..e74d39f7 100644 --- a/Tex/Prematter.tex +++ b/Tex/Prematter.tex @@ -1,5 +1,4 @@ -\chapter*{符号列表} -\chaptermark{符号列表} +\intobmk\chapter*{符号列表}% 显示在书签但不显示在目录 \section*{字符} \nomenclatureitem[\textbf{Unit}]{\textbf{Symbol}}{\textbf{Description}} diff --git a/Thesis.tex b/Thesis.tex index 4fa563fb..02b7d047 100644 --- a/Thesis.tex +++ b/Thesis.tex @@ -55,12 +55,12 @@ \input{Tex/Frontpages}% title page, abstract, dedication {% content list region \linespread{1.2}% local line space -%\intotoc{\contentsname}% add link to contents table and bookmark -\tableofcontents% contents catalog -%\intotoc{\listfigurename}% add link to contents table and bookmark -\listoffigures% figures catalog -%\intotoc{\listtablename}% add link to contents table and bookmark -\listoftables% tables catalog +\intobmk*{\cleardoublepage}{\contentsname}% add link to bookmark +\tableofcontents% content catalog +\intobmk*{\cleardoublepage}{\listfigurename}% add link to bookmark +\listoffigures% figure catalog +\intobmk*{\cleardoublepage}{\listtablename}% add link to bookmark +\listoftables% table catalog } \input{Tex/Prematter}% list of symbols, preface content %- @@ -78,7 +78,7 @@ %-> Backmatter: bibliography, glossary, index %- \backmatter% initialize the environment -\intotoc{\bibname}% add link to contents table and bookmark +\intotoc*{\chapter}{\cleardoublepage}{\bibname}% add link to toc \bibliography{Biblio/ref}% bibliography \input{Tex/Backmatter}% other information \end{document} 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" index c1094466..58926b99 100644 --- "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" @@ -1 +1 @@ -dd273ed5707cbaa84ec457683ebd0759b94ce84f \ No newline at end of file +8beb4723e42aff5edccfe4652a0ee42adc006ae1 \ No newline at end of file