diff options
Diffstat (limited to 'Master')
28 files changed, 7606 insertions, 3 deletions
diff --git a/Master/texmf-dist/bibtex/bst/thuthesis/thubib.bst b/Master/texmf-dist/bibtex/bst/thuthesis/thubib.bst new file mode 100644 index 00000000000..ac2b877138b --- /dev/null +++ b/Master/texmf-dist/bibtex/bst/thuthesis/thubib.bst @@ -0,0 +1,1195 @@ +% BibTeX standard bibliography style `thubib.bst' derived from `unsrt' +% This file is part of `thuthesis' package. +% +% $Id: thubib.bst 120 2007-10-09 13:51:57Z littleleo $ + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + lang + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + url + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output.year} +{ 't := + number empty$ + volume empty$ + and + { add.period$ write$ } + { ", " * write$ } + if$ + t +} + +STRINGS {z} +FUNCTION {remove.dots} +{ 'z := + "" + { z empty$ not} + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ + %z +} + +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + pop$ + } + if$ + } + if$ +} + +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ duplicate$ empty$ + 'pop$ + 'write$ + if$ + newline$ + "\thudot" write$ + newline$ +} + +% FUNCTION {fin.entry} +% { add.period$ +% write$ +% %remove.dots +% newline$ +% } + +% FUNCTION {fin.entry} +% { duplicate$ empty$ +% 'pop$ +% 'write$ +% if$ +% newline$ +% } + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.cn.etal} +{ "等." } + +FUNCTION {format.lang} +{ lang empty$ + 'skip$ + 'skip$ + if$ + } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + %"{ff }{ll}" + "{ll }{f{~}}" + format.name$ + %remove.dots + %bibinfo bibinfo.check + 't := + nameptr #1 > + { + nameptr #3 + #1 + = + numnames #3 + > and + { "others" 't := + #1 'namesleft := } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { numnames #2 > + { "" * } + 'skip$ + if$ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + lang empty$ + { ", " * bbl.etal * } + { lang "zh" = + { ", " * bbl.cn.etal * } + 'skip$ + if$ + } + if$ + } + { + lang empty$ + { ", " * t * } + { lang "zh" = + { ", " * t * } + 'skip$ + if$ + } + if$ + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {editors.names} +{ lang empty$ + { ", (eds.)" } + { ", 编" } + if$ +} + + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names + % editor num.names$ #1 > + %{ ", editors" * } + %{ ", editor" * } + % if$ + editors.names * + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { month ", " * year * } + if$ + } + if$ +} + +FUNCTION {format.btitle} +{ title %emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "volume" volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ " ed." * } + { edition "t" change.case$ " ed." * } + if$ + } + if$ +} + + +FUNCTION {format.url} +{ url empty$ + { "" } + { new.block " {\url{" url * "}}" * } + if$ +} + + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "" pages n.dashify tie.or.space.connect } + { "" pages tie.or.space.connect } + if$ + } + if$ +} + +FUNCTION {format.vol.num.pages} +{ volume field.or.null + number empty$ + 'skip$ + { "(" number * ")" * * + volume empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ format.pages } + { ":" * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ + { "chapter" } + { type "l" change.case$ } + if$ + chapter tie.or.space.connect + pages empty$ + 'skip$ + { ", " * format.pages * } + if$ + } + if$ +} + +FUNCTION {collection.in} +{ lang empty$ + { "In: " } + { "见: " } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { editor empty$ + { lang empty$ + { "Proceedings of " booktitle * } + { " " booktitle * } + if$ + } + { lang empty$ + { collection.in format.editors * ". Proceedings of " * booktitle * } + { collection.in format.editors * ". " * booktitle * } + if$ + } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{ll }{f{~}}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ll }{f{~}}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{ll }{f{~}}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.address.publisher} +{ address empty$ + { publisher empty$ + { "" } + { "there's a publisher but no address in " cite$ * warning$ + publisher + } + if$ + } + { publisher empty$ + 'address + { address ": " * publisher * } + if$ + } + if$ +} + +FUNCTION {format.address.school} +{ address empty$ + { school empty$ + { "" } + { "there's a school but no address in " cite$ * warning$ + school + } + if$ + } + { school empty$ + 'address + { address ": " * school * } + if$ + } + if$ +} + + +FUNCTION {format.title.type} +{ title empty$ + { type empty$ + { "" } + { "there's a type but no title in " cite$ * warning$ + type + } + if$ + } + { type empty$ + 'title + { title ": " * type * } + if$ + } + if$ +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + new.block + format.number.series output + %new.sentence + %format.address.publisher output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + format.address.publisher output + format.date "year" output.check + new.sentence + format.pages output + fin.entry +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { %journal emphasize "journal" output.check + journal "journal" output.check + %format.date "year" output.check + %new.block + year output + format.vol.num.pages output.year + } + { format.article.crossref output.nonnull + format.pages output + } + if$ + new.block + format.note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + new.block + format.title "title" output.check + howpublished address new.block.checkb + howpublished output + address output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + crossref missing$ + { format.bvolume output + %format.chapter.pages "chapter and pages" output.check + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { format.chapter.pages "chapter and pages" output.check + new.block + format.book.crossref output.nonnull + } + if$ + format.edition output + % format.date ":" * format.pages * output + format.date "." * format.pages * output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + %format.bvolume output + format.number.series output + format.chapter.pages output + new.sentence + format.address.publisher output + %address output + %publisher "publisher" output.check + %format.edition output + % format.date "year" output.check + format.date ". " * format.pages * output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + % new.block + % note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + %format.bvolume output + %format.number.series output + %format.pages output + address empty$ + { organization publisher new.sentence.checkb + organization output + publisher output + %format.date "year" output.check + year output + } + { %address output.nonnull + format.address.publisher output + %format.date "year" output.check + year output + new.sentence + organization output + %publisher output + } + if$ + new.block + pages output + %remove.dots + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + author empty$ + { organization empty$ + { address new.block.checka + address output + } + 'skip$ + if$ + } + { organization address new.block.checkb + organization output + address output + } + if$ + format.edition output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {masterthesis.type} +{ lang empty$ + { "\thumasterbib" } + { "[硕士学位论文]" } + if$ +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" add.period$ output.check + new.block + % format.title remove.dots ": " * masterthesis.type * output + format.title remove.dots masterthesis.type * output + new.block + format.address.school output + %format.madd "address" output.check + %school "school" output.check + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.block.checkb + format.title output + howpublished new.block.checka + howpublished output + format.date output + format.url output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis.type} +{ lang empty$ + { "\thuphdbib" } + { "[博士学位论文]" } + if$ +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" add.period$ output.check + new.block + % format.title remove.dots ": " * phdthesis.type * output + format.title remove.dots phdthesis.type * output + new.block + format.address.school output + %address output + %school "school" output.check + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + new.block + format.btitle "title" output.check + format.bvolume output + format.number.series output + address empty$ + { editor empty$ + { publisher new.sentence.checka } + { organization publisher new.sentence.checkb + organization output + } + if$ + publisher output + format.date "year" output.check + } + { address output.nonnull + format.date "year" output.check + new.sentence + editor empty$ + 'skip$ + { organization output } + if$ + publisher output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + format.date "year" output.check + format.url output + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + note "note" output.check + format.date output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +READ + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} diff --git a/Master/texmf-dist/doc/latex/thuthesis/Readme b/Master/texmf-dist/doc/latex/thuthesis/Readme new file mode 100644 index 00000000000..bb3133c2ff7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/Readme @@ -0,0 +1,128 @@ +锘========== +What's it? +========== +ThuThesis is a LaTeX thesis template package for Tsinghua University in order to +make it easy to write thesises for either bachelor, master or doctor. ThuThesis +鏄竻鍗庡ぇ瀛﹀浣嶈鏂嘗aTeX妯℃澘锛屾敮鎸佹湰绉戙佺澹佸崥澹鏂囨牸寮忋 + + +======== +浣跨敤鏂规硶 +======== +1. 缂栬瘧绀轰緥鏂囨。 + latex main + bibtex main + latex main + gbk2uni main # 鍙 + latex main + dvips main.dvi + ps2pdf main.ps + + 璇存槑锛氫篃鍙互浣跨敤pdflatex鎴杁vipdfm(x)鐢熸垚鏂囨。銆 + +2. 缂栧啓鑷繁鐨勮鏂 + 鍙傝冪ず渚嬫枃妗o細 + main.tex 涓绘帶鏂囨。 + data/ 璁烘枃鍏蜂綋鍐呭 + ref/ 鍙傝冩枃鐚洰褰 + figures/ 鍥剧墖鐩綍 + + +======== +濡備綍鍗囩骇 +======== +1. 涓嬭浇鏂版ā鏉垮苟瑙e帇缂 +2. 灏唗huthesis.cls, thuthesis.cfg, thubib.bst浣滅浉搴旀浛鎹㈠嵆鍙 + + +====================================== +Makefile Howto (by edyfox & littleleo) +====================================== +1. 鑾峰彇甯姪鏂囨。 + + make doc 寰楀埌 thuthesis.pdf锛屽府鍔╂枃妗o紝閲岄潰鏈夎缁嗙殑璇存槑銆 + +2. 鐢熸垚绀轰緥鏂囨。 + + make thesis + +3. 鐢熸垚涔﹁剨绀轰緥 + + make shuji + +闄勫綍锛 Makefile 鍛戒护璇﹁В锛 + +Makefile锛 + + 浣跨敤鏂规硶锛 + + make [{all|thesis|shuji|doc|clean|distclean}] \ + [METHOD={ps2pdf|dvipdfm}] \ + [TEXI2DVI=<tex2dvi>] + + 鍙傛暟璇存槑锛 + + make all 绛変簬 make thesis && make shuji && make doc锛 + make cls 鐢熸垚妯℃澘鏂囦欢锛岀浉褰撲簬 make -f thesis.mak cls锛 + make thesis 鐢熸垚璁烘枃锛岀浉褰撲簬 make -f thesis.mak锛 + make shuji 鐢熸垚涔﹁剨锛岀浉褰撲簬 make -f shuji.mak锛 + make doc 鐢熸垚浣跨敤璇存槑涔︼紝鐩稿綋浜 make -f doc.mak锛 + make clean 琛ㄧず娓呴櫎闄や簡 pdf 澶栫殑鎵鏈変腑闂存枃浠跺拰鐩爣鏂囦欢锛 + make distclean 琛ㄧず娓呴櫎鍖呮嫭 pdf 鍦ㄥ唴鐨勬墍鏈変腑闂存枃浠跺拰鐩爣鏂囦欢銆 + + METHOD 鍙傛暟鐢ㄦ潵鎸囧畾鐢熸垚 pdf 鐨勬柟寮忥紝 + + METHOD=ps2pdf 琛ㄧず浣跨敤 texi2dvi -> dvips ->ps2pdf 鐨勬柟寮忕敓鎴 pdf锛 + METHOD=dvipdfm 琛ㄧず浣跨敤 texi2dvi -> dvipdfm 鐨勬柟寮忕敓鎴 pdf锛 + + 濡傛灉缂虹渷锛屽垯閲囩敤 ps2pdf 鏂瑰紡銆 + + TEXI2DVI 琛ㄧず texi2dvi 瀹炵敤宸ュ叿鐨勬枃浠跺悕锛岃宸ュ叿鐨勪綔鐢ㄦ槸鑷姩閲嶅杩愯 + latex 鑻ュ共閬嶏紝鐩磋嚦鎵鏈変氦鍙夊紩鐢ㄩ兘姝g‘涓烘銆傚湪鏈夌殑鍙戣鐗堜腑璇ュ伐鍏风殑鏂囦欢鍚 + 涓嶅彨 texi2dvi锛岃濡 CTeX 涓嬬殑杩欎釜宸ュ叿灏卞彨 texify銆傞亣鍒拌繖绉嶆儏鍐典綘鍙互鍦 + 鍛戒护琛岄氳繃 TEXI2DVI=texify 鍛戒护鎸囧畾浣跨敤鍏跺畠鐨 texi2dvi 宸ュ叿銆 + + + +=========================== +msmake.cmd Howto (by Truel) +=========================== +1.閰嶇疆thuthesis瀹忓寘 + + msmake setup + 銆銆鍦ㄥ綋鍓嶇洰褰曚笅鐢熸垚thuthesis瀹忓寘鍙婅鏄庢枃妗huthesis.pdf + +2.鐢熸垚绀轰緥鏂囨。 + + msmake [shuji|main|all|other] +銆銆 + 鍦ㄥ綋鍓嶇洰褰曚笅鐢熸垚绀轰緥鏂囨。锛屾垨鍏朵腑鐨勪竴閮ㄥ垎锛屾垨鍏朵粬鐢ㄦ埛鎸囧畾鏂囨。 + 濡傛灉褰撳墠鐩綍涓嬫棤thuthesis.cls锛屽皢鑷姩鏍规嵁thuthesis.ins鐢熸垚銆 +銆銆- shuji 浠呯敓鎴愪功鑴 +銆銆- main 浠呯敓鎴恗ain.pdf +銆銆- all 鐢熸垚涔﹁剨鍜宮ain.pdf锛岄粯璁ら夐」 +銆銆- other 鐢ㄦ埛鎸囧畾鐨則ex鏂囦欢鍚嶏紝鐢辫tex鏂囦欢浜х敓pdf鏂囨。 + +3.娓呯悊鐩綍 + + msmake clean [other] + +銆銆娓呯悊褰撳墠鐩綍涓嬬敱thuthesis瀹忓寘鐢熸垚鐨勬枃浠讹紝鍏蜂綋鍖呮嫭 + - 瀹忓寘鍙婂叾璇存槑鏂囨。thuthesis.{cls,cfg,dvi,ps,pdf} + - 绀轰緥鏂囨。shuji.pdf, main.{dvi,ps,pdf,aux,etc.} + - 鍏跺畠涓存椂鏂囦欢 *.log *.aux *.glo *.idx *.ilg *.ind *.out *.thm *.toc *.lot *.loe *.out.bak + - 濡傛灉鐢ㄦ埛鎸囧畾鍏朵粬鏂囦欢鍚嶏紝涓嶅垹闄ain.*锛岃屽垹闄 other.{dvi,ps,pdf,lo?,aux,bbl,blg,out* toc thm} + +4.杈呭姪鍥惧舰鍥惧儚鏂囦欢鏍煎紡杞崲鍛戒护锛 + + msmake epspdf [param] + + 灏嗗綋鍓嶇洰褰曚笅鎵鏈塭ps鏂囦欢鐢╡pstopdf杞负pdf鏍煎紡 + + msmake bmpeps [param] + + 灏嗗綋鍓嶇洰褰曚笅鎵鏈塨mp,jpg,png鏂囦欢鐢╞meps杞负eps鏍煎紡 + + 浠ヤ笂涓や釜鍛戒护涓紝param鍙互鐢辩敤鎴锋寚瀹氳浆鎹㈢▼搴忔墍鐢ㄧ殑鍙傛暟銆 + +# $Id: Readme 117 2007-06-26 13:28:05Z littleleo $ diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/Makefile b/Master/texmf-dist/doc/latex/thuthesis/example/Makefile new file mode 100644 index 00000000000..92246aa35db --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/Makefile @@ -0,0 +1,159 @@ +# Makefile for ThuThesis +# $Id: Makefile 123 2007-11-08 13:05:49Z littleleo $ + +ifeq ($(MAKE),) + override MAKE=make +endif + +ifeq ($(TEXI2DVI),) + override TEXI2DVI=texi2dvi +endif + +ifneq ($(METHOD),ps2pdf) +ifneq ($(METHOD),dvipdfm) + override METHOD=ps2pdf +endif +endif + +PACKAGE=thuthesis +SOURCES=$(PACKAGE).ins $(PACKAGE).dtx +THESISMAIN=main +THESISCONTENTS=$(THESISMAIN).tex data/*.tex +BIBFILE=ref/refs.bib +SHUJIMAIN=shuji +SHUJICONTENTS=$(SHUJIMAIN).tex + +.PHONY: all clean distclean dist all thesis shuji doc cls cfg dvi ps pdf + +all: cls doc thesis shuji + + +###### generate cls/cfg +cls: $(PACKAGE).cls + +$(PACKAGE).cls: $(SOURCES) + rm -f $(PACKAGE).cls $(PACKAGE).cfg + latex $(PACKAGE).ins + +###### for doc + +doc: doc-pdf + +doc-pdf: $(PACKAGE).pdf + +doc-ps: $(PACKAGE).ps + +doc-dvi: $(PACKAGE).dvi + +$(PACKAGE).dvi: cls + latex $(PACKAGE).dtx + makeindex -s gind.ist -o $(PACKAGE).ind $(PACKAGE).idx + makeindex -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo + latex $(PACKAGE).dtx + +$(PACKAGE).ps: $(PACKAGE).dvi + gbk2uni $(PACKAGE) + latex $(PACKAGE).dtx + dvips -Ppdf -G0 -t letter $(PACKAGE).dvi + +$(PACKAGE).pdf: $(PACKAGE).ps + ps2pdf $(PACKAGE).ps + +###### for thesis + +thesis: thesis-pdf + +thesis-pdf: $(THESISMAIN).pdf + +thesis-dvi: $(THESISMAIN).dvi + +thesis-ps: $(THESISMAIN).ps + +$(THESISMAIN).dvi: cls $(THESISCONTENTS) $(THESISMAIN).bbl + $(TEXI2DVI) $(THESISMAIN).tex + +ifeq ($(METHOD),dvipdfm) +$(THESISMAIN).pdf: $(THESISMAIN).dvi + gbk2uni $(THESISMAIN) + latex $(THESISMAIN).tex + dvipdfm $(THESISMAIN).dvi +else +$(THESISMAIN).pdf: $(THESISMAIN).ps + ps2pdf $(THESISMAIN).ps +endif + +$(THESISMAIN).ps: $(THESISMAIN).dvi + gbk2uni $(THESISMAIN) + latex $(THESISMAIN).tex + dvips -Ppdf -G0 $(THESISMAIN).dvi + +$(THESISMAIN).bbl: $(BIBFILE) + $(TEXI2DVI) $(THESISMAIN).tex + -bibtex $(THESISMAIN) + + + +###### for shuji +shuji: shuji-pdf + +shuji-pdf: $(SHUJIMAIN).pdf + +shuji-dvi: $(SHUJIMAIN).dvi + +shuji-ps: $(SHUJIMAIN).ps + +$(SHUJIMAIN).dvi: cls $(SHUJICONTENTS) + $(TEXI2DVI) $(SHUJIMAIN).tex + +ifeq ($(METHOD),dvipdfm) +$(SHUJIMAIN).pdf: $(SHUJIMAIN).dvi + gbk2uni $(SHUJIMAIN) + latex $(SHUJIMAIN).tex + dvipdfmx $(SHUJIMAIN).dvi +elifeq ($(METHOD),ps2pdf) +$(SHUJIMAIN).pdf: $(SHUJIMAIN).ps + ps2pdf $(SHUJIMAIN).ps +else +$(SHUJIMAIN).pdf: cls $(SHUJICONTENTS) + pdflatex $(SHUJIMAIN) +endif + +$(SHUJIMAIN).ps: $(SHUJIMAIN).dvi + gbk2uni $(SHUJIMAIN) + latex $(SHUJIMAIN).tex + dvips -Ppdf -G0 $(SHUJIMAIN).dvi + +clean: + -@rm -f \ + *.aux \ + *.bak \ + *.bbl \ + *.blg \ + *.cls \ + *.cfg \ + *.dvi \ + *.glo \ + *.gls \ + *.idx \ + *.ilg \ + *.ind \ + *.ist \ + *.log \ + *.out \ + *.ps \ + *.thm \ + *.toc \ + *.lof \ + *.lot \ + *.loe \ + data/*.aux + +distclean: clean + -@rm -f *.pdf *.tar.gz + +dist: + @if [ -z "$(VERSION)" ]; then \ + echo "Usage: make dist VERSION=<version#>"; \ + else \ + ./makedist.sh $(VERSION); \ + fi diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/ack.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/ack.tex new file mode 100644 index 00000000000..91565f19703 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/ack.tex @@ -0,0 +1,16 @@ + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../main" +%%% End: + +\begin{ack} +本科的致谢和声明分页,硕士博士不分。 + +所以本科可以多写一些,研究生少写一些。 + +感谢~\thuthesis,它的存在让我的论文写作轻松自在了许多,让我的论文格式规整漂亮了许 +多,我以自己的经验告诉大家:用~\thuthesis{} 写毕业论文,爽! + +:) +\end{ack} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/appendix01.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/appendix01.tex new file mode 100644 index 00000000000..424ed03d73c --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/appendix01.tex @@ -0,0 +1,248 @@ +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "../main" +%%% End: + +\chapter{外文资料原文} +\label{cha:engorg} +As one of the most widely used techniques in operations research, {\em + mathematical programming} is defined as a means of maximizing a quantity known +as {\em objective function}, subject to a set of constraints represented by +equations and inequalities. Some known subtopics of mathematical programming are +linear programming, nonlinear programming, multiobjective programming, goal +programming, dynamic programming, and multilevel programming. + +It is impossible to cover in a single chapter every concept of mathematical +programming. This chapter introduces only the basic concepts and techniques of +mathematical programming such that readers gain an understanding of them +throughout the book. + + +\section{Single-Objective Programming} +The general form of single-objective programming (SOP) is written +as follows, +\begin{equation}\tag*{(123)} % 如果附录中的公式不想让它出现在公式索引中,那就请 + % 用 \tag*{xxxx} +\left\{\begin{array}{l} +\max \,\,f(x)\\[0.1 cm] +\mbox{subject to:} \\ [0.1 cm] +\qquad g_j(x)\le 0,\quad j=1,2,\cdots,p +\end{array}\right. +\end{equation} +which maximizes a real-valued function $f$ of +$x=(x_1,x_2,\cdots,x_n)$ subject to a set of constraints. + +\newtheorem{mpdef}{Definition}[chapter] +\begin{mpdef} +In SOP, we call $x$ a decision vector, and +$x_1,x_2,\cdots,x_n$ decision variables. The function +$f$ is called the objective function. The set +\begin{equation}\tag*{(456)} % 这里同理,其它不再一一指定。 +S=\left\{x\in\Re^n\bigm|g_j(x)\le 0,\,j=1,2,\cdots,p\right\} +\end{equation} +is called the feasible set. An element $x$ in $S$ is called a +feasible solution. +\end{mpdef} + +\newtheorem{mpdefop}[mpdef]{Definition} +\begin{mpdefop} +A feasible solution $x^*$ is called the optimal +solution of SOP if and only if +\begin{equation} +f(x^*)\ge f(x) +\end{equation} +for any feasible solution $x$. +\end{mpdefop} + +One of the outstanding contributions to mathematical programming was known as +the Kuhn-Tucker conditions\ref{eq:ktc}. In order to introduce them, let us give +some definitions. An inequality constraint $g_j(x)\le 0$ is said to be active at +a point $x^*$ if $g_j(x^*)=0$. A point $x^*$ satisfying $g_j(x^*)\le 0$ is said +to be regular if the gradient vectors $\nabla g_j(x)$ of all active constraints +are linearly independent. + +Let $x^*$ be a regular point of the constraints of SOP and assume that all the +functions $f(x)$ and $g_j(x),j=1,2,\cdots,p$ are differentiable. If $x^*$ is a +local optimal solution, then there exist Lagrange multipliers +$\lambda_j,j=1,2,\cdots,p$ such that the following Kuhn-Tucker conditions hold, +\begin{equation} +\label{eq:ktc} +\left\{\begin{array}{l} + \nabla f(x^*)-\sum\limits_{j=1}^p\lambda_j\nabla g_j(x^*)=0\\[0.3cm] + \lambda_jg_j(x^*)=0,\quad j=1,2,\cdots,p\\[0.2cm] + \lambda_j\ge 0,\quad j=1,2,\cdots,p. +\end{array}\right. +\end{equation} +If all the functions $f(x)$ and $g_j(x),j=1,2,\cdots,p$ are convex and +differentiable, and the point $x^*$ satisfies the Kuhn-Tucker conditions +(\ref{eq:ktc}), then it has been proved that the point $x^*$ is a global optimal +solution of SOP. + +\subsection{Linear Programming} +\label{sec:lp} + +If the functions $f(x),g_j(x),j=1,2,\cdots,p$ are all linear, then SOP is called +a {\em linear programming}. + +The feasible set of linear is always convex. A point $x$ is called an extreme +point of convex set $S$ if $x\in S$ and $x$ cannot be expressed as a convex +combination of two points in $S$. It has been shown that the optimal solution to +linear programming corresponds to an extreme point of its feasible set provided +that the feasible set $S$ is bounded. This fact is the basis of the {\em simplex + algorithm} which was developed by Dantzig as a very efficient method for +solving linear programming. +\begin{table}[ht] +\centering + \centering + \caption*{Table~1\hskip1em This is an example for manually numbered table, which + would not appear in the list of tables.} + \label{tab:badtabular2} + \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline + \multicolumn{2}{|c|}{Network Topology} & \# of nodes & + \multicolumn{3}{c|}{\# of clients} & Server \\\hline + GT-ITM & Waxman Transit-Stub & 600 & + \multirow{2}{2em}{2\%}& + \multirow{2}{2em}{10\%}& + \multirow{2}{2em}{50\%}& + \multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3} + \multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline + \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3} + & \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline +\end{tabular} +\end{table} + +Roughly speaking, the simplex algorithm examines only the extreme points of the +feasible set, rather than all feasible points. At first, the simplex algorithm +selects an extreme point as the initial point. The successive extreme point is +selected so as to improve the objective function value. The procedure is +repeated until no improvement in objective function value can be made. The last +extreme point is the optimal solution. + +\subsection{Nonlinear Programming} + +If at least one of the functions $f(x),g_j(x),j=1,2,\cdots,p$ is nonlinear, then +SOP is called a {\em nonlinear programming}. + +A large number of classical optimization methods have been developed to treat +special-structural nonlinear programming based on the mathematical theory +concerned with analyzing the structure of problems. +\begin{figure}[h] + \centering + \includegraphics{hello.eps} + \caption*{Figure~1\hskip1em This is an example for manually numbered figure, + which would not appear in the list of figures.} + \label{tab:badfigure2} +\end{figure} + +Now we consider a nonlinear programming which is confronted solely with +maximizing a real-valued function with domain $\Re^n$. Whether derivatives are +available or not, the usual strategy is first to select a point in $\Re^n$ which +is thought to be the most likely place where the maximum exists. If there is no +information available on which to base such a selection, a point is chosen at +random. From this first point an attempt is made to construct a sequence of +points, each of which yields an improved objective function value over its +predecessor. The next point to be added to the sequence is chosen by analyzing +the behavior of the function at the previous points. This construction continues +until some termination criterion is met. Methods based upon this strategy are +called {\em ascent methods}, which can be classified as {\em direct methods}, +{\em gradient methods}, and {\em Hessian methods} according to the information +about the behavior of objective function $f$. Direct methods require only that +the function can be evaluated at each point. Gradient methods require the +evaluation of first derivatives of $f$. Hessian methods require the evaluation +of second derivatives. In fact, there is no superior method for all +problems. The efficiency of a method is very much dependent upon the objective +function. + +\subsection{Integer Programming} + +{\em Integer programming} is a special mathematical programming in which all of +the variables are assumed to be only integer values. When there are not only +integer variables but also conventional continuous variables, we call it {\em + mixed integer programming}. If all the variables are assumed either 0 or 1, +then the problem is termed a {\em zero-one programming}. Although integer +programming can be solved by an {\em exhaustive enumeration} theoretically, it +is impractical to solve realistically sized integer programming problems. The +most successful algorithm so far found to solve integer programming is called +the {\em branch-and-bound enumeration} developed by Balas (1965) and Dakin +(1965). The other technique to integer programming is the {\em cutting plane + method} developed by Gomory (1959). + +\hfill\textit{Uncertain Programming\/}\quad(\textsl{BaoDing Liu, 2006.2}) + +\chapter{外文资料的调研阅读报告或书面翻译} +这是附录~\ref{cha:engorg} 对应的翻译结果。 + +\section{单目标规划} +北冥有鱼,其名为鲲。鲲之大,不知其几千里也。化而为鸟,其名为鹏。鹏之背,不知其几 +千里也。怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。 +\begin{equation}\tag*{(123)} + p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}= +\frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})} +\end{equation} + +吾生也有涯,而知也无涯。以有涯随无涯,殆已!已而为知者,殆而已矣!为善无近名,为 +恶无近刑,缘督以为经,可以保身,可以全生,可以养亲,可以尽年。 + +\subsection{线性规划} +庖丁为文惠君解牛,手之所触,肩之所倚,足之所履,膝之所倚,砉然响然,奏刀騞然,莫 +不中音,合于桑林之舞,乃中经首之会。 +\begin{table}[ht] +\centering + \centering + \caption*{表~1\hskip1em 这是手动编号但不出现在索引中的一个表格例子。} + \label{tab:badtabular3} + \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline + \multicolumn{2}{|c|}{Network Topology} & \# of nodes & + \multicolumn{3}{c|}{\# of clients} & Server \\\hline + GT-ITM & Waxman Transit-Stub & 600 & + \multirow{2}{2em}{2\%}& + \multirow{2}{2em}{10\%}& + \multirow{2}{2em}{50\%}& + \multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3} + \multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline + \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3} + & \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline +\end{tabular} +\end{table} + +文惠君曰:“嘻,善哉!技盖至此乎?”庖丁释刀对曰:“臣之所好者道也,进乎技矣。始臣之 +解牛之时,所见无非全牛者;三年之后,未尝见全牛也;方今之时,臣以神遇而不以目视, +官知止而神欲行。依乎天理,批大郤,导大窾,因其固然。技经肯綮之未尝,而况大坬乎! +良庖岁更刀,割也;族庖月更刀,折也;今臣之刀十九年矣,所解数千牛矣,而刀刃若新发 +于硎。彼节者有间而刀刃者无厚,以无厚入有间,恢恢乎其于游刃必有余地矣。是以十九年 +而刀刃若新发于硎。虽然,每至于族,吾见其难为,怵然为戒,视为止,行为迟,动刀甚微 +,謋然已解,如土委地。提刀而立,为之而四顾,为之踌躇满志,善刀而藏之。” + +文惠君曰:“善哉!吾闻庖丁之言,得养生焉。” + + +\subsection{非线性规划} +孔子与柳下季为友,柳下季之弟名曰盗跖。盗跖从卒九千人,横行天下,侵暴诸侯。穴室枢 +户,驱人牛马,取人妇女。贪得忘亲,不顾父母兄弟,不祭先祖。所过之邑,大国守城,小 +国入保,万民苦之。孔子谓柳下季曰:“夫为人父者,必能诏其子;为人兄者,必能教其弟 +。若父不能诏其子,兄不能教其弟,则无贵父子兄弟之亲矣。今先生,世之才士也,弟为盗 +跖,为天下害,而弗能教也,丘窃为先生羞之。丘请为先生往说之。” +\begin{figure}[h] + \centering + \includegraphics{hello.eps} + \caption*{图~1\hskip1em 这是手动编号但不出现索引中的图片的例子。} + \label{tab:badfigure3} +\end{figure} + +柳下季曰:“先生言为人父者必能诏其子,为人兄者必能教其弟,若子不听父之诏,弟不受 +兄之教,虽今先生之辩,将奈之何哉?且跖之为人也,心如涌泉,意如飘风,强足以距敌, +辩足以饰非。顺其心则喜,逆其心则怒,易辱人以言。先生必无往。” + +孔子不听,颜回为驭,子贡为右,往见盗跖。 + +\subsection{整数规划} +盗跖乃方休卒徒大山之阳,脍人肝而餔之。孔子下车而前,见谒者曰:“鲁人孔丘,闻将军 +高义,敬再拜谒者。”谒者入通。盗跖闻之大怒,目如明星,发上指冠,曰:“此夫鲁国之 +巧伪人孔丘非邪?为我告之:尔作言造语,妄称文、武,冠枝木之冠,带死牛之胁,多辞缪 +说,不耕而食,不织而衣,摇唇鼓舌,擅生是非,以迷天下之主,使天下学士不反其本,妄 +作孝弟,而侥幸于封侯富贵者也。子之罪大极重,疾走归!不然,我将以子肝益昼餔之膳。” + + +\chapter{其它附录} +前面两个附录主要是给本科生做例子。其它附录的内容可以放到这里,当然如果你愿意,可 +以把这部分也放到独立的文件中,然后将其~\verb|\input| 到主文件中。
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/chap01.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/chap01.tex new file mode 100644 index 00000000000..c447358902a --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/chap01.tex @@ -0,0 +1,525 @@ + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: + +\chapter{带~English 的标题} +\label{cha:intro} + +这是~\thuthesis{} 的示例文档,基本上覆盖了模板中所有格式的设置。建议大家在使用模 +板之前,除了阅读《\thuthesis{}用户手册》,这个示例文档也最好能看一看。 + +小老鼠偷吃热凉粉;短长虫环绕矮高粱。\footnote{韩愈(768-824),字退之,河南河阳( + 今河南孟县)人,自称郡望昌黎,世称韩昌黎。幼孤贫刻苦好学,德宗贞元八年进士。曾 + 任监察御史,因上疏请免关中赋役,贬为阳山县令。后随宰相裴度平定淮西迁刑部侍郎, + 又因上表谏迎佛骨,贬潮州刺史。做过吏部侍郎,死谥文公,故世称韩吏部、韩文公。是 + 唐代古文运动领袖,与柳宗元合称韩柳。诗力求险怪新奇,雄浑重气势。} + + +\section{封面相关} +封面的例子请参看~cover.tex。主要符号表参看~denation.tex,附录和个人简历分别参看~appendix01.tex +和~resume.tex。里面的命令都非常简单,一看即会。\footnote{你说还是看不懂?怎么会呢?} + +\section{字体命令} +\label{sec:first} + +苏轼(1037-1101):北宋文学家、书画家。字子瞻,号东坡居士,眉州眉山(今属四川)人 +。苏洵子。嘉佑进士。神宗时曾任祠部员外郎,因反对王安石新法而求外职,任杭州通判, +知密州、徐州、湖州。后以作诗“谤讪朝廷” 罪贬黄州。哲宗时任翰林学士,曾出知杭州 +、颖州等,官至礼部尚书。后又贬谪惠州、儋州。北还后第二年病死常州。南宋时追谥文忠 +。与父洵弟辙,合称“三苏”。在政治上属于旧党,但也有改革弊政的要求。其文汪洋恣肆 +,明白畅达, 为“唐宋八大家”之一。其诗清新豪健,善用夸张比喻,在艺术表现方面独 +具风格。少数诗篇也能反映民间疾苦,指责统治者的奢侈骄纵。词开豪放一派,对后代很有 +影响。《念奴娇·赤壁怀古》、《水调歌头·丙辰中秋》传诵甚广。 + +{\kai 坡仙擅长行书、楷书,取法李邕、徐浩、颜真卿、杨凝式,而能自创新意。用笔丰腴 + 跌宕,有天真烂漫之趣。与蔡襄、黄庭坚、米芾并称“宋四家”。能画竹,学文同, 也 + 喜作枯木怪石。论画主张“神似”,认为“论画以形似,见与儿童邻”;高度评价“诗中 + 有画,画中有诗”的艺术造诣。诗文有《东坡七集》等。存世书迹有《答谢民师论文帖》 + 、《祭黄几道文》、《前赤壁赋》、《黄州寒食诗帖》等。 画迹有《枯木怪石图》、《 + 竹石图》等。} + +{\fs 易与天地准,故能弥纶天地之道。仰以观於天文,俯以察於地理,是故知幽明之故。原 + 始反终,故知死生之说。精气为物,游魂为变,是故知鬼神之情状。与天地相似,故不违 + 。知周乎万物,而道济天下,故不过。旁行而不流,乐天知命,故不忧。安土敦乎仁,故 + 能爱。范围天地之化而不过,曲成万物而不遗,通乎昼夜之道而知,故神无方而易无体。} + +{\you 有天地,然后万物生焉。盈天地之间者,唯万物,故受之以屯;屯者盈也,屯者物之 + 始生也。物生必蒙,故受之以蒙;蒙者蒙也,物之穉也。物穉不可不养也,故受之以需; + 需者饮食之道也。饮食必有讼,故受之以讼。讼必有众起,故受之以师;师者众也。众必 + 有所比,故受之以比;比者比也。比必有所畜也,故受之以小畜。物畜然后有礼,故受之 + 以履。} + +{\hei 履而泰,然后安,故受之以泰;泰者通也。物不可以终通,故受之以否。物不可以终 + 否,故受之以同人。与人同者,物必归焉,故受之以大有。有大者不可以盈,故受之以谦 + 。有大而能谦,必豫,故受之以豫。豫必有随,故受之以随。以喜随人者,必有事,故受 + 之以蛊;蛊者事也。} + +{\li 有事而后可大,故受之以临;临者大也。物大然后可观,故受之以观。可观而后有所合 + ,故受之以噬嗑;嗑者合也。物不可以苟合而已,故受之以贲;贲者饰也。致饰然后亨, + 则尽矣,故受之以剥;剥者剥也。物不可以终尽,剥穷上反下,故受之以复。复则不妄矣 + ,故受之以无妄。} + +{\song 有无妄然后可畜,故受之以大畜。物畜然后可养,故受之以颐;颐者养也。不养则不可动, +故受之以大过。物不可以终过,故受之以坎;坎者陷也。陷必有所丽,故受之以离;离者丽 +也。} + +\section{表格样本} +\label{chap1:sample:table} + +\subsection{基本表格} +\label{sec:basictable} + +模板中关于表格的宏包有三个:~\textsf{booktabs}、\textsf{array} 和 +~\textsf{longtabular}, 命令有一个~\verb|\hlinewd|。三线表可以用 +~\textsf{booktabs} 提供的~\verb|\toprule|、\verb|\midrule| 和~\verb|\bottomrule|。它 +们与~\textsf{longtable} 能很好的配合使用。如果表格比较简单的话可以直接用命令~\verb|hlinewd{xpt}| 控制。 +\begin{table}[htb] + \centering + \begin{minipage}[t]{0.8\linewidth} % 如果想在表格中使用脚注,minipage是个不错的办法 + \caption[模板文件。]{模板文件。如果表格的标题很长,那么在表格索引中就会很不美 + 观,所以要像~chapter 那样在前面用中括号写一个简短的标题。这个标题会出现在索 + 引中。} + \label{tab:template-files} + \begin{tabular*}{\linewidth}{lp{10cm}} + \toprule[1.5pt] + {\hei 文件名} & {\hei 描述} \\\midrule[1pt] + thuthesis.ins & \LaTeX{} 安装文件,docstrip\footnote{表格中的脚注} \\ + thuthesis.dtx & 所有的一切都在这里面\footnote{再来一个}。\\ + thuthesis.cls & 模板类文件。\\ + thuthesis.cfg & 模板配置文。cls 和~cfg 由前两个文件生成。\\ + thubib.bst & 参考文献~Bibtex 样式文件。\\ + thutils.sty & 常用的包和命令写在这里,减轻主文件的负担。\\ + \bottomrule[1.5pt] + \end{tabular*} + \end{minipage} +\end{table} + +首先来看一个最简单的表格。表~\ref{tab:template-files} 列举了本模板主要文件及其功 +能。请大家注意三线表中各条线对应的命令。这个例子还展示了如何在表格中正确使用脚注 +。由于~\LaTeX{} 本身不支持在表格中使用~\verb|\footnote|,所以我们不得不将表格放在小页中, +而且最好将表格的宽度设置为小页的宽度,这样脚注看起来才更美观。 + +\subsection{复杂表格} +\label{sec:complicatedtable} + +我们经常会在表格下方标注数据来源,或者对表格里面的条目进行解释。前面的脚注是一种 +不错的方法,如果你不喜欢脚注。那么完全可以在表格后面自己写注释,比如表 +~\ref{tab:tabexamp1}。 +\begin{table}[h] + \centering + \caption{复杂表格示例~1。} + \label{tab:tabexamp1} + \begin{minipage}[t]{0.8\textwidth} + \begin{tabularx}{\linewidth}{|l|X|X|X|X|} + \hline + \multirow{2}*{\backslashbox{x}{y}} & \multicolumn{2}{c|}{First Half} & \multicolumn{2}{c|}{Second Half}\\\cline{2-5} + & 1st Qtr &2nd Qtr&3rd Qtr&4th Qtr \\ \hline + East$^{*}$ & 20.4& 27.4& 90& 20.4 \\ + West$^{**}$ & 30.6 & 38.6 & 34.6 & 31.6 \\ \hline + \end{tabularx}\\[2pt] + \footnotesize 注:数据来源《\thuthesis{} 使用手册》。\\ + *:东部\\ + **:西部 + \end{minipage} +\end{table} + +此外,表~\ref{tab:tabexamp1} 同时还演示了另外两个功能:1)通过~\textsf{tabularx} 的 +~\texttt{|X|} 扩展实现表格自动放大;2)通过命令~\verb|\backslashbox| 在表头部分 +插入反斜线。 + + +浮动体的并排放置一般有两种情况:1)二者没有关系,为两个独立的浮动体;2)二者隶属 +于同一个浮动体。对表格来说并排表格既可以像图~\ref{tab:parallel1}、图 +~\ref{tab:parallel2} 使用小页环境,也可以如图~\ref{tab:subtable} 使用子表格来做。 +图的例子参见第~\ref{sec:multifig} 节。 +\begin{table} +\noindent\begin{minipage}{0.5\textwidth} +\centering +\caption{第一个并排子表格。} +\label{tab:parallel1} +\begin{tabular}{p{2cm}p{2cm}} +\toprule[1.5pt] +111 & 222 \\\midrule[1pt] +222 & 333 \\\bottomrule[1.5pt] +\end{tabular} +\end{minipage} +\begin{minipage}{0.5\textwidth} +\centering +\caption{第二个并排子表格。} +\label{tab:parallel2} +\begin{tabular}{p{2cm}p{2cm}} +\toprule[1.5pt] +111 & 222 \\\midrule[1pt] +222 & 333 \\\bottomrule[1.5pt] +\end{tabular} +\end{minipage} +\end{table} +\begin{table} +\centering +\caption{并排子表格。} +\label{tab:subtable} +\subfloat[第一个子表格。]{ +\begin{tabular}{p{2cm}p{2cm}} +\toprule[1.5pt] +111 & 222 \\\midrule[1pt] +222 & 333 \\\bottomrule[1.5pt] +\end{tabular}}\hskip2cm +\subfloat[第二个子表格]{ +\begin{tabular}{p{2cm}p{2cm}} +\toprule[1.5pt] +111 & 222 \\\midrule[1pt] +222 & 333 \\\bottomrule[1.5pt] +\end{tabular}} +\end{table} + +不可否认~\LaTeX{} 的表格功能没有想象中的那么强大,不过只要你足够认真,足够细致,那么 +同样可以排出来非常复杂非常漂亮的表格。请参看表~\ref{tab:tabexamp2}。 +\begin{table}[hb] + \centering\dawu[1.3] + \caption{复杂表格示例~2。} + \label{tab:tabexamp2} + \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline + \multicolumn{2}{|c|}{Network Topology} & \# of nodes & + \multicolumn{3}{c|}{\# of clients} & Server \\\hline + GT-ITM & Waxman Transit-Stub & 600 & + \multirow{2}{2em}{2\%}& + \multirow{2}{2em}{10\%}& + \multirow{2}{2em}{50\%}& + \multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3} + \multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline + \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\thuthesis}}\\\cline{2-3} + & \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline +\end{tabular} +\end{table} + +如果您要排版的表格长度超过一页,那么推荐使用~\textsf{longtable} 或者 +~\textsf{supertabular} 宏包,模板对~\textsf{longtable} 进行了相应的设置,所以用起 +来可能简单一些。表~\ref{tab:performance} 就是~\textsf{longtable} 的简单示例。 +\begin{longtable}[c]{crrrrrr} +\caption{实验数据。}\label{tab:performance}\\ +\endfirsthead +\multicolumn{7}{c}{续表~\thetable\hskip1em 标题}\\ +\hline +\endhead +\hline +\multicolumn{7}{r}{续下页} +\endfoot +\endlastfoot +\toprule[1.5pt] + 测试程序 & \multicolumn{1}{c}{正常运行} & \multicolumn{1}{c}{同步} & \multicolumn{1}{c}{检查点} & \multicolumn{1}{c}{卷回恢复} +& \multicolumn{1}{c}{进程迁移} & \multicolumn{1}{c}{检查点} \\ +& \multicolumn{1}{c}{时间~(s)}& \multicolumn{1}{c}{时间~(s)}& +\multicolumn{1}{c}{时间~(s)}& \multicolumn{1}{c}{时间~(s)}& \multicolumn{1}{c}{ + 时间~(s)}& 文件(KB)\\\midrule[1pt] +CG.A.2 & 23.05 & 0.002 & 0.116 & 0.035 & 0.589 & 32491 \\ +CG.A.4 & 15.06 & 0.003 & 0.067 & 0.021 & 0.351 & 18211 \\ +CG.A.8 & 13.38 & 0.004 & 0.072 & 0.023 & 0.210 & 9890 \\ +CG.B.2 & 867.45 & 0.002 & 0.864 & 0.232 & 3.256 & 228562 \\ +CG.B.4 & 501.61 & 0.003 & 0.438 & 0.136 & 2.075 & 123862 \\ +CG.B.8 & 384.65 & 0.004 & 0.457 & 0.108 & 1.235 & 63777 \\ +MG.A.2 & 112.27 & 0.002 & 0.846 & 0.237 & 3.930 & 236473 \\ +MG.A.4 & 59.84 & 0.003 & 0.442 & 0.128 & 2.070 & 123875 \\ +MG.A.8 & 31.38 & 0.003 & 0.476 & 0.114 & 1.041 & 60627 \\ +MG.B.2 & 526.28 & 0.002 & 0.821 & 0.238 & 4.176 & 236635 \\ +MG.B.4 & 280.11 & 0.003 & 0.432 & 0.130 & 1.706 & 123793 \\ +MG.B.8 & 148.29 & 0.003 & 0.442 & 0.116 & 0.893 & 60600 \\ +LU.A.2 & 2116.54 & 0.002 & 0.110 & 0.030 & 0.532 & 28754 \\ +LU.A.4 & 1102.50 & 0.002 & 0.069 & 0.017 & 0.255 & 14915 \\ +LU.A.8 & 574.47 & 0.003 & 0.067 & 0.016 & 0.192 & 8655 \\ +LU.B.2 & 9712.87 & 0.002 & 0.357 & 0.104 & 1.734 & 101975 \\ +LU.B.4 & 4757.80 & 0.003 & 0.190 & 0.056 & 0.808 & 53522 \\ +LU.B.8 & 2444.05 & 0.004 & 0.222 & 0.057 & 0.548 & 30134 \\ +EP.A.2 & 123.81 & 0.002 & 0.010 & 0.003 & 0.074 & 1834 \\ +EP.A.4 & 61.92 & 0.003 & 0.011 & 0.004 & 0.073 & 1743 \\ +EP.A.8 & 31.06 & 0.004 & 0.017 & 0.005 & 0.073 & 1661 \\ +EP.B.2 & 495.49 & 0.001 & 0.009 & 0.003 & 0.196 & 2011 \\ +EP.B.4 & 247.69 & 0.002 & 0.012 & 0.004 & 0.122 & 1663 \\ +EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\ +\bottomrule[1.5pt] +\end{longtable} + +\subsection{其它} +\label{sec:tableother} + +\begin{table}[ht] +\centering + \begin{minipage}{0.45\linewidth} + \centering + \caption*{表~1.111\hskip1em 这是一个手动编号,不出现在索引中的坏表格。} + \label{tab:badtabular} + \begin{picture}(150,50) + \framebox(150,50)[c]{\thuthesis} + \end{picture} + \end{minipage}\hfill + \begin{minipage}{0.45\linewidth} + \centering + \begin{picture}(150,50) + \framebox(150,50)[c]{薛瑞尼} + \end{picture} + \caption*{Figure~1.111\hskip1em 这是一个手动编号,不出现在索引中的坏图。} + \label{tab:badfigure} + \end{minipage} +\end{table} + +有的同学不想让某个表格或者图片出现在索引里面,那么请使用命令~\verb|\caption*{}|, +这个命令不会给表格编号,也就是出来的只有标题文字而没有“表~XX”,“图~XX”,否则 +索引里面序号不连续就显得不伦不类,这也是~\LaTeX{} 里星号命令默认的规则。 + +有这种需求的多是本科同学的英文资料翻译部分,如果你觉得附录中英文原文中的表格和图 +片显示成“ 表”和“图”很不协调的话,一个很好的办法就是用~\verb|\caption*|,参数 +随便自己写,比如不守规矩的表~1.111 和图~1.111 能满足这种特殊需要(可以参看附录部 +分)。 + +如果你的确想让它编号,但又不想让它出现在索引中的话,那就自己看看代码改一改吧,我 +目前不打算给模板增加这种另类命令。 + +最后,虽然大家不一定会独立使用小页,但是关于小页中的脚注还是有必要提一下。请看下 +面的例子。 + +\begin{minipage}[t]{\linewidth-2\parindent} + 柳宗元,字子厚(773-819),河东(今永济县)人\footnote{山西永济水饺。},是唐代 + 杰出的文学家,哲学家,同时也是一位政治改革家。与韩愈共同倡导唐代古文运动,并称 + 韩柳\footnote{唐宋八大家之首二位。}。 +\end{minipage}\\[-5pt] + +唐朝安史之乱后,宦官专权,藩镇割据,土地兼并日渐严重,社会生产破坏严重,民不聊生 +。柳宗元对这种社会现实极为不满,他积极参加了王叔文领导的“永济革新”,并成为这一 +运动的中坚人物。他们革除弊政,打击权奸,触犯了宦官和官僚贵族利益,在他们的联合反 +扑下,改革失败了,柳宗元被贬为永州司马。 + +\section{定理环境} +\label{sec:theorem} + +给大家演示一下各种和证明有关的环境: + +\begin{assumption} +待月西厢下,迎风户半开;隔墙花影动,疑是玉人来。 +\begin{eqnarray} + \label{eq:eqnxmp} + c & = & a^2 - b^2\\ + & = & (a+b)(a-b) +\end{eqnarray} +\end{assumption} + +千辛万苦,历尽艰难,得有今日。然相从数千里,未曾哀戚。今将渡江,方图百年欢笑,如 +何反起悲伤?(引自《杜十娘怒沉百宝箱》) + +\begin{definition} +子曰:「道千乘之国,敬事而信,节用而爱人,使民以时。」 +\end{definition} + +千古第一定义!问世间、情为何物,只教生死相许?天南地北双飞客,老翅几回寒暑。欢乐趣,离别苦,就中更有痴儿女。 +君应有语,渺万里层云,千山暮雪,只影向谁去? + +横汾路,寂寞当年箫鼓,荒烟依旧平楚。招魂楚些何嗟及,山鬼暗谛风雨。天也妒,未信与,莺儿燕子俱黄土。 +千秋万古,为留待骚人,狂歌痛饮,来访雁丘处。 + +\begin{proposition} + 曾子曰:「吾日三省吾身 \pozhehao 为人谋而不忠乎?与朋友交而不信乎?传不习乎?」 +\end{proposition} + +多么凄美的命题啊!其日牛马嘶,新妇入青庐,奄奄黄昏后,寂寂人定初,我命绝今日, +魂去尸长留,揽裙脱丝履,举身赴清池,府吏闻此事,心知长别离,徘徊庭树下,自挂东南 +枝。 + +\begin{remark} +天不言自高,水不言自流。 +\begin{gather*} +\begin{split} +\varphi(x,z) +&=z-\gamma_{10}x-\gamma_{mn}x^mz^n\\ +&=z-Mr^{-1}x-Mr^{-(m+n)}x^mz^n +\end{split}\\[6pt] +\begin{align} \zeta^0&=(\xi^0)^2,\\ +\zeta^1 &=\xi^0\xi^1,\\ +\zeta^2 &=(\xi^1)^2, +\end{align} +\end{gather*} +\end{remark} + +天尊地卑,乾坤定矣。卑高以陈,贵贱位矣。 动静有常,刚柔断矣。方以类聚,物以群分, +吉凶生矣。在天成象,在地成形,变化见矣。鼓之以雷霆,润之以风雨,日月运行,一寒一 +暑,乾道成男,坤道成女。乾知大始,坤作成物。乾以易知,坤以简能。易则易知,简则易 +从。易知则有亲,易从则有功。有亲则可久,有功则可大。可久则贤人之德,可大则贤人之 +业。易简,而天下矣之理矣;天下之理得,而成位乎其中矣。 + +\begin{axiom} +两点间直线段距离最短。 +\begin{align} +x&\equiv y+1\pmod{m^2}\\ +x&\equiv y+1\mod{m^2}\\ +x&\equiv y+1\pod{m^2} +\end{align} +\end{axiom} + +《彖曰》:大哉乾元,万物资始,乃统天。云行雨施,品物流形。大明始终,六位时成,时乘六 +龙以御天。乾道变化,各正性命,保合大和,乃利贞。首出庶物,万国咸宁。 + +《象曰》:天行健,君子以自强不息。潜龙勿用,阳在下也。见龙再田,德施普也。终日乾乾, +反复道也。或跃在渊,进无咎也。飞龙在天,大人造也。亢龙有悔,盈不可久也。用九,天 +德不可为首也。 + +\begin{lemma} +《猫和老鼠》是我最爱看的动画片。 +\begin{multline*}\tag*{[a]} % 这个不出现在索引中 +\int_a^b\biggl\{\int_a^b[f(x)^2g(y)^2+f(y)^2g(x)^2] + -2f(x)g(x)f(y)g(y)\,dx\biggr\}\,dy \\ + =\int_a^b\biggl\{g(y)^2\int_a^bf^2+f(y)^2 + \int_a^b g^2-2f(y)g(y)\int_a^b fg\biggr\}\,dy +\end{multline*} +\end{lemma} + +行行重行行,与君生别离。相去万余里,各在天一涯。道路阻且长,会面安可知。胡马依北 +风,越鸟巢南枝。相去日已远,衣带日已缓。浮云蔽白日,游子不顾返。思君令人老,岁月 +忽已晚。 弃捐勿复道,努力加餐饭。 + +\begin{theorem}\label{the:theorem1} +犯我强汉者,虽远必诛\hfill \pozhehao 陈汤(汉) +\end{theorem} +\begin{subequations} +\begin{align} +y & = 1 \\ +y & = 0 +\end{align} +\end{subequations} +道可道,非常道。名可名,非常名。无名天地之始;有名万物之母。 故常无,欲以观其妙; +常有,欲以观其徼。此两者,同出而异名,同谓之玄。玄之又玄,众妙之门。上善若水。水 +善利万物而不争,处众人之所恶,故几于道。曲则全,枉则直,洼则盈,敝则新,少则多, +多则惑。 人法地,地法天,天法道,道法自然。知人者智,自知者明。胜人者有力,自胜 +者强。知足者富。强行者有志。不失其所者久。死而不亡者寿。 + +\begin{proof} +燕赵古称多感慨悲歌之士。董生举进士,连不得志于有司,怀抱利器,郁郁适兹土,吾 +知其必有合也。董生勉乎哉? + +夫以子之不遇时,苟慕义强仁者,皆爱惜焉,矧燕、赵之士出乎其性者哉!然吾尝闻 +风俗与化移易,吾恶知其今不异于古所云邪?聊以吾子之行卜之也。董生勉乎哉? + +吾因子有所感矣。为我吊望诸君之墓,而观于其市,复有昔时屠狗者乎?为我谢 +曰:“明天子在上,可以出而仕矣!” \hfill\pozhehao 韩愈《送董邵南序》 +\end{proof} + +\begin{corollary} + 四川话配音的《猫和老鼠》是世界上最好看最好听最有趣的动画片。 +\begin{alignat}{3} +V_i & =v_i - q_i v_j, & \qquad X_i & = x_i - q_i x_j, + & \qquad U_i & = u_i, + \qquad \text{for $i\ne j$;}\label{eq:B}\\ +V_j & = v_j, & \qquad X_j & = x_j, + & \qquad U_j & u_j + \sum_{i\ne j} q_i u_i. +\end{alignat} +\end{corollary} + +迢迢牵牛星,皎皎河汉女。 +纤纤擢素手,札札弄机杼。 +终日不成章,泣涕零如雨。 +河汉清且浅,相去复几许。 +盈盈一水间,脉脉不得语。 + +\begin{example} + 大家来看这个例子。 +\begin{equation} +\label{ktc} +\left\{\begin{array}{l} +\nabla f({\mbox{\boldmath $x$}}^*)-\sum\limits_{j=1}^p\lambda_j\nabla g_j({\mbox{\boldmath $x$}}^*)=0\\[0.3cm] +\lambda_jg_j({\mbox{\boldmath $x$}}^*)=0,\quad j=1,2,\cdots,p\\[0.2cm] +\lambda_j\ge 0,\quad j=1,2,\cdots,p. +\end{array}\right. +\end{equation} +\end{example} + +\begin{exercise} + 清列出~Andrew S. Tanenbaum 和~W. Richard Stevens 的所有著作。 +\end{exercise} + +\begin{conjecture} \textit{Poincare Conjecture} If in a closed three-dimensional + space, any closed curves can shrink to a point continuously, this space can be + deformed to a sphere. +\end{conjecture} + +\begin{problem} + 回答还是不回答,是个问题。 +\end{problem} + +如何引用定理~\ref{the:theorem1} 呢?加上~\verb|label| 使用~\verb|ref| 即可。 + +\section{参考文献} +\label{sec:bib} +当然参考文献可以直接写~bibitem,虽然费点功夫,但是好控制,各种格式可以自己随意改 +写。 + +本模板推荐使用~BIB\TeX,样式文件为~thubib.bst,基本符合学校的参考文献格式(如专利 +等引用未加详细测试)。看看这个例子,关于书的\cite{tex, companion, ColdSources},还有这些\cite{Krasnogor2004e, clzs, zjsw},关于杂志的\cite{ELIDRISSI94, + MELLINGER96, SHELL02},硕士论文\cite{zhubajie, metamori2004},博士论文 +\cite{shaheshang, FistSystem01},会议论文\cite{DPMG},技术报告\cite{NPB2}。中文参 +考文献\cite{cnarticle}应增加~\texttt{lang=``chinese''}~字段,以便进行相应处理。另 +外,这个~bst~对中文文献\cite{cnproceed}的支持并不是十全十美,如果有不如意的地方, +请手动修改~bbl 文件。 + +有时候不想要上标,那么可以这样~\onlinecite{shaheshang},这个非常重要。 + +\section{公式} +\label{sec:equation} +贝叶斯公式如式~(\ref{equ:chap1:bayes}),其中~$p(y|\mathbf{x})$ 为后验; +$p(\mathbf{x})$ 为先验;分母~$p(\mathbf{x})$ 为归一化因子。 +\begin{equation} +\label{equ:chap1:bayes} +p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}= +\frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})} +\end{equation} + +论文里面公式越多,\TeX{} 就越~happy。再看一个~\textsf{amsmath} 的例子: +\newcommand{\envert}[1]{\left\lvert#1\right\rvert} +\begin{equation}\label{detK2} +\det\mathbf{K}(t=1,t_1,\dots,t_n)=\sum_{I\in\mathbf{n}}(-1)^{\envert{I}} +\prod_{i\in I}t_i\prod_{j\in I}(D_j+\lambda_jt_j)\det\mathbf{A} +^{(\lambda)}(\overline{I}|\overline{I})=0. +\end{equation} + +前面定理示例部分列举了很多公式环境,可以说把常见的情况都覆盖了,大家在写公式的时 +候一定要好好看~\textsf{amsmath} 的文档,并参考模板中的用法: +\begin{multline*}\tag{[b]} % 这个出现在索引中的 +\int_a^b\biggl\{\int_a^b[f(x)^2g(y)^2+f(y)^2g(x)^2] + -2f(x)g(x)f(y)g(y)\,dx\biggr\}\,dy \\ + =\int_a^b\biggl\{g(y)^2\int_a^bf^2+f(y)^2 + \int_a^b g^2-2f(y)g(y)\int_a^b fg\biggr\}\,dy +\end{multline*} + +其实还可以看看这个多级规划: +\begin{equation}\label{bilevel} +\left\{\begin{array}{l} +\max\limits_{{\mbox{\footnotesize\boldmath $x$}}} F(x,y_1^*,y_2^*,\cdots,y_m^*)\\[0.2cm] +\mbox{subject to:}\\[0.1cm] +\qquad G(x)\le 0\\[0.1cm] +\qquad(y_1^*,y_2^*,\cdots,y_m^*)\mbox{ solves problems }(i=1,2,\cdots,m)\\[0.1cm] +\qquad\left\{\begin{array}{l} + \max\limits_{{\mbox{\footnotesize\boldmath $y_i$}}}f_i(x,y_1,y_2,\cdots,y_m)\\[0.2cm] + \mbox{subject to:}\\[0.1cm] + \qquad g_i(x,y_1,y_2,\cdots,y_m)\le 0. + \end{array}\right. +\end{array}\right. +\end{equation} +这些跟规划相关的公式都来自于刘宝碇老师《不确定规划》的课件。 + +\section{破则号} +\label{sec:pozhehao} + +中文破则号为一个两个字宽垂直居中的直线,输入法直接得到的破则号是两个断开的小短线 +(——),这看起来不舒服。所以我定义了一个破则号的命令~\verb|\pozhehao|,请看几个 +例子: +\begin{itemize} +\item 这是一个 \pozhehao 破则号 + \begin{enumerate}[(1)] + \item 同时也可以看看 + \item 不同列表环境的间距 + \end{enumerate} +\item 看起来这个要好一些 +\item 破则 \pozhehao 号就说到这里。 +\end{itemize} + +默认的列表环境上下间距很大,模板将其重定义为~\textsf{paralist} 中的压缩环境,看起 +来要好一些。如果还是不满意,自己也可以调~\verb|\itemsep| 的。\textsf{paralist} 还 +可以方便的指定标签的样式。 + diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/chap02.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/chap02.tex new file mode 100644 index 00000000000..23151e8910f --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/chap02.tex @@ -0,0 +1,111 @@ + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: + +\chapter{中华人民共和国} +\label{cha:china} + +\section{其它例子} +\label{sec:other} + +在第~\ref{cha:intro} 章中我们学习了贝叶斯公式~(\ref{equ:chap1:bayes}),这里我们复 +习一下: +\begin{equation} +\label{equ:chap2:bayes} +p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}= +\frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})} +\end{equation} + +\subsection{绘图} +\label{sec:draw} + +本模板不再预先装载任何绘图包(如~\textsf{pstricks} 等),完全由你自己来 +决定。个人觉得~\textsf{pgf} 不错,不依赖于~ps。此外还有很多针对 +~\LaTeX{} 的~GUI 作图工具,如~XFig(jFig),WinFig,Tpx,Ipe,Dia, +Inkscape,LaTeXPiX,jPicEdt,jaxdraw 等等。 + +\subsection{插图} +\label{sec:graphs} + +强烈推荐《\LaTeXe 插图指南》!关于子图形的使用细节请参看~\textsf{subfig} 的说明文档。 + +\subsubsection{一个图形} +\label{sec:onefig} +一般图形都是处在浮动环境中。之所以称为浮动是指最终排版效果图形的位置不一定与源文 +件中的位置对应\footnote{This is a feature of \LaTeX, but not a bug!},这也是刚使 +用~\LaTeX{} 同学遇到的问题。如果要强制固定浮动图形的位置,请使用~\textsf{float} +宏包,它提供了~\texttt{[H]} 参数,比如图~\ref{fig:xfig1}。 +\begin{figure}[H] % use float package if you want it here + \centering + \includegraphics{hello.eps} + \caption{利用~Xfig 绘制图。} + \label{fig:xfig1} +\end{figure} + +大学之道,在明明德,在亲民,在止于至善。知止而后有定;定而后能静;静而后能安;安 +而后能虑;虑而后能得。物有本末,事有终始。知所先后,则近道矣。古之欲明明德于天 +下者,先治其国;欲治其国者,先齐其家;欲齐其家者,先修其身;欲修其身者,先正其心; +欲正其心者,先诚其意;欲诚其意者,先致其知;致知在格物。物格而后知至;知至而后 +意诚;意诚而后心正;心正而后身 修;身修而后家齐;家齐而后国治;国治而后天下 +平。自天子以至于庶人,壹是皆以修身为本。其本乱而未治者 否矣。其所厚者薄,而其所 +薄者厚,未之有也! + +\hfill \pozhehao《大学》 + + +\subsubsection{多个图形} +\label{sec:multifig} + +如果多个图形相互独立,并不共用一个图形计数器,那么用~\verb|minipage| 或者 +~\verb|parbox| 就可以。否则,请参看图~\ref{fig:big1},它包含两个小图,分别是图 +~\ref{fig:subfig1} 和图~\ref{fig:subfig2}。推荐使用~\verb|\subfloat|,不要再用~\verb|\subfigure| +和~\verb|\subtable|。 +\begin{figure} %[h] + \centering% + \subfloat[第一个小图形]{% + \label{fig:subfig1} + \includegraphics{hello.eps}}% + \subfloat[第二个小图形。如果标题很长的话,它会自动换行,这个~caption 就是这样的例子。]{% + \label{fig:subfig2} + \includegraphics{hello.eps}} + \caption{包含子图形的大图形。} + \label{fig:big1} +\end{figure} + +古之学者必有师。师者,所以传道受业解惑也。人非生而知之者,孰能无惑?惑而不从 +师, 其为惑也,终不解矣。生乎吾前,其闻道也固先乎吾,吾从而师之;生乎吾後,其闻 +道也亦先乎吾,吾从而师之。吾师道也,夫庸知其年之先後生於吾乎!是故无贵无贱无长无 +少,道之所存,师之所存也。 + +嗟乎!师道之不传也久矣,欲人之无惑也难矣。古之圣人,其出人也远矣,犹且从师而问 +焉;今之众人,其下圣人也亦远矣,而耻学於师。是故圣益圣,愚益愚。圣人之所以为 +圣,愚人之所以为愚,其皆出於此乎?爱其子,择师而教之,於其身也,则耻师焉,惑 +焉。彼童子之师,授之书而习其句读者,非吾所谓传其道、解其惑者也。句读之不知,惑之 +不解,或师焉, 或不焉,小学而大遗,吾未见其明也。巫医、乐师、百工之人不耻相师, +士大夫之族曰“师”曰“弟子”之云者,则群聚而笑之。问之,则曰:彼与彼年相若 +也,道相似也,位卑则足羞,官盛则近谀。呜呼!师道之不复,可知矣。巫医、乐师、百 +工之人。吾子不齿,今其智乃反不能及,其可怪也欤!圣人无常师。孔子师郯子、苌子、师 +襄、老聃。郯子之徒,其贤不及孔子。孔子曰:“三人行,必有我师。”是故弟子不必不如 +师,师不必贤於弟子。闻道有先後,术业有专攻,如是而已。 + +如果要把编号的两个图形并排,那么小页就非常有用了: +\begin{figure} +\begin{minipage}{0.45\textwidth} + \includegraphics{hello.eps} + \caption{并排第一个图。} + \label{fig:parallel1} +\end{minipage}\hfill +\begin{minipage}{0.45\textwidth} + \includegraphics{hello.eps} + \caption{并排第二个图。} + \label{fig:parallel2} +\end{minipage} +\end{figure} + +李氏子蟠,年十七,好古文、六艺,经传皆通习之,不拘於时,学於余。余嘉其能行古 +道,作师说以贻之。 + +\hfill \pozhehao 韩愈(唐) + diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/cover.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/cover.tex new file mode 100644 index 00000000000..35898c73672 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/cover.tex @@ -0,0 +1,71 @@ + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: +\secretlevel{绝密} \secretyear{2100} + +\ctitle{清华大学学位论文~\LaTeX\ 模板使用示例文档} +% 根据自己的情况选,不用这样复杂 +\makeatletter +\ifthu@bachelor\relax\else + \ifthu@doctor + \cdegree{工学博士} + \else + \ifthu@master + \cdegree{工学硕士} + \fi + \fi +\fi +\makeatother + + +\cdepartment[计算机]{计算机科学与技术系} +\cmajor{计算机科学与技术} +\cauthor{薛瑞尼} +\csupervisor{郑纬民教授} +% 如果没有副指导老师或者联合指导老师,把下面两行相应的删除即可。 +\cassosupervisor{陈文光副教授} +\ccosupervisor{某某某教授} +% 日期自动生成,如果你要自己写就改这个cdate +%\cdate{\CJKdigits{\the\year}年\CJKnumber{\the\month}月} + +\etitle{An Introduction to \LaTeX{} Thesis Template of Tsinghua University} +% \edegree{Doctor of Science} +\edegree{Doctor of Engineering} +\emajor{Computer Science and Technology} +\eauthor{Xue Ruini} +\esupervisor{Professor Zheng Weimin} +\eassosupervisor{Chen Wenguang} +% 这个日期也会自动生成,你要改么? +% \edate{December, 2005} + +% 定义中英文摘要和关键字 +\begin{cabstract} + 本文介绍清华大学论文模板~\thuthesis{} 的使用方法。本模板基本符合学校的本科、硕 + 士、博士论文格式要求。 + + 本文的创新点主要有: + \begin{itemize} + \item 用例子来解释模板的使用方法; + \item 用废话来填充无关紧要的部分; + \item 一边学习摸索一边编写新代码。 + \end{itemize} +\end{cabstract} + +\ckeywords{\TeX, \LaTeX, CJK, 模板, 排版, 论文} + +\begin{eabstract} + This article presents \thuthesis, the thesis template for Tsinghua University, + and briefly introduces the usage. + + The template has been verified by the academic administration of Tsinghua + University. It fulfils the corresponding format requirements, and can generate + either bachelor, master or doctor thesis easily. You can simply insert your + information and main text into the right places in this example. + + Generally, the abstract and the key words should be consistent with the + Chinese version. +\end{eabstract} + +\ekeywords{\TeX, \LaTeX, CJK, template, typesetting, thesis} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/denotation.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/denotation.tex new file mode 100644 index 00000000000..3f78ad141f8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/denotation.tex @@ -0,0 +1,32 @@ +\begin{denotation} + +\item[HPC] 高性能计算~(High Performance Computing) +\item[cluster] 集群 +\item[Itanium] 安腾 +\item[SMP] 对称多处理 +\item[API] 应用程序编程接口 +\item[PI] 聚酰亚胺 +\item[MPI] 聚酰亚胺模型化合物,N-苯基邻苯酰亚胺 +\item[PBI] 聚苯并咪唑 +\item[MPBI] 聚苯并咪唑模型化合物,N-苯基苯并咪唑 +\item[PY] 聚吡咙 +\item[PMDA-BDA] 均苯四酸二酐与联苯四胺合成的聚吡咙薄膜 +\item[$\Delta G$] 活化自由能~(Activation Free Energy) +\item [$\chi$] 传输系数~(Transmission Coefficient) +\item[$E$] 能量 +\item[$m$] 质量 +\item[$c$] 光速 +\item[$P$] 概率 +\item[$T$] 时间 +\item[$v$] 速度 +\item[劝 学] 君子曰:学不可以已。青,取之于蓝,而青于蓝;冰,水为之,而寒于水。 + 木直中绳。(车柔)以为轮,其曲中规。虽有槁暴,不复挺者,(车柔)使之然也。故木 + 受绳则直, 金就砺则利,君子博学而日参省乎己,则知明而行无过矣。吾尝终日而思 + 矣, 不如须臾之所学也;吾尝(足齐)而望矣,不如登高之博见也。登高而招,臂非加 + 长也, 而见者远; 顺风而呼, 声非加疾也,而闻者彰。假舆马者,非利足也,而致 + 千里;假舟楫者,非能水也,而绝江河, 君子生非异也,善假于物也。积土成山,风雨 + 兴焉;积水成渊,蛟龙生焉;积善成德,而神明自得,圣心备焉。故不积跬步,无以至千 + 里;不积小流,无以成江海。骐骥一跃,不能十步;驽马十驾,功在不舍。锲而舍之,朽 + 木不折; 锲而不舍,金石可镂。蚓无爪牙之利,筋骨之强,上食埃土,下饮黄泉,用心 + 一也。蟹六跪而二螯,非蛇鳝之穴无可寄托者,用心躁也。\pozhehao{} 荀况 +\end{denotation} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/data/resume.tex b/Master/texmf-dist/doc/latex/thuthesis/example/data/resume.tex new file mode 100644 index 00000000000..2871aee5e49 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/data/resume.tex @@ -0,0 +1,45 @@ +\begin{resume} + + \resumeitem{个人简历} + + 1978~年~4~月~30~日出生于花果山水帘洞, + 1996~年~9~月考入花果山大学中文专业, + 2000~年~6~月本科毕业并获得文学学士学位, + 同年~9~月免试保送清华大学应用魔法系攻读博士至今。 + + \resumeitem{目前已正式发表的论文} + + \begin{enumerate}[{$[$}1{$]$}] + \item Harry Potter, Bajie Zhu, Sanzang Tang, Coupling + Computation of the BEM and FDM in 3D Spirit Extraction, + Interplanetarian Conference on Super-Sudden Motion, 2001, + p.716 - 719(SCI). + + \item + 哈里波特,猪八戒,唐三藏,三维寄生红孩儿边界元提取的一种预条件 + 方法,花果山炼金术月刊,2002, Vol38(16), p.207-209. + + \item Harry Potter, Bajie Zhu, Sanzang Tang, A weighted + average formula for efficient inductance and resistance + extraction, International Conference on God 2003, Vol.2, + p996 - 999. + + \item 孙悟空,猪八戒,哈里波特,牛魔王,观世音, + 六维边界元金箍棒参数提取中的有效预条件方法,蚕丝洞大学学报,2004, + Vol.44(1), p.45-49(EI). + \end{enumerate} + + + \resumeitem{目前已被录用文章} + + \begin{enumerate}[{$[$}1{$]$}] + \item Wukong Sun, Harry Potter, Sanzang Tang, + Fast 6-D Impedance Extraction of Spirit, + International Conference on Communication, Circuit and Systems, 2005, 已录用. + + \item + 孙悟空,哈里波特,唐三藏,观世音,基于三味真火的快速三维钛 + 箍棒提取算法,炼金术学报,已录用(EI). + \end{enumerate} + +\end{resume} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/figures/hello.eps b/Master/texmf-dist/doc/latex/thuthesis/example/figures/hello.eps new file mode 100644 index 00000000000..cc9802eee7a --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/figures/hello.eps @@ -0,0 +1,111 @@ +%!PS-Adobe-2.0 EPSF-2.0
+%%Title: hello.fig
+%%Creator: fig2dev Version 3.2 Patchlevel 4
+%%CreationDate: Mon Nov 14 12:04:18 2005
+%%For: xrn@gentoo ()
+%%BoundingBox: 0 0 182 51
+%%Magnification: 1.0000
+%%EndComments
+/$F2psDict 200 dict def
+$F2psDict begin
+$F2psDict /mtrx matrix put
+/col-1 {0 setgray} bind def
+/col0 {0.000 0.000 0.000 srgb} bind def
+/col1 {0.000 0.000 1.000 srgb} bind def
+/col2 {0.000 1.000 0.000 srgb} bind def
+/col3 {0.000 1.000 1.000 srgb} bind def
+/col4 {1.000 0.000 0.000 srgb} bind def
+/col5 {1.000 0.000 1.000 srgb} bind def
+/col6 {1.000 1.000 0.000 srgb} bind def
+/col7 {1.000 1.000 1.000 srgb} bind def
+/col8 {0.000 0.000 0.560 srgb} bind def
+/col9 {0.000 0.000 0.690 srgb} bind def
+/col10 {0.000 0.000 0.820 srgb} bind def
+/col11 {0.530 0.810 1.000 srgb} bind def
+/col12 {0.000 0.560 0.000 srgb} bind def
+/col13 {0.000 0.690 0.000 srgb} bind def
+/col14 {0.000 0.820 0.000 srgb} bind def
+/col15 {0.000 0.560 0.560 srgb} bind def
+/col16 {0.000 0.690 0.690 srgb} bind def
+/col17 {0.000 0.820 0.820 srgb} bind def
+/col18 {0.560 0.000 0.000 srgb} bind def
+/col19 {0.690 0.000 0.000 srgb} bind def
+/col20 {0.820 0.000 0.000 srgb} bind def
+/col21 {0.560 0.000 0.560 srgb} bind def
+/col22 {0.690 0.000 0.690 srgb} bind def
+/col23 {0.820 0.000 0.820 srgb} bind def
+/col24 {0.500 0.190 0.000 srgb} bind def
+/col25 {0.630 0.250 0.000 srgb} bind def
+/col26 {0.750 0.380 0.000 srgb} bind def
+/col27 {1.000 0.500 0.500 srgb} bind def
+/col28 {1.000 0.630 0.630 srgb} bind def
+/col29 {1.000 0.750 0.750 srgb} bind def
+/col30 {1.000 0.880 0.880 srgb} bind def
+/col31 {1.000 0.840 0.000 srgb} bind def
+
+end
+save
+newpath 0 51 moveto 0 0 lineto 182 0 lineto 182 51 lineto closepath clip newpath
+-269.0 153.7 translate
+1 -1 scale
+
+/cp {closepath} bind def
+/ef {eofill} bind def
+/gr {grestore} bind def
+/gs {gsave} bind def
+/sa {save} bind def
+/rs {restore} bind def
+/l {lineto} bind def
+/m {moveto} bind def
+/rm {rmoveto} bind def
+/n {newpath} bind def
+/s {stroke} bind def
+/sh {show} bind def
+/slc {setlinecap} bind def
+/slj {setlinejoin} bind def
+/slw {setlinewidth} bind def
+/srgb {setrgbcolor} bind def
+/rot {rotate} bind def
+/sc {scale} bind def
+/sd {setdash} bind def
+/ff {findfont} bind def
+/sf {setfont} bind def
+/scf {scalefont} bind def
+/sw {stringwidth} bind def
+/tr {translate} bind def
+/tnt {dup dup currentrgbcolor
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add
+ 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
+ bind def
+/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
+ 4 -2 roll mul srgb} bind def
+/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
+/$F2psEnd {$F2psEnteredState restore end} def
+
+$F2psBegin
+10 setmiterlimit
+0 slj 0 slc
+ 0.06000 0.06000 sc
+%
+% Fig objects follow
+%
+%
+% here starts figure with depth 50
+% Polyline
+7.500 slw
+n 4570 1725 m 4495 1725 4495 2475 75 arcto 4 {pop} repeat
+ 4495 2550 7425 2550 75 arcto 4 {pop} repeat
+ 7500 2550 7500 1800 75 arcto 4 {pop} repeat
+ 7500 1725 4570 1725 75 arcto 4 {pop} repeat
+ cp gs col0 s gr
+/NewCenturySchlbk-BoldItalic ff 300.00 scf sf
+4650 2025 m
+gs 1 -1 sc (Hello, Xfig!) col9 sh gr
+/Times-Italic ff 150.00 scf sf
+6825 2475 m
+gs 1 -1 sc (LittleLeo) col18 sh gr
+% here ends figure;
+$F2psEnd
+rs
+showpage
diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/figures/hello.fig b/Master/texmf-dist/doc/latex/thuthesis/example/figures/hello.fig new file mode 100644 index 00000000000..8b50f5cdd02 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/figures/hello.fig @@ -0,0 +1,13 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +2 4 0 1 0 7 50 -1 -1 0.000 0 0 5 0 0 5 + 7500 2550 7500 1725 4495 1725 4495 2550 7500 2550 +4 0 9 50 -1 27 20 0.0000 4 270 1605 4650 2025 Hello, Xfig!\001 +4 0 18 50 -1 1 10 0.0000 4 105 585 6825 2475 LittleLeo\001 diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/main.pdf b/Master/texmf-dist/doc/latex/thuthesis/example/main.pdf Binary files differnew file mode 100644 index 00000000000..00721b64271 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/main.pdf diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/main.tex b/Master/texmf-dist/doc/latex/thuthesis/example/main.tex new file mode 100644 index 00000000000..82199808dc4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/main.tex @@ -0,0 +1,64 @@ +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: + +\documentclass[doctor]{thuthesis} +% \documentclass[bachelor|master|doctor,dvips|dvipdfm,secret,openany|openright,arialtoc,arialtitle]{thuthesis} + +% 所有其它可能用到的包都统一放到这里了,可以根据自己的实际添加或者删除。 +\usepackage{thutils} + +% 你可以在这里修改配置文件中的定义,导言区可以使用中文。 +% \def\myname{薛瑞尼} + +\begin{document} + +% 定义所有的eps文件在 figures 子目录下 +\graphicspath{{figures/}} + + +%%% 封面部分 +\frontmatter +\input{data/cover} +\makecover + +% 目录 +\tableofcontents + +% 符号对照表 +\input{data/denotation} + + +%%% 正文部分 +\mainmatter +\include{data/chap01} +\include{data/chap02} + + +%%% 其它部分 +\backmatter +% 插图索引 +\listoffigures +% 表格索引 +\listoftables +% 公式索引 +\listofequations + + +% 参考文献 +\bibliographystyle{thubib} +\bibliography{ref/refs} + + +% 致谢 +\include{data/ack} + +% 附录 +\begin{appendix} +\input{data/appendix01} +\end{appendix} + +% 个人简历 +\include{data/resume} +\end{document} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/msmake.cmd b/Master/texmf-dist/doc/latex/thuthesis/example/msmake.cmd new file mode 100644 index 00000000000..7bc188678a8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/msmake.cmd @@ -0,0 +1,264 @@ +@rem -*- mode: conf; encoding: chinese-gbk-dos; -*- +@rem ---------------------------------------------------------------------- +@rem START OF FILE +@rem ---------------------------------------------------------------------- +@rem +@rem Filename: msmake.cmd +@rem Author: Fred Qi +@rem Created: 2006-05-20 14:09:57(+0800) +@rem Version: +@rem +@rem ---------------------------------------------------------------------- +@rem COMMENTARY +@rem ---------------------------------------------------------------------- +@rem +@rem 使用说明: +@rem +@rem 1.配置thuthesis宏包 +@rem msmake setup +@rem 在当前目录下生成thuthesis宏包及说明文档thuthesis.pdf +@rem +@rem 2.生成示例文档 +@rem msmake [shuji|main|all|other] +@rem 在当前目录下生成示例文档,或其中的一部分,或其他用户指定文档 +@rem 如果当前目录下无thuthesis.cls,将自动根据thuthesis.ins生成。 +@rem - shuji 仅生成书脊 +@rem - main 仅生成main.pdf +@rem - all 生成书脊和main.pdf,默认选项 +@rem - other 用户指定的tex文件名,由该tex文件产生pdf文档 +@rem +@rem 3.清理目录 +@rem msmake clean [other] +@rem 清理当前目录下由thuthesis宏包生成的文件,具体包括 +@rem 宏包及其说明文档thuthesis.{cls,cfg,dvi,ps,pdf} +@rem 示例文档shuji.pdf, main.{dvi,ps,pdf,aux,etc.} +@rem 如果用户指定其他文件名,不删除main.*,而删除 +@rem other.{dvi,ps,pdf,lo?,aux,bbl,blg,out* toc thm} +@rem +@rem 4.辅助图形图像文件格式转换命令: +@rem msmake epspdf [param] +@rem 将当前目录下所有eps文件用epstopdf转为pdf格式 +@rem msmake bmpeps [param] +@rem 将当前目录下所有bmp,jpg,png文件用bmeps转为eps格式 +@rem 以上两个命令中,[param]可以由用户指定转换程序所用的参数。 +@rem +@rem ---------------------------------------------------------------------- +@rem CHANGE LOG +@rem ---------------------------------------------------------------------- +@rem Last-Updated: 2006-05-26 11:47:40(+0800) [by Fred Qi@lab] +@rem Update #: 312 +@rem ---------------------------------------------------------------------- +@rem 2006-05-20 16:53:38(+0800) Fred Qi@lab +@rem msmake.cmd initial. prepaired for thuthesis 2.5 +@rem +@rem +@rem +@rem ---------------------------------------------------------------------- +@rem ---------------------------------------------------------------------- + +@echo off +set thupkg=thuthesis +set tmpfile=_clstemptest_ +set ltxparam=-quiet -c-style-errors +if /i {%1}=={clean} goto clean +if /i {%1}=={epspdf} goto epspdf +if /i {%1}=={bmpeps} goto bmpeps +if /i {%1}=={setup} goto setup +goto testcls +:clean +@rem ============================================= +@rem 清除文档生成过程中产生的临时文件 +@rem ============================================= +echo 删除thuthesis宏包相关文件 +del /f /q %thupkg%.cls %thupkg%.cfg +echo 删除thuthesis宏包的说明文档 +del /f /q %thupkg%.dvi %thupkg%.ps %thupkg%.pdf +echo 删除shuji.pdf +del /f /q shuji.pdf shuji.ps shuji.dvi +echo 删除示例文档main.pdf及生成该文档过程中产生的文件 +if {%2}=={} (set targ=main) else (set targ=%2) +del /f %targ%.dvi %targ%.ps %targ%.pdf +del /f %targ%.lo? %targ%.aux %targ%.bbl %targ%.blg +del /f %targ%.out* %targ%.toc %targ%.thm +del /f data\*.aux +echo 删除其它临时文件 +del /f /q *.log *.aux *.glo *.idx *.ilg *.ind *.out *.thm *.toc *.lot *.loe *.out.bak +goto end +@rem ============================================= +@rem 将当前目录下的eps文件转换为pdf格式 +@rem 需要用到epstopdf +@rem ============================================= +:epspdf +if /i {%2}=={} ( + set conv=call epstopdf %%i +) else ( + set conv=call epstopdf %2 %%i +) +@echo on +for %%i in (*.eps) do %conv% +@echo off +goto end +@rem ============================================= +@rem 将当前目录下的bmp,jpg,png图形转换为eps格式 +@rem 需要用到bmeps +@rem ============================================= +:bmpeps +if /i {%2}=={} (set param=-c) else (set param=%2) +set conv=call bmeps %param% %%i %%~ni.eps +@echo on +for %%i in (*.bmp *.jpg *.png) do %conv% +@echo off +goto end +:testcls +@rem ============================================= +echo 正在测试是否需要生成thuthesis宏包... +@rem ============================================= +if not exist %thupkg%.cls goto presetup +if not exist %thupkg%.cfg goto presetup +goto choose +@rem ----------------------------- +@rem this section of code is NOT used. +echo \documentclass{%thupkg%}>%tmpfile%.tex +echo \begin{document}>>%tmpfile%.tex +echo \end{document}>>%tmpfile%.tex +call latex %ltxparam% %tmpfile%.tex>nul +IF ERRORLEVEL 1 (goto presetup) else goto choose +@rem NOT used code block end. +@rem ----------------------------- +:presetup +@rem del /f /q %tmpfile%.* +echo 您没有安装或配置好thuthesis宏包, +echo 本程序试图重新生成并配置thuthesis宏包... +:setup +@rem ============================================= +@rem 生成thuthesis宏包及说明文档 +@rem ============================================= +if not exist %thupkg%.ins goto clserr4 +if exist %thupkg%.cls del /f /q %thupkg%.cls +if exist %thupkg%.cfg del /f /q %thupkg%.cfg +echo 正在生成%thupkg%宏包... +call latex %ltxparam% %thupkg%.ins +@rem IF errorlevel 1 goto clserr3 +echo 成功生成thuthesis宏包 +@rem ---------------------------------------------- +if not exist %thupkg%.dtx goto clserr2 +echo 正在生成%thupkg%宏包的说明文档... +call latex %ltxparam% %thupkg%.dtx +if errorlevel 1 goto clserr1 +call makeindex -s gind.ist -o %thupkg%.ind %thupkg%.idx +if errorlevel 1 goto clserr1 +call makeindex -s gglo.ist -o %thupkg%.gls %thupkg%.glo +if errorlevel 1 goto clserr1 +call latex %ltxparam% %thupkg%.dtx +if errorlevel 1 goto clserr1 +call gbk2uni %thupkg%.out +if errorlevel 1 goto clserr1 +call latex %ltxparam% %thupkg%.dtx +if errorlevel 1 goto clserr1 +call dvips -Ppdf -G0 %thupkg%.dvi +if errorlevel 1 goto clserr1 +call ps2pdf %thupkg%.ps +if errorlevel 1 goto clserr1 +echo 成功生成thuthesis说明文档thuthesis.pdf +@rem 清理说明文档生成过程中产生的临时文件 +del /f /q %thupkg%.log +del /f /q %thupkg%.aux +del /f /q %thupkg%.glo +del /f /q %thupkg%.gls +del /f /q %thupkg%.idx +del /f /q %thupkg%.out +del /f /q %thupkg%.out.bak +del /f /q %thupkg%.ind +del /f /q %thupkg%.ilg +del /f /q %thupkg%.toc +@rem del /f /q %thupkg%.dvi +@rem del /f /q %thupkg%.ps +goto choose +@rem ---------------------------------------------- +:clserr2 +echo 没有找到thuthesis.dtx文件 +:clserr1 +echo 无法生成说明文档thuthesis.pdf +goto end +:clserr4 +echo 没有找到thuthesis.ins文件 +:clserr3 +echo 无法生成thuthesis宏包 +goto end +:choose +if /i {%1}=={setup} goto end +set ltx=latex %ltxparam% +if /i {%1}=={shuji} goto shuji +if /i {%1}=={main} goto main +if /i {%1}=={all} goto all +if /i {%1}=={} (goto all) else goto other +:dvips +@rem ============================================= +@rem 使用latex->dvips->ps2pdf生成示例文档main.pdf +@rem ============================================= +:other +set targ=%2 +goto latex +:all +:shuji +set targ=shuji +set errmsg=pdflatex +call pdflatex shuji.tex +if errorlevel 1 goto error +@rem set errmsg=dvipdfmx +@rem dvipdfmx shuji.dvi +@rem if errorlevel 1 goto error +del /f /q %targ%.aux +del /f /q %targ%.log +del /f /q %targ%.out +del /f /q %targ%.thm +@rem del /f /q %targ%.dvi +if /i {%1}=={shuji} goto end +:main +set targ=main +goto latex +:pdf +@rem ============================================= +@rem 使用pdflatex生成示例文档main.pdf +@rem ============================================= +@echo 未实现的功能。 +goto end +:latex +@rem ============================================= +@rem 生成示例文档 +@rem ============================================= +set errmsg=%ltx% +call %ltx% %targ% +if errorlevel 1 goto error +set errmsg=bibtex +call bibtex -quiet %targ% +if errorlevel 1 goto error +set errmsg=latex +call %ltx% %targ% +if errorlevel 1 goto error +set errmsg=gbk2uni +call gbk2uni %targ% +if errorlevel 1 goto error +set errmsg=latex +call %ltx% %targ% +if errorlevel 1 goto error +if {%1}=={pdf} goto end +set errmsg=dvips +call dvips -Ppdf -G0 -ta4 %targ%.dvi +if errorlevel 1 goto error +set errmsg=ps2pdf +call ps2pdf %targ%.ps +if errorlevel 1 goto error +goto end +@rem ============================================= +@rem 示例文件生成过程中出错处理 +@rem ============================================= +:error +echo 使用%errmsg%生成%targ%.pdf的过程中出错 +:end +@rem ============================================= +@rem 执行结束 +@rem ============================================= +@rem ---------------------------------------------------------------------- +@rem END OF FILE +@rem ---------------------------------------------------------------------- diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/ref/refs.bib b/Master/texmf-dist/doc/latex/thuthesis/example/ref/refs.bib new file mode 100644 index 00000000000..091323cc9cc --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/ref/refs.bib @@ -0,0 +1,178 @@ +@INCOLLECTION{Krasnogor2004e, + AUTHOR = {N. Krasnogor}, + TITLE = {Towards robust memetic algorithms}, + BOOKTITLE = {Recent Advances in Memetic Algorithms}, + PUBLISHER = {Springer Berlin Heidelberg}, + YEAR = {2004}, + PAGES = {185-207}, + EDITOR = {W.E. Hart and N. Krasnogor and J.E. Smith}, + VOLUME = {166}, + SERIES = {Studies in Fuzziness and Soft Computing}, + ADDRESS = {New York}, +} + +@INCOLLECTION{zjsw, + AUTHOR = {班固}, + TITLE = {苏武传}, + BOOKTITLE = {传记散文英华}, + PUBLISHER = {湖北人民出版社}, + YEAR = {1998}, + PAGES = {65-69}, + EDITOR = {郑在瀛 and 汪超宏 and 周文复}, + VOLUME = {2}, + SERIES = {新古文观止丛书}, + ADDRESS = {武汉}, + lang = {zh}, +} + + +@INBOOK{clzs, + AUTHOR = {阎真}, + TITLE = {沧浪之水}, + CHAPTER = {大人物还是讲人情的}, + PAGES = {185-207}, + PUBLISHER = {人民文学出版社}, + YEAR = {2001}, + lang = {zh}, +} + +@Book{tex, + author = "Donald E. Knuth", + title = "The {\TeX} Book", + publisher = "Addison-Wesley Publishing Company", + address = "Reading, MA", + year = 1989, + edition = "15th", +} + +@Book{companion, + author = "Michel Goosens and Frank Mittelbach and Alexander Samarin", + title = "The {\LaTeX} Companion", + publisher = "Addison-Wesley Publishing Company", + address = "Reading, MA", + PAGES = "112--125", + year = 1994, +} + +@ARTICLE{ELIDRISSI94, + AUTHOR = "{Chafik El Idrissi}, M. and {Roney}, A. and {Frigon}, C. and + {Larzilli{\`e}re}, M.", + TITLE = "Measurements of total kinetic-energy released to the {$N=2$} + dissociation limit of {H}$_2$ --- evidence of the dissociation + of very high vibrational {R}ydberg states of {H}$_2$ by + doubly-excited states", + JOURNAL = "Chemical Physics Letters", + PAGES = "260-266", + VOLUME = 224, + NUMBER = 10, + YEAR = 1994, +} + +@ARTICLE{MELLINGER96, + AUTHOR = "Mellinger, A. and Vidal, C. R. and Jungen, Ch.", + TITLE = "Laser reduced fluorescence study of the carbon-monoxide nd + triplet {R}ydberg series-experimental results and multichannel + quantum-defect analysis", + JOURNAL = "J. Chem. Phys.", + PAGES = "8913-8921", + VOLUME = 104, + NUMBER = 5, + YEAR = 1996, +} + +@ARTICLE{SHELL02, + AUTHOR = "Michael Shell", + TITLE = "How to Use the {IEEEtran \LaTeX} Class", + JOURNAL = "Journal of {\LaTeX} Class Files", + YEAR = 2002, + VOLUME = 12, + NUMBER = 4, + PAGES = "100-120" +} + +@TechReport{NPB2, + title = {The {NAS} Parallel Benchmarks 2.0}, + author = {Alex Woo and David Bailey and Maurice Yarrow and Wijngaart + Wijngaart and Tim Harris and William Saphir}, + year = 1995, + month = dec # "~05", + institution = "The Pennsylvania State University CiteSeer Archives", + url = "http://www.nasa.org/" +} + +@INPROCEEDINGS{DPMG, + author = {Kim, Sangbum and Woo, Namyoon and Yeom, Heon Y. and Park, + Taesoon and Park, Hyoungwoo}, + title = {Design and {I}mplementation of {D}ynamic {P}rocess + {M}anagement for {G}rid-enabled {MPICH}}, + booktitle = {the 10th European PVM/MPI Users' Group Conference}, + year = 2003, + address = {Venice, Italy}, + month = sep, +} + +@INPROCEEDINGS{cnproceed, + author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝}, + title = {武林高手从入门到精通}, + booktitle = {第~$N$~次华山论剑}, + year = 2006, + address = {西安, 中国}, + month = sep, + lang = "zh", +} + +@ARTICLE{cnarticle, + AUTHOR = "贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春", + TITLE = "论刘姥姥食量大如牛之现实意义", + JOURNAL = "红楼梦杂谈", + PAGES = "260--266", + VOLUME = 224, + YEAR = 1800, + LANG = "zh", +} + +@MastersThesis{zhubajie, + author = {猪八戒}, + title = {论流体食物的持久保存}, + school = {广寒宫大学}, + year = 2005, + address = {北京}, + lang = "zh", +} + +@PhdThesis{shaheshang, + author = {沙和尚}, + title = {论流沙河的综合治理}, + school = {清华大学}, + year = 2005, + address = {北京}, + lang = "zh", +} + +@MastersThesis{metamori2004, + author = {Ashwin Raju Jeyakumar}, + title = {Metamori: A library for Incremental File Checkpointing}, + school = {Virgina Tech}, + year = 2004, + month = jun # "~21", + address = {Blacksburg}, +} + +@PHDTHESIS{FistSystem01, + AUTHOR = "Erez Zadok", + TITLE = "{FiST: A System for Stackable File System Code Generation}", + YEAR = 2001, + MONTH = "May", + SCHOOL = "Computer Science Department, Columbia University", + ADDRESS = "USA" +} + +@INBOOK{ColdSources, + AUTHOR = {P. Gr{\"o}ning and L. Nilsson and P. Ruffieux and R. + Clergereaux and O. Gr{\"o}ning}, + TITLE = {Encyclopedia of Nanoscience and Nanotechnology}, + pages = {547-579}, + PUBLISHER = {American Scientific Publishers}, + YEAR = 2004, + volume = 1, +} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/shuji.pdf b/Master/texmf-dist/doc/latex/thuthesis/example/shuji.pdf Binary files differnew file mode 100644 index 00000000000..10aa0766cf1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/shuji.pdf diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/shuji.tex b/Master/texmf-dist/doc/latex/thuthesis/example/shuji.tex new file mode 100644 index 00000000000..c64637bc596 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/shuji.tex @@ -0,0 +1,9 @@ +\documentclass[doctor]{thuthesis} +\begin{document} +\cauthor{薛~~瑞~~尼} + +\ctitle{没有英文的中文标题} +\shuji + +\shuji[清华大学硕士~\hspace{0.2em}\raisebox{2pt}{\LaTeX}\hspace{-0.25em} 论文模板~\hspace{0.1em}\raisebox{2pt}{v\version}\hspace{-0.25em} 样例] +\end{document} diff --git a/Master/texmf-dist/doc/latex/thuthesis/example/thutils.sty b/Master/texmf-dist/doc/latex/thuthesis/example/thutils.sty new file mode 100644 index 00000000000..c3d83425d53 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/example/thutils.sty @@ -0,0 +1,40 @@ +\ProvidesPackage{thutils}[2007/11/08 4.0 put any packages you would like to use here] + +% 处理数学公式中的黑斜体的宏包 +%\RequirePackage{bm} + + +% 不同于~|\mathcal| or |\mathfrak| 之类的英文花体字体 +%\RequirePackage{mathrsfs} + +% 表格中支持跨行 +\RequirePackage{multirow} + +% 跨页表格 +%\RequirePackage{longtable} + +% 固定宽度的表格 +\RequirePackage{tabularx} + +% 表格中的反斜线 +\RequirePackage{slashbox} + +% 确定浮动对象的位置,可以使用~H,强制将浮动对象放到这里(可能效果很差) +\RequirePackage{float} + +% 浮动图形控制宏包。 +% 允许上一个~section 的浮动图形出现在下一个~section 的开始部分 +% 该宏包提供处理浮动对象的~|\FloatBarrier| 命令,使所有未处 +% 理的浮动图形立即被处理。这三个宏包仅供参考,未必使用: + % \RequirePackage[below]{placeins} + % \RequirePackage{floatflt} % 图文混排用宏包 + % \RequirePackage{rotating} % 图形和表格的控制旋转 + +% 给自定义的宏后面自动加空白 +% \RequirePackage{xspace} + + +% 定义自己常用的东西 +\newcommand{\china}{中华人民共和国} + +\endinput diff --git a/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf Binary files differnew file mode 100644 index 00000000000..9edf8958721 --- /dev/null +++ b/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx new file mode 100644 index 00000000000..745395b155e --- /dev/null +++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx @@ -0,0 +1,3239 @@ +% \iffalse +% Local Variables: +% mode: doctex +% TeX-master: t +% End: +% \fi +% +% \iffalse meta-comment +% +% Copyright (C) 2005, 2006, 2007 by Xue Ruini <xueruini@gmail.com> +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3a +% of this license or (at your option) any later version. +% The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3a or later is part of all distributions of LaTeX +% version 2004/10/01 or later. +% +% $Id: thuthesis.dtx 123 2007-11-08 13:05:49Z littleleo $ +% +% \fi +% +% \CheckSum{2387} +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \iffalse +%<*driver> +\ProvidesFile{thuthesis.dtx}[2007/11/08 4.0 Tsinghua University Thesis Template] +\documentclass[10pt]{ltxdoc} +\usepackage{calc} +\usepackage{array} +\usepackage{fancybox} +\usepackage{fancyvrb} +\usepackage{shapepar} +\usepackage{url} + %\IfFileExists{lucidabr.sty}{\usepackage{lucidabr}}{} +\usepackage{txfonts} +\usepackage{xcolor} +\usepackage{CJK,CJKpunct} +\usepackage[CJKbookmarks=true, bookmarksnumbered=true, + colorlinks=true, linkcolor=blue, dvips]{hyperref} +\usepackage{indentfirst} +\setlength{\parskip}{4pt plus1pt minus0pt} +\setlength{\topsep}{0pt} +\setlength{\partopsep}{0pt} +\setlength{\parindent}{20pt} +\addtolength{\oddsidemargin}{-1cm} +\advance\textwidth 1.5cm +\addtolength{\topmargin}{-1cm} +\addtolength{\headsep}{0.3cm} +\addtolength{\textheight}{2.3cm} +\newcommand\hei{\CJKfamily{hei}} +\newcommand\fs{\CJKfamily{fs}} +\renewcommand{\baselinestretch}{1.3} +\setlength{\shadowsize}{3pt} +\def\DescribeOption#1{\SpecialOptionIndex{#1}} +\def\SpecialOptionIndex#1{\index{#1\actualchar\textbf{#1}}} +\renewenvironment{description} + {\list{}{\setlength\labelwidth{2cm} + \setlength\labelsep{3pt} + \setlength\leftmargin{\labelwidth+\labelsep} + \addtolength{\itemsep}{3pt} + \renewcommand\makelabel[1]{\shadowbox{\color{blue!90}\texttt##1}\DescribeOption{##1}} + } + }{\endlist} +\DefineVerbatimEnvironment{example}{Verbatim}% + {frame=single, framerule=0.3mm, rulecolor=\color{red!75!green!50!blue}, + fillcolor=\color{red!75!green!50!blue!15},framesep=2mm, baselinestretch=1.2, + fontsize=\small, gobble=1} +\DefineVerbatimEnvironment{shell}{Verbatim}% + {frame=single, framerule=0.3mm, rulecolor=\color{red!85!green!60}, + fillcolor=\color{red!85!green!10},framesep=2mm,fontsize=\small, gobble=1} +\makeatletter +\long\def\myentry#1{\vskip5pt\par\noindent\llap{{\color{blue}\fs #1}}\marginpar{\strut}\hskip\parindent} +\def\tableofcontents{\renewcommand{\baselinestretch}{1.0}\@starttoc{toc}} +\def\DescribeMacro{\Describe@Macro} +\def\Describe@Macro#1{\PrintDescribeMacro{#1}\SpecialUsageIndex{#1}} +\def\PrintDescribeMacro#1{{\color{-red!75!green!50!blue!55}\MacroFont \string #1\hskip1em }} +\def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{\vbox{\hbox + to\textwidth{\llap{\fbox{\rightmark\rule[-2pt]{0pt}{13pt}}}\hfil\thepage}\vskip-0.7pt + \hbox to \textwidth{\hrulefill}}}% + \let\@evenfoot\@oddfoot + \let\@evenhead\@oddhead + \let\@mkboth\markboth + \def\sectionmark##1{% + \markright{\ifnum \c@secnumdepth >\m@ne + \thesection\quad + \fi + ##1}} + \def\subsectionmark##1{% + \markright{\ifnum \c@secnumdepth >\m@ne + \thesubsection\quad + \fi + ##1}} + \def\subsubsectionmark##1{% + \markright{\ifnum \c@secnumdepth >\m@ne + \thesubsubsection\quad + \fi + ##1}}} +\renewcommand\section{\@startsection{section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\bfseries\hei}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\bfseries\hei}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\bfseries\hei}} +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}} +\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}} + +\makeatother +\pagestyle{empty} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +%\OnlyDescription + +\begin{document} +\begin{CJK*}{GBK}{song} +\DocInput{thuthesis.dtx} +\clearpage\end{CJK*} +\end{document} +%</driver> +% \fi +% +% \GetFileInfo{thuthesis.dtx} +% \MakeShortVerb{\|} +% +% \def\thuthesis{\textsc{Thu}\-\textsc{Thesis}} +% \def\pkg#1{\texttt{#1}} +% +% \changes{v1.0-}{2005/07/06}{Please refer to ``Bao--Pan'' version.} +% +% \changes{v1.1}{2005/11/03}{Initial version, migrate from the old ``Bao--Pan'' +% version. Make the template a class instead of package.} +% +% \changes{v1.2}{2005/11/04}{Remove \textbf{fancyref}; Remove \textbf{ucite} and implemente +% \textbf{onlinecite}; use package arial or helvet selectively.} +% +% \changes{v1.3}{2005/11/14}{replace subfigure with subfig, replace caption2 +% with caption, add details about using figure in the example.} +% +% \changes{v1.4rc1}{2005/11/20}{I do not why \textbf{thu@authorizationaddon} does not work +% now for v1.3, while it's fine in v1.2. Temporarily, I remove the directive +% :(. There might be nicer solution. Other changes: add \textsf{config} option to +% subfig to be compatible with subfigure. add \textbf{courier} package for tt font.} +% +% \changes{v1.4}{2005/12/05}{Fix the problem of \textbf{chinese}, that is +% because both CJK and everysel redefined the \textbf{selectfont}. So, a not so good +% workaround is merge them up. Add \textbf{shuji} example. Add \textbf{pozhehao} command.} +% +% \changes{v2.1}{2006/02/27}{Add support to bachelor thesis.} +% \changes{v2.1}{2006/03/01}{Remove |fancyhdr| and |geometry|.} +% \changes{v2.1}{2006/03/01}{Redefine footnote marks.} +% \changes{v2.1}{2006/03/01}{Replace thubib.bst with chinesebst.bst.} +% \changes{v2.1}{2006/03/02}{Merge the modification of |ntheorem|.} +% \changes{v2.1}{2006/03/02}{Remove |footmisc| and refine the document.} +% \changes{v2.1}{2006/03/03}{Work very hard on the document.} +% \changes{v2.1}{2006/03/03}{Add |checklab| code to reduce ``unresolved labels'' warning} +% \changes{v2.2}{2006/03/26}{Adjust margins. How bad it is to simulate MS WORD!.} +% \changes{v2.2}{2006/03/26}{Add bachelor training overview details supporting.} +% \changes{v2.2}{2006/03/26}{CJK support in preamble.} +% \changes{v2.2}{2006/03/26}{Adjust hyperref to avoid boxes around links.} +% \changes{v2.3}{2006/04/07}{Fix a great bug: PassOptionsToClass and LoadClass +% rather than PassOptionToPackage and LoadPackage.} +% \changes{v2.3}{2006/04/07}{Reorganize the codes in cover, make the pagestyle +% more readable.} +% \changes{v2.3}{2006/04/07}{Add gbk2uni into the document.} +% \changes{v2.3}{2006/04/07}{Support openright and openany.} +% \changes{v2.3}{2006/04/09}{Adjust hypersetup to remove color and box.} +% \changes{v2.3}{2006/04/09}{Adjust margins again.} +% \changes{v2.3}{2006/04/09}{Adjust references formats.} +% \changes{v2.3}{2006/04/09}{Redefine frontmatter and mainmatter to fit our case.} +% \changes{v2.3}{2006/04/09}{Add assumption environment.} +% \changes{v2.3}{2006/04/09}{Change the brace in the cover.} +% \changes{v2.4}{2006/04/14}{Fill more pdf info. with hypersetup.} +% \changes{v2.4}{2006/04/14}{自动隐藏密级为内部时后面的五角星。} +% \changes{v2.4}{2006/04/14}{增加“注释”(Remark)环境。} +% \changes{v2.4}{2006/04/14}{压缩~item~之间的距离。} +% \changes{v2.4}{2006/04/14}{thubib.bst~文献标题取消自动小写。} +% \changes{v2.4}{2006/04/14}{中文参考文献取消~In: Proceedings。} +% \changes{v2.4}{2006/04/14}{英文文参考文献调整~In: editor, Proceedings。} +% \changes{v2.4}{2006/04/14}{参考文献为学位论文时,加方括号,作者后面为实心点。} +% \changes{v2.4}{2006/04/14}{中文参考文献作者超过三个加等。} +% \changes{v2.4}{2006/04/14}{中文参考文献需要在~bib~中指定~|lang="chinese"|。} +% \changes{v2.4}{2006/04/14}{学位论文不在需要~type~字段。} +% \changes{v2.4}{2006/04/14}{为摘要等条目增加书签。} +% \changes{v2.4}{2006/04/14}{章节的编号用黑体,也就是自动打开~arialtitle~选项。} +% \changes{v2.4.1}{2006/04/17}{2.4 忘了把关键词的tabular改成thu@tabular。} +% \changes{v2.4.1}{2006/04/17}{参考文献最后一个作者前是逗号而不是~and。} +% \changes{v2.4.2}{2006/04/18}{去掉参考文献第二个作者后面烦人的逗号。} +% \changes{v2.5}{2006/05/19}{对本科论文进行大幅度的重写,因为教务处修改了格式要 +% 求。} +% \changes{v2.5}{2006/05/19}{重新整理代码,使其布局更易读。} +% \changes{v2.5.1}{2006/05/24}{根据教务处的新要求调整附录部分。} +% \changes{v2.5.1}{2006/05/25}{参考文献中杂志文章如果没有卷号,那么页码直接跟在 +% 年份后面,并用句点分割。在~thubib.bst 中增加~output.year 函数。} +% \changes{v2.6.1}{2006/06/16}{取消~thubib.bst 中~inbook 类~volume 后的页码。} +% +% +% \DoNotIndex{\begin,\end,\begingroup,\endgroup} +% \DoNotIndex{\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi} +% \DoNotIndex{\let,\def,\xdef,\newcommand,\renewcommand} +% \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect} +% \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize} +% \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny} +% \DoNotIndex{\normalfont,\bfseries,\slshape,\interlinepenalty} +% \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad} +% \DoNotIndex{\centering,\raggedright} +% \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize} +% \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne} +% \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass} +% \DoNotIndex{\AtBeginDocument,\AtEndDocument} +% +% \IndexPrologue{\section*{索引}% +% \addcontentsline{toc}{section}{索~~~~引}} +% \GlossaryPrologue{\section*{修改记录}% +% \addcontentsline{toc}{section}{修改记录}} +% +% \renewcommand{\abstractname}{摘~~要} +% \renewcommand{\contentsname}{目~~录} +% +% +% \title{\thuthesis:清华大学学位论文模板\thanks{Tsinghua University \LaTeX{} Thesis Template.}} +% \author{{\fs 薛瑞尼\thanks{LittleLeo@newsmth}}\\[5pt]{\fs 清华大学计算机系高性能所}\\[5pt] \texttt{xueruini@gmail.com}} +% \date{v\fileversion\ (\filedate)} +% \maketitle\thispagestyle{empty} +% +% +% \begin{abstract}\noindent +% 此宏包旨在建立一个简单易用的清华大学学位论文模板,包括本科综合论文训练、硕士 +% 论文、博士论文以及博士哲学论文。现在已经支持本科、硕士和博士论文格式,对其它 +% 格式的支持会陆续加入。 +% \end{abstract} +% +% \vskip2cm +% \def\abstractname{免责声明} +% \begin{abstract} +% \noindent +% \begin{enumerate} +% \item 本模板的发布遵守~\LaTeX{} Project Public License,使用前请认真阅读协议内容。 +% \item 本模板为作者根据清华大学教务处颁发的《综合论文训练写作指南》和清华大学研 +% 究生院颁发的《研究生学位论文写作指南》编写而成,旨在供清华大学毕业生撰写学位 +% 论文使用。 +% \item 此模板已经得到清华大学教务处和研究生院的“认证”,但不保证格式审查老师不 +% 提意见,任何由于使用本模板而引起的论文格式审查问题均与本模板作者无关。 +% \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵 +% 守~\LaTeX{} Project Public License 协议。由于违犯协议而引起的任何纠纷争端均与 +% 本模板作者无关。 +% \end{enumerate} +% \end{abstract} +% +% +% \clearpage +% \begin{multicols}{2}[ +% \section*{\contentsname} +% \setlength{\columnseprule}{.4pt} +% \setlength{\columnsep}{18pt}] +% \tableofcontents +% \end{multicols} +% +% \clearpage +% \pagenumbering{arabic} +% \pagestyle{headings} +% \section{模板介绍} +% 2005 年夏天我把自己写硕士论文的模板稍加整理做了一个所谓的“清华硕士论文 +% ~\LaTeX\ 模板报盘版”。此模板基于王磊编写、王垠整理的博士论文模板,借鉴了 +% ~mynewid@SMTH~的参考文献~bst~工作,并根据清华大学~2005~年研究生院硕士论文最新模 +% 板要求修改而成。其时大家的论文基本上都写完了,所以用的人不是很多;而且那个模板 +% 的结构不好,很多都是将就的写法。 +% +% 为了给想用~\LaTeX\ 写论文的同学提供方便,我在报盘版的基础上重新整理,在结构上采 +% 用标准的~docstrip 组织,中文支持采用~CJK\footnote{对~CCT 不熟悉,所以没有专门花 +% 时间去看。},在内容上尽量融合所有论文格式要求,同时更名为~\thuthesis,即 +% ~\textbf{T}sing\textbf{hu}a \textbf{Thesis},并在 +% ~\href{http://thuthesis.sourceforge.net}{sourceforge.net} 上安了家,随后在 +% ~\href{http://gforge.oss.org.cn/projects/thuthesis}{gforge.oss.org.cn} 建立了镜 +% 像,近来准备将其迁移到~\href{http://thuthesis.googlecode.com}{code.google.com}。 +% +% 由于个人精力有限,不能保证三者完全同步。现在~\thuthesis{} 也提交到了% +% ~\href{http://www.ctan.org/macros/latex/contrib/thuthesis}{CTAN} 上,更新一下你 +% 的~\TeX{} 就能得到最新的~\thuthesis。 +% +% 2005 年圣诞节前,\thuthesis-2.0 发布,成为第一个同时支持硕士、博士论文格式的模 +% 板,后直到~2006 年~3 月初才加入本科论文格式支持,即~\thuthesis-2.1。这个版本除 +% 了增加本科论文格式支持,同时去掉了很多不必要的宏包,改由基本~\TeX{} 和 +% ~\LaTeX{} 命令实现。在随后的几个月时间里,由于教务处的督促以及同学们的积极反馈 +% ,模板进入了一个“高速”发展的阶段,其间增加了许多有用的功能,同时发现并排除了 +% 不少问题,使得~\thuthesis{} 日臻完善。现在的~\thuthesis{} 不仅在结构上跟报盘版 +% 相去甚远,而且在功能上也更加丰富,最重要的是~\thuthesis{} 符合学校的最新规范。 +% +% 2007 年~11 月~8 日,研究生院同意将~\thuthesis{} 作为官方模板。至此,教务处和研 +% 究生院都认可了~\thuthesis,所有的毕业生都可以放心地使用~\thuthesis{} 来准备论 +% 文,而不必像以前那样犹豫不决,提心吊胆。 +% +% 在整理这个模板的过程中,我得到不少同学热情的支持,在此不一一列出,感谢他们提供 +% 的每一份帮助!让人感到欣喜的是很多同学都开始为~\thuthesis{} 添砖加瓦,目前包括% +% ~edyfox~的~Makefile,Truel 的~msmake.cmd,oseen~将其移植到~UTF-8 并制作了% +% ~Debian package,EricH 制作了~Gentoo ebuild。 +% +% 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者给邮件 +% 列表(见后)写信,欢迎感兴趣的同学出力完善此使用手册。由于个人水平有限,虽然现 +% 在的这个版本基本上满足了学校的要求,但难免还存在不足之处,欢迎大家积极反馈。 +% +% 最后补充一点:{\color{blue}\fs 模板的作用在于减轻论文写作过程中格式调整的时间, +% 其前提就是遵守模板的规定,否则即使使用了~\thuthesis{} 也难以保证输出的论文符 +% 合学校规范。} +% +% +% \section{安装} +% \label{sec:installation} +% +% \subsection{下载} +% \thuthesis{} 主页: \url{http://thuthesis.sourceforge.net}。 +% +% 但由于各种各样的原因,这个主页访问起来并不顺利,下面提供其它几个链接,按照维护 +% 的优先级排序: +% \begin{itemize}\addtolength{\itemsep}{-5pt} +% \item \url{http://gforge.oss.org.cn/projects/thuthesis} +% \item \url{http://thuthesis.googlecode.com} +% \item \url{http://www.ctan.org/macros/latex/contrib/thuthesis} +% \end{itemize} +% +% \thuthesis{} 的开发版本同样可以在~sourceforge 上获得: +% \begin{shell} +% $ svn co https://svn.sourceforge.net/svnroot/thuthesis/trunk/thuthesis +% \end{shell} +% +% \subsection{模板的组成部分} +% 下表列出了~\thuthesis{} 的主要文件及其功能介绍: +% +% \begin{center} +% \begin{tabular}{l|p{10cm}} +% \hline +% {\hei 文件(夹)} & {\hei 功能描述}\\\hline\hline +% thuthesis.ins & 模板驱动文件 \\ +% thuthesis.dtx & 模板文档代码的混合文件\\ +% thuthesis.cls & 模板类文件\\ +% thuthesis.cfg & 模板配置文件\\ +% thubib.bst & 参考文献样式文件\\\hline +% main.tex & 示例文档主文件\\ +% shuji.tex & 书脊示例文档\\ +% ref/ & 示例文档参考文献目录\\ +% data/ & 示例文档章节具体内容\\ +% figures/ & 示例文档图片路径\\ +% thutils.sty & 为示例文档加载其它宏包\\\hline +% Makefile & self-explanation \\ +% msmake.cmd & Windows 批处理工具\\\hline +% Readme & self-explanation\\ +% \textbf{thuthesis.pdf} & 用户手册(本文档)\\\hline +% \end{tabular} +% \end{center} +% +% 需要说明几点:1) thuthesis.cls 和~thuthesis.cfg 可以由~thuthesis.ins 和% +% ~thuthesis.dtx 生成,但为了降低新手用户的使用难度,特将~cls 和~cfg 也一起发布。 +% 2) 学习一个新东西最好的办法就是读它的文档。请时刻记住~RTFM\footnote{Read The +% Fucking Manual} 和~STFW\footnote{Search The Fucking Web},不要滥用你提问的权 +% 力,不要抱怨没人帮助你:任何人都有权利不回答你的问题。 +% +% 如果对上面表格中的文件及其解释还存在疑问,没有关系,继续往下看,一会儿就会天开 +% 云散了。 +% +% \subsection{准备工作} +% \label{sec:prepare} +% 本模板用到以下宏包: +% +% \begin{center} +% \begin{minipage}{1.0\linewidth}\centering +% \begin{tabular}{*{6}{l}}\hline +% ifthen & clac & ifpdf & CJK & CJKnumb & \textbf{CJKpunct} \\ +% array & booktabs & longtable & amsmath & amssymb & ntheorem \\ +% indentfirst & paralist & txfonts & natbib & hyperref & hypernat \\ +% graphicx & \textbf{subfig}\footnote{版本要求:$\geq$2005/06/28 ver: 1.3} & +% \textbf{caption}\footnote{版本要求:$\geq$2006/03/21 v3.0j} & +% \textbf{thubib.bst} & &\\\hline +% \end{tabular} +% \end{minipage} +% \end{center} +% +% 不要害怕,绝大多数包你的~\TeX{} 系统已经都有了,如果没有请到~\url{www.ctan.org} +% 去下载。中文标点优化的~\pkg{CJKpunct}~可能需要到~\url{www.ctex.org} 去下载,如 +% 果你用~C\TeX{} 中文套装的话,那么~\pkg{CJKpunct} 也已经有了。参考文献 +% 样式~thubib.bst 为模板自带,不必操心。 +% +% +% \subsection{开始安装} +% \label{sec:install} +% 模板解压缩后生成文件夹~thuthesis-VERSION\footnote{VERSION 为版本号。},其中包 +% 括:模板源文件(thuthesis.ins 和~thuthesis.dtx),参考文献样式~thubib.bst,示例文 +% 档(main.tex,shuji.tex,thutils.sty\footnote{我把所有可能用到但不一定用到的包 +% 以及一些命令定义都放在这里面,以免主~thuthesis.cls 过分臃肿。}, +% \linebreak[4]data/ 和~figures/ 和~ref/)。在使用之前需要先生成模板文件和配置文 +% 件(具体命令细节请参考~|Readme| 和~|Makefile|): +% +% \begin{shell} +% $ cd thuthesis-VERSION +% # 生成 thuthesis.cls 和 thuthesis.cfg +% $ latex thuthesis.ins +% +% # 下面的命令用来生成用户手册,可以不执行 +% $ latex thuthesis.dtx +% $ makeindex -s gind.ist -o thuthesis.ind thuthesis.idx +% $ makeindex -s gglo.ist -o thuthesis.gls thuthesis.glo +% $ latex thuthesis.dtx +% $ latex thuthesis.dtx % 生成说明文档 thuthesis.dvi +% \end{shell} +% +% \thuthesis{} 发布的时候已经自带了编译好的文档,如果你对文档如何生成并不关心, +% 那么上面只需要执行~\texttt{latex thuthesis.ins} 即可。为了进一步简化模板的使用 +% ,\thuthesis{} 的发布中已经自带了~thuthesis.cls~和~thuthesis.cfg,也就是说上面 +% 的命令一条都不必执行。 +% +%\subsubsection{dvi$\rightarrow$ps$\rightarrow$pdf} +%\label{sec:dvipspdf} +% +% 很多用户对~\LaTeX{} 命令执行的次数不太清楚,一个基本的原则就是如果有引用,如 +% ~ref 和~cite,那么至少需要执行~3 次。第一次发现引用,后两次解决引用。下面给出 +% 生成示例文档的详细过程(\# 开头的行为注释),首先来看经典的 +% ~\texttt{dvi$\rightarrow$ps$\rightarrow$pdf} 方式: +% \begin{shell} +% # 1. 发现里面的引用关系,文件后缀 .tex 可以省略 +% $ latex main +% +% # 2. 编译参考文件源文件,生成 bbl 文件 +% $ bibtex main +% +% # 3. 下面两次解决引用 +% $ latex main +% $ gbk2uni main # 防止书签乱码 +% $ latex main # 此时生成完整的 dvi 文件 +% +% # 4. 生成 ps +% $ dvips main.dvi +% +% # 5. 生成 pdf +% $ ps2pdf main.ps +% \end{shell} +% +% 模板已经把纸型信息写入目标文件,这样执行~\texttt{dvips}~时就可以避免由于遗忘 +% ~\texttt{-ta4}~参数而导致输出不合格的文件(因为~\texttt{dvips}~默认使用 +% ~letter~纸型)。 +% +%\subsubsection{dvipdfm(x)} +%\label{sec:dvipdfmx} +% +% 如果使用~dvipdfm(x),那么在生成完整的~dvi 文件之后(参见上面的例子),可以直接得到~pdf: +% \begin{shell}% +% $ dvipdfm main.dvi +% # 或者 +% $ dvipdfmx main.dvi +% \end{shell} +% +% +%\subsubsection{pdflatex} +%\label{sec:pdflatex} +% +% 如果使用~pdflatex,那么上面的步骤就可以大大简化: +% \begin{shell} +% # 1. 发现里面的引用关系,文件后缀 .tex 可以省略 +% $ pdflatex main +% +% # 2. 编译参考文件源文件,生成 bbl 文件 +% $ bibtex main +% +% # 3. 下面两次解决引用 +% $ pdflatex main +% $ gbk2uni main # 防止书签乱码 +% $ pdflatex main # 此时生成完整的 pdf 文件 +% \end{shell} +% +% 需要注意的是~pdflatex 不能处理常见的~eps 图形,如果要用需要先将~eps 转化成~pdf。 +% 但增加了对~png,jpg~等标量图形的支持,比较方便。另外需要注意的是很多同学使用 +% 默认的示例文件写论文,但用~pdflatex 编译,这时务必将~\textbf{dvips} 和 ~\textbf{dvipdfm} 选项去掉。 +% +% \subsubsection{自动化过程} +% \label{sec:automation} +% +% 上面的例子只是给出一般情况下的使用方法,可以发现虽然命令很简单,但是每次都输入 +% 的话还是非常罗嗦的,所以~\thuthesis{} 还提供了一些自动处理的文件。 +% +% 如果使用~Windows 平台,可以试一试~Truel 编写的批处理脚本~msmake.cmd\footnote{ +% 目前尚不完善,需要进一步测试。}: +% +% \begin{shell} +% your_path $ msmake setup % 生成宏包文件和说明文档 +% your_path $ msmake all % 生成示例文档和书脊 +% your_path $ msmake main % 生成示例文档 +% your_path $ msmake shuji % 生成书脊 +% your_path $ msmake clean % 清除临时文件 +% \end{shell} +% +% 如果你的系统有~make 那就方便多了: +% \begin{shell} +% $ make clean +% $ make cls % 生成 thuthesis.cls 和 thuthesis.cfg +% $ make doc % 生成说明文档 thuthesis.pdf +% $ make thesis % 生成示例文档 main.pdf +% $ make shuji % 生成书脊 shuji.pdf +% \end{shell} +% +% edyfox 整理的~Makefile 非常细致(我将他给的四个文件合成一个大~Makefile),稍微有 +% 这方面知识的用户会感到非常~happy。如果你不知道怎么用,最好学习学习。 +% +% 关于~msmake 以及~Makefile 的用法请参见~Readme,此处不再详述。 +% +% 经过上面的操作得到的模板文件都在当前目录,没有安装到系统~|TDS|,主要是考虑到方 +% 便,修改,更新容易一些。只有自己用没必要全局安装。 +% +% +% \subsection{升级} +% \label{sec:updgrade} +% \thuthesis{} 升级非常简单,下载最新的版本,将~thuthesis.ins,thuthesis.dtx 和 +% ~thubib.bst 拷贝至你的工作目录覆盖相应的文件,然后运行一次: +% \begin{shell} +% $ latex thuthesis.ins +% \end{shell} +% +% 生成新的类文件和配置文件即可。当然也可以直接拷贝~thuthesis.cls、 +% thuthesis.cfg 和~thubib.bst,免去上面命令的执行。只要明白它的工作原理,这个很容 +% 易。 +% +% +% \section{使用说明} +% \label{sec:usage} +% 本手册假定用户已经能处理一般的~\LaTeX{} 文档,并对~BIB\TeX{} 有一定了解。如果你 +% 从来没有接触过~\TeX 和~\LaTeX,建议先学习相关的基础知识。磨刀不误砍柴工! +% +% +% \subsection{关于提问} +% \label{sec:howtoask} +% 提问之前先问自己几个问题: +% \begin{enumerate}\addtolength{\itemsep}{-5pt} +% \item 我是不是认真地学习了~\LaTeX{} 基础知识? +% \item 我是不是认真地阅读了相关的文档? +% \item 我是不是~Google 了? +% \end{enumerate} +% +% 如果你确保自己做到了上面的“三大步”,那么就可以到以下两个推荐的地方提问: +% \begin{itemize}\addtolength{\itemsep}{-5pt} +% \item \url{http://groups.google.com/group/thuthesis} \\ +% 直接给~thuthesis@googlegroups.com 写信就可以 +% \item \href{http://www.newsmth.net/bbsdoc.php?board=TeX}{\TeX@newsmth} +% \end{itemize} +% +% 考虑到不能将所有的问题堆积到~\TeX@newsmth 版(或许可以申请一个附属版面,但是除 +% 非毕业前夕,这个版面必然十分荒凉,故暂不可行);邮件列表又不易维护~FAQ,所以我 +% 为~\thuthesis{} 建了一个~wiki:\url{http://thuthesis.wiki.sf.net}。大家可以一起 +% 贡献力量把这个~wiki 弄好,这样以后的同学就不至于有了问题不知该如何求救。 +% +% \subsection{\thuthesis{} 使用向导} +% \label{sec:userguide} +% 推荐新用户先看网上的《\thuthesis{} 使用向导》幻灯片,那份讲稿比这份文档简练易懂。前面列出的几个网址都有这个幻灯片。 +% +% \subsection{\thuthesis{} 示例文件} +% \label{sec:userguide1} +% 模板核心文件只有三个:thuthesis.cls,thuthesis.cfg 和~thubib.bst,但是如果没有 +% 示例文档用户会发现很难下手。所以推荐新用户从模板自带的示例文档入手,里面包 +% 括了论文写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。 +% 对于不清楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示 +% 例文档,具体内容可以参考模板附带的~main.tex 和~data/。 +% +% \begin{example} +% \documentclass[bachelor]{thuthesis} +% % \documentclass[master|doctor,dvips|dvipdfm,secret,arialtoc]{thuthesis} +% +% % 所有其它可能用到的包都统一放到这里了,可以根据自己的实际添加或者删除。 +% \usepackage{thutils} +% +% % 你可以在这里修改配置文件中的定义,导言区可以使用中文。 +% % \def\myname{薛瑞尼} +% +% \begin{document} +% +% % 定义所有的eps文件在 figures 子目录下 +% \graphicspath{{figures/}} +% +% +% %%% 封面部分 +% \frontmatter +% \input{data/cover} +% \makecover +% +% % 目录 +% \tableofcontents +% +% % 符号对照表 +% \input{data/denotation} +% +% +% %%% 正文部分 +% \mainmatter +% \include{data/chap01} +% \include{data/chap02} +% +% +% %%% 其它部分 +% \backmatter +% % 插图索引 +% \listoffigures +% % 表格索引 +% \listoftables +% % 公式索引 +% \listofequations +% +% +% % 参考文献 +% \bibliographystyle{thubib} +% \bibliography{ref/refs} +% +% +% % 致谢 +% \include{data/ack} +% +% % 附录 +% \begin{appendix} +% \input{data/appendix01} +% \end{appendix} +% +% % 个人简历 +% \include{data/resume} +% \end{document} +% \end{example} +% +% \subsection{选项} +% \label{sec:option} +% 本模板提供了一些选项以方便使用: +% \begin{description} +% \item[bachelor] +% 如果写本科论文将此选项打开。 +% \begin{example} +% \documentclass[bachelor]{thuthesis} +% \end{example} +% +% \item[master] +% 如果写硕士论文将此选项打开。 +% \begin{example} +% \documentclass[master]{thuthesis} +% \end{example} +% +% \item[doctor] +% 如果写博士论文将此选项打开。 +% \begin{example} +% \documentclass[doctor]{thuthesis} +% \end{example} +% +% \item[secret] +% 涉秘论文开关。配合另外两个命令~|\secretlevel| 和~|\secretyear| 分别用来指定保 +% 密级别和时间。 二者默认分别为“秘密”和当前年份。可以通过: +% \cs{secretlevel}|{|绝密|}| 和~\cs{secretyear}|{|10|}| 年独立修改。 +% \begin{example} +% \documentclass[bachelor, secret]{thuthesis} +% \end{example} +% +% \changes{v3.0}{2007/05/12}{不用专门为本科论文生成“提交”版本了。} +% +% \item[openany, openright] +% 正规出版物的章节出现在奇数页,也就是右手边的页面,这就是~\texttt{openright}, +% 也是~\thuthesis~的默认选项。在这种情况下,如果前一章的最后一页也是奇数,那么 +% 模板会自动生成一个纯粹的空白页,很多人不是很习惯这种方式,而且学校的格式似乎 +% 更倾向于页面连续,那就是通常所说的~\texttt{openany}。{\fs 目前教务处明确规定 +% 本科论文采用~openright,研究生论文据推断是~openany。}这两个选项不用专门设置, +% \thuthesis{} 会根据当前论文类型自动选择。 +% +% \item[dvips] +% 打开~dvips 支持。如果用~pdflatex~编译,请务必去掉此选项,否则模板会报错。 +% \begin{example} +% \documentclass[master, dvips]{thuthesis} +% \end{example} +% +% \item[dvipdfm] +% 打开~dvipdfm 支持,本选项和~dvips 主要是为了~hyperref 能正确生成书签和链接。 +% \begin{example} +% \documentclass[master, dvipdfm]{thuthesis} +% \end{example} +% +% \item[arial] +% 使用真正的~arial 字体。此选项会装载~arial 字体宏包,如果此宏包不存在,就装载 +% ~Helvet。arialtoc 和~arialtitle 不受~arial 的影响。因为一般的~\TeX{} 发行都没 +% 有~arial 字体,所以默认采用~helvet,因为二者效果非常相似。如果你执着的要用 +% ~arial 字体,请参看: +% \href{http://www.mail-archive.com/ctan-ann@dante.de/msg00627.html}{Arial 字体}。 +% +% \item[arialtoc] +% 目录项中的英文是否用~arial 字体。本选项和下一个~\textsl{arialtitle} 都不用用户 +% 操心,模板都自动设置好了。 +% +% \item[arialtitle] +% 章节标题中英文是否用~arial 字体(默认打开)。 +% \end{description} +% +% 上面只是给出了简单的用法示例,如果你不明白~\LaTeX{} 的选项究竟是怎么一回事,那 +% 就再补充一下基础知识。 +% +% \subsection{命令} +% \label{sec:command} +% 模板中的命令分为两类:一是格式控制,二是内容替换。格式控制如字体、字号、字距和 +% 行距。内容替换如姓名、院系、专业、致谢等等。其中内容替换命令居多,而且主要集中 +% 在封面上,其中有以本科论文为最(比硕士和博士论文多了“综合论文训练任务书”一页 +% )。首先来看格式控制命令。 +% +% \subsubsection{基本控制命令} +% \label{sec:basiccom} +% +% \myentry{字体} +% \DescribeMacro{\song} +% \DescribeMacro{\fs} +% \DescribeMacro{\hei} +% \DescribeMacro{\kai} +% \DescribeMacro{\li} +% \DescribeMacro{\you} +% 等分别用来切换宋体、仿宋、黑体、楷体、隶书和幼圆字体。为了兼容不同用户的习惯,模 +% 板还定义了另外一些字体切换命令,对应关系如下: +% +% \begin{center} +% \begin{tabular}{llllll}\hline +% \cs{song} &\cs{fs}&\cs{hei}&\cs{kai}&\cs{li}&\cs{you}\\\hline +% \cs{songti}&\cs{fangsong}&\cs{heiti}&\cs{kaishu}&\cs{lishu}&\cs{youyuan}\\\hline +% \end{tabular} +% \end{center} +% +% \begin{example} +% {\song 乾:元,亨,利贞} +% {\fs 初九,潜龙勿用} +% {\hei 九二,见龙在田,利见大人} +% {\kai 九三,君子终日乾乾,夕惕若, +% 厉,无咎} +% {\li 九四,或跃在渊,无咎} +% {\hei 九五,飞龙在天,利见大人} +% {\song 上九,亢龙有悔} +% {\you 用九,见群龙无首,吉} +% \end{example} +% +% \myentry{字号} +% \DescribeMacro{\chuhao} +% 等命令定义一组字体大小,分别为: +% +% \begin{center} +% \begin{tabular}{lllll} +% \hline +% |\chuhao|&|\xiaochu|&|\yihao|&|\xiaoyi| &\\ +% |\erhao|&|\xiaoer|&|\sanhao|&|\xiaosan|&\\ +% |\sihao|& |\banxiaosi|&|\xiaosi|&|\dawu|&|\wuhao|\\ +% |\xiaowu|&|\liuhao|&|\xiaoliu|&|\qihao|& |\bahao|\\\hline +% \end{tabular} +% \end{center} +% +% 使用方法为:\cs{command}\oarg{num},其中~|command| 为字号命令,|num| 为行距。比 +% 如~|\xiaosi[1.5]| 表示选择小四字体,行距~1.5 倍。表格中的字体是~\cs{dawu},如果 +% 你不使用类~tabular 环境,那么就需要自己调整表格中的字号。 +% +% \begin{example} +% {\erhao 二号 \sanhao 三号 \sihao 四号 \qihao 七号} +% \end{example} +% +% \myentry{字距} +% \DescribeMacro{\ziju} +% 更改汉字之间默认的距离,使用格式为~|\ziju{4bp}|,其中的距离只要是合格的~\TeX{} 距离即可。 +% +% \myentry{密级} +% \DescribeMacro{\secretlevel} +% \DescribeMacro{\secretyear} +% 定义秘密级别和年限: +% \begin{example} +% \secretyear{5} +% \secretlevel{内部} +% \end{example} +% +% \myentry{引用方式} +% \DescribeMacro{\onlinecite} +% 学校要求的参考文献引用有两种模式:1)上标模式。比如“同样的工作有很多$^{[1,2]}$\ldots” +% 。2)正文模式。比如“文[3] 中详细说明了\ldots”。其中上标模式使用远比正文模式频 +% 繁,所以为了符合使用习惯,上标模式仍然用常规的~|\cite{key}|,而~|\onlinecite{key}| 则用来生成正文模式。 +% +% 关于参考文献模板推荐使用~BIB\TeX,关于中文参考文献需要额外增加一个~Entry: lang +% ,将其设置为~\texttt{zh} 用来指示此参考文献为中文,以便~thubib.bst~处理。如: +% \begin{example} +% @INPROCEEDINGS{cnproceed, +% author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝}, +% title = {武林高手从入门到精通}, +% booktitle = {第~$N$~次华山论剑}, +% year = 2006, +% address = {西安, 中国}, +% month = sep, +% lang = "zh", +% } +% +% @ARTICLE{cnarticle, +% AUTHOR = "贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春", +% TITLE = "论刘姥姥食量大如牛之现实意义", +% JOURNAL = "红楼梦杂谈", +% PAGES = "260--266", +% VOLUME = "224", +% YEAR = "1800", +% LANG = "zh", +% } +% \end{example} +% +% 如果你坚持自己写~\cs{bibitem},我也没有办法,祝你好运!\footnote{由于调整某篇文 +% 献的引用顺序而导致其后所有文献引用序号统统发生变化而带来的繁重的而且极容易出 +% 错的体力劳动谁也帮不了你。} +% +% \myentry{书脊} +% \DescribeMacro{\shuji} +% 生成装订的书脊,为竖排格式,默认参数为论文中文题目。如果中文题目中没有英文字母, +% 那么直接调用此命令即可。否则,就要像例子里面那样做一些微调。其实这个命令在独立 +% 的文件生成更好一些,不要和论文混在一起(看到模板自带的~shuji.tex 了么?)。下面 +% 是一个列子: +% \begin{example} +% \documentclass[bachelor]{thuthesis} +% \begin{document} +% \ctitle{论文中文题目} +% \cauthor{中文姓名} +% % |\shuji| 命令需要上面两个变量 +% \shuji +% +% % 如果你的中文标题中有英文,那可以指定: +% \shuji[清华大学~\hspace{0.2em}\raisebox{2pt}{\LaTeX}% +% \hspace{-0.25em} 论文模板~\hspace{0.1em}\raisebox{2pt}% +% {v\version}\hspace{-0.25em}样例] +% \end{document} +% \end{example} +% +% \myentry{破折号} \DescribeMacro{\pozhehao} 中文破折号在~CJK-\LaTeX\ 里没有很好 +% 的处理,我们平时输入的都是两个小短线,比如这样,{\hei 中国——中华人民共和国}。 +% 这不符合中文习惯。所以这里定义了一个命令生成更好看的破折号,不过这似乎不是一个 +% 好的解决办法。有同学说不能用在~|\section| 等命令中使用,可以提供 +% 一个不带破折号的段标题:\cs{section}\oarg{没有破折号精简标题}\marg{带破折号的 +% 标题}。 +% +% \subsubsection{封面命令} +% \label{sec:titlepage} +% +% 下面是内容替换命令,其中以~|c| 开头的命令跟中文相关,|e| 开头则为对应的英文。 +% 这部分的命令数目比较多,但实际上都相当简单,套用即可。 +% +% 大多数命令的使用方法都是: \cs{command}\marg{arg},例外者将具体指出。这些命令都 +% 在示例文档的~data/cover.tex 中。 +% +% +% \myentry{论文标题} +% \DescribeMacro{\ctitle} +% \DescribeMacro{\etitle} +% \begin{example} +% \ctitle{在这里写论文中文题目} +% \etitle{and here for the English title} +% \end{example} +% +% \myentry{作者姓名} +% \DescribeMacro{\cauthor} +% \DescribeMacro{\eauthor} +% \begin{example} +% \cauthor{这是您的大名} +% \eauthor{Here is your name in PinYin} +% \end{example} +% +% \myentry{申请学位名称} +% \DescribeMacro{\cdegree} +% \DescribeMacro{\edegree} +% \begin{example} +% \cdegree{您要申请什么学位} +% \edegree{degree in English} +% \end{example} +% +% \myentry{院系名称} +% \DescribeMacro{\cdepartment} 旧版本中为~\DescribeMacro{\caffil}\unskip; +% \DescribeMacro{\edepartment} 旧版本中为~\DescribeMacro{\eaffil} +% +% \cs{cdepartment} 可以加一个可选参数,如:\cs{cdepartmentl}\oarg{精简}\marg{详 +% 细},主要针对本科生的“综合论文训练”部分,因为需要填写的空间有限,最好给出一 +% 个详细和精简院系名称,如“计算机科学与技术”和“计算机”。 +% \begin{example} +% \cdepartment[系名简称]{贵系是?} +% \edepartment{what's you department} +% \end{example} +% +% \myentry{专业名称} +% \DescribeMacro{\cmajor} 旧版本中为~\DescribeMacro{\csubject}; +% \DescribeMacro{\emajor} 旧版本中为~\DescribeMacro{\esubject} +% \begin{example} +% \cmajor{您的专业} +% \emajor{major in English} +% \end{example} +% +% \myentry{导师姓名} +% \DescribeMacro{\csupervisor} +% \DescribeMacro{\esupervisor} +% \begin{example} +% \csupervisor{老板} +% \esupervisor{boss} +% \end{example} +% +% \myentry{副导师姓名} +% \DescribeMacro{\cassosupervisor} +% \DescribeMacro{\eassosupervisor} +% 本科生的辅导教师,硕士的副指导教师。 +% \begin{example} +% \cassosupervisor{二老板} +% \eassosupervisor{second boss} +% \end{example} +% +% \myentry{联合导师} +% \DescribeMacro{\ccosupervisor} +% \DescribeMacro{\ecosupervisor} +% 硕士生联合指导教师,博士生联合导师。 +% \begin{example} +% \ccosupervisor{小老板} +% \ecosupervisor{small boss} +% \end{example} +% +% \myentry{论文成文日期} +% \DescribeMacro{\cdate} +% \DescribeMacro{\edate} +% 默认为当前时间,也可以自己指定。 +% \begin{example} +% \cdate{你真的不必自己指定这个时间} +% \edate{let thuthesis do it!} +% \end{example} +% +% \myentry{摘要} +% \DescribeEnv{cabstract} +% \DescribeEnv{eabstract} +% \begin{example} +% \begin{cabstract} +% 您的摘要请写在这里 +% \end{cabstract} +% \begin{eabstract} +% here comes English abstract +% \end{eabstract} +% \end{example} +% +% \myentry{关键词} +% \DescribeMacro{\ckeywords} +% \DescribeMacro{\ekeywords} +% 关键词用英文逗号分割写入相应的命令中,模板会解析各关键词并生成符合不同论文格式 +% 要求的关键词格式。 +% \begin{example} +% \ckeywords{关键词, 填在这里} +% \ekeywords{keywords, come here} +% \end{example} +% +% \subsubsection{其它部分} +% \label{sec:otherparts} +% 论文其它主要部分命令: +% +% \myentry{符号对照表} +% \DescribeEnv{denotation} +% 主要符号表环境。简单定义的一个~list,跟~description 非常类似,使用方法参见示例 +% 文件。带一个可选参数,用来指定符号列的宽度(默认为~2.5cm)。 +% \begin{example} +% \begin{denotation} +% \item[E] 能量 +% \item[m] 质量 +% \item[c] 光速 +% \end{denotation} +% \end{example} +% +% 如果你觉得符号列的宽度不满意,那可以这样来调整: +% \begin{example} +% \begin{denotation}[1.5cm] % 设置为 1.5cm +% \item[E] 能量 +% \item[m] 质量 +% \item[c] 光速 +% \end{denotation} +% \end{example} +% +% \myentry{索引} +% 插图、表格和公式三个索引命令分别如下,将其插入到期望的位置即可(带星号的命令表 +% 示对应的索引表不会出现在目录中): +% +% \begin{center} +% \begin{tabular}{ll} +% \hline +% {\hei 命令} & {\hei 说明} \\\hline +% \cs{listoffigures} & 插图索引\\ +% \cs{listoffigures*} & \\\hline +% \cs{listoftables} & 表格索引\\ +% \cs{listoftables*} & \\\hline +% \cs{listofequations} & 公式索引\\ +% \cs{listofequations*} & \\\hline +% \end{tabular} +% \end{center} +% +% \LaTeX{} 默认支持插图和表格索引,是通过~\cs{caption} 命令完成的,因此它们必须出现在浮动环境中 +% ,否则不被计数。 +% +% 有的同学不想让某个表格或者图片出现在索引里面,那么请使用命令~\cs{caption*}, +% 这个命令不会给表格编号,也就是出来的只有标题文字而没有“表~xx”,“图~xx”,否则 +% 索引里面序号不连续就显得不伦不类,这也是~\LaTeX{} 里星号命令默认的规则。 +% +% 有这种需求的多是本科同学的英文资料翻译部分,如果你觉得附录中英文原文中的表格和 +% 图片显示成“表”和“图”很不协调的话,一个很好的办法还是用~\cs{caption*},参数 +% 随便自己写,具体用法请参看示例文档。 +% +% 如果你的确想让它编号,但又不想让它出现在索引中的话,那就自己改一改模板的代码吧, +% 我目前不打算给模板增加这种另类命令\footnote{\thuthesis{} 在教务处和研究生院写 +% 作指南的“导引”下,已经够不伦不类了。我记的有个人在网上说“~\thuthesis{} 的 +% 模版不断要向学校难看的规定妥协!”是啊,除此之外,我又能怎样做呢?提点建议人 +% 家都不愿意听。}。 +% +% 公式索引为本模板扩展,模板扩展了~\pkg{amsmath} 几个内部命令,使得公式编号样式和 +% 自动索引功能非常方便。一般来说,你用到的所有数学环境编号都没问题了, 这个可以 +% 参看示例文档。如果你有个非常特殊的数学环境需要加入公式索引,那么请使用 +% ~\cs{equcaption}\marg{编号}。此命令表示~equation caption,带一个参数,即显示在 +% 索引中的编号。因为公式与图表不同,我们很少给一个公式附加一个标题,之所以起这么 +% 个名字是因为图表就是通过~\cs{caption} 加入索引的,\cs{equcaption} 完全就是为了 +% 生成公式列表,不产生什么标题。 +% +% 使用方法如下。假如有一个非~equation 数学环境~mymath,只要在其中写一句 +% ~\cs{equcaption} 就可以将它加入公式列表。 +% \begin{example} +% \begin{mymath} +% \label{eq:emc2}\equcaption{\ref{eq:emc2}} +% E=mc^2 +% \end{mymath} +% \end{example} +% +% 当然~mymath 正文中公式的编号需要你自己来做。 +% +% 同图表一样,附录中的公式有时候也不希望它跟全文统一编号,而且不希望它出现在公式 +% 索引中,目前的解决办法就是利用~\cs{tag*}\marg{公式编号} 来解决。用法很简单,此 +% 处不再罗嗦,实例请参看示例文档附录~A 的前两个公式。 +% +% \myentry{简历} +% \DescribeEnv{resume}\DescribeMacro{\resumeitem} +% 开启个人简历章节,包括发表文章列表等。其实就是一个~chapter。里面的每个子项目请用命令~|\resumeitem{sub title}|。 +% +% 这里我就不再列举例子了,请参看示例文档的~data/resume.tex。 +% +% \myentry{附录} +% \DescribeEnv{appendix} +% 所有的附录都插到这里来。因为附录会更改默认的~chapter 属性,而后面的 +% {\hei 个人简历}又需要恢复,所以实现为环境可以保证全局的属性不受影响。 +% \begin{example} +% \begin{appendix} +% \input{data/appendix01} +% \input{data/appendix02} +% \end{appendix} +% \end{example} +% +% \myentry{致谢声明} +% \DescribeEnv{ack} +% \changes{2.0}{2005/12/19}{把~acknowledge 改为~ack,简单而已。} +% 把致谢做成一个环境更好一些,直接往里面写感谢的话就可以啦!下面是数学系一位同 +% 学致谢里的话,拿过来做个广告,多希望每个人都能写这么一句啊! +% \begin{example} +% \begin{ack} +% …… +% 还要特别感谢计算机系薛瑞尼同学在论文格式和~\LaTeX{} 编译等方面给我的很多帮助! +% \end{ack} +% \end{example} +% +% \myentry{列表环境} +% \DescribeEnv{itemize} +% \DescribeEnv{enumerate} +% \DescribeEnv{description} +% 为了适合中文喜欢,模板将这三个常用的列表环境用~\pkg{paralist} 对应的压缩环境替换。一 +% 方面满足了多余空间的清楚,另一方面可以自己指定标签的样式和符号。细节请参看 +% ~\pkg{paralist} 文档,此处不再赘述。 +% +% \changes{v3.0}{2007/05/12}{没有了综合论文训练页面,很多本科论文专用命令就消失了。} +% +% \subsection{数学环境} +% \label{sec:math} +% \thuthesis{} 定义了常用的数学环境: +% +% \begin{center} +% \begin{tabular}{*{7}{l}}\hline +% axiom & theorem & definition & proposition & lemma & conjecture &\\ +% 公理 & 定理 & 定义 & 命题 & 引理 & 猜想 &\\\hline +% proof & corollary & example & exercise & assumption & remark & problem \\ +% 证明 & 推论 & 例子& 练习 & 假设 & 注释 & 问题\\\hline +% \end{tabular} +% \end{center} +% +% 比如: +% \begin{example} +% \begin{definition} +% 道千乘之国,敬事而信,节用而爱人,使民以时。 +% \end{definition} +% \end{example} +% 产生(自动编号):\\[5pt] +% \fbox{{\hei 定义~1.1~~~} {道千乘之国,敬事而信,节用而爱人,使民以时。}} +% +% 当然我能想到的数学环境是有限的,如果你想用“胡说”这样的数学环境,那么很容易定 +% 义: +% \begin{example} +% \newtheorem{nonsense}{胡说}[chapter] +% \end{example} +% +% 然后这样使用: +% \begin{example} +% \begin{nonsense} +% 契丹武士要来中原夺武林秘笈。\pozhehao 慕容博 +% \end{nonsense} +% \end{example} +% 产生(自动编号):\\[5pt] +% \fbox{{\hei 胡说~1.1~~~} {契丹武士要来中原夺武林秘笈。\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex 慕容博}} +% +% \subsection{自定义以及其它} +% \label{sec:othercmd} +% +% 模板的配置文件~thuthesis.cfg 中定义了很多“固定”词汇,一般无须修改。如果你有 +% 特殊需求,推荐在导言区使用~\cs{renewcommand}。当然,导言区里可以直接使用中文。 +% +% 此外,模板中定义了很多内部命令,由于设计过多繁琐的实现细节,此处将其略去。感兴 +% 趣的同学可以参看源代码,重新定义以适合自己的需要。 +% +% +%\section{致谢} +%\label{sec:thanks} +% +% 感谢~edyfox~的~Makefile,感谢~Truel 的~msmake.cmd,感谢~oseen~的~utf-8~移植工作 +% 和~debian package,感谢~EricH 制作的~gentoo ebuild! +% +% 感谢我自己能把这件事坚持下来,模板制作期间颇多感慨,不断遇到问题,不断摸索解决。其中的 +% 酸甜苦辣恐怕只有自己能体会得到! +% +% 很多同学用~\thuthesis{} 提交论文之后都会给我写一封感谢信,有的还会把打印出来的 +% 论文送给我一份:每当这个时候我都有说不出的欣慰。大家的认可才是~\thuthesis{} 最 +% 大的动力。与此同时我也感觉到更大的压力,因为模板的维护还需要花费相当的精力。同 +% 时我对模板还不太满意,代码质量不高,结构组织不好,文档内容不足。我呼唤感兴趣的 +% 同学能出手相助,给模板的开发和维护注入新的活力,让我们一起把~\thuthesis{} 做得 +% 更好! +% +% \newpage\hbox{}\vfill +% \heartpar{\textbf{\thuthesis} is a \LaTeX{} package aiming to facilitate the +% thesis writing for bachelors, masters and doctors of Tsinghua University. +% By now, \thuthesis\ has been widely used among lots of \TeX\ zealots who do +% not want to format their several years' hard work with the infamous MS +% WORD. I created \thuthesis\ in the summer of 2005, and made it more useful +% and stable in the spring of 2006. To be frank, \thuthesis\ is not going to +% fight with MS WORD, because in my opinion, ``the best tool depends on +% you''. It is hard to persuade all students to give up MS WORD and turn to +% \TeX, but I'd like to encourage them through my efforts. Actually, +% \thuthesis\ is in its initial step now, as an infant, \thuthesis\ needs your +% help very much, and it is very kind of you to contribute and promote +% it. \textsf{Xue Ruini}} +% \vfill +% +% \StopEventually{\PrintChanges\PrintIndex} +% \clearpage +% +% \section{实现细节} +% +% \subsection{基本信息} +% \begin{macrocode} +%<cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%<cls>\ProvidesClass{thuthesis} +%<cfg>\ProvidesFile{thuthesis.cfg} +%<cls|cfg>[2007/11/08 4.0 Tsinghua University Thesis Template] +% \end{macrocode} +% +% \subsection{定义选项} +% \label{sec:defoption} +% +% 定义论文类型以及是否涉密 +% \changes{v2.4}{2006/04/14}{添加模板名称命令。} +% \changes{v2.5}{2006/05/19}{增加本科论文的提交选项~submit。} +% \changes{v2.5.1}{2006/05/24}{如果没有设置格式选项,报错。} +% \changes{v2.5.1}{2006/05/26}{submit 只能由本科用。} +% \changes{v2.5.3}{2006/06/03}{submit 选项的一个笔误。} +% \changes{v3.0}{2007/05/12}{删除~submit 选项。} +% \begin{macrocode} +%<*cls> +\hyphenation{Thu-Thesis} +\def\thuthesis{\textsc{ThuThesis}} +\def\version{4.0} +\newif\ifthu@bachelor\thu@bachelorfalse +\newif\ifthu@master\thu@masterfalse +\newif\ifthu@doctor\thu@doctorfalse +\newif\ifthu@secret\thu@secretfalse +\DeclareOption{bachelor}{\thu@bachelortrue} +\DeclareOption{master}{\thu@mastertrue} +\DeclareOption{doctor}{\thu@doctortrue} +\DeclareOption{secret}{\thu@secrettrue} +\AtEndOfClass{% + \ifthu@bachelor\relax\else + \ifthu@master\relax\else + \ifthu@doctor\relax\else + \ClassError{thuthesis}% + {You have to specify one of thesis options: bachelor, master or doctor.}{} + \fi + \fi + \fi} +% \end{macrocode} +% +% 使用~dvips,dvipdfm 还是~pdflatex +% \changes{v2.5.1}{2006/05/24}{如果选项设置了~dvips,但是用~pdflatex 编译,报错。} +% \changes{v2.6}{2006/06/09}{增加~dvipdfm 选项。} +% \begin{macrocode} +\newif\ifthu@dvips +\newif\ifthu@dvipdfm +\DeclareOption{dvips}{\thu@dvipstrue} +\DeclareOption{dvipdfm}{\thu@dvipdfmtrue} +\AtEndOfClass{% + \ifpdf + \ifthu@dvips + \ClassError{thuthesis}% + {Please remove `dvips' if you run pdflatex.}{} + \fi + \ifthu@dvipdfm + \ClassError{thuthesis}% + {Please remove `dvipdfm' if you run pdflatex.}{} + \fi + \fi} +% \end{macrocode} +% +% 如果需要使用~arial 字体,请打开~[arial] 选项 +% \begin{macrocode} +\newif\ifthu@arial +\DeclareOption{arial}{\thu@arialtrue} +% \end{macrocode} +% +% 目录中英文是否用~arial +% \begin{macrocode} +\newif\ifthu@arialtoc +\DeclareOption{arialtoc}{\thu@arialtoctrue} +% \end{macrocode} +% 章节标题中的英文是否用~arial +% \begin{macrocode} +\newif\ifthu@arialtitle +\DeclareOption{arialtitle}{\thu@arialtitletrue} +% \end{macrocode}% +% +% +% 将选项传递给~book 类 +% \begin{macrocode} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} +% \end{macrocode} +% +% 本科默认打开~arialtoc。\textbf{ExecuteOptions} 的参数之间用逗号分割,必须不能有空 +% 格。开始不知道,折腾了老半天。 +% \changes{v2.5.1}{2006/05/24}{ft,研究生院目录要~times,而教务处要~arial。} +% \changes{v2.5.1}{2006/05/26}{本科~openright,研究生~openany。} +% \changes{v3.1}{2007/10/09}{本科的目录又不要~arial 字体了。} +% \begin{macrocode} +\ExecuteOptions{arialtitle} +\ProcessOptions +\ifthu@bachelor + %\thu@arialtoctrue % hard code + \LoadClass[12pt, a4paper, openright]{book} +\else + \LoadClass[12pt, a4paper, openany]{book} +\fi +% \end{macrocode} +% +% +% \subsection{装载宏包} +% \label{sec:loadpackage} +% +% +% 引用的宏包和相应的定义。 +% \begin{macrocode} +\RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{ifpdf} +% \end{macrocode} +% +% \AmSTeX{} 宏包,用来排出更加漂亮的公式。 +% \begin{macrocode} +\RequirePackage{amsmath, amssymb} +% \end{macrocode} +% +% 用很爽的~\pkg{txfonts} 替换~\pkg{mathptmx} 宏包,同时用它自带的~typewriter 字 +% 体替换~courier。必须出现在~\AmSTeX{} 之后。 +% \changes{v3.1}{2007/06/16}{replace mathptmx with txfonts.} +% \begin{macrocode} +\RequirePackage{txfonts} +% \end{macrocode} +% +% arial 字体需要单独安装,如果不使用~arial 字体,可以用~helvet 字体~|\textsf| +% 模拟,二者基本没有差别。 +% \begin{macrocode} +\ifthu@arial + \IfFileExists{arial.sty}{\RequirePackage{arial}}% + {\ClassWarning{thuthesis}{no arial.sty availiable!}} +\fi +% \end{macrocode} +% +% +% 图形支持宏包。 +% \begin{macrocode} +\RequirePackage{graphicx} +% \end{macrocode} +% +% 并排图形。\pkg{subfigure} 已经不再推荐,用新的~\pkg{subfig}。加入~|config| 选项以便兼容 +% ~\pkg{subfigure} 的命令。 +% 浮动图形和表格标题样式。\pkg{caption2} 已经不推荐使用,采用新的~\pkg{caption}。它会自动被 +% ~\pkg{subfig} 装载进来。所以可以在后面看到~\cs{captionsetup} 的命令。 +% \begin{macrocode} +\RequirePackage[config]{subfig} +% \end{macrocode} +% +% 首行缩进宏包 +% \begin{macrocode} +\RequirePackage{indentfirst} +% \end{macrocode} +% +% 更好的列表环境。 +% \changes{v2.6.2}{2006/06/18}{去掉~\pkg{paralist} 的~newitem 和~newenum 选项,因为默 +% 认是打开的。} +% \changes{v2.6.4}{2006/10/23}{增加~\texttt{neverdecrease} 选项。} +% \begin{macrocode} +\RequirePackage[neverdecrease]{paralist} +% \end{macrocode} +% +% 中文支持宏包 +% \begin{macrocode} +\RequirePackage{CJK, CJKnumb} +% \end{macrocode} +% +% 中文标点优化处理 +% \begin{macrocode} +\RequirePackage{CJKpunct} +% \end{macrocode} +% +% 可拷贝的~pdf (需要进一步测试) +% \begin{macrocode} +\ifpdf % We're not running pdftex + \RequirePackage{ccmap} % 用 pdflatex 编译 +\else + % \RequirePackage{cmap} +\fi +% \end{macrocode} +% +% 定理类环境宏包,其中~\pkg{amsmath} 选项用来兼容~AMS \LaTeX 的宏包 +% \begin{macrocode} +\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem} +% \end{macrocode} +% +% 表格控制 +% \changes{v2.6}{2006/06/09}{增加~\pkg{longtable}。} +% \begin{macrocode} +\RequirePackage{array} +\RequirePackage{longtable} +% \end{macrocode} +% +% 使用三线表: \cs{toprule}, \cs{midrule}, \cs{bottomrule}。当然简单的可以用~\cs{hwline}\marg{wd}。 +% \begin{macrocode} +\RequirePackage{booktabs} +% \end{macrocode} +% +% +% 参考文献引用宏包。 +% \begin{macrocode} +\RequirePackage[numbers,super,sort&compress]{natbib} +% \end{macrocode} +% +% 生成有书签的~pdf 及其开关,请结合~gbk2uni 避免书签乱码。 +% \changes{v2.6}{2006/06/09}{去除~hyperref 选项,等待全局传递。} +% \begin{macrocode} +\RequirePackage{hyperref} +\hypersetup{% + unicode=true, + CJKbookmarks=true, + bookmarksnumbered=true, + bookmarksopen=true, + bookmarksopenlevel=1, + breaklinks=true, + colorlinks=false, + plainpages=false, + pdfpagelabels, + pdfborder=0 0 0} +% \end{macrocode} +% 设置~url 样式,与上下文一致 +% \begin{macrocode} +\urlstyle{same} +% \end{macrocode} +% +% \pkg{hypernat} 让~\pkg{hyperref} 和~\pkg{natbib} 协调的工作。应该在~\pkg{natbib} 和~\pkg{hyperref} 之后加载,参看其文档。 +% \begin{macrocode} +\RequirePackage{hypernat} +%</cls> +% \end{macrocode} +% +% +% +% \subsection{主文档格式} +% \label{sec:mainbody} +% +% \subsubsection{Three matters} +% 我们的单面和双面模式与常规的不太一样。 +% \changes{v2.5.1}{2006/05/23}{本科正文之后页码即用罗马数字,研究生不变。} +% \changes{v2.5.3}{2006/06/03}{第一章永远右开。} +% \begin{macrocode} +%<*cls> +\renewcommand\frontmatter{% + \if@openright\cleardoublepage\else\clearpage\fi + \@mainmatterfalse + \pagenumbering{Roman} + \pagestyle{thu@empty}} +\renewcommand\mainmatter{% + \if@openright\cleardoublepage\else\clearpage\fi + \@mainmattertrue + \pagenumbering{arabic} + \pagestyle{thu@headings}} +\renewcommand\backmatter{% + \if@openright\cleardoublepage\else\clearpage\fi + %\@mainmatterfalse + \ifthu@bachelor\pagenumbering{Roman}\fi} +%</cls> +% \end{macrocode} +% +% +% \subsubsection{字体} +% \label{sec:font} +% +% \begin{macro}{\song} +% \begin{macro}{\songit} +% \begin{macro}{\fs} +% \begin{macro}{\fangsong} +% \begin{macro}{\kai} +% \begin{macro}{\kaishu} +% \begin{macro}{\hei} +% \begin{macro}{\heiti} +% \begin{macro}{\li} +% \begin{macro}{\lishu} +% \begin{macro}{\you} +% \begin{macro}{\youyuan} +% 重定义字体命令 +% \begin{macrocode} +%<*cls> +\newcommand{\song}{\CJKfamily{song}} % 宋体 +\def\songti{\song} +\newcommand{\fs}{\CJKfamily{fs}} % 仿宋体 +\def\fangsong{\fs} +\newcommand{\kai}{\CJKfamily{kai}} % 楷体 +\def\kaishu{\kai} +\newcommand{\hei}{\CJKfamily{hei}} % 黑体 +\def\heiti{\hei} +\newcommand{\li}{\CJKfamily{li}} % 隶书 +\def\lishu{\li} +\newcommand{\you}{\CJKfamily{you}} % 幼圆 +\def\youyuan{\you} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% 重定义字号命令 +% +% Ref 1: +% \begin{verbatim} +% 参考科学出版社编写的《著译编辑手册》(1994年) +% 七号 5.25pt 1.845mm +% 六号 7.875pt 2.768mm +% 小五 9pt 3.163mm +% 五号 10.5pt 3.69mm +% 小四 12pt 4.2175mm +% 四号 13.75pt 4.83mm +% 三号 15.75pt 5.53mm +% 二号 21pt 7.38mm +% 一号 27.5pt 9.48mm +% 小初 36pt 12.65mm +% 初号 42pt 14.76mm +% +% 这里的 pt 对应的是 1/72.27 inch,也就是 TeX 中的标准 pt +% \end{verbatim} +% +% Ref 2: +% WORD 中的字号对应该关系如下: +% \begin{verbatim} +% 初号 = 42bp = 14.82mm = 42.1575pt +% 小初 = 36bp = 12.70mm = 36.135 pt +% 一号 = 26bp = 9.17mm = 26.0975pt +% 小一 = 24bp = 8.47mm = 24.09pt +% 二号 = 22bp = 7.76mm = 22.0825pt +% 小二 = 18bp = 6.35mm = 18.0675pt +% 三号 = 16bp = 5.64mm = 16.06pt +% 小三 = 15bp = 5.29mm = 15.05625pt +% 四号 = 14bp = 4.94mm = 14.0525pt +% 小四 = 12bp = 4.23mm = 12.045pt +% 五号 = 10.5bp = 3.70mm = 10.59375pt +% 小五 = 9bp = 3.18mm = 9.03375pt +% 六号 = 7.5bp = 2.56mm +% 小六 = 6.5bp = 2.29mm +% 七号 = 5.5bp = 1.94mm +% 八号 = 5bp = 1.76mm +% +% 1bp = 72.27/72 pt +% \end{verbatim} +% +% \begin{macro}{\thu@define@fontsize} +% \changes{v2.6.2}{2006/06/18}{引入此命令重新定义字号。} +% 根据习惯定义字号。用法: +% +% \cs{thu@define@fontsize}\marg{字号名称}\marg{磅数} +% +% 避免了字号选择和行距的紧耦合。所有字号定义时为单倍行距,并提供选项指定行距倍数。 +% \begin{macrocode} +\newlength\thu@linespace +\newcommand{\thu@choosefont}[2]{% + \setlength{\thu@linespace}{#2*\real{#1}}% + \fontsize{#2}{\thu@linespace}\selectfont} +\def\thu@define@fontsize#1#2{% + \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{% + \thu@choosefont{##1}{#2}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\chuhao} +% \begin{macro}{\xiaochu} +% \begin{macro}{\yihao} +% \begin{macro}{\xiaoyi} +% \begin{macro}{\erhao} +% \begin{macro}{\xiaoer} +% \begin{macro}{\sanhao} +% \begin{macro}{\xiaosan} +% \begin{macro}{\sihao} +% \begin{macro}{\banxiaosi} +% \begin{macro}{\xiaosi} +% \begin{macro}{\dawu} +% \begin{macro}{\wuhao} +% \begin{macro}{\xiaowu} +% \begin{macro}{\liuhao} +% \begin{macro}{\xiaoliu} +% \begin{macro}{\qihao} +% \begin{macro}{\bahao} +% \begin{macrocode} +\thu@define@fontsize{chuhao}{42bp} +\thu@define@fontsize{xiaochu}{36bp} +\thu@define@fontsize{yihao}{26bp} +\thu@define@fontsize{xiaoyi}{24bp} +\thu@define@fontsize{erhao}{22bp} +\thu@define@fontsize{xiaoer}{18bp} +\thu@define@fontsize{sanhao}{16bp} +\thu@define@fontsize{xiaosan}{15bp} +\thu@define@fontsize{sihao}{14bp} +\thu@define@fontsize{banxiaosi}{13bp} +\thu@define@fontsize{xiaosi}{12bp} +\thu@define@fontsize{dawu}{11bp} +\thu@define@fontsize{wuhao}{10.5bp} +\thu@define@fontsize{xiaowu}{9bp} +\thu@define@fontsize{liuhao}{7.5bp} +\thu@define@fontsize{xiaoliu}{6.5bp} +\thu@define@fontsize{qihao}{5.5bp} +\thu@define@fontsize{bahao}{5bp} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% 正文小四号~(12pt) 字,行距为固定值~20 磅。 +% \begin{macrocode} +\renewcommand\normalsize{% + \@setfontsize\normalsize{12bp}{20bp} + \abovedisplayskip=10bp \@plus 2bp \@minus 2bp + \abovedisplayshortskip=10bp \@plus 2bp \@minus 2bp + \belowdisplayskip=\abovedisplayskip + \belowdisplayshortskip=\abovedisplayshortskip} +%</cls> +% \end{macrocode} +% +% +%\subsubsection{页面设置} +%\label{sec:layout} +% +% 本来这部分应该是最容易设置的,但根据格式规定出来的结果跟学校的~WORD 样例相差很 +% 大,所以只能微调。 +% \changes{v2.4}{2006/04/14}{把页面尺寸写入~dvi,避免有的用户通 +% 过~dvips 不指定页面类型而得到古怪的结果。} +% \begin{macrocode} +%<*cls> +\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}} +\AtBeginDvi{\special{!% + \@percentchar\@percentchar BeginPaperSize: a4 + ^^Ja4^^J\@percentchar\@percentchar EndPaperSize}} +\setlength{\textwidth}{\paperwidth} +\setlength{\textheight}{\paperheight} +\setlength\marginparwidth{0cm} +\setlength\marginparsep{0cm} +\addtolength{\textwidth}{-6.4cm} +\setlength{\oddsidemargin}{3.2cm-1in} +\setlength{\evensidemargin}{\oddsidemargin} +\setlength{\headheight}{20pt} +\setlength{\topskip}{0pt} +\setlength{\skip\footins}{15pt} +\setlength{\topmargin}{2.8cm-1in} +\ifthu@bachelor + \setlength{\footskip}{1.3cm} + \setlength{\headsep}{0.6cm} + \addtolength{\textheight}{-7.8cm} +\else + \setlength{\footskip}{1.5cm} + \setlength{\headsep}{0.5cm} + \addtolength{\textheight}{-8.6cm} +\fi +%</cls> +% \end{macrocode} +% +% \subsubsection{页眉页脚} +% \label{sec:headerfooter} +% +% 新的一章最好从奇数页开始~(openright),所以必须保证它前面那页如果没有内容也必须 +% 没有页眉页脚。(code stolen from \pkg{fancyhdr}) +% \begin{macrocode} +%<*cls> +\let\thu@cleardoublepage\cleardoublepage +\newcommand{\thu@clearemptydoublepage}{% + \clearpage{\pagestyle{empty}\thu@cleardoublepage}} +\let\cleardoublepage\thu@clearemptydoublepage +% \end{macrocode} +% +% 定义页眉和页脚。chapter 自动调用~thispagestyle{thu@plain},所以要重新定义~thu@plain。 +% \changes{v2.0}{2005/12/18}{以前的太乱了,重新整理过清晰多了。} +% \changes{v2.1}{2006/03/01}{彻底放弃~fancyhdr,定义自己的样式。} +% \changes{v2.5}{2006/05/13}{本科的奇偶页眉不同。} +% \changes{v2.5}{2006/05/20}{增加~empty 页面样式。} +% \begin{macro}{\ps@thu@empty} +% \begin{macro}{\ps@thu@plain} +% \begin{macro}{\ps@thu@headings} +% 定义三种页眉页脚格式: +% \begin{itemize} +% \item \texttt{thu@empty}:页眉页脚都没有 +% \item \texttt{thu@plain}:只显示页脚的页码 +% \item \texttt{thu@headings}:页眉页脚同时显示 +% \end{itemize} +% \begin{macrocode} +\def\ps@thu@empty{% + \let\@oddhead\@empty% + \let\@evenhead\@empty% + \let\@oddfoot\@empty% + \let\@evenfoot\@empty} +\def\ps@thu@plain{% + \let\@oddhead\@empty% + \let\@evenhead\@empty% + \def\@oddfoot{\hfil\wuhao\thepage\hfil}% + \let\@evenfoot=\@oddfoot} +\def\ps@thu@headings{% + \def\@oddhead{\vbox to\headheight{% + \hb@xt@\textwidth{\hfill\wuhao\song\leftmark\ifthu@bachelor\relax\else\hfill\fi}% + \vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}} + \def\@evenhead{\vbox to\headheight{% + \hb@xt@\textwidth{\wuhao\song% + \ifthu@bachelor\thu@schoolename\thu@bachelor@subtitle% + \else\hfill\leftmark\fi\hfill}% + \vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}} + \def\@oddfoot{\hfil\wuhao\thepage\hfil} + \let\@evenfoot=\@oddfoot} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% +% 其实可以直接写到~\cs{chapter} 的定义里面。 +% \begin{macrocode} +\renewcommand{\chaptermark}[1]{\@mkboth{\@chapapp\ ~~#1}{}} +%</cls> +% \end{macrocode} +% +% +% \subsubsection{段落} +% \label{sec:paragraph} +% +% 用于中文段落缩进和正文版式 +% \begin{macrocode} +%<*cls> +\newlength\CJKtwospaces +\def\CJKindent{% + \settowidth\CJKtwospaces{\CJKchar{"0A1}{"0A1}\CJKchar{"0A1}{"0A1}}% + \parindent\CJKtwospaces} +% \end{macrocode} +% +% 段落之间的竖直距离 +% \begin{macrocode} +\setlength{\parskip}{0pt \@plus2pt \@minus0pt} +% \end{macrocode} +% +% 调整默认列表环境间的距离,以符合中文习惯。 +% \changes{v2.5.2}{2006/06/01}{更改默认列表距离。} +% \begin{macro}{thu@item@space} +% \begin{macrocode} +\def\thu@item@space{% + \let\itemize\compactitem + \let\enditemize\endcompactitem + \let\enumerate\compactenum + \let\endenumerate\endcompactenum + \let\description\compactdesc + \let\enddescription\endcompactdesc} +%</cls> +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{脚注} +% \label{sec:footnote} +% +% \begin{macro}{\MakePerPage} +% 从~perpage.sty 中抽取的代码,使~footnote 按页编号。不再用臃肿的~footmisc。 +% \begin{macrocode} +%<*cls> +\newcommand*\MakePerPage[2][\@ne]{% + \expandafter\def\csname c@pchk@#2\endcsname{\c@pchk@{#2}{#1}}% + \newcounter{pcabs@#2}% + \@addtoreset{pchk@#2}{#2}} +\def\new@pagectr#1{\@newl@bel{pchk@#1}} +\def\c@pchk@#1#2{\z@=\z@ + \begingroup + \expandafter\let\expandafter\next\csname pchk@#1@\arabic{pcabs@#1}\endcsname + \addtocounter{pcabs@#1}\@ne + \expandafter\ifx\csname pchk@#1@\arabic{pcabs@#1}\endcsname\next + \else \setcounter{#1}{#2}\fi + \protected@edef\next{% + \string\new@pagectr{#1}{\arabic{pcabs@#1}}{\noexpand\thepage}}% + \protected@write\@auxout{}{\next}% + \endgroup\global\z@} +\MakePerPage{footnote} +% \end{macrocode} +% \end{macro} +% +% 脚注字体:宋体小五,单倍行距。 悬挂缩进1.5字符。标号在正文中是上标,在脚注中为 +% 正体。默认情况下~|\@makefnmark| 显示为上标,同时为脚标和正文所用,所以如果要区 +% 分,必须分别定义脚注的标号和正文的标号。 +% \changes{v2.1}{2006/03/01}{让脚注它悬挂起来,而且中文中用上标,脚注中用正体。} +% \changes{v2.5}{2006/05/13}{修正~minipage~中的脚注。} +% \changes{v2.5.1}{2006/05/21}{脚注编号使用~textcircled 命令,每页允许至多~99 个 +% 脚注条目。} +% \begin{macro}{\thu@textcircled} +% 生成带圈的脚注数字。最多处理到~99,当然这个很容易扩展了。 +% \begin{macrocode} +\def\thu@textcircled#1{% + \ifnum \value{#1} <10 \textcircled{\xiaoliu\arabic{#1}} + \else\ifnum \value{#1} <100 \textcircled{\qihao\arabic{#1}}\fi + \fi} +% \end{macrocode} +% \end{macro} +% \changes{v2.6}{2006/06/09}{脚注改成~1.5 倍行距,漂亮。} +% \begin{macrocode} +\renewcommand{\thefootnote}{\thu@textcircled{footnote}} +\renewcommand{\thempfootnote}{\thu@textcircled{mpfootnote}} +\def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@} +\let\thu@footnotesize\footnotesize +\renewcommand\footnotesize{\thu@footnotesize\xiaowu[1.5]} +\def\@makefnmark{\textsuperscript{\hbox{\normalfont\@thefnmark}}} +\long\def\@makefntext#1{ + \bgroup + \setbox\@tempboxa\hbox{% + \hb@xt@ 2em{\@thefnmark\hss}} + \leftmargin\wd\@tempboxa + \rightmargin\z@ + \linewidth \columnwidth + \advance \linewidth -\leftmargin + \parshape \@ne \leftmargin \linewidth + \footnotesize + \@setpar{{\@@par}}% + \leavevmode + \llap{\box\@tempboxa}% + #1 + \par\egroup} +%</cls> +% \end{macrocode} +% +% +%\subsubsection{数学相关} +%\label{sec:equation} +% +% 允许太长的公式断行、分页等。 +% \begin{macrocode} +%<*cls> +\allowdisplaybreaks[4] +% \end{macrocode} +% +% 公式距前后文的距离由~4 个参数控制,参见~\cs{normalsize} 的定义。 +% +% 公式改成~(1-1) 的形式,本科还要在前面加上公式二字,我不知道他们是怎么想的,这 +% 忒不好看了。 +% \changes{v2.5.1}{2006/05/24}{本科公式编号前添加“公式”二字。ft,这个需要修改 +% ~\pkg{amsmath} 极其深入的一个命令。} +% \changes{v2.5.1}{2006/05/24}{教务处居然要本科论文公式全文编号!} +% \changes{v2.5.2}{2006/05/29}{上一个版本忘了把研究生的公式编号排除。} +% \changes{v3.0}{2007/05/12}{本科公式又要取消全文统一编号了,这帮家伙,早就告诉 +% 过他们,就是不听。} +% 本科的公式编号太变态了,我不得不修改~\pkg{amsmath} 中很深的一个命令~\cs{tagform@}。 +%\changes{v2.6.2}{2006/06/19}{根据不同论文格式显示不同公式编号,并自动加入索引。} +% 同时为了让~\pkg{amsmath} 的~\cs{tag*} 命令得到正确的格式,我们必须修改这些代 +% 码。\cs{make@df@tag} 是定义~\cs{tag*} 和~\cs{tag} 内部命令的。 +% \cs{make@df@tag@@} 处理~\cs{tag*},我们就改它! +% \begin{verbatim} +% \def\make@df@tag{\@ifstar\make@df@tag@@\make@df@tag@@@} +% \def\make@df@tag@@#1{% +% \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}}} +% \end{verbatim} +% \begin{macrocode} +\def\make@df@tag{\@ifstar\thu@make@df@tag@@\make@df@tag@@@} +\def\thu@make@df@tag@@#1{% + \gdef\df@tag{\thu@maketag{#1}\def\@currentlabel{#1}}} + % redefinitation of tagform broken eqref! +\renewcommand{\eqref}[1]{\textup{\ref{#1}}} +\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} +\ifthu@bachelor + \def\thu@maketag#1{\maketag@@@{% + (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)}} + \def\tagform@#1{\maketag@@@{% + (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)\equcaption{#1}}} +\else + \def\thu@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}} + \def\tagform@#1{\maketag@@@{% + (\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}} +\fi +% \end{macrocode} +% ^^A 使公式编号随着每开始新的一节而重新开始。 +% ^^A \@addtoreset{eqation}{section} +% +% 解决证明环境中方块乱跑的问题。 +% \begin{macrocode} +\gdef\@endtrivlist#1{% % from \endtrivlist + \if@inlabel \indent\fi + \if@newlist \@noitemerr\fi + \ifhmode + \ifdim\lastskip >\z@ #1\unskip \par %<<<<<<<<<<<<<<<<<<<<<< + \else #1\unskip \par \fi + \fi + \if@noparlist \else + \ifdim\lastskip >\z@ + \@tempskipa\lastskip \vskip -\lastskip + \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip + \vskip\@tempskipa + \fi + \@endparenv + \fi #1} +% \end{macrocode} +% +% “定理”字样使用黑体,正文使用宋体,冒号隔开 +% \changes{v2.6.2}{2006/06/17}{增加问题和猜想两个数学环境。} +% \begin{macrocode} +\theorembodyfont{\song\rmfamily} +\theoremheaderfont{\hei\rmfamily} + % \theoremsymbol{\ensuremath{\blacksquare}} +\theoremsymbol{\ensuremath{\square}} +\theoremstyle{nonumberplain} +%</cls> +%<*cfg> +\newtheorem{proof}{证明} +%</cfg> +%<*cls> +\theoremstyle{plain} +\theoremsymbol{} +%</cls> +%<*cfg> +\theoremseparator{:} +\newtheorem{assumption}{假设}[chapter] +\newtheorem{definition}{定义}[chapter] +\newtheorem{proposition}{命题}[chapter] +\newtheorem{lemma}{引理}[chapter] +\newtheorem{theorem}{定理}[chapter] +\newtheorem{axiom}{公理}[chapter] +\newtheorem{corollary}{推论}[chapter] +\newtheorem{exercise}{练习}[chapter] +\newtheorem{example}{例}[chapter] +\newtheorem{remark}{注释}[chapter] +\newtheorem{problem}{问题}[chapter] +\newtheorem{conjecture}{猜想}[chapter] +%</cfg> +% \end{macrocode} +% +% \subsubsection{浮动对象以及表格} +% \label{sec:float} +% +% 设置浮动对象和文字之间的距离 +% \changes{v2.6}{2006/06/09}{增加~\cs{floatsep},\cs{@fptop},\cs{@fpsep} 和~\cs{@fpbot}。} +% \begin{macrocode} +%<*cls> +\setlength{\floatsep}{12bp \@plus4pt \@minus1pt} +\setlength{\intextsep}{12bp \@plus4pt \@minus2pt} +\setlength{\textfloatsep}{12bp \@plus4pt \@minus2pt} +\setlength{\@fptop}{0bp \@plus1.0fil} +\setlength{\@fpsep}{12bp \@plus2.0fil} +\setlength{\@fpbot}{0bp \@plus1.0fil} +% \end{macrocode} +% +% 下面这组命令使浮动对象的缺省值稍微宽松一点,从而防止幅度 +% 对象占据过多的文本页面,也可以防止在很大空白的浮动页上放置 +% 很小的图形。 +% \begin{macrocode} +\renewcommand{\textfraction}{0.15} +\renewcommand{\topfraction}{0.85} +\renewcommand{\bottomfraction}{0.65} +\renewcommand{\floatpagefraction}{0.60} +% \end{macrocode} +% +% 定制浮动图形和表格标题样式 +% \begin{itemize} +% \item 图表标题字体为~11pt, 这里写作大五号 +% \item 去掉图表号后面的冒号。图序与图名文字之间空一个汉字符宽度。 +% \item 图:caption 在下,段前空~6 磅,段后空~12 磅 +% \item 表:caption 在上,段前空~12 磅,段后空~6 磅 +% \end{itemize} +% \changes{v2.4}{2006/04/14}{表格内容为~11~磅。} +% \changes{v2.4}{2006/04/14}{图表标题左对齐,取消原先漂亮的~hang~模式。} +% \changes{v2.5}{2006/05/13}{标题上下间距重调,以前没有考虑~\cs{intextsep} 的影响。} +% \changes{v2.5.1}{2006/05/23}{增加~\pkg{subfigure} 和~\pkg{subtable} 的~caption 配置。} +% \changes{v2.5.1}{2006/05/24}{重新定义表格默认字体。} +% \changes{v2.5.3}{2006/06/07}{不管~caption 出现在什么位置,\cs{aboveskip} 总是出现在标题和浮动体之间的距离。} +% \begin{macrocode} +\let\old@tabular\@tabular +\def\thu@tabular{\dawu[1.5]\old@tabular} +\DeclareCaptionLabelFormat{thu}{{\dawu[1.5]\song #1~\rmfamily #2}} +\DeclareCaptionLabelSeparator{thu}{\hspace{1em}} +\DeclareCaptionFont{thu}{\dawu[1.5]} +\captionsetup{labelformat=thu,labelsep=thu,font=thu} +\captionsetup[table]{position=top,belowskip={12bp-\intextsep},aboveskip=3bp} +\captionsetup[figure]{position=bottom,belowskip={12bp-\intextsep},aboveskip=-2bp} +\captionsetup[subfloat]{font=thu,captionskip=6bp,nearskip=6bp,farskip=0bp,topadjust=0bp} + %\renewcommand{\thesubfigure}{\thefigure--(\arabic{subfigure})} + % \renewcommand{\p@subfigure}{:} +% \end{macrocode} +% 我们采用~\pkg{longtable} 来处理跨页的表格。默认有个不足:插图索引部分缺少图 +% 名。同样我们需要设置其默认字体为五号。 +% \changes{v2.5.3}{2006/06/08}{增加对~\pkg{longtable} 的处理。} +% \begin{macrocode} +\def\LT@c@ption#1[#2]#3{% change code from longtable.sty + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{\csname ext@table\endcsname}{table}% + {\protect\numberline{\tablename\hskip0.5em\thetable}{#2}}}% + \fi} +\let\thu@LT@array\LT@array +\def\LT@array{\dawu[1.5]\thu@LT@array} % set default font size +% \end{macrocode} +% +% \begin{macro}{\hlinewd} +% 简单的表格使用三线表推荐用~\cs{hlinewd}。如果表格比较复杂还是用~\pkg{booktabs} 的命 +% 令好一些。 +% \begin{macrocode} +\def\hlinewd#1{% + \noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet + \reserved@a\@xhline} +%</cls> +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{中文标题定义} +% \label{sec:theor} +% +% \changes{v2.5}{2006/05/19}{增加索引名称定义。} +% \begin{macrocode} +%<*cfg> +\renewcommand\contentsname{目\hspace{1em}录} +\renewcommand\listfigurename{插图索引} +\renewcommand\listtablename{表格索引} +\newcommand\listequationname{公式索引} +\newcommand\equationname{公式} +\renewcommand\bibname{参考文献} +\renewcommand\indexname{索引} +\renewcommand\figurename{图} +\renewcommand\tablename{表} +\newcommand\CJKprepartname{第} +\newcommand\CJKpartname{部分} +\newcommand\CJKthepart{\CJKnumber{\@arabic\c@part}} +\newcommand\CJKprechaptername{第} +\newcommand\CJKchaptername{章} +\newcommand\CJKthechapter{\@arabic\c@chapter} +\renewcommand\chaptername{\CJKprechaptername~\CJKthechapter~\CJKchaptername} +\renewcommand\appendixname{附录} +\ifthu@bachelor + \newcommand{\cabstractname}{中文摘要} + \newcommand{\eabstractname}{ABSTRACT} +\else + \newcommand{\cabstractname}{摘\hspace{1em}要} + \newcommand{\eabstractname}{Abstract} +\fi +\let\CJK@todaysave=\today +\def\CJK@todaysmall{~\the\year~年~\the\month~月~\the\day~日} +\def\CJK@todaybig{\CJKdigits{\the\year}年\CJKnumber{\the\month}月\CJKnumber{\the\day}日} +\def\CJK@today{\CJK@todaysmall} +\renewcommand\today{\CJK@today} +\newcommand\CJKtoday[1][1]{% + \ifcase#1\def\CJK@today{\CJK@todaysave} + \or\def\CJK@today{\CJK@todaysmall} + \or\def\CJK@today{\CJK@todaybig} + \fi} +%</cfg> +% \end{macrocode} +% +% +% \subsubsection{章节标题} +% \label{sec:titleandtoc} +% +% 如果章节题目中的英文要使用~arial,那么就加上~sffamily +% \begin{macrocode} +%<*cls> +\ifthu@arialtitle + \def\thu@title@font{\sffamily} +\fi +% \end{macrocode} +% +% \begin{macro}{\chapter} +% 章序号与章名之间空一个汉字符 黑体三号字,居中书写,单倍行距,段前空~24 磅,段 +% 后空~18 磅。 +% \changes{v2.5}{2006/05/13}{取消~\pkg{titlesec} 宏包,用基本~\LaTeX{} 命令格式化标题。} +% \changes{v2.5.1}{2006/05/23}{让~\cs{chapter*} 自动~\cs{markboth}。} +% \changes{v3.1}{2006/06/16}{英文摘要标题要搞特殊化,ft!} +% \begin{macrocode} +\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi\phantomsection% + \ifthu@bachelor\thispagestyle{thu@plain}% + \else\thispagestyle{thu@headings}\fi% + \global\@topnum\z@% + \@afterindenttrue% + \secdef\@chapter\@schapter} +\def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp}#1}%TODO: shit + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@makechapterhead{#2}} +\def\@makechapterhead#1{% + \vspace*{20bp}% + {\parindent \z@ \centering + \hei\csname thu@title@font\endcsname\ifthu@bachelor\xiaosan\else\sanhao[1]\fi + \ifnum \c@secnumdepth >\m@ne + \@chapapp\hskip1em + \fi + #1\par\nobreak + \vskip 24bp}} +\def\@schapter#1{% + \@makeschapterhead{#1} + \@afterheading} +\def\@makeschapterhead#1{% + \vspace*{20bp}% + {\parindent \z@ \centering + \hei\csname thu@title@font\endcsname\sanhao[1] + \ifthu@bachelor\xiaosan\else + \def\@tempa{#1} + \def\@tempb{\eabstractname} + \ifx\@tempa\@tempb\bfseries\fi + \fi + \interlinepenalty\@M + #1\par\nobreak + \vskip 24bp}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\thu@chapter*} +% \changes{v2.5.2}{2006/05/29}{定义自己的~\cs{thu@chapter*}。} +% 默认的~\cs{chapter*} 很难同时满足研究生院和本科生的论文要求。本科论文要求所有 +% 的章都出现在目录里,比如摘要、Abstract、主要符号表等,所以可以简单的扩展默认 +% ~\cs{chapter*} 实现这个目的。但是研究生又不要这些出现在目录中,而且致谢和声明 +% 部分的章名、页眉和目录都不同,所以我想定义一个功能强悍的~\cs{thu@chapter*} 专 +% 门处理他们的变态要求。 +% +% \cs{thu@chapter*}\oarg{tocline}\marg{title}\oarg{header}: tocline 是出现在目录 +% 中的条目,如果为空则此~chapter 不出现在目录中,如果省略表示目录出现~title; +% title 是章标题;header 是页眉出现的标题,如果忽略则取~title。通过这个宏我才真 +% 正体会到~\TeX{} macro 的力量! +% \begin{macrocode} +\def\thu@chapter*{% + \@ifnextchar [ % ] + {\thu@@chapter} + {\thu@@chapter@}} +\def\thu@@chapter@#1{\thu@@chapter[#1]{#1}} +\def\thu@@chapter[#1]#2{% + \@ifnextchar [ % ] + {\thu@@@chapter[#1]{#2}} + {\thu@@@chapter[#1]{#2}[]}} +\def\thu@@@chapter[#1]#2[#3]{% + \if@openright\cleardoublepage\else\clearpage\fi + \phantomsection + \def\@tmpa{#1} + \def\@tmpb{#3} + \ifx\@tmpa\@empty + \pdfbookmark[0]{#2}{\expandafter\@gobble\string#2} + \else + \addcontentsline{toc}{chapter}{#1} + \fi + \chapter*{#2} + \ifx\@tmpb\@empty + \@mkboth{#2}{#2} + \else + \@mkboth{#3}{#3} + \fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\section} +% 一级节标题,例如:2.1 实验装置与实验方法 +% 节标题序号与标题名之间空一个汉字符(下同)。 +% 采用黑体四号(14pt)字居左书写,行距为固定值~20 磅,段前空~24 磅,段后空~6 磅。 +% \begin{macrocode} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-24bp \@plus -1ex \@minus -.2ex}% + {6bp \@plus .2ex}% + {\hei\csname thu@title@font\endcsname\sihao[1.429]}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subsection} +% 二级节标题,例如:2.1.1 实验装置 +% 采用黑体~13pt 字居左书写,行距为固定值~20 磅,段前空~12 磅,段后空~6 磅。 +% \begin{macrocode} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-16bp \@plus -1ex \@minus -.2ex}% + {6bp \@plus .2ex}% + {\hei\csname thu@title@font\endcsname\banxiaosi[1.538]}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\subsubsection} +% 三级节标题,例如:2.1.2.1 归纳法 +% 采用黑体小四号(12pt)字居左书写,行距为固定值~20 磅,段前空~12 磅,段后空~6 磅。 +% \begin{macrocode} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-16bp \@plus -1ex \@minus -.2ex}% + {6bp \@plus .2ex}% + {\hei\csname thu@title@font\endcsname\xiaosi[1.667]}} +%</cls> +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{目录格式} +% \label{sec:toc} +% +% 最多涉及~4 层,即: x.x.x.x。\par +% chapter(0), section(1), subsection(2), subsubsection(3) +% \changes{v3.1}{2007/10/09}{博士论文目录只出现到第~3 级标题即可。} +% \begin{macrocode} +%<*cls> +\setcounter{secnumdepth}{3} +\ifthu@doctor + \setcounter{tocdepth}{2} +\else + \setcounter{tocdepth}{3} +\fi +% \end{macrocode} +% +% +% 每章标题行前空~6 磅,后空~0 磅。如果使用目录项中英文要使用~Arial,那么就加上 +% ~\cs{sffamily}。章节名中英文用~Arial 字体,页码仍用~Times。 +% \changes{v2.0}{2005/12/18}{附录的目录项需要调整一下。以及公式编号方式等等。} +% \changes{v2.5}{2006/05/13}{取消~\pkg{titletoc}~宏包,用~\cs{dottedtocline} 调整 +% 目录。} +% \changes{v2.5.1}{2006/05/23}{减小目录项中的导引小点跟页码之间的留白。} +% \changes{v2.5.2}{2006/05/29}{用~\cs{thu@chapter*} 改写目录命令。} +% \changes{v3.0}{2007/05/12}{缩小目录中标题与页码之间“点”之间的距离。} +% \changes{v4.0}{2007/11/08}{本科研究生目录字号行距都不同。} +% \begin{macro}{\tableofcontents} +% 目录生成命令。 +% \begin{macrocode} +\renewcommand\tableofcontents{% + \thu@chapter*[]{\contentsname} + \ifthu@bachelor\wuhao[1.8]\else\xiaosi[1.5]\fi\@starttoc{toc}\normalsize} +\ifthu@arialtoc + \def\thu@toc@font{\sffamily} +\fi +\def\@pnumwidth{2em} % 这个参数没用了 +\def\@tocrmarg{2em} +\def\@dotsep{1} % 目录点间的距离 +\def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth \else + \vskip \z@ \@plus.2\p@ + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {\csname thu@toc@font\endcsname #4}\nobreak + \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill + \nobreak{\normalfont \normalcolor #5}% + \par}% + \fi} +\renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 4bp \@plus\p@ + \setlength\@tempdima{4em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode + \advance\leftskip\@tempdima + \hskip -\leftskip + {\hei\csname thu@toc@font\endcsname #1} % numberline is called here, and it use @tempdima + \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill + \nobreak{\normalfont\normalcolor #2}\par + \penalty\@highpenalty + \endgroup + \fi} +\renewcommand*\l@section{\@dottedtocline{1}{1.2em}{2.1em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{2em}{3em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.5em}{3.8em}} +%</cls> +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{封面和封底} +% \label{sec:cover} +% \begin{macro}{\thu@define@term} +% 方便的定义封面的一些替换命令。 +% \changes{v2.6.2}{2006/06/18}{引入~\cs{thu@define@term} 定义封面命令。} +% \changes{v3.1}{2006/06/16}{重新定义摘要为环境,long 选项不需要了。} +% \begin{macrocode} +%<*cls> +\def\thu@define@term#1{ + \expandafter\gdef\csname #1\endcsname##1{% + \expandafter\gdef\csname thu@#1\endcsname{##1}} + \csname #1\endcsname{}} +% \end{macrocode} +% \end{macro} +% 封面、摘要、版权、致谢格式定义 +% \changes{v2.0}{2005/12/18}{增加了封面密级,增加博士封面支持} +% \begin{macro}{\secretlevel} +% \begin{macro}{\secretyear} +% \begin{macro}{\ctitle} +% \begin{macro}{\cdegree} +% \begin{macro}{\cdepartment} +% \begin{macro}{\caffil} +% \begin{macro}{\cmajor} +% \begin{macro}{\csubject} +% \begin{macro}{\cauthor} +% \begin{macro}{\csupervisor} +% \begin{macro}{\cassosupervisor} +% \begin{macro}{\ccosupervisor} +% \begin{macro}{\cdate} +% \begin{macro}{\etitle} +% \begin{macro}{\edegree} +% \begin{macro}{\edepartment} +% \begin{macro}{\eaffil} +% \begin{macro}{\emajor} +% \begin{macro}{\esubject} +% \begin{macro}{\eauthor} +% \begin{macro}{\esupervisor} +% \begin{macro}{\eassosupervisor} +% \begin{macro}{\ecosupervisor} +% \begin{macro}{\edate} +% \changes{v2.5}{2006/05/20}{院系和专业分别改名用~department 和~major,代替原来 +% 的~affil 和~subject。} \changes{v2.6.2}{2006/06/18}{改正~groupmembers 的拼 +% 写错误。} +% \begin{macrocode} +\thu@define@term{secretlevel} +\thu@define@term{secretyear} +\thu@define@term{ctitle} +\thu@define@term{cdegree} +\newcommand\cdepartment[2][]{\def\thu@cdepartment@short{#1}\def\thu@cdepartment{#2}} +\def\caffil{\cdepartment} % for compatibility +\def\thu@cdepartment@short{} +\def\thu@cdepartment{} +\thu@define@term{cmajor} +\def\csubject{\cmajor} % for compatibility +\thu@define@term{cauthor} +\thu@define@term{csupervisor} +\thu@define@term{cassosupervisor} +\thu@define@term{ccosupervisor} +\thu@define@term{cdate} +\thu@define@term{etitle} +\thu@define@term{edegree} +\thu@define@term{edepartment} +\def\eaffil{\edepartment} % todo: for compability +\thu@define@term{emajor} +\def\esubject{\emajor} % todo: for compability +\thu@define@term{eauthor} +\thu@define@term{esupervisor} +\thu@define@term{eassosupervisor} +\thu@define@term{ecosupervisor} +\thu@define@term{edate} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{environment}{cabstract} +% \begin{environment}{eabstract} +% 摘要最好以环境的形式出现(否则命令的形式会导致开始结束的括号举例太远,我不喜 +% 欢),这就必须让环境能够自己保存内容留待以后使用。ctt 上找到两种方法:1)使用 +% ~\pkg{amsmath} 中的~\cs{collect@body},但是此宏没有定义为~long,不能直接用。 +% 2)利用~\LaTeX{} 中环境和对应命令间的命名关系以及参数分隔符的特点非常巧妙地实 +% 现了这个功能,其不足是不能嵌套环境。由于摘要部分经常会用到诸如~itemize 类似 +% 的环境,所以我们不得不选择第一种负责的方法。以下是修改~\pkg{amsmath} 代码部分: +% \changes{v3.1}{2006/06/17}{重新定义摘要成为环境,Great!} +% \begin{macrocode} +\long\@xp\def\@xp\collect@@body\@xp#\@xp1\@xp\end\@xp#\@xp2\@xp{% + \collect@@body{#1}\end{#2}} +\long\@xp\def\@xp\push@begins\@xp#\@xp1\@xp\begin\@xp#\@xp2\@xp{% + \push@begins{#1}\begin{#2}} +\long\@xp\def\@xp\addto@envbody\@xp#\@xp1\@xp{% + \addto@envbody{#1}} +% \end{macrocode} +% +% 使用~\cs{collect@body} 来构建摘要环境。 +% \begin{macrocode} +\newcommand{\thu@@cabstract}[1]{\long\gdef\thu@cabstract{#1}} +\newenvironment{cabstract}{\collect@body\thu@@cabstract}{} +\newcommand{\thu@@eabstract}[1]{\long\gdef\thu@eabstract{#1}} +\newenvironment{eabstract}{\collect@body\thu@@eabstract}{} +% \end{macrocode} +% \end{environment} +% \end{environment} +% +% \begin{macro}{\thu@parse@keywords} +% 不同论文格式关键词之间的分割不太相同,我们用~\cs{ckeywords} 和 +% ~\cs{ekeywords} 来收集关键词列表,然后用本命令来生成符合要求的格式。 +% \cs{expandafter} 都快把我整晕了。 +% \begin{macrocode} +\def\thu@parse@keywords#1{ + \expandafter\gdef\csname thu@#1\endcsname{} % todo: need or not? + \expandafter\gdef\csname #1\endcsname##1{ + \@for\reserved@a:=##1\do{ + \expandafter\ifx\csname thu@#1\endcsname\@empty\else + \expandafter\g@addto@macro\csname thu@#1\endcsname{\ignorespaces\csname thu@#1@separator\endcsname} + \fi + \expandafter\expandafter\expandafter\g@addto@macro% + \expandafter\csname thu@#1\expandafter\endcsname\expandafter{\reserved@a}}}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ckeywords} +% \begin{macro}{\ekeywords} +% 利用~\cs{thu@parse@keywords} 来定义,内部通过~\cs{thu@ckeywords} 来引用。 +% \changes{v3.1}{2007/06/16}{增强的关键词命令。} +% \begin{macrocode} +\thu@parse@keywords{ckeywords} +\thu@parse@keywords{ekeywords} +%</cls> +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \changes{v1.4rc1}{2005/12/14}{I have to put all chinese chars into cfg, +% otherwise they would not appear.} +% \changes{v2.5.1}{2006/05/25}{硕士封面的冒号前居然有点小距离!} +% \changes{v3.1}{2007/10/09}{去掉配置文件中的~\cs{hfill}。} +% \changes{v3.1}{2007/10/09}{“内部”密级前面要五角星了。} +% \changes{v4.0}{2007/11/08}{“内部”密级前面终究还是不要五角星了。} +% \begin{macrocode} +%<*cfg> +\def\thu@ckeywords@separator{ + \ifthu@bachelor,%todo: + \else + \ifthu@master\hspace{2em}\else;\fi + \fi} +\def\thu@ekeywords@separator{ + \ifthu@bachelor,%todo: + \else + \ifthu@master\hspace{2em}\else;\fi + \fi} +\def\thu@title@sep{:} +\def\thu@secretlevel{秘密} +\def\thu@secretyear{\the\year} +\def\thu@schoolename{清华大学} +\def\thu@bachelor@subtitle{综合论文训练} +\def\thu@bachelor@title@pre{题目} +\def\thu@bachelor@departmenttitle{系别} +\def\thu@bachelor@majortitle{专业} +\def\thu@bachelor@authortitle{姓名} +\def\thu@secretlevel@inner{内部} +\def\thu@secret@title{% + \thu@secretlevel\ifx\thu@secretlevel\thu@secretlevel@inner\else★\fi% + \hspace{2em}\thu@secretyear\hspace{1em}年} +\def\thu@apply{(申请清华大学\thu@cdegree学位论文)} +\def\thu@cdepartmenttitle{培养单位} +\def\thu@cmajortitle{学科} +\def\thu@cauthortitle{研究生} +\def\thu@csupervisortitle{指导教师} +\ifthu@bachelor + \def\thu@cassosupertitle{辅导教师} +\else + \def\thu@cassosupertitle{副指导教师} +\fi +\def\thu@ccosupertitle{% + \ifthu@doctor 联合导师\else \ifthu@master 联合指导教师\fi\fi} +\cdate{\ifthu@bachelor\the\year~~年~~\the\month~~月~~\the\day~~日% + \else\CJKdigits{\the\year}年\CJKnumber{\the\month}月\fi} +\edate{\ifcase \month \or January\or February\or March\or April\or May% + \or June\or July \or August\or September\or October\or November + \or December\fi\unskip,\ \ \the\year} +\newcommand{\thu@authtitle}{关于学位论文使用授权的说明} +\newcommand{\thu@authorization}{% +\ifthu@bachelor +本人完全了解清华大学有关保留、使用学位论文的规定,即:学校有权保留学位 +论文的复印件,允许该论文被查阅和借阅;学校可以公布该论文的全部或部分内 +容,可以采用影印、缩印或其他复制手段保存该论文。 +\else +本人完全了解清华大学有关保留、使用学位论文的规定,即: + +清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:(1)已获学位的研究生 +必须按学校规定提交学位论文,学校可以采用影印、缩印或其他复制手段保存研究生上交的 +学位论文;(2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料 +室等场所供校内师生阅读,或在校园网上供校内师生浏览部分内容\ifthu@master 。\else +;(3)根据《中华人民共和国学位条例暂行实施办法》,向国家图书馆报送可以公开的学位 +论文。\fi + +本人保证遵守上述规定。 +\fi} +\newcommand{\thu@authorizationaddon}{% + \ifthu@bachelor(涉密的学位论文在解密后应遵守此规定)\else(保密的论文在解密后应遵守此规定)\fi} +\newcommand{\thu@authorsig}{\ifthu@bachelor 签\hskip2em名:\else作者签名:\fi} +\newcommand{\thu@teachersig}{导师签名:} +\newcommand{\thu@frontdate}{日\hspace{2em}期:} +\newcommand{\thu@ckeywords@title}{关键词:} +%</cfg> +% \end{macrocode} +% +% +% \begin{macro}{\thu@first@titlepage} +% 论文封面第一页! +% +% 题名使用一号黑体字,一行写不下时可分两行写,并采用~1.25 倍行距。 +% 申请学位的学科门类: 小二号宋体字。 +% 中文封面页边距: +% 上-~6.0 厘米,下-~5.5 厘米,左-~4.0 厘米,右-~4.0 厘米,装订线~0 厘米; +% \changes{v2.5.1}{2006/05/21}{本科封面标题调整微小的空隙。} +% \changes{v2.5.1}{2006/05/21}{本科封面标题第二行的横线上移一点。} +% \changes{v2.5.2}{2006/05/29}{研究生论文标题中英文用~arial 字体。} +% \changes{v2.6}{2006/06/09}{本科生题目加长,最多~24 个字。} +% \begin{macrocode} +%<*cls> +\newlength{\thu@title@width} +\def\thu@put@title#1{\makebox{\hb@xt@ \thu@title@width{#1}}} +\newcommand{\thu@first@titlepage}{ + \begin{center} + \vspace*{-1.3cm} + \parbox[b][2.4cm][t]{\textwidth}{% + \ifthu@secret\hfill{\sihao\thu@secret@title}\else\rule{1cm}{0cm}\fi} + \ifthu@bachelor + \vskip0.2cm + {\ziju{10bp}\yihao\li\thu@schoolename} + \par\vskip1.2cm + {\ziju{18bp}\xiaochu\hei\thu@bachelor@subtitle} + \vskip2.5cm + \hspace*{-0.3cm}\noindent\hei\xiaoer\thu@bachelor@title@pre\thu@title@sep + \parbox[t]{12cm}{% + \begin{picture}(0,0)(0,0) + \setlength\unitlength{1cm} + \linethickness{1.3pt} + \put(0,-0.25){\line(1,0){12}} + \put(0,-1.68){\line(1,0){12}} + \end{picture}% + \ignorespaces\yihao[1.55]\thu@ctitle} %TODO: CJKulem.sty + \vskip1.55cm + \else + \parbox[t][9cm][t]{\paperwidth-8cm}{ + \renewcommand{\baselinestretch}{1.5} + \begin{center} + \yihao[1.2]{\hei\sffamily\thu@ctitle}\par + \ifthu@master + \erhao[1.1] \textbf{\sffamily\thu@etitle}\par\vskip 5bp + \else % for doctor + \par\vskip 20bp + \fi + \xiaoer[1] \textrm{{\ziju{2bp}\thu@apply}} + \end{center}} + \fi +% \end{macrocode} +% +% 作者及导师信息部分使用三号仿宋字 +% \changes{v2.0}{2005/12/20}{封面的培养单位,学科等内容字距自动调整。} +% \changes{v2.1}{2006/02/29}{增加本科部分。} +% \changes{v2.6.2}{2006/06/17}{如果本科生没有辅导教师则不显示。} +% \changes{v3.1}{2007/10/09}{重新放置封面表格的提示元素。} +% \begin{macrocode} + \parbox[t][7.8cm][t]{\textwidth}{{\sanhao[1.5] + \begin{center}\fs + \ifthu@bachelor + \setlength{\thu@title@width}{4em} + \setlength{\extrarowheight}{6pt} + \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{4pt}}l} + \thu@put@title{\thu@bachelor@departmenttitle} & \thu@title@sep & \thu@cdepartment\\ + \thu@put@title{\thu@bachelor@majortitle} & \thu@title@sep & \thu@cmajor\\ + \thu@put@title{\thu@bachelor@authortitle} & \thu@title@sep & \thu@cauthor \\ + \thu@put@title{\thu@csupervisortitle} & \thu@title@sep & \thu@csupervisor\\ + \ifx\thu@cassosupervisor\@empty\else + \thu@put@title{\thu@cassosupertitle} & \thu@title@sep & \thu@cassosupervisor\\ + \fi + \end{tabular} + \else + \setlength{\thu@title@width}{6em} + \setlength{\extrarowheight}{4pt} + \begin{tabular}{p{\thu@title@width}c@{\extracolsep{4pt}}l} + \thu@put@title{\thu@cdepartmenttitle} & \thu@title@sep & {\ziju{3bp}\thu@cdepartment}\\ + \thu@put@title{\thu@cmajortitle} & \thu@title@sep & {\ziju{3bp}\thu@cmajor}\\ + \thu@put@title{\thu@cauthortitle} & \thu@title@sep & {\ziju{11bp}\thu@cauthor}\\ + \thu@put@title{\thu@csupervisortitle} & \thu@title@sep & {\ziju{11bp}\thu@csupervisor}\\ + \ifx\thu@cassosupervisor\@empty\else + \thu@put@title{\thu@cassosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@cassosupervisor}\\ + \fi + \ifx\thu@ccosupervisor\@empty\else + \thu@put@title{\thu@ccosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@ccosupervisor}\\ + \fi + \end{tabular} + \fi + \end{center}}} +% \end{macrocode} +% +% 论文成文打印的日期,用三号宋体汉字,不用阿拉伯数字 +% \begin{macrocode} + \begin{center} + {\ifthu@bachelor\xiaosi\else\sanhao\fi \song \thu@cdate} + \end{center} + \end{center}} % end of titlepage +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\thu@doctor@engcover} +% 博士论文英文封面部分。 +% \begin{macrocode} +\newcommand{\thu@doctor@engcover}{% + \begin{center} + \vspace*{0.2cm} + \parbox[t][5.2cm][t]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.5} + \begin{center} + \erhao[1.1]\bfseries\sffamily\thu@etitle + \end{center}} + \parbox[t][5.8cm][t]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.3} + \begin{center} + \sanhao Dissertation Submitted to\\ + {\bfseries Tsinghua University}\\ + in partial fulfillment of the requirement\\ + for the degree of\\ + {\bfseries\sffamily\thu@edegree} + \end{center}} + \parbox[t][3.6cm][b]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.3} + \begin{center} + \sanhao\sffamily by\\[3bp] + \bfseries\thu@eauthor\\(~\thu@emajor~) + \end{center}} + \par\vspace{0.9cm} + \parbox[t][2.1cm][t]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.2}\xiaosan\centering + \begin{tabular}{rl} + Dissertation Supervisor : & \thu@esupervisor\\ + \ifx\thu@eassosupervisor\@empty + \else Associate Supervisor : & \thu@eassosupervisor\\\fi + \end{tabular}} + \parbox[t][2cm][b]{\paperwidth-7.2cm}{ + \begin{center} + \sanhao\bfseries\sffamily\thu@edate + \end{center}} + \end{center}} +% \end{macrocode} +% \end{macro} +% \changes{4.0}{2007/11/08}{研究生的授权部分调整了一下,不知道老师为什么总爱修改 +% 那些无关紧要的格式,郁闷。感谢~PMHT@newsmth 的认真比对。} +% \begin{macro}{\thu@authorization@mk} +% 封面中论文授权部分。 +% \begin{macrocode} +\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt} +\newcommand{\thu@authorization@mk}{% + \ifthu@bachelor\vspace*{-0.6cm}\else\vspace*{-0.1cm}\fi % shit code! + \begin{center}\erhao\hei\thu@authtitle\end{center} + \ifthu@bachelor\vskip\baselineskip\else\vskip18pt\sihao[2.03]\fi\par + \thu@authorization\par + \textbf{\thu@authorizationaddon}\par + \ifthu@bachelor\vskip2.54cm\else\vskip1.9cm\fi + \ifthu@bachelor + \noindent\thu@authorsig\thu@underline\relax% + \thu@teachersig\thu@underline\relax\thu@frontdate\thu@underline\relax + \else + \begingroup + \parindent0pt\xiaosi + \hspace*{1.5cm}\thu@authorsig\thu@underline[7em]\relax\hfill% + \thu@teachersig\thu@underline[7em]\relax\hspace*{1cm}\\[3pt] + \hspace*{1.5cm}\thu@frontdate\thu@underline[7em]\relax\hfill% + \thu@frontdate\thu@underline[7em]\relax\hspace*{1cm} + \endgroup + \fi} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\makecover} +% \changes{v2.1}{2006/02/29}{分成几个小模块来搞,不然这个~macro 太大了,看不过来。} +% \begin{macrocode} +\newcommand{\makecover}{ + \phantomsection + \pdfbookmark[-1]{\thu@ctitle}{ctitle} + \normalsize% + \begin{titlepage} +% \end{macrocode} +% +% 论文封面第一页! +% \begin{macrocode} +\thu@first@titlepage +% \end{macrocode} +% +% \changes{v2.5}{2006/05/19}{本科论文评语位置调整。} +% \changes{v3.0}{2007/05/12}{本科论文评语取消。} +% +% 博士论文需要增加英文封面 +% \begin{macrocode} +\ifthu@doctor + \cleardoublepage\thu@doctor@engcover +\fi +% \end{macrocode} +% +% 授权说明 +% \changes{v3.0}{2007/05/12}{本科论文授权图片扫描取消。} +% \begin{macrocode} +\cleardoublepage\thu@authorization@mk + \end{titlepage} +% \end{macrocode} +% +% \changes{v2.5}{2006/05/16}{综合论文训练在授权说明之后。} +% \changes{v3.0}{2007/05/12}{本科综合论文训练在电子版中取消。} +% +% 中英文摘要 +% \begin{macrocode} +\normalsize +\thu@makeabstract +\let\@tabular\thu@tabular} +%</cls> +% \end{macrocode} +% \end{macro} +% +% \subsubsection{摘要格式} +% \label{sec:abstractformat} +% +% \begin{macro}{\thu@makeabstract} +% 中文摘要部分的标题为"摘要",用黑体三号字。 +% \changes{v2.5.1}{2006/05/24}{我靠,教务处又不要正文前的页眉了,ft!} +% \changes{v2.5.1}{2006/05/24}{不管是哪种论文格式,摘要都要右开。} +% \changes{v2.5.2}{2006/05/29}{在研究生论文中,摘要不出现在目录中,但是要在书签 +% 中出现。} +% \changes{v2.5.3}{2006/06/03}{\cs{pagenumber} 会自动设置页码为~1。} +% \changes{v2.6.3}{2006/06/30}{为本科正确设置目录及以后的页码。} +% \begin{macrocode} +%<*cls> +\newcommand{\thu@makeabstract}{% + \cleardoublepage % always openright for Abstract + \thu@chapter*[]{\cabstractname} % no tocline + \ifthu@bachelor + \pagestyle{thu@plain} + \else + \pagestyle{thu@headings} + \fi + \pagenumbering{Roman} +% \end{macrocode} +% +% 摘要内容用小四号字书写,两端对齐,汉字用宋体,外文字用~Times New Roman 体, +% 标点符号一律用中文输入状态下的标点符号。 +% \changes{v3.1}{2007/06/16}{研究生关键词不再沉底。} +% \begin{macrocode} + \thu@cabstract +% \end{macrocode} +% 每个关键词之间空两个汉字符宽度, 且为悬挂缩进 +% \changes{v2.6.2}{2006/06/17}{取消最后一列的空白。} +% \changes{v2.6.2}{2006/06/20}{取消~tabular 环境,用~\cs{hangindent} 实现关键词 +% 悬挂缩进,英文摘要同。} +% \begin{macrocode} + \vskip12bp + \setbox0=\hbox{{\hei \thu@ckeywords@title}} + \noindent\hangindent\wd0\hangafter1\box0\thu@ckeywords +% \end{macrocode} +% +% 英文摘要部分的标题为“Abstract”,用~Arial 体三号字。研究生的英文摘要要求非常怪 +% 异:虽然正文前的封面部分为右开,但是英文摘要要跟中文摘要连续。 +% \changes{v.2.5.1}{2006/05/28}{研究生封面英文摘要连续。} +% \begin{macrocode} + \thu@chapter*[]{\eabstractname} % no tocline +% \end{macrocode} +% +% 摘要内容用小四号~Times New Roman。 +% \begin{macrocode} + \thu@eabstract +% \end{macrocode} +% +% 每个关键词之间空四个英文字符宽度 +% \changes{v2.4}{2006/04/14}{It is \textbf{Key words}, but not \textbf{Key +% Words}.} +% \changes{v2.6.2}{2006/06/17}{取消最后一列的空白。} +% \changes{v2.6.4}{2006/10/23}{\textbf{Keywords} but not \textbf{Key words}.} +% \changes{v3.0}{2007/05/13}{\textbf{Key words} but not +% \textbf{Keywords}. What are you doing?} +% \begin{macrocode} + \vskip12bp + \setbox0=\hbox{\textbf{Key words:\enskip}} + \noindent\hangindent\wd0\hangafter1\box0\thu@ekeywords} +%</cls> +% \end{macrocode} +% \end{macro} +% +% \subsubsection{主要符号表} +% \label{sec:denotationfmt} +% \begin{environment}{denotation} +% 主要符号对照表\changes{v2.0e}{2005/12/18}{主要符号表定义为一个~list,用起来方便。} +% \changes{v2.4}{2006/04/14}{为主要符号表环境增加一个可选参数,调节符号列的宽度。} +% \begin{macrocode} +%<*cfg> +\newcommand{\thu@denotation@name}{主要符号对照表} +%</cfg> +%<*cls> +\newenvironment{denotation}[1][2.5cm]{ + \thu@chapter*[]{\thu@denotation@name} % no tocline + \noindent\begin{list}{}% + {\vskip-30bp\xiaosi[1.6] + \renewcommand\makelabel[1]{##1\hfil} + \setlength{\labelwidth}{#1} % 标签盒子宽度 + \setlength{\labelsep}{0.5cm} % 标签与列表文本距离 + \setlength{\itemindent}{0cm} % 标签缩进量 + \setlength{\leftmargin}{\labelwidth+\labelsep} % 左边界 + \setlength{\rightmargin}{0cm} + \setlength{\parsep}{0cm} % 段落间距 + \setlength{\itemsep}{0cm} % 标签间距 + \setlength{\listparindent}{0cm} % 段落缩进量 + \setlength{\topsep}{0pt} % 标签与上文的间距 + }}{\end{list}} +%</cls> +% \end{macrocode} +% \end{environment} +% +% +% \subsubsection{致谢以及声明} +% \label{sec:ackanddeclare} +% +% \begin{environment}{ack} +% \changes{v2.4}{2006/04/14}{调整“致谢”等中间的距离。} +% \begin{macrocode} +%<*cfg> +\newcommand{\thu@ackshortname}{致谢} +\newcommand{\thu@ackname}{致\hspace{1em}谢} +\newcommand{\thu@acklongname}{致谢与声明} +\newcommand{\thu@declareshortname}{声明} +\newcommand{\thu@declarename}{声\hspace{1em}明} +\newcommand{\thu@declaretext}{本人郑重声明:所呈交的学位论文,是本人在导师指导下 + ,独立进行研究工作所取得的成果。尽我所知,除文中已经注明引用的内容外,本学位论 + 文的研究成果不包含任何他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的 + 其他个人和集体,均已在文中以明确方式标明。} +\newcommand{\thu@signature}{签\hspace{1em}名:} +\newcommand{\thu@backdate}{日\hspace{1em}期:} +%</cfg> +% \end{macrocode} +% +% \changes{v2.0}{2005/12/19}{将致谢定义为一个环境更合适,里面也不用像以前段首需 +% 要自己缩进。} +% \changes{v1.5}{2005/12/16}{在那些不显示编号的章节前面先执行一次 +% ~\cs{cleardoublepage},使新开章节的页码到达正确的状态。否则会因为~\cs{addcontentsline} +% 在~chapter 之前而导致目录页码错误。} +% 定义致谢与声明环境。 +% \changes{v2.5}{2006/05/16}{ft,本科论文要求致谢声明分页,但是研究生的不分!} +% \changes{v2.5.2}{2006/05/29}{研究生致谢右开。} +% \changes{v2.5.2}{2006/05/30}{研究生致谢题目是致谢,目录是致谢与声明。} +% \changes{v2.6.3}{2006/07/01}{重画双虚线,自适应页面宽度。} +% \begin{macrocode} +%<*cls> +\newenvironment{ack}{% + \ifthu@bachelor + \thu@chapter*{\thu@ackname} + \else + % \cleardoublepage + \thu@chapter*[\thu@acklongname]{\thu@ackname}[\thu@acklongname] + \fi} + {% + \ifthu@bachelor\relax\else %TAG 1 + \par\vfill% + \noindent + {\setlength{\unitlength}{0.1\textwidth} + \begin{picture}(10, 0.1) + \multiput(0,0)(1, 0){10}{\rule{0.8\unitlength}{1.2pt}} + \multiput(0,0.08)(1, 0){10}{\rule{0.8\unitlength}{1.2pt}} + \end{picture}} + \fi % END TAG 1 +% \end{macrocode} +% 声明部分 +% \changes{v3.0}{2007/05/12}{本科论文声明部分图片扫描取消。} +% \begin{macrocode} + \ifthu@bachelor + \thu@chapter*{\thu@declarename} + \else + \parbox[t][4cm][c]{\textwidth}{{\sanhao\hei\centerline{\thu@declarename}}} + \fi + \par{\xiaosi\parindent2em\thu@declaretext}\vskip2cm + {\xiaosi\hfill\thu@signature\thu@underline[2.5cm]\relax% + \thu@backdate\thu@underline[2.5cm]\relax}% + } +%</cls> +% \end{macrocode} +% \end{environment} +% +% \subsubsection{索引部分} +% \label{sec:threeindex} +% \changes{v2.5}{2006/05/18}{增加插图、表格和公式索引。} +% \changes{v2.5}{2006/05/19}{为了让索引中能出现“图 xxx”,我不得不修改~\LaTeX +% 内部命令~\cs{@caption}。} +% \changes{v2.6.4}{2006/10/23}{增加~\cs{listoffigures*},\cs{listoftables*}。} +% \begin{macro}{\listoffigures} +% \begin{macro}{\listoffigures*} +% \begin{macro}{\listoftables} +% \begin{macro}{\listoftables*} +% \begin{macrocode} +%<*cls> +\long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname #1name\endcsname\hskip0.5em\csname the#1\endcsname}% + {\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup} +\def\thu@listof#1#2{% + \@ifstar + {\thu@chapter*[]{#1}\@starttoc{#2}} + {\thu@chapter*{#1}\@starttoc{#2}}} +\renewcommand\listoffigures{\thu@listof{\listfigurename}{\ext@figure}} +\renewcommand*\l@figure{\@dottedtocline{1}{0em}{4em}} +\renewcommand\listoftables{\thu@listof{\listtablename}{\ext@table}} +\let\l@table\l@figure +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\equcaption} +% \changes{v2.6.2}{2006/06/19}{此命令配合~\pkg{amsmath} 命令基本可以满足所有 +% 公式需要。} +% 本命令只是为了生成公式列表,所以这个~caption~是假的。如果要编号最好用 +% ~equation 环境,如果是其它编号环境,请手动添加添加~\cs{equcaption}。 +% 用法如下: +% +% \cs{equcaption}\marg{counter} +% +% \marg{counter} 指定出现在索引中的编号,一般取~\cs{theequation},如果你是用 +% ~\pkg{amsmath} 的~\cs{tag},那么默认是~\cs{tag} 的参数;除此之外可能需要你 +% 手工指定。 +% +% \changes{v2.5}{2006/05/19}{将公式编号写入临时文件以便生成公式列表。} +% \changes{v2.5.3}{2006/06/03}{取消~\cs{equcaption} 的参数} +% \begin{macrocode} +\def\ext@equation{loe} +\def\equcaption#1{% + \addcontentsline{\ext@equation}{equation}% + {\protect\numberline{\equationname\hskip0.5em #1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\listofequations} +% \begin{macro}{\listofequations*} +% \LaTeX{}默认没有公式索引,此处定义自己的~\cs{listofequations}。 +% \changes{v2.5}{2006/05/19}{增加公式索引命令。} +% \changes{v2.5.1}{2006/05/26}{公式索引项~numwidth 增加。} +% \changes{v2.6.4}{2006/10/23}{增加~\cs{listofequations*}。} +% \begin{macrocode} +\newcommand\listofequations{\thu@listof{\listequationname}{\ext@equation}} +\ifthu@bachelor + \newcommand*\l@equation{\@dottedtocline{1}{0em}{4em}} +\else + \newcommand*\l@equation{\@dottedtocline{1}{0em}{4.2em}} +\fi +%</cls> +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% +% \subsubsection{参考文献} +% \label{sec:ref} +% +% \begin{macro}{\onlinecite} +% 正文引用模式。依赖于~\pkg{natbib}~宏包,修改其中的命令。 +% \begin{macrocode} +%<*cls> +\bibpunct{[}{]}{,}{s}{}{,} +\renewcommand\NAT@citesuper[3]{\ifNAT@swa +\unskip\kern\p@\textsuperscript{\NAT@@open #1\NAT@@close}% + \if*#3*\else\ (#3)\fi\else #1\fi\endgroup} +\DeclareRobustCommand\onlinecite{\@onlinecite} +\def\@onlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup} +% \end{macrocode} +% \end{macro} +% +% 参考文献的正文部分用五号字。 +% 行距采用固定值~16 磅,段前空~3 磅,段后空~0 磅。 +% +% \begin{macro}{\thudot} +% 研究生参考文献条目最后加点,而本科有不要。只好定义一个东西来拙劣地处理了, +% 本来这个命令通过~\texttt{@preamble} 命令放到~bib 文件中是最省事的,但是那 +% 样的话很多人肯定不知道该怎么做了。 +% \changes{v3.1}{2007/06/19}{引入~cs{thudot} 来自动完成参考文献最后的点。} +% \begin{macrocode} +\def\thudot{\ifthu@bachelor\else\unskip.\fi} +% \end{macrocode} +% \end{macro} +% \begin{macro}{thumasterbib} +% \begin{macro}{thuphdbib} +% 本科生和研究生模板要求外文硕士论文参考文献显示“[Master Thesis]”,而博士模板 +% 则于~2007 年冬要求显示为“[M]”。对应的外文博士论文参考文献分别显示为“[Phd +% Thesis]”和“[D]”。所以不得不出次下策。 +% \begin{macrocode} +\def\thumasterbib{\ifthu@doctor [M]\else [Master Thesis]\fi} +\def\thuphdbib{\ifthu@doctor [D]\else [Doctor Thesis]\fi} +% \end{macrocode} +% \end{macro} +% \end{macro} +% \begin{environment}{thebibliography} +% 修改默认的~thebibliography 环境,增加一些调整代码。 +% \changes{v2.4}{2006/04/15}{参考文献间距调小一点,label~长度增加一点,以便让超过 +% ~100~的参考文献更好地对齐。} +% \changes{v2.5}{2006/05/13}{参考文献序号靠左,而不是靠右。} +% \changes{v2.6.4}{2006/10/23}{调整参考文献标签宽度,使得条目增多时仍能对齐。} +% \begin{macrocode} +\renewenvironment{thebibliography}[1]{% + \thu@chapter*{\bibname}% + \wuhao[1.5] + \list{\@biblabel{\@arabic\c@enumiv}}% + {\renewcommand{\makelabel}[1]{##1\hfill} + \settowidth\labelwidth{1.1cm} + \setlength{\labelsep}{0.6em} + \setlength{\itemindent}{0pt} + \setlength{\leftmargin}{\labelwidth+\labelsep} + \addtolength{\itemsep}{-0.7em} + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \interlinepenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} +%</cls> +% \end{macrocode} +% \end{environment} +% +% +% \subsubsection{附录} +% \label{sec:appendix} +% +% \begin{environment}{appendix} +% \begin{macrocode} +%<*cls> +\let\thu@appendix\appendix +\renewenvironment{appendix}{% + \thu@appendix + \gdef\@chapapp{\appendixname~\thechapter} + %\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} + }{} +%</cls> +% \end{macrocode} +%\end{environment} +% +% \subsubsection{个人简历} +% +% \changes{v1.5}{2005/12/16}{增加个人简历章节的命令,去掉主文件中需要重新 +% 定义~\cs{cleardoublepage} 和自己写~\cs{markboth},\cs{addcontentsline} 的部分。} +% 定义个人简历章节标题 +% +% \begin{environment}{resume} +% 个人简历发表文章等。 +% \changes{v2.0}{2005/12/18}{最后决定将~resume 定义为环境。这样与前面的主要符号 +% 表、致谢等对应。} +% \changes{v2.5.2}{2006/05/29}{研究生的个人介绍要右开。} +% \begin{macrocode} +%<*cls> +\newenvironment{resume}{% + % \cleardoublepage + \thu@chapter*{\thu@resume@title}}{} +%</cls> +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\resumeitem} +% 个人简历里面会出现的以发表文章,在投文章等。 +% \changes{v2.5.1}{2006/05/23}{ft,教务处和研究生院非要搞的不一样!} +% \begin{macrocode} +%<*cfg> +\ifthu@bachelor + \newcommand{\thu@resume@title}{在学期间参加课题的研究成果} +\else + \newcommand{\thu@resume@title}{个人简历、在学期间发表的学术论文与研究成果} +\fi +%</cfg> +%<*cls> +\newcommand{\resumeitem}[1]{\vspace{2.5em}{\sihao \hei \centerline{#1}}\par} +%</cls> +% \end{macrocode} +% \end{macro} +% +% \subsubsection{书脊} +% \label{sec:shuji} +% +% 为了生成书脊使用竖排 +% \begin{macrocode} +%<*cls> +\newcommand{\thu@verticle}{% + \renewcommand{\CJKsymbol}[1]{% + \setbox0=\hbox{\symbol{##1}}% + \newcommand{\POS}{}% + \ifthenelse{\lengthtest{\ht0<.39\wd0}}% + {\renewcommand{\POS}{c}}{\renewcommand{\POS}{r}}% + \makebox[1.3\wd0][\POS]{\rotatebox[origin=lB]{90}{\symbol{##1}}}% + \ifCJK@bold@% + \hbox to \CJKboldshift{\hss\makebox[1.3\wd0][\POS]{% + \rotatebox[origin=lB]{90}{\symbol{##1}}}}% + \hbox to \CJKboldshift{\hss\makebox[1.3\wd0][\POS]{% + \rotatebox[origin=lB]{90}{\symbol{##1}}}}% + \fi}} +\newsavebox{\thu@saverotate}% +\newcommand{\shupai}[2][\textheight]{% + \savebox{\thu@saverotate}{\parbox[t]{#1}{\thu@verticle #2}} + \hfill\rotatebox[origin=lt]{-90}{\usebox{\thu@saverotate}}} +% \end{macrocode} +% +% \begin{macro}{\shuji} +% 单独使用书脊命令会在新的一页产生竖排书脊 +% \begin{macrocode} +\newcommand{\shuji}[1][\thu@ctitle]{ + \newpage% + \thispagestyle{empty} + \vspace*{1cm} + \shupai[\textheight-2cm]{\fs\xiaosan #1\hfill\thu@cauthor}} +%</cls> +% \end{macrocode} +% \end{macro} +% +% \subsubsection{索引} +% +% 生成索引的一些命令,虽然我们暂时还用不到。 +% \begin{macrocode} +%<*cls> +\iffalse +\newcommand{\bs}{\symbol{'134}}%Print backslash + % \newcommand{\bs}{\ensuremath{\mathtt{\backslash}}}%Print backslash + % Index entry for a command (\cih for hidden command index +\newcommand{\cih}[1]{% +\index{commands!#1@\texttt{\bs#1}}% +\index{#1@\texttt{\hspace*{-1.2ex}\bs #1}} +} +\newcommand{\ci}[1]{\cih{#1}\texttt{\bs#1}} + % Package +\newcommand{\pai}[1]{% +\index{packages!#1@\textsf{#1}}% +\index{#1@\textsf{#1}}% +\textsf{#1}} + % Index entry for an environment +\newcommand{\ei}[1]{% +\index{environments!\texttt{#1}}% +\index{#1@\texttt{#1}}% +\texttt{#1}} + % Indexentry for a word (Word inserted into the text) +\newcommand{\wi}[1]{\index{#1}#1} +\fi +%</cls> +% \end{macrocode} +% +% \subsubsection{自定义命令和环境} +% \label{sec:userdefine} +% +% \begin{macro}{\ziju} +% 改变字距。参数为距离 +% \changes{v2.0}{2005/12/20}{字距改变,重定义~\cs{CJKglue} 即可。} +% \begin{macrocode} +%<*cls> +\newcommand*{\ziju}[1]{\renewcommand{\CJKglue}{\hskip #1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\pozhehao} +% 定义破则号。两个字宽,ex 差不多是当前字体的一半高度,所以通过~\cs{rule} 可以简单 +% 的完成破则号绘制。 +% \changes{v2.1}{2006/01/12}{稍微加宽一点。同时把名字改为“破折号”:pozhehao} +% \begin{macrocode} +\newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex} +%</cls> +% \end{macrocode} +% \end{macro} +% +% +% \subsubsection{其它} +% \label{sec:other} +% +% \begin{macro}{\thu@active@cjk} +% 在导言区支持中文。 +% \begin{macrocode} +%<*cls> +\def\thu@active@cjk{ + % Activate all >128 characters. + \count@=127 + \@whilenum\count@<255 \do{% + \advance\count@ by 1 + \lccode`\~=\count@ + \catcode\count@=\active + \lowercase{\def~{\kern1ex}}}} +% \end{macrocode} +% \end{macro} +% +% 在模板文档结束时即装入配置文件,这样用户就能在导言区进行相应的修改,否则 +% 必须在~document~开始后才能,感觉不好。 +% \changes{v2.5}{2006/05/13}{不用~\cs{CJKcaption},在导言区直接引入配置文件。} +% \begin{macrocode} +\AtEndOfClass{\thu@active@cjk\input{thuthesis.cfg}}% +% \end{macrocode} +% +% \begin{macro}{\thu@fixselectfont} +% \pkg{caption} 宏包会调用~\pkg{ragged2e},\pkg{ragged2e} 又调用~\pkg{everysel}。而~\pkg{everysel} 宏包和~\pkg{CJK} +% 宏包都要修改~\cs{selectfont},一个是给~\cs{selectfont} 加~hook,一个是让 +% ~\cs{selectfont} 支持~\cs{CJKbold}。幸好两者本质上并不冲突,把他们源文件中对 +% ~\cs{selectfont} 重定义的部分合并一下就可以了。 +% \begin{macrocode} +\def\thu@fixselectfont{% + \DeclareRobustCommand{\selectfont}{% + \ifx\f@linespread\baselinestretch \else + \set@fontsize\baselinestretch\f@size\f@baselineskip \fi + \xdef\font@name{% + \csname\curr@fontshape/\f@size\endcsname}% + \pickup@font + \font@name + % CJK addition: + \CJK@bold@false + \csname \curr@fontshape\endcsname + % everysel addition: + \@EverySelectfont@EveryHook + \@EverySelectfont@AtNextHook + \gdef\@EverySelectfont@AtNextHook{}% + % end additions + \size@update + \enc@update}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\thu@setup@pdfinfo} +% 设置一些~pdf~文档信息,依赖于~\pkg{hyperref}~宏包。 +% \begin{macrocode} +\def\thu@setup@pdfinfo{% + \hypersetup{% + pdftitle={\thu@ctitle}, + pdfauthor={\thu@cauthor}, + pdfsubject={\thu@cdegree}, + pdfkeywords={\thu@ckeywords}, + pdfcreator={\thu@cauthor}, + pdfproducer={\thuthesis}}} +% \end{macrocode} +% \end{macro} +% +% +% 把~CJK 环境放到合适的位置,以免导致其它宏包的命令位于~CJK 环境中而出现问题(比 +% 如~natbib 的“Multiple-defined labels”,同时自动开启~CJK。 +% \changes{v2.6.2}{2006/06/18}{合理放置~CJK,避免~natbib 的警告。} +% \begin{macrocode} +\def\thu@beginCJK{% + \thu@fixselectfont% + \begin{CJK*}{GBK}{song}% + \sloppy\CJKindent\CJKtilde} +\def\thu@endCJK{\clearpage\end{CJK*}} +\let\thu@begindocumenthook\@begindocumenthook +\let\thu@enddocumenthook\@enddocumenthook +\def\AtBeginDocument{\g@addto@macro\thu@begindocumenthook} +\def\AtEndDocument{\g@addto@macro\thu@enddocumenthook} +\def\@begindocumenthook{\thu@begindocumenthook\thu@beginCJK} +\def\@enddocumenthook{\thu@endCJK\thu@enddocumenthook} +\AtBeginDocument{\thu@setup@pdfinfo\thu@item@space} +%</cls> +% \end{macrocode} +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins b/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins new file mode 100644 index 00000000000..6b0f7db3c57 --- /dev/null +++ b/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins @@ -0,0 +1,92 @@ +%% +%% Copyright (C) 2005-2007 by Xue Ruini <xueruini@gmail.com> +%% +%% This file is part of the Thu-Thesis package project. +%% --------------------------------------------------- +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3a +%% of this license or (at your option) any later version. +%% The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3a or later is part of all distributions of LaTeX +%% version 2004/10/01 or later. +%% + +\input docstrip + +\askforoverwritefalse +%\askonceonly +%\showprogress +\keepsilent + +\usedir{tex/latex/thuthesis} + +\preamble + +This is a generated file. + +Copyright (C) 2005-\the\year by Xue Ruini <xueruini@gmail.com> + +This file may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3a +of this license or (at your option) any later version. +The latest version of this license is in: + +http://www.latex-project.org/lppl.txt + +and version 1.3a or later is part of all distributions of LaTeX +version 2004/10/01 or later. + +To produce the documentation run the original source files ending with `.dtx' +through LaTeX. + +\endpreamble + +\declarepreamble\cfgpreamble + +This is a generated file. + +Copyright (C) 2005-\the\year by Xue Ruini <xueruini@gmail.com> + +This file may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3a +of this license or (at your option) any later version. +The latest version of this license is in: + +http://www.latex-project.org/lppl.txt + +and version 1.3a or later is part of all distributions of LaTeX +version 2004/10/01 or later. + + +This is the configuration file of the thuthesis package with LaTeX2e. + +\endpreamble + +\generate{\file{thuthesis.cls}{\from{thuthesis.dtx}{cls}} + \usepreamble\cfgpreamble + \file{thuthesis.cfg}{\from{thuthesis.dtx}{cfg}} + } + +\ifToplevel{ +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* The recommended directory is TEXMF/tex/latex/thuthesis} +\Msg{*} +\Msg{* \space\space thuthesis.cls} +\Msg{* \space\space thuthesis.cfg} +\Msg{*} +\Msg{* To produce the documentation run the files ending with} +\Msg{* `.dtx' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{***********************************************************} +} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg new file mode 100644 index 00000000000..4baeea1930c --- /dev/null +++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cfg @@ -0,0 +1,159 @@ +%% +%% This is file `thuthesis.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% thuthesis.dtx (with options: `cfg') +%% +%% This is a generated file. +%% +%% Copyright (C) 2005-2007 by Xue Ruini <xueruini@gmail.com> +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3a +%% of this license or (at your option) any later version. +%% The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3a or later is part of all distributions of LaTeX +%% version 2004/10/01 or later. +%% +%% +%% This is the configuration file of the thuthesis package with LaTeX2e. +%% +\ProvidesFile{thuthesis.cfg} +[2007/11/08 4.0 Tsinghua University Thesis Template] +\newtheorem{proof}{证明} +\theoremseparator{:} +\newtheorem{assumption}{假设}[chapter] +\newtheorem{definition}{定义}[chapter] +\newtheorem{proposition}{命题}[chapter] +\newtheorem{lemma}{引理}[chapter] +\newtheorem{theorem}{定理}[chapter] +\newtheorem{axiom}{公理}[chapter] +\newtheorem{corollary}{推论}[chapter] +\newtheorem{exercise}{练习}[chapter] +\newtheorem{example}{例}[chapter] +\newtheorem{remark}{注释}[chapter] +\newtheorem{problem}{问题}[chapter] +\newtheorem{conjecture}{猜想}[chapter] +\renewcommand\contentsname{目\hspace{1em}录} +\renewcommand\listfigurename{插图索引} +\renewcommand\listtablename{表格索引} +\newcommand\listequationname{公式索引} +\newcommand\equationname{公式} +\renewcommand\bibname{参考文献} +\renewcommand\indexname{索引} +\renewcommand\figurename{图} +\renewcommand\tablename{表} +\newcommand\CJKprepartname{第} +\newcommand\CJKpartname{部分} +\newcommand\CJKthepart{\CJKnumber{\@arabic\c@part}} +\newcommand\CJKprechaptername{第} +\newcommand\CJKchaptername{章} +\newcommand\CJKthechapter{\@arabic\c@chapter} +\renewcommand\chaptername{\CJKprechaptername~\CJKthechapter~\CJKchaptername} +\renewcommand\appendixname{附录} +\ifthu@bachelor + \newcommand{\cabstractname}{中文摘要} + \newcommand{\eabstractname}{ABSTRACT} +\else + \newcommand{\cabstractname}{摘\hspace{1em}要} + \newcommand{\eabstractname}{Abstract} +\fi +\let\CJK@todaysave=\today +\def\CJK@todaysmall{~\the\year~年~\the\month~月~\the\day~日} +\def\CJK@todaybig{\CJKdigits{\the\year}年\CJKnumber{\the\month}月\CJKnumber{\the\day}日} +\def\CJK@today{\CJK@todaysmall} +\renewcommand\today{\CJK@today} +\newcommand\CJKtoday[1][1]{% + \ifcase#1\def\CJK@today{\CJK@todaysave} + \or\def\CJK@today{\CJK@todaysmall} + \or\def\CJK@today{\CJK@todaybig} + \fi} +\def\thu@ckeywords@separator{ + \ifthu@bachelor,%todo: + \else + \ifthu@master\hspace{2em}\else;\fi + \fi} +\def\thu@ekeywords@separator{ + \ifthu@bachelor,%todo: + \else + \ifthu@master\hspace{2em}\else;\fi + \fi} +\def\thu@title@sep{:} +\def\thu@secretlevel{秘密} +\def\thu@secretyear{\the\year} +\def\thu@schoolename{清华大学} +\def\thu@bachelor@subtitle{综合论文训练} +\def\thu@bachelor@title@pre{题目} +\def\thu@bachelor@departmenttitle{系别} +\def\thu@bachelor@majortitle{专业} +\def\thu@bachelor@authortitle{姓名} +\def\thu@secretlevel@inner{内部} +\def\thu@secret@title{% + \thu@secretlevel\ifx\thu@secretlevel\thu@secretlevel@inner\else★\fi% + \hspace{2em}\thu@secretyear\hspace{1em}年} +\def\thu@apply{(申请清华大学\thu@cdegree学位论文)} +\def\thu@cdepartmenttitle{培养单位} +\def\thu@cmajortitle{学科} +\def\thu@cauthortitle{研究生} +\def\thu@csupervisortitle{指导教师} +\ifthu@bachelor + \def\thu@cassosupertitle{辅导教师} +\else + \def\thu@cassosupertitle{副指导教师} +\fi +\def\thu@ccosupertitle{% + \ifthu@doctor 联合导师\else \ifthu@master 联合指导教师\fi\fi} +\cdate{\ifthu@bachelor\the\year~~年~~\the\month~~月~~\the\day~~日% + \else\CJKdigits{\the\year}年\CJKnumber{\the\month}月\fi} +\edate{\ifcase \month \or January\or February\or March\or April\or May% + \or June\or July \or August\or September\or October\or November + \or December\fi\unskip,\ \ \the\year} +\newcommand{\thu@authtitle}{关于学位论文使用授权的说明} +\newcommand{\thu@authorization}{% +\ifthu@bachelor +本人完全了解清华大学有关保留、使用学位论文的规定,即:学校有权保留学位 +论文的复印件,允许该论文被查阅和借阅;学校可以公布该论文的全部或部分内 +容,可以采用影印、缩印或其他复制手段保存该论文。 +\else +本人完全了解清华大学有关保留、使用学位论文的规定,即: + +清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:(1)已获学位的研究生 +必须按学校规定提交学位论文,学校可以采用影印、缩印或其他复制手段保存研究生上交的 +学位论文;(2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料 +室等场所供校内师生阅读,或在校园网上供校内师生浏览部分内容\ifthu@master 。\else +;(3)根据《中华人民共和国学位条例暂行实施办法》,向国家图书馆报送可以公开的学位 +论文。\fi + +本人保证遵守上述规定。 +\fi} +\newcommand{\thu@authorizationaddon}{% + \ifthu@bachelor(涉密的学位论文在解密后应遵守此规定)\else(保密的论文在解密后应遵守此规定)\fi} +\newcommand{\thu@authorsig}{\ifthu@bachelor 签\hskip2em名:\else作者签名:\fi} +\newcommand{\thu@teachersig}{导师签名:} +\newcommand{\thu@frontdate}{日\hspace{2em}期:} +\newcommand{\thu@ckeywords@title}{关键词:} +\newcommand{\thu@denotation@name}{主要符号对照表} +\newcommand{\thu@ackshortname}{致谢} +\newcommand{\thu@ackname}{致\hspace{1em}谢} +\newcommand{\thu@acklongname}{致谢与声明} +\newcommand{\thu@declareshortname}{声明} +\newcommand{\thu@declarename}{声\hspace{1em}明} +\newcommand{\thu@declaretext}{本人郑重声明:所呈交的学位论文,是本人在导师指导下 + ,独立进行研究工作所取得的成果。尽我所知,除文中已经注明引用的内容外,本学位论 + 文的研究成果不包含任何他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的 + 其他个人和集体,均已在文中以明确方式标明。} +\newcommand{\thu@signature}{签\hspace{1em}名:} +\newcommand{\thu@backdate}{日\hspace{1em}期:} +\ifthu@bachelor + \newcommand{\thu@resume@title}{在学期间参加课题的研究成果} +\else + \newcommand{\thu@resume@title}{个人简历、在学期间发表的学术论文与研究成果} +\fi +\endinput +%% +%% End of file `thuthesis.cfg'. diff --git a/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls new file mode 100644 index 00000000000..fb7e71d13b9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls @@ -0,0 +1,901 @@ +%% +%% This is file `thuthesis.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% thuthesis.dtx (with options: `cls') +%% +%% This is a generated file. +%% +%% Copyright (C) 2005-2007 by Xue Ruini <xueruini@gmail.com> +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3a +%% of this license or (at your option) any later version. +%% The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3a or later is part of all distributions of LaTeX +%% version 2004/10/01 or later. +%% +%% To produce the documentation run the original source files ending with `.dtx' +%% through LaTeX. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{thuthesis} +[2007/11/08 4.0 Tsinghua University Thesis Template] +\hyphenation{Thu-Thesis} +\def\thuthesis{\textsc{ThuThesis}} +\def\version{4.0} +\newif\ifthu@bachelor\thu@bachelorfalse +\newif\ifthu@master\thu@masterfalse +\newif\ifthu@doctor\thu@doctorfalse +\newif\ifthu@secret\thu@secretfalse +\DeclareOption{bachelor}{\thu@bachelortrue} +\DeclareOption{master}{\thu@mastertrue} +\DeclareOption{doctor}{\thu@doctortrue} +\DeclareOption{secret}{\thu@secrettrue} +\AtEndOfClass{% + \ifthu@bachelor\relax\else + \ifthu@master\relax\else + \ifthu@doctor\relax\else + \ClassError{thuthesis}% + {You have to specify one of thesis options: bachelor, master or doctor.}{} + \fi + \fi + \fi} +\newif\ifthu@dvips +\newif\ifthu@dvipdfm +\DeclareOption{dvips}{\thu@dvipstrue} +\DeclareOption{dvipdfm}{\thu@dvipdfmtrue} +\AtEndOfClass{% + \ifpdf + \ifthu@dvips + \ClassError{thuthesis}% + {Please remove `dvips' if you run pdflatex.}{} + \fi + \ifthu@dvipdfm + \ClassError{thuthesis}% + {Please remove `dvipdfm' if you run pdflatex.}{} + \fi + \fi} +\newif\ifthu@arial +\DeclareOption{arial}{\thu@arialtrue} +\newif\ifthu@arialtoc +\DeclareOption{arialtoc}{\thu@arialtoctrue} +\newif\ifthu@arialtitle +\DeclareOption{arialtitle}{\thu@arialtitletrue} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} +\ExecuteOptions{arialtitle} +\ProcessOptions +\ifthu@bachelor + %\thu@arialtoctrue % hard code + \LoadClass[12pt, a4paper, openright]{book} +\else + \LoadClass[12pt, a4paper, openany]{book} +\fi +\RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{ifpdf} +\RequirePackage{amsmath, amssymb} +\RequirePackage{txfonts} +\ifthu@arial + \IfFileExists{arial.sty}{\RequirePackage{arial}}% + {\ClassWarning{thuthesis}{no arial.sty availiable!}} +\fi +\RequirePackage{graphicx} +\RequirePackage[config]{subfig} +\RequirePackage{indentfirst} +\RequirePackage[neverdecrease]{paralist} +\RequirePackage{CJK, CJKnumb} +\RequirePackage{CJKpunct} +\ifpdf % We're not running pdftex + \RequirePackage{ccmap} % 用 pdflatex 编译 +\else + % \RequirePackage{cmap} +\fi +\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem} +\RequirePackage{array} +\RequirePackage{longtable} +\RequirePackage{booktabs} +\RequirePackage[numbers,super,sort&compress]{natbib} +\RequirePackage{hyperref} +\hypersetup{% + unicode=true, + CJKbookmarks=true, + bookmarksnumbered=true, + bookmarksopen=true, + bookmarksopenlevel=1, + breaklinks=true, + colorlinks=false, + plainpages=false, + pdfpagelabels, + pdfborder=0 0 0} +\urlstyle{same} +\RequirePackage{hypernat} +\renewcommand\frontmatter{% + \if@openright\cleardoublepage\else\clearpage\fi + \@mainmatterfalse + \pagenumbering{Roman} + \pagestyle{thu@empty}} +\renewcommand\mainmatter{% + \if@openright\cleardoublepage\else\clearpage\fi + \@mainmattertrue + \pagenumbering{arabic} + \pagestyle{thu@headings}} +\renewcommand\backmatter{% + \if@openright\cleardoublepage\else\clearpage\fi + %\@mainmatterfalse + \ifthu@bachelor\pagenumbering{Roman}\fi} +\newcommand{\song}{\CJKfamily{song}} % 宋体 +\def\songti{\song} +\newcommand{\fs}{\CJKfamily{fs}} % 仿宋体 +\def\fangsong{\fs} +\newcommand{\kai}{\CJKfamily{kai}} % 楷体 +\def\kaishu{\kai} +\newcommand{\hei}{\CJKfamily{hei}} % 黑体 +\def\heiti{\hei} +\newcommand{\li}{\CJKfamily{li}} % 隶书 +\def\lishu{\li} +\newcommand{\you}{\CJKfamily{you}} % 幼圆 +\def\youyuan{\you} +\newlength\thu@linespace +\newcommand{\thu@choosefont}[2]{% + \setlength{\thu@linespace}{#2*\real{#1}}% + \fontsize{#2}{\thu@linespace}\selectfont} +\def\thu@define@fontsize#1#2{% + \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{% + \thu@choosefont{##1}{#2}}} +\thu@define@fontsize{chuhao}{42bp} +\thu@define@fontsize{xiaochu}{36bp} +\thu@define@fontsize{yihao}{26bp} +\thu@define@fontsize{xiaoyi}{24bp} +\thu@define@fontsize{erhao}{22bp} +\thu@define@fontsize{xiaoer}{18bp} +\thu@define@fontsize{sanhao}{16bp} +\thu@define@fontsize{xiaosan}{15bp} +\thu@define@fontsize{sihao}{14bp} +\thu@define@fontsize{banxiaosi}{13bp} +\thu@define@fontsize{xiaosi}{12bp} +\thu@define@fontsize{dawu}{11bp} +\thu@define@fontsize{wuhao}{10.5bp} +\thu@define@fontsize{xiaowu}{9bp} +\thu@define@fontsize{liuhao}{7.5bp} +\thu@define@fontsize{xiaoliu}{6.5bp} +\thu@define@fontsize{qihao}{5.5bp} +\thu@define@fontsize{bahao}{5bp} +\renewcommand\normalsize{% + \@setfontsize\normalsize{12bp}{20bp} + \abovedisplayskip=10bp \@plus 2bp \@minus 2bp + \abovedisplayshortskip=10bp \@plus 2bp \@minus 2bp + \belowdisplayskip=\abovedisplayskip + \belowdisplayshortskip=\abovedisplayshortskip} +\AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}} +\AtBeginDvi{\special{!% + \@percentchar\@percentchar BeginPaperSize: a4 + ^^Ja4^^J\@percentchar\@percentchar EndPaperSize}} +\setlength{\textwidth}{\paperwidth} +\setlength{\textheight}{\paperheight} +\setlength\marginparwidth{0cm} +\setlength\marginparsep{0cm} +\addtolength{\textwidth}{-6.4cm} +\setlength{\oddsidemargin}{3.2cm-1in} +\setlength{\evensidemargin}{\oddsidemargin} +\setlength{\headheight}{20pt} +\setlength{\topskip}{0pt} +\setlength{\skip\footins}{15pt} +\setlength{\topmargin}{2.8cm-1in} +\ifthu@bachelor + \setlength{\footskip}{1.3cm} + \setlength{\headsep}{0.6cm} + \addtolength{\textheight}{-7.8cm} +\else + \setlength{\footskip}{1.5cm} + \setlength{\headsep}{0.5cm} + \addtolength{\textheight}{-8.6cm} +\fi +\let\thu@cleardoublepage\cleardoublepage +\newcommand{\thu@clearemptydoublepage}{% + \clearpage{\pagestyle{empty}\thu@cleardoublepage}} +\let\cleardoublepage\thu@clearemptydoublepage +\def\ps@thu@empty{% + \let\@oddhead\@empty% + \let\@evenhead\@empty% + \let\@oddfoot\@empty% + \let\@evenfoot\@empty} +\def\ps@thu@plain{% + \let\@oddhead\@empty% + \let\@evenhead\@empty% + \def\@oddfoot{\hfil\wuhao\thepage\hfil}% + \let\@evenfoot=\@oddfoot} +\def\ps@thu@headings{% + \def\@oddhead{\vbox to\headheight{% + \hb@xt@\textwidth{\hfill\wuhao\song\leftmark\ifthu@bachelor\relax\else\hfill\fi}% + \vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}} + \def\@evenhead{\vbox to\headheight{% + \hb@xt@\textwidth{\wuhao\song% + \ifthu@bachelor\thu@schoolename\thu@bachelor@subtitle% + \else\hfill\leftmark\fi\hfill}% + \vskip2pt\hbox{\vrule width\textwidth height0.4pt depth0pt}}} + \def\@oddfoot{\hfil\wuhao\thepage\hfil} + \let\@evenfoot=\@oddfoot} +\renewcommand{\chaptermark}[1]{\@mkboth{\@chapapp\ ~~#1}{}} +\newlength\CJKtwospaces +\def\CJKindent{% + \settowidth\CJKtwospaces{\CJKchar{"0A1}{"0A1}\CJKchar{"0A1}{"0A1}}% + \parindent\CJKtwospaces} +\setlength{\parskip}{0pt \@plus2pt \@minus0pt} +\def\thu@item@space{% + \let\itemize\compactitem + \let\enditemize\endcompactitem + \let\enumerate\compactenum + \let\endenumerate\endcompactenum + \let\description\compactdesc + \let\enddescription\endcompactdesc} +\newcommand*\MakePerPage[2][\@ne]{% + \expandafter\def\csname c@pchk@#2\endcsname{\c@pchk@{#2}{#1}}% + \newcounter{pcabs@#2}% + \@addtoreset{pchk@#2}{#2}} +\def\new@pagectr#1{\@newl@bel{pchk@#1}} +\def\c@pchk@#1#2{\z@=\z@ + \begingroup + \expandafter\let\expandafter\next\csname pchk@#1@\arabic{pcabs@#1}\endcsname + \addtocounter{pcabs@#1}\@ne + \expandafter\ifx\csname pchk@#1@\arabic{pcabs@#1}\endcsname\next + \else \setcounter{#1}{#2}\fi + \protected@edef\next{% + \string\new@pagectr{#1}{\arabic{pcabs@#1}}{\noexpand\thepage}}% + \protected@write\@auxout{}{\next}% + \endgroup\global\z@} +\MakePerPage{footnote} +\def\thu@textcircled#1{% + \ifnum \value{#1} <10 \textcircled{\xiaoliu\arabic{#1}} + \else\ifnum \value{#1} <100 \textcircled{\qihao\arabic{#1}}\fi + \fi} +\renewcommand{\thefootnote}{\thu@textcircled{footnote}} +\renewcommand{\thempfootnote}{\thu@textcircled{mpfootnote}} +\def\footnoterule{\vskip-3\p@\hrule\@width0.3\textwidth\@height0.4\p@\vskip2.6\p@} +\let\thu@footnotesize\footnotesize +\renewcommand\footnotesize{\thu@footnotesize\xiaowu[1.5]} +\def\@makefnmark{\textsuperscript{\hbox{\normalfont\@thefnmark}}} +\long\def\@makefntext#1{ + \bgroup + \setbox\@tempboxa\hbox{% + \hb@xt@ 2em{\@thefnmark\hss}} + \leftmargin\wd\@tempboxa + \rightmargin\z@ + \linewidth \columnwidth + \advance \linewidth -\leftmargin + \parshape \@ne \leftmargin \linewidth + \footnotesize + \@setpar{{\@@par}}% + \leavevmode + \llap{\box\@tempboxa}% + #1 + \par\egroup} +\allowdisplaybreaks[4] +\def\make@df@tag{\@ifstar\thu@make@df@tag@@\make@df@tag@@@} +\def\thu@make@df@tag@@#1{% + \gdef\df@tag{\thu@maketag{#1}\def\@currentlabel{#1}}} + % redefinitation of tagform broken eqref! +\renewcommand{\eqref}[1]{\textup{\ref{#1}}} +\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} +\ifthu@bachelor + \def\thu@maketag#1{\maketag@@@{% + (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)}} + \def\tagform@#1{\maketag@@@{% + (\ignorespaces\text{\equationname\hskip0.5em}#1\unskip\@@italiccorr)\equcaption{#1}}} +\else + \def\thu@maketag#1{\maketag@@@{(\ignorespaces #1\unskip\@@italiccorr)}} + \def\tagform@#1{\maketag@@@{% + (\ignorespaces #1\unskip\@@italiccorr)\equcaption{#1}}} +\fi +\gdef\@endtrivlist#1{% % from \endtrivlist + \if@inlabel \indent\fi + \if@newlist \@noitemerr\fi + \ifhmode + \ifdim\lastskip >\z@ #1\unskip \par %<<<<<<<<<<<<<<<<<<<<<< + \else #1\unskip \par \fi + \fi + \if@noparlist \else + \ifdim\lastskip >\z@ + \@tempskipa\lastskip \vskip -\lastskip + \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip + \vskip\@tempskipa + \fi + \@endparenv + \fi #1} +\theorembodyfont{\song\rmfamily} +\theoremheaderfont{\hei\rmfamily} + % \theoremsymbol{\ensuremath{\blacksquare}} +\theoremsymbol{\ensuremath{\square}} +\theoremstyle{nonumberplain} +\theoremstyle{plain} +\theoremsymbol{} +\setlength{\floatsep}{12bp \@plus4pt \@minus1pt} +\setlength{\intextsep}{12bp \@plus4pt \@minus2pt} +\setlength{\textfloatsep}{12bp \@plus4pt \@minus2pt} +\setlength{\@fptop}{0bp \@plus1.0fil} +\setlength{\@fpsep}{12bp \@plus2.0fil} +\setlength{\@fpbot}{0bp \@plus1.0fil} +\renewcommand{\textfraction}{0.15} +\renewcommand{\topfraction}{0.85} +\renewcommand{\bottomfraction}{0.65} +\renewcommand{\floatpagefraction}{0.60} +\let\old@tabular\@tabular +\def\thu@tabular{\dawu[1.5]\old@tabular} +\DeclareCaptionLabelFormat{thu}{{\dawu[1.5]\song #1~\rmfamily #2}} +\DeclareCaptionLabelSeparator{thu}{\hspace{1em}} +\DeclareCaptionFont{thu}{\dawu[1.5]} +\captionsetup{labelformat=thu,labelsep=thu,font=thu} +\captionsetup[table]{position=top,belowskip={12bp-\intextsep},aboveskip=3bp} +\captionsetup[figure]{position=bottom,belowskip={12bp-\intextsep},aboveskip=-2bp} +\captionsetup[subfloat]{font=thu,captionskip=6bp,nearskip=6bp,farskip=0bp,topadjust=0bp} + %\renewcommand{\thesubfigure}{\thefigure--(\arabic{subfigure})} + % \renewcommand{\p@subfigure}{:} +\def\LT@c@ption#1[#2]#3{% change code from longtable.sty + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{\csname ext@table\endcsname}{table}% + {\protect\numberline{\tablename\hskip0.5em\thetable}{#2}}}% + \fi} +\let\thu@LT@array\LT@array +\def\LT@array{\dawu[1.5]\thu@LT@array} % set default font size +\def\hlinewd#1{% + \noalign{\ifnum0=`}\fi\hrule \@height #1 \futurelet + \reserved@a\@xhline} +\ifthu@arialtitle + \def\thu@title@font{\sffamily} +\fi +\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi\phantomsection% + \ifthu@bachelor\thispagestyle{thu@plain}% + \else\thispagestyle{thu@headings}\fi% + \global\@topnum\z@% + \@afterindenttrue% + \secdef\@chapter\@schapter} +\def\@chapter[#1]#2{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \addcontentsline{toc}{chapter}{\protect\numberline{\@chapapp}#1}%TODO: shit + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@makechapterhead{#2}} +\def\@makechapterhead#1{% + \vspace*{20bp}% + {\parindent \z@ \centering + \hei\csname thu@title@font\endcsname\ifthu@bachelor\xiaosan\else\sanhao[1]\fi + \ifnum \c@secnumdepth >\m@ne + \@chapapp\hskip1em + \fi + #1\par\nobreak + \vskip 24bp}} +\def\@schapter#1{% + \@makeschapterhead{#1} + \@afterheading} +\def\@makeschapterhead#1{% + \vspace*{20bp}% + {\parindent \z@ \centering + \hei\csname thu@title@font\endcsname\sanhao[1] + \ifthu@bachelor\xiaosan\else + \def\@tempa{#1} + \def\@tempb{\eabstractname} + \ifx\@tempa\@tempb\bfseries\fi + \fi + \interlinepenalty\@M + #1\par\nobreak + \vskip 24bp}} +\def\thu@chapter*{% + \@ifnextchar [ % ] + {\thu@@chapter} + {\thu@@chapter@}} +\def\thu@@chapter@#1{\thu@@chapter[#1]{#1}} +\def\thu@@chapter[#1]#2{% + \@ifnextchar [ % ] + {\thu@@@chapter[#1]{#2}} + {\thu@@@chapter[#1]{#2}[]}} +\def\thu@@@chapter[#1]#2[#3]{% + \if@openright\cleardoublepage\else\clearpage\fi + \phantomsection + \def\@tmpa{#1} + \def\@tmpb{#3} + \ifx\@tmpa\@empty + \pdfbookmark[0]{#2}{\expandafter\@gobble\string#2} + \else + \addcontentsline{toc}{chapter}{#1} + \fi + \chapter*{#2} + \ifx\@tmpb\@empty + \@mkboth{#2}{#2} + \else + \@mkboth{#3}{#3} + \fi} +\renewcommand\section{\@startsection {section}{1}{\z@}% + {-24bp \@plus -1ex \@minus -.2ex}% + {6bp \@plus .2ex}% + {\hei\csname thu@title@font\endcsname\sihao[1.429]}} +\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% + {-16bp \@plus -1ex \@minus -.2ex}% + {6bp \@plus .2ex}% + {\hei\csname thu@title@font\endcsname\banxiaosi[1.538]}} +\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-16bp \@plus -1ex \@minus -.2ex}% + {6bp \@plus .2ex}% + {\hei\csname thu@title@font\endcsname\xiaosi[1.667]}} +\setcounter{secnumdepth}{3} +\ifthu@doctor + \setcounter{tocdepth}{2} +\else + \setcounter{tocdepth}{3} +\fi +\renewcommand\tableofcontents{% + \thu@chapter*[]{\contentsname} + \ifthu@bachelor\wuhao[1.8]\else\xiaosi[1.5]\fi\@starttoc{toc}\normalsize} +\ifthu@arialtoc + \def\thu@toc@font{\sffamily} +\fi +\def\@pnumwidth{2em} % 这个参数没用了 +\def\@tocrmarg{2em} +\def\@dotsep{1} % 目录点间的距离 +\def\@dottedtocline#1#2#3#4#5{% + \ifnum #1>\c@tocdepth \else + \vskip \z@ \@plus.2\p@ + {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip + \parindent #2\relax\@afterindenttrue + \interlinepenalty\@M + \leavevmode + \@tempdima #3\relax + \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip + {\csname thu@toc@font\endcsname #4}\nobreak + \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill + \nobreak{\normalfont \normalcolor #5}% + \par}% + \fi} +\renewcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 4bp \@plus\p@ + \setlength\@tempdima{4em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode + \advance\leftskip\@tempdima + \hskip -\leftskip + {\hei\csname thu@toc@font\endcsname #1} % numberline is called here, and it use @tempdima + \leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill + \nobreak{\normalfont\normalcolor #2}\par + \penalty\@highpenalty + \endgroup + \fi} +\renewcommand*\l@section{\@dottedtocline{1}{1.2em}{2.1em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{2em}{3em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.5em}{3.8em}} +\def\thu@define@term#1{ + \expandafter\gdef\csname #1\endcsname##1{% + \expandafter\gdef\csname thu@#1\endcsname{##1}} + \csname #1\endcsname{}} +\thu@define@term{secretlevel} +\thu@define@term{secretyear} +\thu@define@term{ctitle} +\thu@define@term{cdegree} +\newcommand\cdepartment[2][]{\def\thu@cdepartment@short{#1}\def\thu@cdepartment{#2}} +\def\caffil{\cdepartment} % for compatibility +\def\thu@cdepartment@short{} +\def\thu@cdepartment{} +\thu@define@term{cmajor} +\def\csubject{\cmajor} % for compatibility +\thu@define@term{cauthor} +\thu@define@term{csupervisor} +\thu@define@term{cassosupervisor} +\thu@define@term{ccosupervisor} +\thu@define@term{cdate} +\thu@define@term{etitle} +\thu@define@term{edegree} +\thu@define@term{edepartment} +\def\eaffil{\edepartment} % todo: for compability +\thu@define@term{emajor} +\def\esubject{\emajor} % todo: for compability +\thu@define@term{eauthor} +\thu@define@term{esupervisor} +\thu@define@term{eassosupervisor} +\thu@define@term{ecosupervisor} +\thu@define@term{edate} +\long\@xp\def\@xp\collect@@body\@xp#\@xp1\@xp\end\@xp#\@xp2\@xp{% + \collect@@body{#1}\end{#2}} +\long\@xp\def\@xp\push@begins\@xp#\@xp1\@xp\begin\@xp#\@xp2\@xp{% + \push@begins{#1}\begin{#2}} +\long\@xp\def\@xp\addto@envbody\@xp#\@xp1\@xp{% + \addto@envbody{#1}} +\newcommand{\thu@@cabstract}[1]{\long\gdef\thu@cabstract{#1}} +\newenvironment{cabstract}{\collect@body\thu@@cabstract}{} +\newcommand{\thu@@eabstract}[1]{\long\gdef\thu@eabstract{#1}} +\newenvironment{eabstract}{\collect@body\thu@@eabstract}{} +\def\thu@parse@keywords#1{ + \expandafter\gdef\csname thu@#1\endcsname{} % todo: need or not? + \expandafter\gdef\csname #1\endcsname##1{ + \@for\reserved@a:=##1\do{ + \expandafter\ifx\csname thu@#1\endcsname\@empty\else + \expandafter\g@addto@macro\csname thu@#1\endcsname{\ignorespaces\csname thu@#1@separator\endcsname} + \fi + \expandafter\expandafter\expandafter\g@addto@macro% + \expandafter\csname thu@#1\expandafter\endcsname\expandafter{\reserved@a}}}} +\thu@parse@keywords{ckeywords} +\thu@parse@keywords{ekeywords} +\newlength{\thu@title@width} +\def\thu@put@title#1{\makebox{\hb@xt@ \thu@title@width{#1}}} +\newcommand{\thu@first@titlepage}{ + \begin{center} + \vspace*{-1.3cm} + \parbox[b][2.4cm][t]{\textwidth}{% + \ifthu@secret\hfill{\sihao\thu@secret@title}\else\rule{1cm}{0cm}\fi} + \ifthu@bachelor + \vskip0.2cm + {\ziju{10bp}\yihao\li\thu@schoolename} + \par\vskip1.2cm + {\ziju{18bp}\xiaochu\hei\thu@bachelor@subtitle} + \vskip2.5cm + \hspace*{-0.3cm}\noindent\hei\xiaoer\thu@bachelor@title@pre\thu@title@sep + \parbox[t]{12cm}{% + \begin{picture}(0,0)(0,0) + \setlength\unitlength{1cm} + \linethickness{1.3pt} + \put(0,-0.25){\line(1,0){12}} + \put(0,-1.68){\line(1,0){12}} + \end{picture}% + \ignorespaces\yihao[1.55]\thu@ctitle} %TODO: CJKulem.sty + \vskip1.55cm + \else + \parbox[t][9cm][t]{\paperwidth-8cm}{ + \renewcommand{\baselinestretch}{1.5} + \begin{center} + \yihao[1.2]{\hei\sffamily\thu@ctitle}\par + \ifthu@master + \erhao[1.1] \textbf{\sffamily\thu@etitle}\par\vskip 5bp + \else % for doctor + \par\vskip 20bp + \fi + \xiaoer[1] \textrm{{\ziju{2bp}\thu@apply}} + \end{center}} + \fi + \parbox[t][7.8cm][t]{\textwidth}{{\sanhao[1.5] + \begin{center}\fs + \ifthu@bachelor + \setlength{\thu@title@width}{4em} + \setlength{\extrarowheight}{6pt} + \begin{tabular}{p{\thu@title@width}@{}l@{\extracolsep{4pt}}l} + \thu@put@title{\thu@bachelor@departmenttitle} & \thu@title@sep & \thu@cdepartment\\ + \thu@put@title{\thu@bachelor@majortitle} & \thu@title@sep & \thu@cmajor\\ + \thu@put@title{\thu@bachelor@authortitle} & \thu@title@sep & \thu@cauthor \\ + \thu@put@title{\thu@csupervisortitle} & \thu@title@sep & \thu@csupervisor\\ + \ifx\thu@cassosupervisor\@empty\else + \thu@put@title{\thu@cassosupertitle} & \thu@title@sep & \thu@cassosupervisor\\ + \fi + \end{tabular} + \else + \setlength{\thu@title@width}{6em} + \setlength{\extrarowheight}{4pt} + \begin{tabular}{p{\thu@title@width}c@{\extracolsep{4pt}}l} + \thu@put@title{\thu@cdepartmenttitle} & \thu@title@sep & {\ziju{3bp}\thu@cdepartment}\\ + \thu@put@title{\thu@cmajortitle} & \thu@title@sep & {\ziju{3bp}\thu@cmajor}\\ + \thu@put@title{\thu@cauthortitle} & \thu@title@sep & {\ziju{11bp}\thu@cauthor}\\ + \thu@put@title{\thu@csupervisortitle} & \thu@title@sep & {\ziju{11bp}\thu@csupervisor}\\ + \ifx\thu@cassosupervisor\@empty\else + \thu@put@title{\thu@cassosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@cassosupervisor}\\ + \fi + \ifx\thu@ccosupervisor\@empty\else + \thu@put@title{\thu@ccosupertitle} & \thu@title@sep & {\ziju{11bp}\thu@ccosupervisor}\\ + \fi + \end{tabular} + \fi + \end{center}}} + \begin{center} + {\ifthu@bachelor\xiaosi\else\sanhao\fi \song \thu@cdate} + \end{center} + \end{center}} % end of titlepage +\newcommand{\thu@doctor@engcover}{% + \begin{center} + \vspace*{0.2cm} + \parbox[t][5.2cm][t]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.5} + \begin{center} + \erhao[1.1]\bfseries\sffamily\thu@etitle + \end{center}} + \parbox[t][5.8cm][t]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.3} + \begin{center} + \sanhao Dissertation Submitted to\\ + {\bfseries Tsinghua University}\\ + in partial fulfillment of the requirement\\ + for the degree of\\ + {\bfseries\sffamily\thu@edegree} + \end{center}} + \parbox[t][3.6cm][b]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.3} + \begin{center} + \sanhao\sffamily by\\[3bp] + \bfseries\thu@eauthor\\(~\thu@emajor~) + \end{center}} + \par\vspace{0.9cm} + \parbox[t][2.1cm][t]{\paperwidth-7.2cm}{ + \renewcommand{\baselinestretch}{1.2}\xiaosan\centering + \begin{tabular}{rl} + Dissertation Supervisor : & \thu@esupervisor\\ + \ifx\thu@eassosupervisor\@empty + \else Associate Supervisor : & \thu@eassosupervisor\\\fi + \end{tabular}} + \parbox[t][2cm][b]{\paperwidth-7.2cm}{ + \begin{center} + \sanhao\bfseries\sffamily\thu@edate + \end{center}} + \end{center}} +\newcommand\thu@underline[2][6em]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt} +\newcommand{\thu@authorization@mk}{% + \ifthu@bachelor\vspace*{-0.6cm}\else\vspace*{-0.1cm}\fi % shit code! + \begin{center}\erhao\hei\thu@authtitle\end{center} + \ifthu@bachelor\vskip\baselineskip\else\vskip18pt\sihao[2.03]\fi\par + \thu@authorization\par + \textbf{\thu@authorizationaddon}\par + \ifthu@bachelor\vskip2.54cm\else\vskip1.9cm\fi + \ifthu@bachelor + \noindent\thu@authorsig\thu@underline\relax% + \thu@teachersig\thu@underline\relax\thu@frontdate\thu@underline\relax + \else + \begingroup + \parindent0pt\xiaosi + \hspace*{1.5cm}\thu@authorsig\thu@underline[7em]\relax\hfill% + \thu@teachersig\thu@underline[7em]\relax\hspace*{1cm}\\[3pt] + \hspace*{1.5cm}\thu@frontdate\thu@underline[7em]\relax\hfill% + \thu@frontdate\thu@underline[7em]\relax\hspace*{1cm} + \endgroup + \fi} +\newcommand{\makecover}{ + \phantomsection + \pdfbookmark[-1]{\thu@ctitle}{ctitle} + \normalsize% + \begin{titlepage} +\thu@first@titlepage +\ifthu@doctor + \cleardoublepage\thu@doctor@engcover +\fi +\cleardoublepage\thu@authorization@mk + \end{titlepage} +\normalsize +\thu@makeabstract +\let\@tabular\thu@tabular} +\newcommand{\thu@makeabstract}{% + \cleardoublepage % always openright for Abstract + \thu@chapter*[]{\cabstractname} % no tocline + \ifthu@bachelor + \pagestyle{thu@plain} + \else + \pagestyle{thu@headings} + \fi + \pagenumbering{Roman} + \thu@cabstract + \vskip12bp + \setbox0=\hbox{{\hei \thu@ckeywords@title}} + \noindent\hangindent\wd0\hangafter1\box0\thu@ckeywords + \thu@chapter*[]{\eabstractname} % no tocline + \thu@eabstract + \vskip12bp + \setbox0=\hbox{\textbf{Key words:\enskip}} + \noindent\hangindent\wd0\hangafter1\box0\thu@ekeywords} +\newenvironment{denotation}[1][2.5cm]{ + \thu@chapter*[]{\thu@denotation@name} % no tocline + \noindent\begin{list}{}% + {\vskip-30bp\xiaosi[1.6] + \renewcommand\makelabel[1]{##1\hfil} + \setlength{\labelwidth}{#1} % 标签盒子宽度 + \setlength{\labelsep}{0.5cm} % 标签与列表文本距离 + \setlength{\itemindent}{0cm} % 标签缩进量 + \setlength{\leftmargin}{\labelwidth+\labelsep} % 左边界 + \setlength{\rightmargin}{0cm} + \setlength{\parsep}{0cm} % 段落间距 + \setlength{\itemsep}{0cm} % 标签间距 + \setlength{\listparindent}{0cm} % 段落缩进量 + \setlength{\topsep}{0pt} % 标签与上文的间距 + }}{\end{list}} +\newenvironment{ack}{% + \ifthu@bachelor + \thu@chapter*{\thu@ackname} + \else + % \cleardoublepage + \thu@chapter*[\thu@acklongname]{\thu@ackname}[\thu@acklongname] + \fi} + {% + \ifthu@bachelor\relax\else %TAG 1 + \par\vfill% + \noindent + {\setlength{\unitlength}{0.1\textwidth} + \begin{picture}(10, 0.1) + \multiput(0,0)(1, 0){10}{\rule{0.8\unitlength}{1.2pt}} + \multiput(0,0.08)(1, 0){10}{\rule{0.8\unitlength}{1.2pt}} + \end{picture}} + \fi % END TAG 1 + \ifthu@bachelor + \thu@chapter*{\thu@declarename} + \else + \parbox[t][4cm][c]{\textwidth}{{\sanhao\hei\centerline{\thu@declarename}}} + \fi + \par{\xiaosi\parindent2em\thu@declaretext}\vskip2cm + {\xiaosi\hfill\thu@signature\thu@underline[2.5cm]\relax% + \thu@backdate\thu@underline[2.5cm]\relax}% + } +\long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname #1name\endcsname\hskip0.5em\csname the#1\endcsname}% + {\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup} +\def\thu@listof#1#2{% + \@ifstar + {\thu@chapter*[]{#1}\@starttoc{#2}} + {\thu@chapter*{#1}\@starttoc{#2}}} +\renewcommand\listoffigures{\thu@listof{\listfigurename}{\ext@figure}} +\renewcommand*\l@figure{\@dottedtocline{1}{0em}{4em}} +\renewcommand\listoftables{\thu@listof{\listtablename}{\ext@table}} +\let\l@table\l@figure +\def\ext@equation{loe} +\def\equcaption#1{% + \addcontentsline{\ext@equation}{equation}% + {\protect\numberline{\equationname\hskip0.5em #1}}} +\newcommand\listofequations{\thu@listof{\listequationname}{\ext@equation}} +\ifthu@bachelor + \newcommand*\l@equation{\@dottedtocline{1}{0em}{4em}} +\else + \newcommand*\l@equation{\@dottedtocline{1}{0em}{4.2em}} +\fi +\bibpunct{[}{]}{,}{s}{}{,} +\renewcommand\NAT@citesuper[3]{\ifNAT@swa +\unskip\kern\p@\textsuperscript{\NAT@@open #1\NAT@@close}% + \if*#3*\else\ (#3)\fi\else #1\fi\endgroup} +\DeclareRobustCommand\onlinecite{\@onlinecite} +\def\@onlinecite#1{\begingroup\let\@cite\NAT@citenum\citep{#1}\endgroup} +\def\thudot{\ifthu@bachelor\else\unskip.\fi} +\def\thumasterbib{\ifthu@doctor [M]\else [Master Thesis]\fi} +\def\thuphdbib{\ifthu@doctor [D]\else [Doctor Thesis]\fi} +\renewenvironment{thebibliography}[1]{% + \thu@chapter*{\bibname}% + \wuhao[1.5] + \list{\@biblabel{\@arabic\c@enumiv}}% + {\renewcommand{\makelabel}[1]{##1\hfill} + \settowidth\labelwidth{1.1cm} + \setlength{\labelsep}{0.6em} + \setlength{\itemindent}{0pt} + \setlength{\leftmargin}{\labelwidth+\labelsep} + \addtolength{\itemsep}{-0.7em} + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \interlinepenalty4000% + \sfcode`\.\@m} + {\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} +\let\thu@appendix\appendix +\renewenvironment{appendix}{% + \thu@appendix + \gdef\@chapapp{\appendixname~\thechapter} + %\renewcommand\theequation{\ifnum \c@chapter>\z@ \thechapter-\fi\@arabic\c@equation} + }{} +\newenvironment{resume}{% + % \cleardoublepage + \thu@chapter*{\thu@resume@title}}{} +\newcommand{\resumeitem}[1]{\vspace{2.5em}{\sihao \hei \centerline{#1}}\par} +\newcommand{\thu@verticle}{% + \renewcommand{\CJKsymbol}[1]{% + \setbox0=\hbox{\symbol{##1}}% + \newcommand{\POS}{}% + \ifthenelse{\lengthtest{\ht0<.39\wd0}}% + {\renewcommand{\POS}{c}}{\renewcommand{\POS}{r}}% + \makebox[1.3\wd0][\POS]{\rotatebox[origin=lB]{90}{\symbol{##1}}}% + \ifCJK@bold@% + \hbox to \CJKboldshift{\hss\makebox[1.3\wd0][\POS]{% + \rotatebox[origin=lB]{90}{\symbol{##1}}}}% + \hbox to \CJKboldshift{\hss\makebox[1.3\wd0][\POS]{% + \rotatebox[origin=lB]{90}{\symbol{##1}}}}% + \fi}} +\newsavebox{\thu@saverotate}% +\newcommand{\shupai}[2][\textheight]{% + \savebox{\thu@saverotate}{\parbox[t]{#1}{\thu@verticle #2}} + \hfill\rotatebox[origin=lt]{-90}{\usebox{\thu@saverotate}}} +\newcommand{\shuji}[1][\thu@ctitle]{ + \newpage% + \thispagestyle{empty} + \vspace*{1cm} + \shupai[\textheight-2cm]{\fs\xiaosan #1\hfill\thu@cauthor}} +\iffalse +\newcommand{\bs}{\symbol{'134}}%Print backslash + % \newcommand{\bs}{\ensuremath{\mathtt{\backslash}}}%Print backslash + % Index entry for a command (\cih for hidden command index +\newcommand{\cih}[1]{% +\index{commands!#1@\texttt{\bs#1}}% +\index{#1@\texttt{\hspace*{-1.2ex}\bs #1}} +} +\newcommand{\ci}[1]{\cih{#1}\texttt{\bs#1}} + % Package +\newcommand{\pai}[1]{% +\index{packages!#1@\textsf{#1}}% +\index{#1@\textsf{#1}}% +\textsf{#1}} + % Index entry for an environment +\newcommand{\ei}[1]{% +\index{environments!\texttt{#1}}% +\index{#1@\texttt{#1}}% +\texttt{#1}} + % Indexentry for a word (Word inserted into the text) +\newcommand{\wi}[1]{\index{#1}#1} +\fi +\newcommand*{\ziju}[1]{\renewcommand{\CJKglue}{\hskip #1}} +\newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex} +\def\thu@active@cjk{ + % Activate all >128 characters. + \count@=127 + \@whilenum\count@<255 \do{% + \advance\count@ by 1 + \lccode`\~=\count@ + \catcode\count@=\active + \lowercase{\def~{\kern1ex}}}} +\AtEndOfClass{\thu@active@cjk\input{thuthesis.cfg}}% +\def\thu@fixselectfont{% + \DeclareRobustCommand{\selectfont}{% + \ifx\f@linespread\baselinestretch \else + \set@fontsize\baselinestretch\f@size\f@baselineskip \fi + \xdef\font@name{% + \csname\curr@fontshape/\f@size\endcsname}% + \pickup@font + \font@name + % CJK addition: + \CJK@bold@false + \csname \curr@fontshape\endcsname + % everysel addition: + \@EverySelectfont@EveryHook + \@EverySelectfont@AtNextHook + \gdef\@EverySelectfont@AtNextHook{}% + % end additions + \size@update + \enc@update}} +\def\thu@setup@pdfinfo{% + \hypersetup{% + pdftitle={\thu@ctitle}, + pdfauthor={\thu@cauthor}, + pdfsubject={\thu@cdegree}, + pdfkeywords={\thu@ckeywords}, + pdfcreator={\thu@cauthor}, + pdfproducer={\thuthesis}}} +\def\thu@beginCJK{% + \thu@fixselectfont% + \begin{CJK*}{GBK}{song}% + \sloppy\CJKindent\CJKtilde} +\def\thu@endCJK{\clearpage\end{CJK*}} +\let\thu@begindocumenthook\@begindocumenthook +\let\thu@enddocumenthook\@enddocumenthook +\def\AtBeginDocument{\g@addto@macro\thu@begindocumenthook} +\def\AtEndDocument{\g@addto@macro\thu@enddocumenthook} +\def\@begindocumenthook{\thu@begindocumenthook\thu@beginCJK} +\def\@enddocumenthook{\thu@endCJK\thu@enddocumenthook} +\AtBeginDocument{\thu@setup@pdfinfo\thu@item@space} +\endinput +%% +%% End of file `thuthesis.cls'. diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds index 82606a7681d..ecc1b28e49c 100755 --- a/Master/tlpkg/bin/ctan2tds +++ b/Master/tlpkg/bin/ctan2tds @@ -320,7 +320,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw 'thaifonts-scalable', "die 'Thai, fontforge format only, skip'", 'thailatex', "die 'Thai, requires preprocessor (?), skip'", 'thumbpdf', "&MAKEthumbpdf", - 'thuthesis', "die 'Chinese, may as well skip'", + #'thuthesis', "die 'Chinese, may as well skip'", 'ticket', "&MAKEflatten", 'tipa', "&MAKEtipa", 'titlepage-uni-dortmund', "die 'needs graphics (too short names) in .'", diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 11b051f6cd4..120f335d33c 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -63,7 +63,7 @@ my @WorkingTLP = qw( ellipsis elpres elsevier elsevier-bib emulateapj endfloat endheads engrec enumitem envbig environ epigrafica epiolmec eplain epsdice epsf epslatex-fr epspdfconversion eqlist eqparbox errata es-tex-faq - ESIEEcv esint esint-type1 eskd eskdx eso-pic etaremune + ESIEEcv esint esint-type1 eskd eskdx eso-pic esvect etaremune ethiop ethiop-t1 etoolbox eulervm euproposal euro europecv eurosans everypage exam examdesign examplep exercise expl3 expressg extarrows exteps @@ -158,7 +158,7 @@ my @WorkingTLP = qw( tensor teubner tex-gyre texilikecover texmate texpower texshade textcase textfit textopo textpath textpos thesis-titlepage-fhac - thumb thumbpdf ticket titlefoot titlesec titling tocbibind + thumb thumbpdf thuthesis ticket titlefoot titlesec titling tocbibind tocloft todo tokenizer toolbox tools toptesi totpages tracking trajan trfsigns trivfloat trsym tugboat tugboat-plain turnstile twoup Type1fonts diff --git a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc index 3e3e11ade54..fcbdd4e8917 100644 --- a/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc @@ -48,6 +48,7 @@ depend spie depend stellenbosch depend sugconf depend thesis-titlepage-fhac +depend thuthesis depend toptesi depend tugboat depend tugboat-plain diff --git a/Master/tlpkg/tlpsrc/thuthesis.tlpsrc b/Master/tlpkg/tlpsrc/thuthesis.tlpsrc new file mode 100644 index 00000000000..34e4db5dbbc --- /dev/null +++ b/Master/tlpkg/tlpsrc/thuthesis.tlpsrc @@ -0,0 +1,2 @@ +name thuthesis +category Package |