texlive[56305] Master/texmf-dist: thuthesis (9sep20)

commits+karl at tug.org commits+karl at tug.org
Wed Sep 9 22:57:31 CEST 2020


Revision: 56305
          http://tug.org/svn/texlive?view=revision&revision=56305
Author:   karl
Date:     2020-09-09 22:57:31 +0200 (Wed, 09 Sep 2020)
Log Message:
-----------
thuthesis (9sep20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
    trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
    trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
    trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/thuthesis/Makefile
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/abstract.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/latexmkrc
    trunk/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
    trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
    trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
    trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
    trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/committee.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex
    trunk/Master/texmf-dist/doc/latex/thuthesis/figures/committee.pdf
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
    trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx

Modified: trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-author-year.bst	2020-09-09 20:57:31 UTC (rev 56305)
@@ -4,7 +4,7 @@
 %%
 %% The original source files were:
 %%
-%% gbt7714.dtx  (with options: `thu,2005,authoryear')
+%% gbt7714.dtx  (with options: `thu,2015,authoryear')
 %% -------------------------------------------------------------------
 %% GB/T 7714-2015 BibTeX Style
 %% https://github.com/CTeX-org/gbt7714-bibtex-style
@@ -21,9 +21,14 @@
 %% version 2005/12/01 or later.
 %% -------------------------------------------------------------------
 INTEGERS {
+  citation.et.al.min
+  citation.et.al.use.first
+  bibliography.et.al.min
+  bibliography.et.al.use.first
   uppercase.name
-  max.num.authors
-  period.between.author.year
+  terms.in.macro
+  year.after.author
+  period.after.author
   sentence.case.title
   link.title
   title.in.journal
@@ -32,7 +37,7 @@
   show.medium.type
   slash.for.extraction
   in.booktitle
-  abbreviate.journal
+  short.journal
   italic.journal
   bold.journal.volume
   show.missing.address.publisher
@@ -52,18 +57,23 @@
 
 FUNCTION {load.config}
 {
+  #2 'citation.et.al.min :=
+  #1 'citation.et.al.use.first :=
+  #4 'bibliography.et.al.min :=
+  #3 'bibliography.et.al.use.first :=
   #0 'uppercase.name :=
-  #3 'max.num.authors :=
-  #1 'period.between.author.year :=
+  #0 'terms.in.macro :=
+  #1 'year.after.author :=
+  #1 'period.after.author :=
   #1 'sentence.case.title :=
   #0 'link.title :=
   #1 'title.in.journal :=
   #1 'show.mark :=
-  #1 'space.before.mark :=
+  #0 'space.before.mark :=
   #1 'show.medium.type :=
   #1 'slash.for.extraction :=
   #0 'in.booktitle :=
-  #0 'abbreviate.journal :=
+  #0 'short.journal :=
   #0 'italic.journal :=
   #0 'bold.journal.volume :=
   #0 'show.missing.address.publisher :=
@@ -70,7 +80,7 @@
   #0 'only.start.page :=
   #1 'show.urldate :=
   #1 'show.url :=
-  #0 'show.doi :=
+  #1 'show.doi :=
   #0 'show.preprint :=
   #0 'show.note :=
   #0 'show.english.translation :=
@@ -91,11 +101,15 @@
     edition
     editor
     eprint
+    eprinttype
     howpublished
     institution
     journal
+    journaltitle
     key
+    langid
     language
+    location
     mark
     medium
     note
@@ -105,6 +119,7 @@
     publisher
     school
     series
+    shortjournal
     title
     translation
     translator
@@ -114,7 +129,7 @@
     year
   }
   { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
-  { label extra.label sort.label short.list entry.mark entry.url }
+  { label extra.label sort.label short.label short.list entry.mark entry.url }
 
 INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
 
@@ -149,6 +164,9 @@
   if$
 }
 
+FUNCTION {bbl.and}
+{ "" }
+
 FUNCTION {bbl.et.al}
 { entry.lang lang.zh =
     { "等" }
@@ -164,14 +182,25 @@
   if$
 }
 
+FUNCTION {citation.and}
+{ terms.in.macro
+    { "{\biband}" }
+    'bbl.and
+  if$
+}
+
 FUNCTION {citation.et.al}
-{ bbl.et.al }
+{ terms.in.macro
+    { "{\bibetal}" }
+    'bbl.et.al
+  if$
+}
 
 FUNCTION {bbl.colon} { ": " }
 
-FUNCTION {bbl.wide.space} { "\ " }
+FUNCTION {bbl.wide.space} { "\quad " }
 
-FUNCTION {bbl.slash} { " // " }
+FUNCTION {bbl.slash} { "// " }
 
 FUNCTION {bbl.sine.loco}
 { entry.lang lang.zh =
@@ -460,16 +489,27 @@
   get.str.lang
 }
 
+STRINGS { entry.langid }
+
 FUNCTION {set.entry.lang}
-{ language empty$
+{ "" 'entry.langid :=
+  language empty$ not
+    { language 'entry.langid := }
+    'skip$
+  if$
+  langid empty$ not
+    { langid 'entry.langid := }
+    'skip$
+  if$
+  entry.langid empty$
     { check.entry.lang }
-    { language "english" = language "american" = or language "british" = or
+    { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
         { lang.en }
-        { language "chinese" =
+        { entry.langid "chinese" =
             { lang.zh }
-            { language "japanese" =
+            { entry.langid "japanese" =
                 { lang.ja }
-                { language "russian" =
+                { entry.langid "russian" =
                     { lang.ru }
                     { check.entry.lang }
                   if$
@@ -495,6 +535,25 @@
 
 INTEGERS { nameptr namesleft numnames name.lang }
 
+FUNCTION {format.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+  t "others" =
+    { bbl.et.al }
+    { t get.str.lang 'name.lang :=
+      name.lang lang.en =
+        { t #1 "{vv~}{ll}{~f{~}}" format.name$
+          uppercase.name
+            { "u" change.case$ }
+            'skip$
+          if$
+          t #1 "{, jj}" format.name$ *
+        }
+        { t #1 "{ll}{ff}" format.name$ }
+      if$
+    }
+  if$
+}
+
 FUNCTION {format.names}
 { 's :=
   #1 'nameptr :=
@@ -502,31 +561,21 @@
   ""
   numnames 'namesleft :=
     { namesleft #0 > }
-    { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
-      nameptr #1 >
-        { ", " * }
-        'skip$
-      if$
-      nameptr max.num.authors >
-        { bbl.et.al *
+    { s nameptr format.name bbl.et.al =
+      numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
+        { ", " *
+          bbl.et.al *
           #1 'namesleft :=
         }
-        { t "others" =
-            { bbl.et.al * }
-            { t get.str.lang 'name.lang :=
-              name.lang lang.en =
-                { t #1 "{vv~}{ll}{~f{~}}" format.name$
-                  uppercase.name
-                    { "u" change.case$ }
-                    'skip$
-                  if$
-                  t #1 "{, jj}" format.name$ *
-                }
-                { t #1 "{ll}{ff}" format.name$ }
+        { nameptr #1 >
+            { namesleft #1 = bbl.and "" = not and
+                { bbl.and * }
+                { ", " * }
               if$
-              *
             }
+            'skip$
           if$
+          s nameptr format.name *
         }
       if$
       nameptr #1 + 'nameptr :=
@@ -920,18 +969,38 @@
 }
 
 FUNCTION {format.journal}
-{ journal empty$ not
-    { journal
-      abbreviate.journal
-        'abbreviate
-        'skip$
+{ ""
+  short.journal
+    { shortjournal empty$ not
+        { shortjournal * }
+        { journal empty$ not
+            { journal * abbreviate }
+            { journaltitle empty$ not
+                { journaltitle * abbreviate }
+                'skip$
+              if$
+            }
+          if$
+        }
       if$
-      italic.journal entry.lang lang.en = and
+    }
+    { journal empty$ not
+        { journal * }
+        { journaltitle empty$ not
+            { journaltitle * }
+            'skip$
+          if$
+        }
+      if$
+    }
+  if$
+  duplicate$ empty$ not
+    { italic.journal entry.lang lang.en = and
         'italicize
         'skip$
       if$
     }
-    { "" }
+    'skip$
   if$
 }
 
@@ -948,9 +1017,6 @@
 
 FUNCTION {format.mark}
 { show.mark
-  type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
-  medium empty$ not or entry.is.electronic or
-  and
     { entry.mark
       show.medium.type
         { medium empty$ not
@@ -967,7 +1033,7 @@
       'entry.mark :=
       space.before.mark
         { " [" entry.mark * "]" * }
-        { "\allowbreak[" entry.mark * "]" * }
+        { "[" entry.mark * "]" * }
       if$
     }
     { "" }
@@ -1036,8 +1102,15 @@
 
 FUNCTION {format.address.publisher}
 { address empty$ not
-    { address
-      format.publisher empty$ not
+    { address }
+    { location empty$ not
+        { location }
+        { "" }
+      if$
+    }
+  if$
+  duplicate$ empty$ not
+    { format.publisher empty$ not
         { bbl.colon * format.publisher * }
         { entry.is.electronic not show.missing.address.publisher and
             { bbl.colon * bbl.sine.nomine * }
@@ -1046,7 +1119,8 @@
         }
       if$
     }
-    { entry.is.electronic not show.missing.address.publisher and
+    { pop$
+      entry.is.electronic not show.missing.address.publisher and
         { format.publisher empty$ not
             { bbl.sine.loco bbl.colon * format.publisher * }
             { bbl.sine.loco.sine.nomine }
@@ -1117,10 +1191,94 @@
   if$
 }
 
+FUNCTION {extract.before.slash}
+{ duplicate$ empty$
+    { pop$ "" }
+    { 's :=
+      #1 'charptr :=
+      s text.length$ #1 + 'len :=
+        { charptr len <
+          s charptr #1 substring$ "/" = not
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+      s #1 charptr #1 - substring$
+    }
+  if$
+}
+
+FUNCTION {extract.after.slash}
+{ duplicate$ empty$
+    { pop$ "" }
+    { 's :=
+      #1 'charptr :=
+      s text.length$ #1 + 'len :=
+        { charptr len <
+          s charptr #1 substring$ "-" = not
+          and
+          s charptr #1 substring$ "/" = not
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+        { charptr len <
+          s charptr #1 substring$ "-" =
+          s charptr #1 substring$ "/" =
+          or
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+      s charptr global.max$ substring$
+    }
+  if$
+}
+
+FUNCTION {contains.slash}
+{ duplicate$ empty$
+    { pop$ #0 }
+    { 's :=
+        { s empty$ not
+          s #1 #1 substring$ "-" = not
+          and
+          s #1 #1 substring$ "/" = not
+          and
+        }
+        { s #2 global.max$ substring$ 's := }
+      while$
+      s empty$ not
+    }
+  if$
+}
+
 FUNCTION {format.year}
 { year empty$ not
-    { year extract.before.dash }
+    { year extract.before.slash extra.label * }
     { date empty$ not
+        { date extract.before.dash extra.label * }
+        { "empty year in " cite$ * warning$
+          urldate empty$ not
+            { "[" urldate extract.before.dash * extra.label * "]" * }
+            { "" }
+          if$
+        }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.periodical.year}
+{ year empty$ not
+    { year extract.before.slash
+      "--" *
+      year extract.after.slash
+      duplicate$ empty$
+        'pop$
+        { * }
+      if$
+    }
+    { date empty$ not
         { date extract.before.dash }
         { "empty year in " cite$ * warning$
           urldate empty$ not
@@ -1131,7 +1289,6 @@
       if$
     }
   if$
-  extra.label *
 }
 
 FUNCTION {format.date}
@@ -1138,7 +1295,9 @@
 { type$ "patent" = type$ "newspaper" = or
   date empty$ not and
     { date }
-    { year }
+    { year field.or.null
+      extra.label *
+    }
   if$
 }
 
@@ -1224,7 +1383,7 @@
 
 FUNCTION {format.periodical.year.volume.number}
 { year empty$ not
-    { year extract.before.dash }
+    { year extract.before.slash }
     { "empty year in periodical " cite$ * warning$ }
   if$
   volume empty$ not
@@ -1235,26 +1394,22 @@
     { "\penalty0 (" * number extract.before.dash * ")" * }
     'skip$
   if$
-  year contains.dash
-    { "--" *
-      year extract.after.dash empty$
-      volume extract.after.dash empty$ and
-      number extract.after.dash empty$ and not
-        { year extract.after.dash empty$ not
-            { year extract.after.dash * }
-            { year extract.before.dash * }
-          if$
-          volume empty$ not
-            { ", " * volume extract.after.dash * }
-            'skip$
-          if$
-          number empty$ not
-            { "\penalty0 (" * number extract.after.dash * ")" * }
-            'skip$
-          if$
-        }
+  "--" *
+  year extract.after.slash empty$
+  volume extract.after.dash empty$ and
+  number extract.after.dash empty$ and not
+    { year extract.after.slash empty$ not
+        { year extract.after.slash * }
+        { year extract.before.slash * }
+      if$
+      volume empty$ not
+        { ", " * volume extract.after.dash * }
         'skip$
       if$
+      number empty$ not
+        { "\penalty0 (" * number extract.after.dash * ")" * }
+        'skip$
+      if$
     }
     'skip$
   if$
@@ -1395,11 +1550,22 @@
 }
 
 FUNCTION {format.eprint}
-{ ""
-  archivePrefix empty$ not
-    { archivePrefix * ": " *
-      "\eprint{https://" *
-      archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+{ eprinttype empty$ not
+    { eprinttype }
+    { archivePrefix empty$ not
+        { archivePrefix }
+        { "" }
+      if$
+    }
+  if$
+  's :=
+  s empty$ not
+    { s ": \eprint{" *
+      url empty$ not
+        { url }
+        { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
+      if$
+      * "}{" *
       eprint * "}" *
     }
     { eprint }
@@ -1470,11 +1636,15 @@
     }
   if$
   output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   format.series.vol.num.title "title" output.check
   "M" set.entry.mark
@@ -1485,6 +1655,10 @@
   format.edition output
   new.block
   format.address.publisher output
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1499,11 +1673,15 @@
   output.translation
   format.authors output
   author format.key output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   format.title "title" output.check
   "M" set.entry.mark
@@ -1518,6 +1696,10 @@
   format.edition output
   new.block
   format.address.publisher output
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.extracted.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1532,11 +1714,15 @@
   output.translation
   format.authors output
   author format.key output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   format.title "title" output.check
   "J" set.entry.mark
@@ -1545,6 +1731,10 @@
   format.periodical.year.volume.number output
   new.block
   format.address.publisher output
+  year.after.author not
+    { format.periodical.year "year" output.check }
+    'skip$
+  if$
   format.urldate "" output.after
   output.url
   output.doi
@@ -1558,11 +1748,15 @@
   output.translation
   format.authors output
   author format.key output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   title.in.journal
     { format.title "title" output.check
@@ -1573,6 +1767,10 @@
     'skip$
   if$
   format.journal "journal" output.check
+  year.after.author not
+    { format.date "year" output.check }
+    'skip$
+  if$
   format.journal.volume output
   format.journal.number "" output.after
   format.journal.pages "" output.after
@@ -1589,11 +1787,15 @@
   output.translation
   format.authors output
   author format.key output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   format.title "title" output.check
   "P" set.entry.mark
@@ -1616,11 +1818,15 @@
   output.translation
   format.authors output
   author format.key output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   format.series.vol.num.title "title" output.check
   "EB" set.entry.mark
@@ -1627,6 +1833,14 @@
   format.mark "" output.after
   new.block
   format.address.publisher output
+  year.after.author not
+    { date empty$
+        { format.date output }
+        'skip$
+      if$
+    }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.editdate "" output.after
   format.urldate "" output.after
@@ -1651,11 +1865,15 @@
     }
   if$
   output
-  period.between.author.year
-    'new.sentence
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
     'skip$
   if$
-  format.year "year" output.check
   new.block
   title.in.journal
     { format.series.vol.num.title "title" output.check
@@ -1670,6 +1888,10 @@
   format.edition output
   new.block
   output.eprint
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1689,7 +1911,8 @@
                 'preprint
                 { entry.is.electronic
                     'electronic
-                    { "Z" set.entry.mark
+                    {
+                      "Z" set.entry.mark
                       monograph
                     }
                   if$
@@ -1745,11 +1968,7 @@
 FUNCTION {manual} { monograph }
 
 FUNCTION {mastersthesis}
-{ lang.zh entry.lang =
-    { "硕士学位论文" }
-    { "D" }
-  if$
-  set.entry.mark
+{ "D" set.entry.mark
   monograph
 }
 
@@ -1763,14 +1982,7 @@
   electronic
 }
 
-FUNCTION {phdthesis}
-{ lang.zh entry.lang =
-    { "博士学位论文" }
-    { "D" }
-  if$
-  set.entry.mark
-  monograph
-}
+FUNCTION {phdthesis} { mastersthesis }
 
 FUNCTION {proceedings}
 { "C" set.entry.mark
@@ -1875,18 +2087,48 @@
   if$
 }
 
+FUNCTION {format.lab.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+  t "others" =
+    { citation.et.al }
+    { t get.str.lang 'name.lang :=
+      name.lang lang.zh = name.lang lang.ja = or
+        { t #1 "{ll}{ff}" format.name$ }
+        { t #1 "{vv~}{ll}" format.name$ }
+      if$
+    }
+  if$
+}
+
 FUNCTION {format.lab.names}
 { 's :=
-  s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
-  t get.str.lang 'name.lang :=
-  name.lang lang.en =
-    { t #1 "{vv~}{ll}" format.name$}
-    { t #1 "{ll}{ff}" format.name$}
-  if$
-  s num.names$ #1 >
-    { bbl.space * citation.et.al * }
-    'skip$
-  if$
+  s #1 format.lab.name 'short.label :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  ""
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr format.lab.name citation.et.al =
+      numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
+        { bbl.space *
+          citation.et.al *
+          #1 'namesleft :=
+        }
+        { nameptr #1 >
+            { namesleft #1 = citation.and "" = not and
+                { citation.and * }
+                { ", " * }
+              if$
+            }
+            'skip$
+          if$
+          s nameptr format.lab.name *
+        }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
 }
 
 FUNCTION {author.key.label}
@@ -1946,7 +2188,8 @@
 }
 
 FUNCTION {calc.short.authors}
-{ type$ "book" =
+{ "" 'short.label :=
+  type$ "book" =
   type$ "inbook" =
   or
     'author.editor.key.label
@@ -1963,6 +2206,10 @@
     }
   if$
   'short.list :=
+  short.label empty$
+    { short.list 'short.label := }
+    'skip$
+  if$
 }
 
 FUNCTION {calc.label}
@@ -1977,6 +2224,16 @@
   if$
   *
   'label :=
+  short.label
+  "("
+  *
+  format.year duplicate$ empty$
+  short.list key field.or.null = or
+     { pop$ "" }
+     'skip$
+  if$
+  *
+  'short.label :=
 }
 
 FUNCTION {sort.language.label}
@@ -1996,6 +2253,7 @@
       if$
     }
   if$
+  #64 +
   int.to.chr$
 }
 
@@ -2062,7 +2320,7 @@
         { author sort.format.names }
       if$
     }
-    { key sortify }
+    { key }
   if$
 }
 
@@ -2078,7 +2336,7 @@
         { author sort.format.names }
       if$
     }
-    { key sortify }
+    { key }
   if$
 }
 
@@ -2094,7 +2352,7 @@
         { author sort.format.names }
       if$
     }
-    { key sortify }
+    { key }
   if$
 }
 
@@ -2110,7 +2368,7 @@
         { editor sort.format.names }
       if$
     }
-    { key sortify }
+    { key }
   if$
 }
 
@@ -2124,6 +2382,8 @@
   "    "
   *
   sort.language.label
+  "    "
+  *
   type$ "book" =
   type$ "inbook" =
   or
@@ -2166,13 +2426,13 @@
 }
 
 FUNCTION {forward.pass}
-{ last.label label =
+{ last.label short.label =
     { last.extra.num #1 + 'last.extra.num :=
       last.extra.num int.to.chr$ 'extra.label :=
     }
     { "a" chr.to.int$ 'last.extra.num :=
       "" 'extra.label :=
-      label 'last.label :=
+      short.label 'last.label :=
     }
   if$
   number.label #1 + 'number.label :=
@@ -2204,6 +2464,14 @@
   if$
   "\begin{thebibliography}{" number.label int.to.str$ * "}" *
   write$ newline$
+  terms.in.macro
+    { "\providecommand{\biband}{和}"
+      write$ newline$
+      "\providecommand{\bibetal}{等}"
+      write$ newline$
+    }
+    'skip$
+  if$
   "\providecommand{\natexlab}[1]{#1}"
   write$ newline$
   "\providecommand{\url}[1]{#1}"

Modified: trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-bachelor.bst	2020-09-09 20:57:31 UTC (rev 56305)
@@ -21,9 +21,14 @@
 %% version 2005/12/01 or later.
 %% -------------------------------------------------------------------
 INTEGERS {
+  citation.et.al.min
+  citation.et.al.use.first
+  bibliography.et.al.min
+  bibliography.et.al.use.first
   uppercase.name
-  max.num.authors
-  period.between.author.year
+  terms.in.macro
+  year.after.author
+  period.after.author
   sentence.case.title
   link.title
   title.in.journal
@@ -32,7 +37,7 @@
   show.medium.type
   slash.for.extraction
   in.booktitle
-  abbreviate.journal
+  short.journal
   italic.journal
   bold.journal.volume
   show.missing.address.publisher
@@ -47,8 +52,14 @@
 
 FUNCTION {load.config}
 {
+  #2 'citation.et.al.min :=
+  #1 'citation.et.al.use.first :=
+  #4 'bibliography.et.al.min :=
+  #3 'bibliography.et.al.use.first :=
   #1 'uppercase.name :=
-  #3 'max.num.authors :=
+  #0 'terms.in.macro :=
+  #0 'year.after.author :=
+  #1 'period.after.author :=
   #1 'sentence.case.title :=
   #0 'link.title :=
   #1 'title.in.journal :=
@@ -57,7 +68,7 @@
   #1 'show.medium.type :=
   #1 'slash.for.extraction :=
   #0 'in.booktitle :=
-  #0 'abbreviate.journal :=
+  #0 'short.journal :=
   #0 'italic.journal :=
   #0 'bold.journal.volume :=
   #0 'show.missing.address.publisher :=
@@ -80,11 +91,15 @@
     edition
     editor
     eprint
+    eprinttype
     howpublished
     institution
     journal
+    journaltitle
     key
+    langid
     language
+    location
     mark
     medium
     note
@@ -94,6 +109,7 @@
     publisher
     school
     series
+    shortjournal
     title
     translation
     translator
@@ -103,7 +119,7 @@
     year
   }
   { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
-  { label extra.label sort.label short.list entry.mark entry.url }
+  { label extra.label sort.label short.label short.list entry.mark entry.url }
 
 INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
 
@@ -138,6 +154,9 @@
   if$
 }
 
+FUNCTION {bbl.and}
+{ "" }
+
 FUNCTION {bbl.et.al}
 { entry.lang lang.zh =
     { "等" }
@@ -153,8 +172,19 @@
   if$
 }
 
+FUNCTION {citation.and}
+{ terms.in.macro
+    { "{\biband}" }
+    'bbl.and
+  if$
+}
+
 FUNCTION {citation.et.al}
-{ bbl.et.al }
+{ terms.in.macro
+    { "{\bibetal}" }
+    'bbl.et.al
+  if$
+}
 
 FUNCTION {bbl.colon} { ": " }
 
@@ -449,16 +479,27 @@
   get.str.lang
 }
 
+STRINGS { entry.langid }
+
 FUNCTION {set.entry.lang}
-{ language empty$
+{ "" 'entry.langid :=
+  language empty$ not
+    { language 'entry.langid := }
+    'skip$
+  if$
+  langid empty$ not
+    { langid 'entry.langid := }
+    'skip$
+  if$
+  entry.langid empty$
     { check.entry.lang }
-    { language "english" = language "american" = or language "british" = or
+    { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
         { lang.en }
-        { language "chinese" =
+        { entry.langid "chinese" =
             { lang.zh }
-            { language "japanese" =
+            { entry.langid "japanese" =
                 { lang.ja }
-                { language "russian" =
+                { entry.langid "russian" =
                     { lang.ru }
                     { check.entry.lang }
                   if$
@@ -484,6 +525,25 @@
 
 INTEGERS { nameptr namesleft numnames name.lang }
 
+FUNCTION {format.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+  t "others" =
+    { bbl.et.al }
+    { t get.str.lang 'name.lang :=
+      name.lang lang.en =
+        { t #1 "{vv~}{ll}{~f{~}}" format.name$
+          uppercase.name
+            { "u" change.case$ }
+            'skip$
+          if$
+          t #1 "{, jj}" format.name$ *
+        }
+        { t #1 "{ll}{ff}" format.name$ }
+      if$
+    }
+  if$
+}
+
 FUNCTION {format.names}
 { 's :=
   #1 'nameptr :=
@@ -491,31 +551,21 @@
   ""
   numnames 'namesleft :=
     { namesleft #0 > }
-    { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
-      nameptr #1 >
-        { ", " * }
-        'skip$
-      if$
-      nameptr max.num.authors >
-        { bbl.et.al *
+    { s nameptr format.name bbl.et.al =
+      numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
+        { ", " *
+          bbl.et.al *
           #1 'namesleft :=
         }
-        { t "others" =
-            { bbl.et.al * }
-            { t get.str.lang 'name.lang :=
-              name.lang lang.en =
-                { t #1 "{vv~}{ll}{~f{~}}" format.name$
-                  uppercase.name
-                    { "u" change.case$ }
-                    'skip$
-                  if$
-                  t #1 "{, jj}" format.name$ *
-                }
-                { t #1 "{ll}{ff}" format.name$ }
+        { nameptr #1 >
+            { namesleft #1 = bbl.and "" = not and
+                { bbl.and * }
+                { ", " * }
               if$
-              *
             }
+            'skip$
           if$
+          s nameptr format.name *
         }
       if$
       nameptr #1 + 'nameptr :=
@@ -909,18 +959,38 @@
 }
 
 FUNCTION {format.journal}
-{ journal empty$ not
-    { journal
-      abbreviate.journal
-        'abbreviate
-        'skip$
+{ ""
+  short.journal
+    { shortjournal empty$ not
+        { shortjournal * }
+        { journal empty$ not
+            { journal * abbreviate }
+            { journaltitle empty$ not
+                { journaltitle * abbreviate }
+                'skip$
+              if$
+            }
+          if$
+        }
       if$
-      italic.journal entry.lang lang.en = and
+    }
+    { journal empty$ not
+        { journal * }
+        { journaltitle empty$ not
+            { journaltitle * }
+            'skip$
+          if$
+        }
+      if$
+    }
+  if$
+  duplicate$ empty$ not
+    { italic.journal entry.lang lang.en = and
         'italicize
         'skip$
       if$
     }
-    { "" }
+    'skip$
   if$
 }
 
@@ -953,7 +1023,7 @@
       'entry.mark :=
       space.before.mark
         { " [" entry.mark * "]" * }
-        { "\allowbreak[" entry.mark * "]" * }
+        { "[" entry.mark * "]" * }
       if$
     }
     { "" }
@@ -1022,8 +1092,15 @@
 
 FUNCTION {format.address.publisher}
 { address empty$ not
-    { address
-      format.publisher empty$ not
+    { address }
+    { location empty$ not
+        { location }
+        { "" }
+      if$
+    }
+  if$
+  duplicate$ empty$ not
+    { format.publisher empty$ not
         { bbl.colon * format.publisher * }
         { entry.is.electronic not show.missing.address.publisher and
             { bbl.colon * bbl.sine.nomine * }
@@ -1032,7 +1109,8 @@
         }
       if$
     }
-    { entry.is.electronic not show.missing.address.publisher and
+    { pop$
+      entry.is.electronic not show.missing.address.publisher and
         { format.publisher empty$ not
             { bbl.sine.loco bbl.colon * format.publisher * }
             { bbl.sine.loco.sine.nomine }
@@ -1103,10 +1181,94 @@
   if$
 }
 
+FUNCTION {extract.before.slash}
+{ duplicate$ empty$
+    { pop$ "" }
+    { 's :=
+      #1 'charptr :=
+      s text.length$ #1 + 'len :=
+        { charptr len <
+          s charptr #1 substring$ "/" = not
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+      s #1 charptr #1 - substring$
+    }
+  if$
+}
+
+FUNCTION {extract.after.slash}
+{ duplicate$ empty$
+    { pop$ "" }
+    { 's :=
+      #1 'charptr :=
+      s text.length$ #1 + 'len :=
+        { charptr len <
+          s charptr #1 substring$ "-" = not
+          and
+          s charptr #1 substring$ "/" = not
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+        { charptr len <
+          s charptr #1 substring$ "-" =
+          s charptr #1 substring$ "/" =
+          or
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+      s charptr global.max$ substring$
+    }
+  if$
+}
+
+FUNCTION {contains.slash}
+{ duplicate$ empty$
+    { pop$ #0 }
+    { 's :=
+        { s empty$ not
+          s #1 #1 substring$ "-" = not
+          and
+          s #1 #1 substring$ "/" = not
+          and
+        }
+        { s #2 global.max$ substring$ 's := }
+      while$
+      s empty$ not
+    }
+  if$
+}
+
 FUNCTION {format.year}
 { year empty$ not
-    { year extract.before.dash }
+    { year extract.before.slash extra.label * }
     { date empty$ not
+        { date extract.before.dash extra.label * }
+        { "empty year in " cite$ * warning$
+          urldate empty$ not
+            { "[" urldate extract.before.dash * extra.label * "]" * }
+            { "" }
+          if$
+        }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.periodical.year}
+{ year empty$ not
+    { year extract.before.slash
+      "--" *
+      year extract.after.slash
+      duplicate$ empty$
+        'pop$
+        { * }
+      if$
+    }
+    { date empty$ not
         { date extract.before.dash }
         { "empty year in " cite$ * warning$
           urldate empty$ not
@@ -1117,7 +1279,6 @@
       if$
     }
   if$
-  extra.label *
 }
 
 FUNCTION {format.date}
@@ -1124,7 +1285,9 @@
 { type$ "patent" = type$ "newspaper" = or
   date empty$ not and
     { date }
-    { year }
+    { year field.or.null
+      extra.label *
+    }
   if$
 }
 
@@ -1210,7 +1373,7 @@
 
 FUNCTION {format.periodical.year.volume.number}
 { year empty$ not
-    { year extract.before.dash }
+    { year extract.before.slash }
     { "empty year in periodical " cite$ * warning$ }
   if$
   volume empty$ not
@@ -1221,26 +1384,22 @@
     { "\penalty0 (" * number extract.before.dash * ")" * }
     'skip$
   if$
-  year contains.dash
-    { "--" *
-      year extract.after.dash empty$
-      volume extract.after.dash empty$ and
-      number extract.after.dash empty$ and not
-        { year extract.after.dash empty$ not
-            { year extract.after.dash * }
-            { year extract.before.dash * }
-          if$
-          volume empty$ not
-            { ", " * volume extract.after.dash * }
-            'skip$
-          if$
-          number empty$ not
-            { "\penalty0 (" * number extract.after.dash * ")" * }
-            'skip$
-          if$
-        }
+  "--" *
+  year extract.after.slash empty$
+  volume extract.after.dash empty$ and
+  number extract.after.dash empty$ and not
+    { year extract.after.slash empty$ not
+        { year extract.after.slash * }
+        { year extract.before.slash * }
+      if$
+      volume empty$ not
+        { ", " * volume extract.after.dash * }
         'skip$
       if$
+      number empty$ not
+        { "\penalty0 (" * number extract.after.dash * ")" * }
+        'skip$
+      if$
     }
     'skip$
   if$
@@ -1381,11 +1540,22 @@
 }
 
 FUNCTION {format.eprint}
-{ ""
-  archivePrefix empty$ not
-    { archivePrefix * ": " *
-      "\eprint{https://" *
-      archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+{ eprinttype empty$ not
+    { eprinttype }
+    { archivePrefix empty$ not
+        { archivePrefix }
+        { "" }
+      if$
+    }
+  if$
+  's :=
+  s empty$ not
+    { s ": \eprint{" *
+      url empty$ not
+        { url }
+        { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
+      if$
+      * "}{" *
       eprint * "}" *
     }
     { eprint }
@@ -1456,6 +1626,15 @@
     }
   if$
   output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.series.vol.num.title "title" output.check
   "M" set.entry.mark
@@ -1466,7 +1645,10 @@
   format.edition output
   new.block
   format.address.publisher output
-  format.year "year" output.check
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1481,6 +1663,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.title "title" output.check
   "M" set.entry.mark
@@ -1495,7 +1686,10 @@
   format.edition output
   new.block
   format.address.publisher output
-  format.year "year" output.check
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.extracted.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1510,6 +1704,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.title "title" output.check
   "J" set.entry.mark
@@ -1518,7 +1721,10 @@
   format.periodical.year.volume.number output
   new.block
   format.address.publisher output
-  format.date "year" output.check
+  year.after.author not
+    { format.periodical.year "year" output.check }
+    'skip$
+  if$
   format.urldate "" output.after
   output.url
   output.doi
@@ -1532,6 +1738,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   title.in.journal
     { format.title "title" output.check
@@ -1542,7 +1757,10 @@
     'skip$
   if$
   format.journal "journal" output.check
-  format.date "year" output.check
+  year.after.author not
+    { format.date "year" output.check }
+    'skip$
+  if$
   format.journal.volume output
   format.journal.number "" output.after
   format.journal.pages "" output.after
@@ -1559,6 +1777,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.title "title" output.check
   "P" set.entry.mark
@@ -1581,6 +1808,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.series.vol.num.title "title" output.check
   "EB" set.entry.mark
@@ -1587,8 +1823,12 @@
   format.mark "" output.after
   new.block
   format.address.publisher output
-  date empty$
-    { format.date output }
+  year.after.author not
+    { date empty$
+        { format.date output }
+        'skip$
+      if$
+    }
     'skip$
   if$
   format.pages bbl.colon output.after
@@ -1615,6 +1855,15 @@
     }
   if$
   output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   title.in.journal
     { format.series.vol.num.title "title" output.check
@@ -1629,7 +1878,10 @@
   format.edition output
   new.block
   output.eprint
-  format.year "year" output.check
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1649,7 +1901,8 @@
                 'preprint
                 { entry.is.electronic
                     'electronic
-                    { "Z" set.entry.mark
+                    {
+                      "Z" set.entry.mark
                       monograph
                     }
                   if$
@@ -1824,18 +2077,48 @@
   if$
 }
 
+FUNCTION {format.lab.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+  t "others" =
+    { citation.et.al }
+    { t get.str.lang 'name.lang :=
+      name.lang lang.zh = name.lang lang.ja = or
+        { t #1 "{ll}{ff}" format.name$ }
+        { t #1 "{vv~}{ll}" format.name$ }
+      if$
+    }
+  if$
+}
+
 FUNCTION {format.lab.names}
 { 's :=
-  s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
-  t get.str.lang 'name.lang :=
-  name.lang lang.en =
-    { t #1 "{vv~}{ll}" format.name$}
-    { t #1 "{ll}{ff}" format.name$}
-  if$
-  s num.names$ #1 >
-    { bbl.space * citation.et.al * }
-    'skip$
-  if$
+  s #1 format.lab.name 'short.label :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  ""
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr format.lab.name citation.et.al =
+      numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
+        { bbl.space *
+          citation.et.al *
+          #1 'namesleft :=
+        }
+        { nameptr #1 >
+            { namesleft #1 = citation.and "" = not and
+                { citation.and * }
+                { ", " * }
+              if$
+            }
+            'skip$
+          if$
+          s nameptr format.lab.name *
+        }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
 }
 
 FUNCTION {author.key.label}
@@ -1895,7 +2178,8 @@
 }
 
 FUNCTION {calc.short.authors}
-{ type$ "book" =
+{ "" 'short.label :=
+  type$ "book" =
   type$ "inbook" =
   or
     'author.editor.key.label
@@ -1912,6 +2196,10 @@
     }
   if$
   'short.list :=
+  short.label empty$
+    { short.list 'short.label := }
+    'skip$
+  if$
 }
 
 FUNCTION {calc.label}
@@ -1926,6 +2214,16 @@
   if$
   *
   'label :=
+  short.label
+  "("
+  *
+  format.year duplicate$ empty$
+  short.list key field.or.null = or
+     { pop$ "" }
+     'skip$
+  if$
+  *
+  'short.label :=
 }
 
 INTEGERS { seq.num }
@@ -1969,13 +2267,13 @@
 }
 
 FUNCTION {forward.pass}
-{ last.label label =
+{ last.label short.label =
     { last.extra.num #1 + 'last.extra.num :=
       last.extra.num int.to.chr$ 'extra.label :=
     }
     { "a" chr.to.int$ 'last.extra.num :=
       "" 'extra.label :=
-      label 'last.label :=
+      short.label 'last.label :=
     }
   if$
   number.label #1 + 'number.label :=
@@ -2007,6 +2305,14 @@
   if$
   "\begin{thebibliography}{" number.label int.to.str$ * "}" *
   write$ newline$
+  terms.in.macro
+    { "\providecommand{\biband}{和}"
+      write$ newline$
+      "\providecommand{\bibetal}{等}"
+      write$ newline$
+    }
+    'skip$
+  if$
   "\providecommand{\natexlab}[1]{#1}"
   write$ newline$
   "\providecommand{\url}[1]{#1}"

Modified: trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/bibtex/bst/thuthesis/thuthesis-numeric.bst	2020-09-09 20:57:31 UTC (rev 56305)
@@ -4,7 +4,7 @@
 %%
 %% The original source files were:
 %%
-%% gbt7714.dtx  (with options: `thu,2005,numerical')
+%% gbt7714.dtx  (with options: `thu,2015,numerical')
 %% -------------------------------------------------------------------
 %% GB/T 7714-2015 BibTeX Style
 %% https://github.com/CTeX-org/gbt7714-bibtex-style
@@ -21,9 +21,14 @@
 %% version 2005/12/01 or later.
 %% -------------------------------------------------------------------
 INTEGERS {
+  citation.et.al.min
+  citation.et.al.use.first
+  bibliography.et.al.min
+  bibliography.et.al.use.first
   uppercase.name
-  max.num.authors
-  period.between.author.year
+  terms.in.macro
+  year.after.author
+  period.after.author
   sentence.case.title
   link.title
   title.in.journal
@@ -32,7 +37,7 @@
   show.medium.type
   slash.for.extraction
   in.booktitle
-  abbreviate.journal
+  short.journal
   italic.journal
   bold.journal.volume
   show.missing.address.publisher
@@ -47,17 +52,23 @@
 
 FUNCTION {load.config}
 {
+  #2 'citation.et.al.min :=
+  #1 'citation.et.al.use.first :=
+  #4 'bibliography.et.al.min :=
+  #3 'bibliography.et.al.use.first :=
   #0 'uppercase.name :=
-  #3 'max.num.authors :=
+  #0 'terms.in.macro :=
+  #0 'year.after.author :=
+  #1 'period.after.author :=
   #1 'sentence.case.title :=
   #0 'link.title :=
   #1 'title.in.journal :=
   #1 'show.mark :=
-  #1 'space.before.mark :=
+  #0 'space.before.mark :=
   #1 'show.medium.type :=
   #1 'slash.for.extraction :=
   #0 'in.booktitle :=
-  #0 'abbreviate.journal :=
+  #0 'short.journal :=
   #0 'italic.journal :=
   #0 'bold.journal.volume :=
   #0 'show.missing.address.publisher :=
@@ -64,7 +75,7 @@
   #0 'only.start.page :=
   #1 'show.urldate :=
   #1 'show.url :=
-  #0 'show.doi :=
+  #1 'show.doi :=
   #0 'show.preprint :=
   #0 'show.note :=
   #0 'show.english.translation :=
@@ -80,11 +91,15 @@
     edition
     editor
     eprint
+    eprinttype
     howpublished
     institution
     journal
+    journaltitle
     key
+    langid
     language
+    location
     mark
     medium
     note
@@ -94,6 +109,7 @@
     publisher
     school
     series
+    shortjournal
     title
     translation
     translator
@@ -103,7 +119,7 @@
     year
   }
   { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
-  { label extra.label sort.label short.list entry.mark entry.url }
+  { label extra.label sort.label short.label short.list entry.mark entry.url }
 
 INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
 
@@ -138,6 +154,9 @@
   if$
 }
 
+FUNCTION {bbl.and}
+{ "" }
+
 FUNCTION {bbl.et.al}
 { entry.lang lang.zh =
     { "等" }
@@ -153,14 +172,25 @@
   if$
 }
 
+FUNCTION {citation.and}
+{ terms.in.macro
+    { "{\biband}" }
+    'bbl.and
+  if$
+}
+
 FUNCTION {citation.et.al}
-{ bbl.et.al }
+{ terms.in.macro
+    { "{\bibetal}" }
+    'bbl.et.al
+  if$
+}
 
 FUNCTION {bbl.colon} { ": " }
 
-FUNCTION {bbl.wide.space} { "\ " }
+FUNCTION {bbl.wide.space} { "\quad " }
 
-FUNCTION {bbl.slash} { " // " }
+FUNCTION {bbl.slash} { "// " }
 
 FUNCTION {bbl.sine.loco}
 { entry.lang lang.zh =
@@ -449,16 +479,27 @@
   get.str.lang
 }
 
+STRINGS { entry.langid }
+
 FUNCTION {set.entry.lang}
-{ language empty$
+{ "" 'entry.langid :=
+  language empty$ not
+    { language 'entry.langid := }
+    'skip$
+  if$
+  langid empty$ not
+    { langid 'entry.langid := }
+    'skip$
+  if$
+  entry.langid empty$
     { check.entry.lang }
-    { language "english" = language "american" = or language "british" = or
+    { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
         { lang.en }
-        { language "chinese" =
+        { entry.langid "chinese" =
             { lang.zh }
-            { language "japanese" =
+            { entry.langid "japanese" =
                 { lang.ja }
-                { language "russian" =
+                { entry.langid "russian" =
                     { lang.ru }
                     { check.entry.lang }
                   if$
@@ -484,6 +525,25 @@
 
 INTEGERS { nameptr namesleft numnames name.lang }
 
+FUNCTION {format.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+  t "others" =
+    { bbl.et.al }
+    { t get.str.lang 'name.lang :=
+      name.lang lang.en =
+        { t #1 "{vv~}{ll}{~f{~}}" format.name$
+          uppercase.name
+            { "u" change.case$ }
+            'skip$
+          if$
+          t #1 "{, jj}" format.name$ *
+        }
+        { t #1 "{ll}{ff}" format.name$ }
+      if$
+    }
+  if$
+}
+
 FUNCTION {format.names}
 { 's :=
   #1 'nameptr :=
@@ -491,31 +551,21 @@
   ""
   numnames 'namesleft :=
     { namesleft #0 > }
-    { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
-      nameptr #1 >
-        { ", " * }
-        'skip$
-      if$
-      nameptr max.num.authors >
-        { bbl.et.al *
+    { s nameptr format.name bbl.et.al =
+      numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
+        { ", " *
+          bbl.et.al *
           #1 'namesleft :=
         }
-        { t "others" =
-            { bbl.et.al * }
-            { t get.str.lang 'name.lang :=
-              name.lang lang.en =
-                { t #1 "{vv~}{ll}{~f{~}}" format.name$
-                  uppercase.name
-                    { "u" change.case$ }
-                    'skip$
-                  if$
-                  t #1 "{, jj}" format.name$ *
-                }
-                { t #1 "{ll}{ff}" format.name$ }
+        { nameptr #1 >
+            { namesleft #1 = bbl.and "" = not and
+                { bbl.and * }
+                { ", " * }
               if$
-              *
             }
+            'skip$
           if$
+          s nameptr format.name *
         }
       if$
       nameptr #1 + 'nameptr :=
@@ -909,18 +959,38 @@
 }
 
 FUNCTION {format.journal}
-{ journal empty$ not
-    { journal
-      abbreviate.journal
-        'abbreviate
-        'skip$
+{ ""
+  short.journal
+    { shortjournal empty$ not
+        { shortjournal * }
+        { journal empty$ not
+            { journal * abbreviate }
+            { journaltitle empty$ not
+                { journaltitle * abbreviate }
+                'skip$
+              if$
+            }
+          if$
+        }
       if$
-      italic.journal entry.lang lang.en = and
+    }
+    { journal empty$ not
+        { journal * }
+        { journaltitle empty$ not
+            { journaltitle * }
+            'skip$
+          if$
+        }
+      if$
+    }
+  if$
+  duplicate$ empty$ not
+    { italic.journal entry.lang lang.en = and
         'italicize
         'skip$
       if$
     }
-    { "" }
+    'skip$
   if$
 }
 
@@ -937,9 +1007,6 @@
 
 FUNCTION {format.mark}
 { show.mark
-  type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
-  medium empty$ not or entry.is.electronic or
-  and
     { entry.mark
       show.medium.type
         { medium empty$ not
@@ -956,7 +1023,7 @@
       'entry.mark :=
       space.before.mark
         { " [" entry.mark * "]" * }
-        { "\allowbreak[" entry.mark * "]" * }
+        { "[" entry.mark * "]" * }
       if$
     }
     { "" }
@@ -1025,8 +1092,15 @@
 
 FUNCTION {format.address.publisher}
 { address empty$ not
-    { address
-      format.publisher empty$ not
+    { address }
+    { location empty$ not
+        { location }
+        { "" }
+      if$
+    }
+  if$
+  duplicate$ empty$ not
+    { format.publisher empty$ not
         { bbl.colon * format.publisher * }
         { entry.is.electronic not show.missing.address.publisher and
             { bbl.colon * bbl.sine.nomine * }
@@ -1035,7 +1109,8 @@
         }
       if$
     }
-    { entry.is.electronic not show.missing.address.publisher and
+    { pop$
+      entry.is.electronic not show.missing.address.publisher and
         { format.publisher empty$ not
             { bbl.sine.loco bbl.colon * format.publisher * }
             { bbl.sine.loco.sine.nomine }
@@ -1106,10 +1181,94 @@
   if$
 }
 
+FUNCTION {extract.before.slash}
+{ duplicate$ empty$
+    { pop$ "" }
+    { 's :=
+      #1 'charptr :=
+      s text.length$ #1 + 'len :=
+        { charptr len <
+          s charptr #1 substring$ "/" = not
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+      s #1 charptr #1 - substring$
+    }
+  if$
+}
+
+FUNCTION {extract.after.slash}
+{ duplicate$ empty$
+    { pop$ "" }
+    { 's :=
+      #1 'charptr :=
+      s text.length$ #1 + 'len :=
+        { charptr len <
+          s charptr #1 substring$ "-" = not
+          and
+          s charptr #1 substring$ "/" = not
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+        { charptr len <
+          s charptr #1 substring$ "-" =
+          s charptr #1 substring$ "/" =
+          or
+          and
+        }
+        { charptr #1 + 'charptr := }
+      while$
+      s charptr global.max$ substring$
+    }
+  if$
+}
+
+FUNCTION {contains.slash}
+{ duplicate$ empty$
+    { pop$ #0 }
+    { 's :=
+        { s empty$ not
+          s #1 #1 substring$ "-" = not
+          and
+          s #1 #1 substring$ "/" = not
+          and
+        }
+        { s #2 global.max$ substring$ 's := }
+      while$
+      s empty$ not
+    }
+  if$
+}
+
 FUNCTION {format.year}
 { year empty$ not
-    { year extract.before.dash }
+    { year extract.before.slash extra.label * }
     { date empty$ not
+        { date extract.before.dash extra.label * }
+        { "empty year in " cite$ * warning$
+          urldate empty$ not
+            { "[" urldate extract.before.dash * extra.label * "]" * }
+            { "" }
+          if$
+        }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.periodical.year}
+{ year empty$ not
+    { year extract.before.slash
+      "--" *
+      year extract.after.slash
+      duplicate$ empty$
+        'pop$
+        { * }
+      if$
+    }
+    { date empty$ not
         { date extract.before.dash }
         { "empty year in " cite$ * warning$
           urldate empty$ not
@@ -1120,7 +1279,6 @@
       if$
     }
   if$
-  extra.label *
 }
 
 FUNCTION {format.date}
@@ -1127,7 +1285,9 @@
 { type$ "patent" = type$ "newspaper" = or
   date empty$ not and
     { date }
-    { year }
+    { year field.or.null
+      extra.label *
+    }
   if$
 }
 
@@ -1213,7 +1373,7 @@
 
 FUNCTION {format.periodical.year.volume.number}
 { year empty$ not
-    { year extract.before.dash }
+    { year extract.before.slash }
     { "empty year in periodical " cite$ * warning$ }
   if$
   volume empty$ not
@@ -1224,26 +1384,22 @@
     { "\penalty0 (" * number extract.before.dash * ")" * }
     'skip$
   if$
-  year contains.dash
-    { "--" *
-      year extract.after.dash empty$
-      volume extract.after.dash empty$ and
-      number extract.after.dash empty$ and not
-        { year extract.after.dash empty$ not
-            { year extract.after.dash * }
-            { year extract.before.dash * }
-          if$
-          volume empty$ not
-            { ", " * volume extract.after.dash * }
-            'skip$
-          if$
-          number empty$ not
-            { "\penalty0 (" * number extract.after.dash * ")" * }
-            'skip$
-          if$
-        }
+  "--" *
+  year extract.after.slash empty$
+  volume extract.after.dash empty$ and
+  number extract.after.dash empty$ and not
+    { year extract.after.slash empty$ not
+        { year extract.after.slash * }
+        { year extract.before.slash * }
+      if$
+      volume empty$ not
+        { ", " * volume extract.after.dash * }
         'skip$
       if$
+      number empty$ not
+        { "\penalty0 (" * number extract.after.dash * ")" * }
+        'skip$
+      if$
     }
     'skip$
   if$
@@ -1384,11 +1540,22 @@
 }
 
 FUNCTION {format.eprint}
-{ ""
-  archivePrefix empty$ not
-    { archivePrefix * ": " *
-      "\eprint{https://" *
-      archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+{ eprinttype empty$ not
+    { eprinttype }
+    { archivePrefix empty$ not
+        { archivePrefix }
+        { "" }
+      if$
+    }
+  if$
+  's :=
+  s empty$ not
+    { s ": \eprint{" *
+      url empty$ not
+        { url }
+        { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
+      if$
+      * "}{" *
       eprint * "}" *
     }
     { eprint }
@@ -1459,6 +1626,15 @@
     }
   if$
   output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.series.vol.num.title "title" output.check
   "M" set.entry.mark
@@ -1469,7 +1645,10 @@
   format.edition output
   new.block
   format.address.publisher output
-  format.year "year" output.check
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1484,6 +1663,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.title "title" output.check
   "M" set.entry.mark
@@ -1498,7 +1686,10 @@
   format.edition output
   new.block
   format.address.publisher output
-  format.year "year" output.check
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.extracted.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1513,6 +1704,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.title "title" output.check
   "J" set.entry.mark
@@ -1521,7 +1721,10 @@
   format.periodical.year.volume.number output
   new.block
   format.address.publisher output
-  format.date "year" output.check
+  year.after.author not
+    { format.periodical.year "year" output.check }
+    'skip$
+  if$
   format.urldate "" output.after
   output.url
   output.doi
@@ -1535,6 +1738,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   title.in.journal
     { format.title "title" output.check
@@ -1545,7 +1757,10 @@
     'skip$
   if$
   format.journal "journal" output.check
-  format.date "year" output.check
+  year.after.author not
+    { format.date "year" output.check }
+    'skip$
+  if$
   format.journal.volume output
   format.journal.number "" output.after
   format.journal.pages "" output.after
@@ -1562,6 +1777,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.title "title" output.check
   "P" set.entry.mark
@@ -1584,6 +1808,15 @@
   output.translation
   format.authors output
   author format.key output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   format.series.vol.num.title "title" output.check
   "EB" set.entry.mark
@@ -1590,8 +1823,12 @@
   format.mark "" output.after
   new.block
   format.address.publisher output
-  date empty$
-    { format.date output }
+  year.after.author not
+    { date empty$
+        { format.date output }
+        'skip$
+      if$
+    }
     'skip$
   if$
   format.pages bbl.colon output.after
@@ -1618,6 +1855,15 @@
     }
   if$
   output
+  year.after.author
+    { period.after.author
+        'new.sentence
+        'skip$
+      if$
+      format.year "year" output.check
+    }
+    'skip$
+  if$
   new.block
   title.in.journal
     { format.series.vol.num.title "title" output.check
@@ -1632,7 +1878,10 @@
   format.edition output
   new.block
   output.eprint
-  format.year "year" output.check
+  year.after.author not
+    { format.year "year" output.check }
+    'skip$
+  if$
   format.pages bbl.colon output.after
   format.urldate "" output.after
   output.url
@@ -1652,7 +1901,8 @@
                 'preprint
                 { entry.is.electronic
                     'electronic
-                    { "Z" set.entry.mark
+                    {
+                      "Z" set.entry.mark
                       monograph
                     }
                   if$
@@ -1708,11 +1958,7 @@
 FUNCTION {manual} { monograph }
 
 FUNCTION {mastersthesis}
-{ lang.zh entry.lang =
-    { "硕士学位论文" }
-    { "D" }
-  if$
-  set.entry.mark
+{ "D" set.entry.mark
   monograph
 }
 
@@ -1726,14 +1972,7 @@
   electronic
 }
 
-FUNCTION {phdthesis}
-{ lang.zh entry.lang =
-    { "博士学位论文" }
-    { "D" }
-  if$
-  set.entry.mark
-  monograph
-}
+FUNCTION {phdthesis} { mastersthesis }
 
 FUNCTION {proceedings}
 { "C" set.entry.mark
@@ -1838,18 +2077,48 @@
   if$
 }
 
+FUNCTION {format.lab.name}
+{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+  t "others" =
+    { citation.et.al }
+    { t get.str.lang 'name.lang :=
+      name.lang lang.zh = name.lang lang.ja = or
+        { t #1 "{ll}{ff}" format.name$ }
+        { t #1 "{vv~}{ll}" format.name$ }
+      if$
+    }
+  if$
+}
+
 FUNCTION {format.lab.names}
 { 's :=
-  s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
-  t get.str.lang 'name.lang :=
-  name.lang lang.en =
-    { t #1 "{vv~}{ll}" format.name$}
-    { t #1 "{ll}{ff}" format.name$}
-  if$
-  s num.names$ #1 >
-    { bbl.space * citation.et.al * }
-    'skip$
-  if$
+  s #1 format.lab.name 'short.label :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  ""
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr format.lab.name citation.et.al =
+      numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
+        { bbl.space *
+          citation.et.al *
+          #1 'namesleft :=
+        }
+        { nameptr #1 >
+            { namesleft #1 = citation.and "" = not and
+                { citation.and * }
+                { ", " * }
+              if$
+            }
+            'skip$
+          if$
+          s nameptr format.lab.name *
+        }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
 }
 
 FUNCTION {author.key.label}
@@ -1909,7 +2178,8 @@
 }
 
 FUNCTION {calc.short.authors}
-{ type$ "book" =
+{ "" 'short.label :=
+  type$ "book" =
   type$ "inbook" =
   or
     'author.editor.key.label
@@ -1926,6 +2196,10 @@
     }
   if$
   'short.list :=
+  short.label empty$
+    { short.list 'short.label := }
+    'skip$
+  if$
 }
 
 FUNCTION {calc.label}
@@ -1940,6 +2214,16 @@
   if$
   *
   'label :=
+  short.label
+  "("
+  *
+  format.year duplicate$ empty$
+  short.list key field.or.null = or
+     { pop$ "" }
+     'skip$
+  if$
+  *
+  'short.label :=
 }
 
 INTEGERS { seq.num }
@@ -1983,13 +2267,13 @@
 }
 
 FUNCTION {forward.pass}
-{ last.label label =
+{ last.label short.label =
     { last.extra.num #1 + 'last.extra.num :=
       last.extra.num int.to.chr$ 'extra.label :=
     }
     { "a" chr.to.int$ 'last.extra.num :=
       "" 'extra.label :=
-      label 'last.label :=
+      short.label 'last.label :=
     }
   if$
   number.label #1 + 'number.label :=
@@ -2021,6 +2305,14 @@
   if$
   "\begin{thebibliography}{" number.label int.to.str$ * "}" *
   write$ newline$
+  terms.in.macro
+    { "\providecommand{\biband}{和}"
+      write$ newline$
+      "\providecommand{\bibetal}{等}"
+      write$ newline$
+    }
+    'skip$
+  if$
   "\providecommand{\natexlab}[1]{#1}"
   write$ newline$
   "\providecommand{\url}[1]{#1}"

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/CHANGELOG.md	2020-09-09 20:57:31 UTC (rev 56305)
@@ -6,6 +6,25 @@
 
 ## [Unreleased]
 
+## [v7.0.0] - 2020-09-09
+### Changed
+- 更新 2020 年版目录、插图和附表清单的格式。
+- 更新 2020 年版使用授权说明的内容。
+- 更新 2020 年版参考文献表的格式。
+
+### Added
+- 新增 2020 年版“答辩委员会名单”页。
+- 新增 biblatex 支持。
+- 新增本科生外文系格式的支持。
+
+### Fixed
+- 修正本科生密级的字体。
+- 修正表格的默认字号。
+- 修正参考文献表的行距和段前段后间距。
+- 修正 `\citep` 数字式引用的页码位置。
+- 修改摘要中关键词的格式。
+- 修正封面的语言切换。
+
 ## [v6.1.3] - 2020-07-09
 ### Added
 - 新增选项 `statement-page-style = empty / plain` 同时控制声明的页眉和页脚。
@@ -605,7 +624,8 @@
 
 
 
-[Unreleased]: https://github.com/tuna/thuthesis/compare/v6.1.3...HEAD
+[Unreleased]: https://github.com/tuna/thuthesis/compare/v7.0.0...HEAD
+[v7.0.0]:     https://github.com/tuna/thuthesis/compare/v6.1.3...v7.0.0
 [v6.1.3]:     https://github.com/tuna/thuthesis/compare/v6.1.2...v6.1.3
 [v6.1.2]:     https://github.com/tuna/thuthesis/compare/v6.1.1...v6.1.2
 [v6.1.1]:     https://github.com/tuna/thuthesis/compare/v6.1.0...v6.1.1

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/Makefile	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/Makefile	2020-09-09 20:57:31 UTC (rev 56305)
@@ -54,13 +54,18 @@
 	$(LATEXMK) -pv $(SPINE)
 
 save:
+ifeq ($(target),)
 	bash testfiles/save.sh
+else
+	bash testfiles/save.sh $(target)
+endif
 
-savepdf:
-	bash testfiles/save-pdf.sh
-
 test:
+ifeq ($(target),)
 	l3build check
+else
+	bash testfiles/test.sh $(target)
+endif
 
 clean:
 	$(LATEXMK) -c $(PACKAGE).dtx $(THESIS) $(SPINE)

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/data/abstract.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/abstract.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/abstract.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -49,6 +49,7 @@
   Key words are terms used in a dissertation for indexing, reflecting core
   information of the dissertation. An abstract may contain a maximum of 5 key
   words, with semi-colons used in between to separate one another.
+
   \thusetup{
     keywords* = {TeX, LaTeX, CJK, template, thesis},
   }

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-survey.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -119,7 +119,7 @@
 
 \subsection{Nonlinear Programming}
 
-If at least one of the functions $f(x),g_j(x),j=1,2,\cdots,p$ is nonlinear, then
+If at least one of the functions $f(x),g_j(x),j=1,2,\dots,p$ is nonlinear, then
 SOP is called a \emph{nonlinear programming}.
 
 A large number of classical optimization methods have been developed to treat
@@ -167,7 +167,7 @@
 
 \hfill\textit{Uncertain Programming\/}\quad(\textsl{BaoDing Liu, 2006.2})
 
-\bibliographystyle{plainnat}
+\bibliographystyle{unsrtnat}
 \bibliography{ref/refs,ref/appendix}
 
 \end{survey}

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix-translation.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -81,7 +81,7 @@
 
 
 % 书面翻译的参考文献
-\bibliographystyle{plainnat}
+\bibliographystyle{unsrtnat}
 \bibliography{ref/appendix}
 
 % 也可以使用 thebiliography 环境手写
@@ -98,7 +98,7 @@
 % 书面翻译对应的原文索引
 \begin{translation-index}
   \nocite{salomon1995advanced}
-  \bibliographystyle{plainnat}
+  \bibliographystyle{unsrtnat}
   \bibliography{ref/appendix}
 \end{translation-index}
 

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/appendix.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -15,7 +15,6 @@
 庖丁为文惠君解牛,手之所触,肩之所倚,足之所履,膝之所倚,砉然响然,奏刀騞然,莫
 不中音,合于桑林之舞,乃中经首之会。
 \begin{table}[ht]
-\centering
   \centering
   \caption{这是一个表格例子}
   \label{tab:badtabular3}

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/chap01.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -331,6 +331,85 @@
 运动的中坚人物。他们革除弊政,打击权奸,触犯了宦官和官僚贵族利益,在他们的联合反
 扑下,改革失败了,柳宗元被贬为永州司马。
 
+\section{数学符号和公式}
+
+\subsection{数学符号}
+数学符号应遵循 GB/T 3102.11-1993《物理科学和技术中使用的数学符号》
+(原 GB 3102.11-1993),
+模板中使用 \pkg{unicode-math} 宏包来配置数学符号,
+与 \LaTeX{} 默认的英美国家的符号习惯有所差异:
+\begin{enumerate}
+  \item 大写希腊字母默认为斜体,如 \cs{Delta}:$\Delta$。
+  \item 有限增量符号 $\increment$(U+2206)应使用 \pkg{unicode-math} 宏包提供的
+    \cs{increment} 命令。
+  \item 向量、矩阵和张量要求粗斜体,应使用 \cs{symbf} 命令,
+    如 \verb|\symbf{A}|、\verb|\symbf{\alpha}|。
+  \item 数学常数和特殊函数要求用正体,应使用 \cs{symup} 命令,
+    如 $\symup{\pi} = 3.14\dots$; $\symup{e} = 2.718\dots$,
+  \item 微分号和积分号使用使用正体,比如 $\int f(x) \dif x$。
+\end{enumerate}
+
+关于数学符号更多的用法,参考
+\href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unicode-math.pdf}{\pkg{unicode-math}}
+宏包的使用说明,
+全部数学符号命的令参考
+\href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unimath-symbols.pdf}{\pkg{unimath-symbols}}。
+
+关于量和单位推荐使用
+\href{http://mirrors.ctan.org/macros/latex/contrib/siunitx/siunitx.pdf}{\pkg{siunitx}}
+宏包,比如:
+\SI{6.4e6}{m},
+\SI{9}{\micro\meter},
+\si{kg.m.s^{-1}},
+\SIrange{10}{20}{\degreeCelsius}。
+
+\subsection{数学公式}
+\label{sec:equation}
+
+贝叶斯公式如式~(\ref{equ:chap1:bayes}),其中 $p(y|\vx)$ 为后验;
+$p(\vx)$ 为先验;分母 $p(\vx)$ 为归一化因子。
+\begin{equation}
+\label{equ:chap1:bayes}
+p(y|\vx) = \frac{p(\vx,y)}{p(\vx)}=
+\frac{p(\vx|y)p(y)}{p(\vx)}
+\end{equation}
+
+论文里面公式越多,\TeX{} 就越 happy。再看一个 \pkg{amsmath} 的例子:
+\newcommand{\envert}[1]{\left\lvert#1\right\rvert}
+\begin{equation}\label{detK2}
+\det\mK(t=1,t_1,\dots,t_n)=\sum_{I\in\vn}(-1)^{\envert{I}}
+\prod_{i\in I}t_i\prod_{j\in I}(D_j+\lambda_jt_j)\det\mA
+^{(\lambda)}(\overline{I}|\overline{I})=0.
+\end{equation}
+
+前面定理示例部分列举了很多公式环境,可以说把常见的情况都覆盖了,大家在写公式的时
+候一定要好好看 \pkg{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)\dif x\biggr\}\dif y \\
+ =\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\}\dif y
+\end{multline*}
+
+其实还可以看看这个多级规划:
+\begin{equation}
+  \label{bilevel}
+  \begin{cases}
+    \max_{\bm{x}} F(\bm{x}, y_1^*, y_2^*, \dots, y_m^*) \\
+      \text{subject to:} \\
+      \qquad G(\bm{x}) \le 0 \\
+      \qquad (y_1^*, y_2^*, \dots, y_m^*) \text{ solves problems }
+        (i = 1, 2, \dots, m) \\
+      \qquad
+        \begin{cases}
+          \max_{\bm{x}} f_i(\bm{x}, y_1, y_2, \dots, y_m) \\
+          \text{subject to:} \\
+          \qquad g_i(\bm{x}, y_1, y_2, \dots, y_m) \le 0.
+        \end{cases}
+  \end{cases}
+\end{equation}
+这些跟规划相关的公式都来自于刘宝碇老师《不确定规划》的课件。
+
 \section{定理环境}
 \label{sec:theorem}
 
@@ -497,13 +576,11 @@
 
 \section{参考文献}
 \label{sec:bib}
-当然参考文献可以直接写 \cs{bibitem},虽然费点功夫,但是好控制,各种格式可以自己随意改
-写。
 
 本模板推荐使用 BibTeX,分别提供数字引用(\texttt{thuthesis-numeric.bst})和作
-者年份引用(\texttt{thuthesis-author-year.bst})样式,基本符合学校的参考文献格式
-(如专利等引用未加详细测试)。看看这个例子,关于书的~\cite{tex, companion,
-  ColdSources},还有这些~\cite{Krasnogor2004e, clzs, zjsw},关于杂志
+者年份引用(\texttt{thuthesis-author-year.bst})样式。
+看看这个例子,关于书的~\cite{tex, companion,
+  ColdSources},还有这些~\cite{Krasnogor2004e, clzs, zjsw},关于期刊
 的~\cite{ELIDRISSI94, MELLINGER96, SHELL02},硕士论文~\cite{zhubajie,
   metamori2004},博士论文~\cite{shaheshang, FistSystem01},标准文
 件~\cite{IEEE-1363},会议论文~\cite{DPMG,kocher99},技术报告~\cite{NPB2},电子文
@@ -512,61 +589,6 @@
 \texttt{key=\{pinyin\}} 字段,以便正确进行排序~\cite{cnproceed}。
 另外,如果对参考文献有不如意的地方,请手动修改 \texttt{bbl} 文件。
 
-有时候不想要上标,那么可以这样~\inlinecite{shaheshang},这个非常重要。
+如果需要标出引文页码\cite[42]{tex},引文页码放在方括号外\cite[73]{tex}。
 
-% 有时候一些参考文献没有纸质出处,需要标注 URL。缺省情况下,URL 不会在连字符处断行,
-% 这可能使得用连字符代替空格的网址分行很难看。如果需要,可以将模板类文件中
-% \begin{verbatim}
-% \RequirePackage{hyperref}
-% \end{verbatim}
-% 一行改为:
-% \begin{verbatim}
-% \PassOptionsToPackage{hyphens}{url}
-% \RequirePackage{hyperref}
-% \end{verbatim}
-% 使得连字符处可以断行。更多设置可以参考 \texttt{url} 宏包文档。
-
-\section{公式}
-\label{sec:equation}
-贝叶斯公式如式~(\ref{equ:chap1:bayes}),其中 $p(y|\vx)$ 为后验;
-$p(\vx)$ 为先验;分母 $p(\vx)$ 为归一化因子。
-\begin{equation}
-\label{equ:chap1:bayes}
-p(y|\vx) = \frac{p(\vx,y)}{p(\vx)}=
-\frac{p(\vx|y)p(y)}{p(\vx)}
-\end{equation}
-
-论文里面公式越多,\TeX{} 就越 happy。再看一个 \pkg{amsmath} 的例子:
-\begin{equation}\label{detK2}
-\det\mK(t=1,t_1,\dots,t_n)=\sum_{I\in\vn}(-1)^{\abs{I}}
-\prod_{i\in I}t_i\prod_{j\in I}(D_j+\lambda_jt_j)\det\mA
-^{(\lambda)}(\overline{I}|\overline{I})=0.
-\end{equation}
-
-前面定理示例部分列举了很多公式环境,可以说把常见的情况都覆盖了,大家在写公式的时
-候一定要好好看 \pkg{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)\dif x\biggr\}\dif y \\
- =\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\}\dif y
-\end{multline*}
-
-其实还可以看看这个多级规划:
-\begin{equation}
-  \label{bilevel}
-  \begin{cases}
-    \max_{\bm{x}} F(\bm{x}, y_1^*, y_2^*, \dots, y_m^*) \\
-      \text{subject to:} \\
-      \qquad G(\bm{x}) \le 0 \\
-      \qquad (y_1^*, y_2^*, \dots, y_m^*) \text{ solves problems }
-        (i = 1, 2, \dots, m) \\
-      \qquad
-        \begin{cases}
-          \max_{\bm{x}} f_i(\bm{x}, y_1, y_2, \dots, y_m) \\
-          \text{subject to:} \\
-          \qquad g_i(\bm{x}, y_1, y_2, \dots, y_m) \le 0.
-        \end{cases}
-  \end{cases}
-\end{equation}
-这些跟规划相关的公式都来自于刘宝碇老师《不确定规划》的课件。
+有时候不想要上标,那么可以这样~\inlinecite{shaheshang}。

Added: trunk/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,5 @@
+% !TeX root = ../thuthesis-example.tex
+
+\chapter{指导小组学术评语}
+
+论文提出了……


Property changes on: trunk/Master/texmf-dist/doc/latex/thuthesis/data/comments.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/thuthesis/data/committee.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/committee.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/committee.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,49 @@
+% !TeX root = ../thuthesis-example.tex
+
+\begin{committee}[name={学位论文指导小组、公开评阅人和答辩委员会名单}]
+
+  \newcolumntype{C}[1]{@{}>{\centering\arraybackslash}p{#1}}
+
+  \section*{指导小组名单}
+
+  \begin{center}
+    \begin{tabular}{C{3cm}C{3cm}C{9cm}@{}}
+      李XX & 教授     & 清华大学 \\
+      王XX & 副教授   & 清华大学 \\
+      张XX & 助理教授 & 清华大学 \\
+    \end{tabular}
+  \end{center}
+
+
+  \section*{公开评阅人名单}
+
+  \begin{center}
+    \begin{tabular}{C{3cm}C{3cm}C{9cm}@{}}
+      刘XX & 教授   & 清华大学                    \\
+      陈XX & 副教授 & XXXX大学                    \\
+      杨XX & 研究员 & 中国XXXX科学院XXXXXXX研究所 \\
+    \end{tabular}
+  \end{center}
+
+
+  \section*{答辩委员会名单}
+
+  \begin{center}
+    \begin{tabular}{C{2.75cm}C{2.98cm}C{4.63cm}C{4.63cm}@{}}
+      主席 & 赵XX                  & 教授                    & 清华大学       \\
+      委员 & 刘XX                  & 教授                    & 清华大学       \\
+          & \multirow{2}{*}{杨XX} & \multirow{2}{*}{研究员} & 中国XXXX科学院 \\
+          &                       &                         & XXXXXXX研究所  \\
+          & 黄XX                  & 教授                    & XXXX大学       \\
+          & 周XX                  & 副教授                  & XXXX大学       \\
+      秘书 & 吴XX                  & 助理研究员              & 清华大学       \\
+    \end{tabular}
+  \end{center}
+
+\end{committee}
+
+
+
+% 也可以导入 Word 版转的 PDF 文件
+% \begin{committee}[file=figures/committee.pdf]
+% \end{committee}


Property changes on: trunk/Master/texmf-dist/doc/latex/thuthesis/data/committee.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,17 @@
+% !TeX root = ../thuthesis-example.tex
+
+\chapter{答辩委员会决议书}
+
+论文提出了……
+
+论文取得的主要创新性成果包括:
+
+1. ……
+
+2. ……
+
+3. ……
+
+论文工作表明作者在×××××具有×××××知识,具有×××××能力,论文××××××××××,答辩×××××××××××××××。
+
+答辩委员会表决,(×票/一致)同意通过论文答辩,并建议授予×××(姓名)×××(门类)学博士/硕士学位。


Property changes on: trunk/Master/texmf-dist/doc/latex/thuthesis/data/resolution.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/thuthesis/figures/committee.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/thuthesis/figures/committee.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/figures/committee.pdf	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/figures/committee.pdf	2020-09-09 20:57:31 UTC (rev 56305)

Property changes on: trunk/Master/texmf-dist/doc/latex/thuthesis/figures/committee.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/latexmkrc
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/latexmkrc	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/latexmkrc	2020-09-09 20:57:31 UTC (rev 56305)
@@ -7,7 +7,7 @@
 
 $bibtex_use = 1.5;
 
-$clean_ext = "hd loe ptc synctex.gz thm xdv";
+$clean_ext = "hd loe ptc run.xml synctex.gz thm xdv";
 
 $makeindex = "makeindex -s gind.ist %O -o %D %S";
 

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/spine.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/thusetup.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -89,12 +89,6 @@
   %
   include-spine = false,
   %
-  % 生成的声明页是否要插入页眉和页脚(默认 empty)
-  % 仅在需要进行电子签名时,才需要打开这一选项
-  % 插入的扫描声明页总是会生成页眉(研究生)和页脚,不受这一选项影响
-  %
-  % statement-page-style = plain,
-  %
   % 密级和年限
   %   秘密, 机密, 绝密
   %
@@ -137,11 +131,33 @@
 % \usepackage{floatflt} % 图文混排用宏包
 % \usepackage{rotating} % 图形和表格的控制旋转
 
+% 量和单位
+\usepackage{siunitx}
+
 % 定理类环境宏包
 \usepackage{amsthm}
 % 也可以使用 ntheorem
 % \usepackage[amsmath,thmmarks,hyperref]{ntheorem}
 
+% 参考文献使用 BibTeX + natbib 宏包
+% 顺序编码制
+\usepackage[sort]{natbib}
+\bibliographystyle{thuthesis-numeric}
+
+% 著者-出版年制
+% \usepackage{natbib}
+% \bibliographystyle{thuthesis-author-year}
+
+% 本科生参考文献的著录格式
+% \usepackage[sort]{natbib}
+% \bibliographystyle{thuthesis-bachelor}
+
+% 参考文献使用 BibLaTeX 宏包
+% \usepackage[backend=biber,style=thuthesis-numeric]{biblatex}
+% \usepackage[backend=biber,style=thuthesis-author-year]{biblatex}
+
+% \addbibresource{ref/refs.bib}  % 声明 BibLaTeX 的数据库
+
 % 给自定义的宏后面自动加空白
 % \usepackage{xspace}
 

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis-example.tex	2020-09-09 20:57:31 UTC (rev 56305)
@@ -10,7 +10,7 @@
 
 
 % 论文基本配置,加载宏包等全局配置
-\input{thusetup.tex}
+\input{thusetup}
 
 
 \begin{document}
@@ -18,17 +18,25 @@
 % 封面
 \maketitle
 
+% 学位论文指导小组、公开评阅人和答辩委员会名单
+\input{data/committee}
+
 % 使用授权的说明
 \copyrightpage
 % 将签字扫描后授权文件 scan-copyright.pdf 替换原始页面
-% \copyrightpage[scan-copyright.pdf]
+% \copyrightpage[file=scan-copyright.pdf]
 
 \frontmatter
-\input{data/abstract.tex}
+\input{data/abstract}
 
 % 目录
 \tableofcontents
 
+% 插图和附表清单
+\listoffigures           % 插图清单
+% \listoftables            % 附表清单
+% \listoffiguresandtables  % 插图和附表清单
+
 % 符号对照表
 \input{data/denotation}
 
@@ -39,37 +47,41 @@
 \input{data/chap02}
 
 
-% 其它部分
+% 其他部分
 \backmatter
 
-%% 本科生要求的几个索引。
-% \listoffigures    % 插图索引
-% \listoftables     % 表格索引
-
 % 参考文献
-\bibliographystyle{thuthesis-numeric}      % 顺序编码制
-% \bibliographystyle{thuthesis-author-year}  % 著者-出版年制
-% \bibliographystyle{thuthesis-bachelor}     % 本科生参考文献的著录格式
-\bibliography{ref/refs}
+\bibliography{ref/refs}  % 参考文献使用 BibTeX 编译
+% \printbibliography       % 参考文献使用 BibLaTeX 编译
 
+% 附录
+\appendix
+\input{data/appendix}
+% \input{data/appendix-survey}       % 本科生:外文资料的调研阅读报告
+% \input{data/appendix-translation}  % 本科生:外文资料的书面翻译
+
 % 致谢
 \input{data/acknowledgements}
 
 % 声明
 \statement
+% 生成的声明页是否要插入页眉和页脚(默认 empty)
+% 仅在需要进行电子签名时,才需要打开这一选项
+% 插入的扫描声明页总是会生成页眉(研究生)和页脚,不受这一选项影响
+% \statement[page-style=plain]
 % 将签字扫描后的声明文件 scan-statement.pdf 替换原始页面
-% \statement[scan-statement.pdf]
+% \statement[file=scan-statement.pdf]
 
-% 附录
-\appendix
-\input{data/appendix}
-% \input{data/appendix-survey}       % 本科生:外文资料的调研阅读报告
-% \input{data/appendix-translation}  % 本科生:外文资料的书面翻译
-
-% 个人简历
+% 个人简历、在学期间完成的相关学术成果
 \input{data/resume}
 
+% 指导教师/指导小组学术评语
+\input{data/comments}
+
+% 答辩委员会决议书
+\input{data/resolution}
+
 % 本科生的综合论文训练记录表(扫描版)
-% \record{scan-record.pdf}
+% \record{file=scan-record.pdf}
 
 \end{document}

Modified: trunk/Master/texmf-dist/doc/latex/thuthesis/thuthesis.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.dtx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -17,7 +17,7 @@
 %
 % \iffalse
 %<*driver>
-\ProvidesFile{thuthesis.dtx}[2020/07/09 6.1.3 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2020/09/09 7.0.0 Tsinghua University Thesis Template]
 \documentclass{ltxdoc}
 \usepackage{dtx-style}
 
@@ -252,9 +252,9 @@
 % \begin{shell}
 %   $ xelatex thuthesis-example.tex
 %   $ bibtex thuthesis-example.aux   # 生成 bbl 文件
-%   $ bibtex main-survey.aux         # 本科生的调研报告的参考文献
-%   $ bibtex main-translation.aux    # 本科生的外文资料翻译的参考文献
-%   $ bibtex main-index.aux          # 本科生的书面翻译对应的原文索引
+%   $ bibtex thuthesis-example-survey.aux         # 本科生的调研报告的参考文献
+%   $ bibtex thuthesis-example-translation.aux    # 本科生的外文资料翻译的参考文献
+%   $ bibtex thuthesis-example-index.aux          # 本科生的书面翻译对应的原文索引
 %   $ xelatex thuthesis-example.tex  # 解决引用
 %   $ xelatex thuthesis-example.tex  # 生成论文 PDF
 %
@@ -546,7 +546,7 @@
 % \begin{latex}
 %   \thusetup{
 %     secret-year  = 10,
-%     secret-level = {内部},
+%     secret-level = {秘密},
 %   }
 % \end{latex}
 %
@@ -572,14 +572,30 @@
 %
 % \subsection{前言部分}
 %
+% \subsubsection{指导小组、公开评阅人和答辩委员会名单}
+% \myentry{答辩委员会名单}
+% \DescribeEnv{committee}
+% 学位论文指导小组、公开评阅人和答辩委员会名单可以由 \env{committee} 环境生成,
+% 其中的可选参数可以使用 \option{name} 根据是有无指导小组设置合适的标题,比如
+% \begin{latex}
+%   \begin{committee}[name={学位论文公开评阅人和答辩委员会名单}]
+%     ...
+%   \end{committee}
+% \end{latex}
+%
+% 答辩委员会名单中的表格使用 LaTeX 生成可能略麻烦,也可以导入 Word 版转成的 PDF 文件,
+% \begin{latex}
+%   \begin{committee}[file=figures/committee.pdf]
+%   \end{committee}
+% \end{latex}
+%
 % \subsubsection{授权说明}
 % \myentry{授权说明}
 % \DescribeMacro{\copyrightpage}
-% 生成授权说明。用法:\cs{copyrightpage}\oarg{file}。
 % 可选参数为扫描得到的 PDF 文件名,例如:
 % \begin{latex}
 %   % 将签字扫描后授权文件 scan-copyright.pdf 替换原始页面
-%   \copyrightpage[scan-copyright.pdf]
+%   \copyrightpage[file=scan-copyright.pdf]
 % \end{latex}
 %
 % \subsubsection{摘要}
@@ -648,6 +664,7 @@
 %     toc-chapter-style = times,
 %   }
 % \end{latex}
+% 该选项只对本科生有效。
 %
 % \LaTeX{} 默认支持插图和表格索引,是通过 \cs{caption} 命令完成的,因此它们必须出
 % 现在浮动环境中,否则不被计数。
@@ -720,8 +737,38 @@
 %
 % \subsection{正文部分}
 %
-% \subsubsection{数学环境}
+% \subsubsection{数学符号}
 % \label{sec:math}
+% 数学符号应遵循 GB/T 3102.11-1993《物理科学和技术中使用的数学符号》
+% \footnote{原 GB 3102.11-1993,根据2017年第7号公告和强制性标准整合精简结论,
+%   自2017年3月23日起,该标准转化为推荐性标准。},
+% 模板中使用 \pkg{unicode-math} 宏包来配置数学符号,
+% 与 \LaTeX{} 默认的英美国家的符号习惯有所差异:
+% \newcommand\dif{\mathop{}\!\mathrm{d}}
+% \begin{enumerate}
+%   \item 大写希腊字母默认为斜体,如 \cs{Delta}:$\Delta$。
+%   \item 有限增量符号 $\increment$(U+2206)应使用 \pkg{unicode-math} 宏包提供的
+%     \cs{increment} 命令。
+%   \item 向量、矩阵和张量要求粗斜体,应使用 \cs{symbf} 命令,
+%     如 \verb|\symbf{A}|、\verb|\symbf{\alpha}|。
+%   \item 数学常数和特殊函数要求用正体,应使用 \cs{symup} 命令,
+%     如 $\symup{\pi} = 3.14\dots$; $\symup{e} = 2.718\dots$,
+%   \item 微分号和积分号使用使用正体,比如 $\int f(x) \dif x$。
+% \end{enumerate}
+%
+% 关于数学符号更多的用法,参考
+% \href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unicode-math.pdf}{\pkg{unicode-math}}
+% 宏包的使用说明,
+% 全部数学符号命的令参考
+% \href{http://mirrors.ctan.org/macros/latex/contrib/unicode-math/unimath-symbols.pdf}{\pkg{unimath-symbols}}。
+%
+% 注意,\pkg{unicode-math} 宏包与 \pkg{amsfonts}、\pkg{amssymb}、\pkg{bm}、
+% \pkg{mathrsfs}、\pkg{upgreek} 等宏包\emph{不}兼容。
+% 模板作了处理,用户可以直接使用这些宏包的命令,如 \cs{bm}、\cs{mathscr}、
+% \cs{uppi}。
+%
+% \subsubsection{定理环境}
+% \label{sec:theorem}
 % \thuthesis{} 定义了常用的数学环境:
 %
 % \begin{center}
@@ -778,6 +825,9 @@
 % (\cs{bibliographystyle},见第~\ref{sec:bibliography} 节)时,
 % 正文中引用文献的标注会自动调整为对应的格式。
 %
+% 如果需要标出引文的页码,可以写在 \cs{cite} 的可选参数中,如
+% |\cite[42]{knuth84}|。
+%
 % \paragraph{顺序编码制}
 % \DescribeMacro{\inlinecite}
 % 顺序编码制的参考文献引用分为两种模式:
@@ -788,13 +838,11 @@
 %
 % \DescribeOption{cite-style}
 % 用户可以将引用标注的格式设为正文模式:
-%
 % \begin{latex}
 %   \thusetup{
 %     cite-style = inline,
 %   }
 % \end{latex}
-%
 % 也可以使用 \cs{inlinecite}\marg{key} 临时使用正文模式的引用标注。
 %
 % \paragraph{著者-出版年制}
@@ -805,8 +853,9 @@
 %   \item \cs{citet}:著者姓名作为正文的一部分,比如“Zhang (2008)”;
 % \end{enumerate}
 %
-% 另外还有 \cs{citeauthor}、\cs{citeyear} 等命令分别标注文献的著者姓名和年份,
-% 更多的引用文献标注法参考 \pkg{natbib} 的文档。
+% 另外,\pkg{natbib} 还提供了其他方便引用的命令,
+% 比如 \cs{citeauthor}、\cs{citeyear} 等,
+% 更多细节参考 \pkg{natbib} 的文档。
 %
 % \subsection{其他部分}
 %
@@ -813,53 +862,102 @@
 % \subsubsection{参考文献}
 % \label{sec:bibliography}
 %
-% 模板支持使用 \hologo{BibTeX} 处理生成参考文献表,
-% 用户需要在文中设置参考文献格式并调用 \file{.bib} 数据库:
+% 参考文献通常可以使用 \hologo{BibTeX} 或 biblatex 生成。
+% \hologo{BibTeX} 是 LaTeX 处理参考文献的传统的方式,
+% 需要在使用 \cs{bibliographystyle}\marg{style} 选择样式
+% 并用 \cs{bibliography} 设置 \file{.bib} 的路径。
+% 然后使用 \texttt{bibtex} 对 \file{.aux} 文件进行编译得到 \file{.bbl} 文件。
+% 其中的参考文献表内容会在后续编译时替换到 \cs{bibliography} 的位置。
+% Biblatex 是较新的方式,需要在载入宏包时通过 \option{style} 选择样式,
+% 在导言区使用 \cs{addbibresource} 声明数据库的路径,
+% 并在输出参考文献表的位置使用 \cs{printbibliography} 命令,
+% 而且编译参考文献的命令需要换为 biber。
+% 这两种方式各有优缺点,比如 BibTeX 无法对中文按照拼音排序,一些样式更新不够及时;
+% Biblatex 运行较缓慢,无法对多个参考文献表使用不同样式。
+% 用户需要根据实际选择合适的方式。
+%
+% 研究生要求的参考文献格式基于《信息与文献 参考文献著录规则》(GB/T 7714-2015)
+% 进行了少量改编(如英文姓名不使用全大写),
+% 可以选择“顺序编码制”和“著者-出版年制”。
+% 如果使用 BibTeX 的方式,需要在导言区载入 \pkg{natbib} 宏包并选择样式,如:
 % \begin{latex}
-%   \bibliographystyle{thuthesis-numeric}        % 顺序编码制
-%   % \bibliographystyle{thuthesis-author-year}  % 著者-出版年制
-%   % \bibliographystyle{thuthesis-bachelor}     % 本科生参考文献的著录格式
-%   \bibliography{ref1,ref2}                     % 载入 ref1.bib 和 ref2.bib
+%   % 顺序编码制
+%   \usepackage[sort]{natbib}
+%   \bibliographystyle{thuthesis-numeric}
 % \end{latex}
-%
-% \note[注意:]{\cs{bibliographystyle} 命令只能出现一次。}
-%
-% \hologo{BibTeX} 可以自动识别数据库中每条文献的语言,并自动处理文献类型和载体类
-% 型标识,用户也可以手动指定,如:
-%
+% 或
 % \begin{latex}
-%   @misc{citekey,
-%     language = {japanese},
-%     mark     = {Z},
-%     medium   = {DK},
-%     ...
-%   }
+%   % 著者-出版年制
+%   \usepackage{natbib}
+%   \bibliographystyle{thuthesis-author-year}
 % \end{latex}
+% 其中的 \option{sort} 选项会将同一处引用的多个文献编号严格按照顺序排序,
+% 这并非《写作指南》要求,但是推荐使用。
+% 这里调用的样式由 \href{http://ctan.org/pkg/gbt7714}{\pkg{gbt7714}} 的 \file{.bst} 进行了少量修改。
 %
-% 可选的语言有 \option{english}, \option{chinese}, \option{japanese} 和 \option{russian}。
-%
-% 国标规定参考文献表采用“著者-出版年”制组织时,各篇文献首先按文种集中,然后按著者字
+% 参考文献表采用“著者-出版年”制组织时,各篇文献首先按文种集中,然后按著者字
 % 顺和出版年排列;中文文献可以按著者汉语拼音字顺排列,也可以按著者的笔画笔顺排列。
-% 由于 \hologo{BibTeX} 功能的局限性,无法自动获取著者姓名的拼音或笔画笔顺,所
-% 以\emph{必须}在 \file{.bib} 数据库中的 |key| 字段手动录入著者姓名的拼音,如:
+% 但由于 \hologo{BibTeX} 功能的局限性,无法自动获取著者姓名的拼音或笔画笔顺进行正确排序。
+% 一种解放方法是在 \file{.bib} 数据库的中文文献的 |key| 域手动录入著者姓名的拼音,
+% 这比较适合中文文献数量较少的情况,如:
 % \begin{latex}
 %   @book{capital,
 %     author = {马克思 and 恩格斯},
-%     key    = {ma3 ke4 si1   en1 ge2 si1}, % 名字之间用 2 或 3 个空格
+%     key    = {ma3 ke4 si1 & en1 ge2 si1},
 %     ...
 %   }
 % \end{latex}
+% 另一种方式是使用 biblatex,应在在导言区设置
+% \begin{latex}
+%   \usepackage[backend=biber,style=thuthesis-author-year]{biblatex}
+%   \addbibresource{ref/refs.bib}
+% \end{latex}
+% 这里的样式由 \href{https://ctan.org/pkg/biblatex-gb7714-2015}{biblatex-gb7714-2015} 进行了少量改编,
+% 一些额外用法可以参考该宏包的文档。
+% 注意 \pkg{biblatex} 跟 \pkg{natbib} 不兼容,
+% 而且 \cs{addbibresource} 必须在导言区设置。
+% 输出参考文献表应使用 \cs{printbibliography} 命令。
 %
-% \hologo{BibTeX} 对自定义样式的支持比较有限,所以用户只能通过修改 \file{bst} 文
-% 件来修改文献列表的格式。本宏包提供了一些接口供用户更方便地修改,在 \file{bst}
-% 文件开始处的 |load.config| 函数中,有一组配置参数用来控制样式。若变量被设
-% 为 |#1| 则表示该项被启用,设为 |#0| 则不启用。默认的值是严格遵循学校规定的配
-% 置。
+% 本科生要求的中文参考文献格式严格遵从 GB/T 7714-2015,
+% 附录中调研报告的英文参考文献可以自行选择合适的风格。
+% 但是 biblatex 不支持同一文档中使用不同的格式,
+% 所以只能使用 \hologo{BibTeX}:
+% \begin{latex}
+%   % 本科生参考文献的著录格式
+%   \usepackage[sort]{natbib}
+%   \bibliographystyle{thuthesis-bachelor}
+% \end{latex}
+% 调研报告的参考文献需要选择与 \pkg{natbib} 兼容的样式。
 %
+% 本科生外文系要求使用 APA 或 MLA。
+% APA 的 BibTeX 样式由 \pkg{apacite} 宏包提供,需要在导言区调用:
+% \begin{latex}
+%   \usepackage[natbibapa]{apacite}
+%   \bibliographystyle{apacite}
+% \end{latex}
+% 其中 \option{natbibapa} 会调用 \pkg{natbib} 来处理引用,
+% 这也是宏包推荐的用法。
+% 注意目前的 \pkg{apacite} 只支持到 APA 第 6 版。
+% 更推荐使用已经更新到 APA 第 7 版的 \pkg{biblatex-apa}:
+% \begin{latex}
+%   \usepackage[style=apa]{biblatex}
+%   \addbibresource{refs-apa.bib}
+% \end{latex}
+% 注意,如果参考文献中引用了中文文献的话,这两种方法都不能正确调整格式,
+% 需要手动进行修改 \file{.bbl} 文件的内容,
+% 这时 BibTeX 比 biblatex 更简单些。
 %
+% BibTeX 没有用于 MLA 的样式,所以对于 MLA 只能使用 biblatex:
+% \begin{latex}
+%   \usepackage[style=mla-new]{biblatex}
+%   \addbibresource{refs-apa.bib}
+% \end{latex}
+% 注意这里 \option{mla-new} 对应于 MLA 第 8 版的格式,
+% \option{mla} 是第 7 版的。
+%
 % \subsubsection{致谢}
 %
-% \DescribeEnv{acknowledgement}
+% \DescribeEnv{acknowledgements}
 % 把致谢做成一个环境更好一些,直接往里面写感谢的话就可以啦。
 %
 % \begin{latex}
@@ -874,19 +972,17 @@
 % 如果使用声明扫描页,将可选参数指定为扫描后的 PDF 文件名,例如:
 %
 % \begin{latex}
-%   \statement[scan-statement.pdf]
+%   \statement[file=scan-statement.pdf]
 % \end{latex}
 %
 % 由于打印版和电子版有空白页的差别,声明的页码可能不同。
-% 所以编译声明页时默认不加页眉和页脚,
+% 所以编译声明页时默认不加页眉和页脚(\texttt{page-style=empty}),
 % 在签字后插入扫描页时再补上页眉和页脚,防止页码冲突。
 %
-% \DescribeOption{statement-page-style}
-% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),可以使用在 \cs{statement} 前设置
+% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),
+% 可以使用在 \cs{statement} 命令设置
 % \begin{latex}
-%   \thusetup{
-%     statement-page-style = plain,
-%   }
+%   \statement[page-style=plain]
 % \end{latex}
 % 注意,插入扫描页总是会加页码,不受该选项控制。
 %
@@ -915,8 +1011,8 @@
 % 调研报告(或书面翻译)的题目和参考文献是独立于论文的,相当一篇独立的小文章,
 % 所以模板相应定义了 \env{survey} 和 \env{translation}。在这两个环境内部可以
 % 像论文正文一样使用标题和参考文献的命令,但不会影响外部。
-% 但是需要使用 \hologo{BibTeX} 对 \file{main-survey.aux} 或者
-% \file{main-translation.aux} 进行编译,才能生成参考文献(见 \ref{sec:xelatex} 节)。
+% 但是需要使用 \hologo{BibTeX} 对 \file{*-survey.aux} 或者
+% \file{*-translation.aux} 进行编译,才能生成参考文献(见 \ref{sec:xelatex} 节)。
 % 如果使用 \texttt{latexmk},则无需额外处理。
 %
 % 同时,阅读报告默认切换书写语言为英语,书面翻译默认切换为中文。
@@ -934,7 +1030,7 @@
 % \end{latex}
 %
 % “书面翻译对应的原文索引”区别于译文的参考文献,需要使用 \env{translation-index}
-% 环境,另外需要使用 \hologo{BibTeX} 编译 \file{main-index.aux},\texttt{latexmk} 同样会自动处理。
+% 环境,另外需要使用 \hologo{BibTeX} 编译 \file{*-index.aux},\texttt{latexmk} 同样会自动处理。
 %
 % \begin{latex}
 %   \begin{translation}
@@ -1019,7 +1115,7 @@
 % 本科生需要在最后附上综合论文训练记录表,可以用如下命令:
 %
 % \begin{latex}
-%   \record{scan-record.pdf}
+%   \record{file=scan-record.pdf}
 % \end{latex}
 %
 %
@@ -1083,7 +1179,7 @@
 %    \begin{macrocode}
 %<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
 %<cls>\ProvidesClass{thuthesis}
-%<cls>[2020/07/09 6.1.3 Tsinghua University Thesis Template]
+%<cls>[2020/09/09 7.0.0 Tsinghua University Thesis Template]
 %    \end{macrocode}
 %
 % 报错
@@ -1094,6 +1190,9 @@
 \newcommand\thu at warning[1]{%
   \ClassWarning{thuthesis}{#1}%
 }
+\newcommand\thu at patch@error[1]{%
+  \thu at error{Failed to patch command \protect#1}%
+}
 %    \end{macrocode}
 %
 % 检查 \LaTeXe{} kernel 版本
@@ -1113,6 +1212,13 @@
 \fi
 %    \end{macrocode}
 %
+% 载入用于测试的配置。
+%    \begin{macrocode}
+\InputIfFileExists{thuthesis-pdf-test-config.tex}{}{
+  \InputIfFileExists{thuthesis-log-test-config.tex}{}{}
+}
+%    \end{macrocode}
+%
 % \subsection{定义选项}
 % \label{sec:defoption}
 % 定义论文类型以及是否涉密
@@ -1120,7 +1226,7 @@
 %<*cls>
 \hyphenation{Thu-Thesis}
 \def\thuthesis{ThuThesis}
-\def\version{6.1.3}
+\def\version{7.0.0}
 \RequirePackage{kvdefinekeys}
 \RequirePackage{kvsetkeys}
 \RequirePackage{kvoptions}
@@ -1282,6 +1388,17 @@
 %
 % 论文的主要语言。
 %    \begin{macrocode}
+  main-language = {
+    name = main at language,
+    choices = {
+      chinese,
+      english,
+    },
+  },
+%    \end{macrocode}
+%
+% 用于设置局部语言。
+%    \begin{macrocode}
   language = {
     choices = {
       chinese,
@@ -1417,6 +1534,7 @@
 % 引用的宏包和相应的定义。
 %    \begin{macrocode}
 \RequirePackage{etoolbox}
+\RequirePackage{filehook}
 \RequirePackage{xparse}
 %    \end{macrocode}
 %
@@ -1486,6 +1604,7 @@
 % \cs{makebox}\oarg{width}\oarg{s} 可能产生的 underful boxes。
 %    \begin{macrocode}
 \RequirePackage{xeCJKfntef}
+\RequirePackage{soul}
 %    \end{macrocode}
 %
 % 表格控制
@@ -1498,19 +1617,28 @@
 \RequirePackage{booktabs}
 %    \end{macrocode}
 %
-% 参考文献引用宏包。
 %    \begin{macrocode}
-\RequirePackage[sort&compress]{natbib}
-\RequirePackage{bibunits}
+\RequirePackage{url}
 %    \end{macrocode}
 %
+% 如果用户在导言区未调用 \pkg{biblatex},则自动调用 \pkg{natbib}。
 %    \begin{macrocode}
-\RequirePackage{url}
+\AtEndPreamble{
+  \@ifpackageloaded{biblatex}{}{
+    \@ifpackageloaded{apacite}{}{
+      \RequirePackage{natbib}
+    }
+  }
+}
+\AtEndOfPackageFile*{natbib}{
+  \@ifpackageloaded{apacite}{}{
+    \RequirePackage{bibunits}
+  }
+}
 %    \end{macrocode}
 %
 % 对冲突的宏包报错。
 %    \begin{macrocode}
-\RequirePackage{filehook}
 \newcommand\thu at package@conflict[2]{
   \AtBeginOfPackageFile*{#2}{
     \thu at error{The "#2" package is incompatible with required "#1"}
@@ -1541,9 +1669,9 @@
 %
 %    \begin{macrocode}
 \geometry{
-  a4paper, % 210 * 297mm
+  paper          = a4paper,  % 210 * 297mm
   marginparwidth = 2cm,
-  marginparsep = 0.5cm
+  marginparsep   = 0.5cm,
 }
 \newcommand\thu at set@geometry{%
   \ifthu at degree@bachelor
@@ -1616,7 +1744,6 @@
   \cleardoublepage
   \@mainmatterfalse
   \pagenumbering{Roman}%
-  \let\@tabular\thu at tabular
 }
 \renewcommand\mainmatter{%
   \cleardoublepage
@@ -1629,7 +1756,8 @@
   \else
     \clearpage
   \fi
-  \@mainmattertrue}
+  \@mainmatterfalse
+}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -2144,14 +2272,17 @@
 % 保存为论文的主要语言;
 % \cs{thu at reset@main at language} 则用于正文中恢复为主要语言。
 %    \begin{macrocode}
+\thusetup{main-language=\thu at language}%
 \let\thu at main@language\thu at language
 \thu at option@hook{language}{%
   \ifx\@begindocumenthook\@undefined\else
+    \thusetup{main-language=\thu at language}%
     \let\thu at main@language\thu at language
   \fi
 }
-\newcommand\thu at reset@main at language{
-  \thusetup{language = \thu at main@language}
+\newcommand\thu at reset@main at language{%
+    \thusetup{language = \thu at main@language}%
+    \let\thu at language\thu at main@language
 }
 %    \end{macrocode}
 %
@@ -2159,48 +2290,71 @@
 % \option{language} 时会修改,而在正文局部切换语言时则不变。
 %    \begin{macrocode}
 \newcommand\thu at set@chapter at names{%
-  \ifthu at language@chinese
+  \ifthu at main@language at chinese
     \ctexset{
       chapter/name   = {第,章},
-      appendixname   = 附录,
-      contentsname   = 目\hspace{\ccwd}录,
-      listfigurename = 插图索引,
-      listtablename  = 表格索引,
-      bibname        = 参考文献,
-      indexname      = 索引,
     }%
-    \def\thu at denotation@name{主要符号对照表}%
-    \def\thu at list@algorithm at name{算法索引}%
-    \def\listequationname{公式索引}%
+    \def\bibname{参考文献}%
+    \def\appendixname{附录}%
+    \def\indexname{索引}%
     \def\thu at acknowledgements@name{致\hspace{\ccwd}谢}%
     \ifthu at degree@bachelor
+      \def\contentsname{目\hspace{\ccwd}录}%
+      \def\listfigurename{插图索引}%
+      \def\listtablename{表格索引}%
+      \def\thu at list@figure at table@name{插图和附表索引}%
+      \def\thu at list@algorithm at name{算法索引}%
+      \def\listequationname{公式索引}%
+      \def\thu at denotation@name{主要符号对照表}%
       \def\thu at resume@name{在学期间参加课题的研究成果}%
     \else
-      \ifthu at degree@postdoc
+      \def\listfigurename{插图清单}%
+      \def\listtablename{附表清单}%
+      \def\thu at list@figure at table@name{插图和附表清单}%
+      \def\thu at list@algorithm at name{算法清单}%
+      \def\listequationname{公式清单}%
+      \ifthu at degree@graduate
+        \def\contentsname{目\hspace{\ccwd}录}%
+        \def\thu at toc@contents at name{目录}%
+        \def\thu at denotation@name{符号和缩略语说明}%
+        \def\thu at resume@name{个人简历、在学期间完成的相关学术成果}%
+      \else  % degree = postdoc
+        \def\contentsname{目\hspace{2\ccwd}次}%
+        \def\thu at denotation@name{符号表}%
         \def\thu at resume@name{个人简历、发表的学术论文与科研成果}%
-      \else
-        \def\thu at resume@name{个人简历、在学期间发表的学术论文与研究成果}%
       \fi
     \fi
   \else
-    \ifthu at language@english
+    \ifthu at main@language at english
       \ctexset{
         chapter/name   = \chaptername\space,
-        appendixname   = Appendix,
-        contentsname   = Contents,
-        listfigurename = List of Figures,
-        listtablename  = List of Tables,
-        bibname        = Bibliography,
-        indexname      = Index,
       }%
-      \def\thu at denotation@name{Nomenclature}%
-      \def\thu at list@algorithm at name{List of Algorithms}%
-      \def\listequationname{List of Equations}%
-      \def\thu at acknowledgements@name{Acknowledgements}%
+      \def\indexname{Index}%
       \ifthu at degree@bachelor
-        \def\thu at resume@name{Research Achievements}%
+        \def\contentsname{CONTENTS}%
+        \def\listfigurename{FIGURES}%
+        \def\listtablename{TABLES}%
+        \def\thu at list@figure at table@name{FIGURES AND TABLES}%
+        \def\thu at list@algorithm at name{ALGORITHMS}%
+        \def\listequationname{EQUATIONS}%
+        \def\thu at denotation@name{ABBREVIATIONS}%
+        \def\bibname{REFERENCES}%
+        \def\appendixname{APPENDIX}%
+        \def\thu at acknowledgements@name{ACKNOWLEDGEMENTS}%
+        \def\thu at resume@name{PUBLICATIONS}%
       \else
-        \def\thu at resume@name{Resume, Publications and Research Achievements}%
+        \def\contentsname{Contents}%
+        \def\thu at toc@contents at name{Contents}%
+        \def\listfigurename{List of Figures}%
+        \def\listtablename{List of Tables}%
+        \def\thu at list@figure at table@name{List of Figures and Tables}%
+        \def\thu at list@algorithm at name{List of Algorithms}%
+        \def\listequationname{List of Equations}%
+        \def\thu at denotation@name{Nomenclature}%
+        \def\bibname{Bibliography}%
+        \def\appendixname{Appendix}%
+        \def\thu at acknowledgements@name{Acknowledgements}%
+        \def\thu at resume@name{Resume and Academic Achievements}%
       \fi
     \fi
   \fi
@@ -2207,11 +2361,7 @@
 }
 \thu at set@chapter at names
 \thu at option@hook{degree}{\thu at set@chapter at names}
-\thu at option@hook{language}{%
-  \ifx\@begindocumenthook\@undefined\else
-    \thu at set@chapter at names
-  \fi
-}
+\thu at option@hook{main-language}{\thu at set@chapter at names}
 %    \end{macrocode}
 %
 % 这部分名称在正文中局部地修改语言时会发生变化,比如英文摘要、
@@ -2331,17 +2481,26 @@
   \renewcommand\footrulewidth{0pt}%
   \ifthu at degree@bachelor
     \renewcommand\headrulewidth{0pt}%
-    \fancyfoot[C]{\xiaowu\thepage}%
+    \fancyfoot[C]{
+      \ifthu at main@language at chinese
+        \xiaowu
+      \else
+        \normalsize
+      \fi
+      \thepage
+    }%
     \let\@mkboth\@gobbletwo
+    \let\chaptermark\@gobble
   \else
     \renewcommand\headrulewidth{0.75bp}%
     \fancyhead[C]{\wuhao\leftmark}%
     \fancyfoot[C]{\wuhao\thepage}%
     \let\@mkboth\markboth
+    \def\chaptermark##1{%
+      \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
+    }%
   \fi
-  \def\chaptermark##1{%
-    \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
-  }%
+  \let\sectionmark\@gobble
 }
 \pagestyle{plain}
 %    \end{macrocode}
@@ -2360,7 +2519,21 @@
 \ctexset{%
   punct=quanjiao,
   space=auto,
-  autoindent=true}
+}
+\newcommand\thu at set@indent{%
+  \ifthu at main@language at english
+    \ifthu at degree@bachelor
+      \ctexset{autoindent=0.8cm}%
+    \else
+      \ctexset{autoindent=2}%
+    \fi
+  \else
+    \ctexset{autoindent=2}%
+  \fi
+}
+\thu at set@indent
+\thu at option@hook{degree}{\thu at set@indent}
+\thu at option@hook{main-language}{\thu at set@indent}
 %    \end{macrocode}
 %
 % 利用 \pkg{enumitem} 命令调整默认列表环境间的距离,以符合中文习惯。
@@ -2558,7 +2731,7 @@
 \renewcommand{\eqref}[1]{\textup{(\ref{#1})}}
 %    \end{macrocode}
 %
-% \subsubsection{浮动对象以及表格}
+% \subsubsection{浮动对象:插图和表格}
 % \label{sec:float}
 % 设置浮动对象和文字之间的距离
 %    \begin{macrocode}
@@ -2579,6 +2752,16 @@
 \renewcommand{\floatpagefraction}{0.60}
 %    \end{macrocode}
 %
+% 研究生要求表单元格中的文字采用 11pt 宋体字,单倍行距,段前空 3 磅,段后空 3 磅。
+%    \begin{macrocode}
+\patchcmd\@floatboxreset{%
+  \normalsize
+}{%
+  \fontsize{11bp}{14.3bp}\selectfont
+  \renewcommand\arraystretch{1.2}%
+}{}{\thu at patch@error{\@floatboxreset}}
+%    \end{macrocode}
+%
 % 定制浮动图形和表格标题样式,以及改变附录中浮动体的编号规则:
 % \begin{itemize}
 %   \item 图表标题字体为 11pt, 这里写作大五号
@@ -2596,10 +2779,7 @@
 \fi
 %    \end{macrocode}
 %
-% 研究生要求表单元格中的文字采用 11pt 宋体字,单倍行距,段前空 3 磅,段后空 3 磅。
 %    \begin{macrocode}
-\let\old at tabular\@tabular
-\def\thu at tabular{\dawu[1.5]\old at tabular}
 \DeclareCaptionFont{thu}{\dawu}
 \DeclareCaptionLabelSeparator{thu}{\hspace{\ccwd}}
 \captionsetup{
@@ -2649,67 +2829,167 @@
 %    \end{macrocode}
 %
 % 各级标题格式设置。
-% \begin{description}
-% \item[chapter] 章序号与章名之间空一个汉字符 黑体三号字,居中书写,单倍行距,段
-%   前空 24 磅,段后空 18 磅。本科要求:段前段后间距 30/20 pt,行距 20pt。但正文
-%   章节 30pt 的话和样例效果不一致。
-%
-% \item[section] 一级节标题,例如:\fbox{2.1 实验装置与实验方法}。节标题序号与标
-%   题名之间空一个汉字符(下同)。采用黑体四号(14pt)字居左书写,行距为固定
-%   值 20 磅,段前空 24 磅,段后空 6 磅。本科:25/12 pt,行距 18pt。
-%
-% \item[subsection] 二级节标题,例如:\fbox{2.1.1 实验装置}。采用黑体 13pt 字居左
-%   书写,行距为固定值 20 磅,段前空 12 磅,段后空 6 磅。本科:中文黑体 12pt 字,
-%   英文 13pt 字,段间距 12/6 pt,行距 15pt。
-%
-% \item[subsubsection] 三级节标题,例如:\fbox{2.1.2.1 归纳法}。采用黑体小四号
-%   (12pt)字居左书写,行距为固定值 20 磅,段前空 12 磅,段后空 6 磅。
-%
-% \end{description}
 %    \begin{macrocode}
-\newcommand\thu at chapter@titleformat[1]{%
-  \ifthu at degree@bachelor #1\else%
-    \ifthenelse%
-      {\equal{#1}{\thu at abstract@name at en}}%
-      {\bfseries #1}%
-      {#1}%
-  \fi}
 \ctexset{%
-  chapter={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 15bp\else 9bp\fi},
-    aftername=\hskip\ccwd,
-    afterskip={\ifthu at degree@bachelor 20bp\else 24bp\fi},
-    format={\centering\sffamily\ifthu at degree@bachelor\xiaosan[1.333]\else\sanhao[1]\fi},
-    nameformat=\relax,
-    numberformat=\relax,
-    titleformat=\thu at chapter@titleformat,
-    lofskip=0pt,
-    lotskip=0pt,
+  chapter = {
+    nameformat   = {},
+    numberformat = {},
+    titleformat  = {},
+    aftername    = \quad,
+    fixskip      = true,
+    afterindent  = true,
+    lofskip      = 0pt,
+    lotskip      = 0pt,
   },
-  section={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 25bp\else 24bp\fi\@plus 1ex \@minus .2ex},
-    afterskip={\ifthu at degree@bachelor 12bp\else 6bp\fi \@plus .2ex},
-    format={\sffamily\ifthu at degree@bachelor\sihao[1.286]\else\sihao[1.429]\fi},
+  section = {
+    aftername    = \quad,
+    afterindent  = true,
   },
-  subsection={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
-    afterskip={6bp \@plus .2ex},
-    format={\sffamily\ifthu at degree@bachelor\xiaosi[1.25]\else\banxiaosi[1.538]\fi},
-    numberformat={\sffamily\ifthu at degree@bachelor\banxiaosi[1.154]\else\banxiaosi[1.538]\fi},
+  subsection = {
+    aftername    = \quad,
+    afterindent  = true,
   },
-  subsubsection={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
-    afterskip={6bp \@plus .2ex},
-    format={\sffamily\ifthu at degree@bachelor\xiaosi[1.25]\else\xiaosi[1.667]\fi},
+  subsubsection = {
+    aftername    = \quad,
+    afterindent  = true,
   },
-  paragraph/afterindent=true,
-  subparagraph/afterindent=true}
+  paragraph/afterindent = true,
+  subparagraph/afterindent = true,
+}
 %    \end{macrocode}
 %
+% 本科生要求:
+% \begin{center}
+%   \begin{tabular}{lclll}
+%     \toprule
+%     标题        & 中文       & 英文       & 段前/后间距 & 行距 \\
+%     \midrule
+%     一级节标题  & 黑体小三号 & Arial 15pt & 30/20 pt    & 20pt \\
+%     二级节标题  & 黑体四号   & Arial 14pt & 25/12 pt    & 18pt \\
+%     三级节标题  & 黑体小四号 & Arial 13pt & 12/6 pt     & 15pt \\
+%     四级节标题  & 黑体小四号 & Arial 12pt & 12/6 pt     &      \\
+%     \bottomrule
+%   \end{tabular}
+% \end{center}
+%
+% 这里三级节标题的“中文黑体小四号”和“英文 Arial 13pt”不一致,取 13pt。
+%    \begin{macrocode}
+\newcommand\thu at set@section at format{%
+  \ifthu at degree@bachelor
+    \ctexset{%
+      chapter = {
+        format     = \centering\sffamily\fontsize{15bp}{20bp}\selectfont,
+        beforeskip = 30bp,
+        afterskip  = 20bp,
+      },
+      section = {
+        format     = \sffamily\fontsize{14bp}{18bp}\selectfont,
+        beforeskip = 25bp,
+        afterskip  = 12bp,
+      },
+      subsection = {
+        format     = \sffamily\fontsize{13bp}{15bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+      subsubsection = {
+        format     = \sffamily\fontsize{12bp}{14bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+    }%
+    \ifthu at main@language at chinese
+      \ctexset{chapter/number = \thechapter}%
+    \else
+      \ctexset{chapter/number = \thu at english@number{chapter}}%
+    \fi
+%    \end{macrocode}
+%
+% 研究生要求:
+% \begin{itemize}
+%   \item 各章标题,例如:“\textsf{第 1 章 引言}”。
+%
+%     章序号与章名之间空一个汉字符。
+%     采用黑体三号字,居中书写,单倍行距,
+%     段前空 24 磅,段后空 18 磅。
+%
+%   \item 一级节标题,例如:“\textsf{2.1 实验装置与实验方法}”。
+%
+%     节标题序号与标题名之间空一个汉字符(下同)。
+%     采用黑体四号(14pt)字居左书写,行距为固定值 20 磅,
+%     段前空 24 磅,段后空 6 磅。
+%
+%   \item 二级节标题,例如:“\textsf{2.1.1 实验装置}”。
+%
+%     采用黑体 13pt 字居左书写,行距为固定值 20 磅,
+%     段前空 12 磅,段后空 6 磅。
+%
+%   \item 三级节标题,例如:“\textsf{2.1.2.1 归纳法}”。
+%
+%     采用黑体小四号(12pt)字居左书写,行距为固定值 20 磅,
+%     段前空 12 磅,段后空 6 磅。
+% \end{itemize}
+%
+% 由于 Word 模板中开启了“对齐到网格”,实际的段前段后距离有所调整。
+%    \begin{macrocode}
+  \else
+    \ctexset{%
+      chapter = {
+        format     = \centering\sffamily\sanhao,
+        beforeskip = 32bp,
+        afterskip  = 32bp,
+      },
+      section = {
+        format     = \sffamily\fontsize{14bp}{20bp}\selectfont,
+        beforeskip = 24bp,
+        afterskip  = 6bp,
+      },
+      subsection = {
+        format     = \sffamily\fontsize{13bp}{20bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+      subsubsection = {
+        format     = \sffamily\fontsize{12bp}{20bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+    }%
+  \fi
+}
+\thu at set@section at format
+\thu at option@hook{degree}{\thu at set@section at format}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\newcommand\thu at english@number[1]{%
+  \expandafter\ifcase\csname c@#1\endcsname
+    Zero\or
+    One\or
+    Two\or
+    Three\or
+    Four\or
+    Five\or
+    Six\or
+    Seven\or
+    Eight\or
+    Nine\or
+    Ten\or
+    Eleven\or
+    Twelve\or
+    Thirteen\or
+    Fourteen\or
+    Fifteen\or
+    Sixteen\or
+    Seventeen\or
+    Eighteen\or
+    Nineteen\or
+    Twenty\or
+    \thu at error{You are genius}%
+  \fi
+}
+%    \end{macrocode}
+%
 % \begin{macro}{\thu at chapter*}
 % 默认的 \cs{chapter*} 很难同时满足研究生院和本科生的论文要求。本科论文要求所有的
 % 章都出现在目录里,比如摘要、Abstract、主要符号表等,所以可以简单的扩展默
@@ -2724,7 +3004,7 @@
 %    \begin{macrocode}
 \newcommand\thu at pdfbookmark[2]{}
 \newcommand\thu at phantomsection{}
-\NewDocumentCommand\thu at chapter{s o m o}{
+\NewDocumentCommand\thu at chapter{s o m o}{%
   \IfBooleanF{#1}{%
     \thu at error{You have to use the star form: \string\thu at chapter*}%
   }%
@@ -2734,15 +3014,15 @@
       \thu at pdfbookmark{0}{#3}%
     }{%
       \thu at phantomsection
-      \addcontentsline{toc}{chapter}{#3}%
+      \addcontentsline{toc}{chapter}{#2}%
     }%
   }{%
     \thu at phantomsection
     \addcontentsline{toc}{chapter}{#3}%
   }%
-  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=25bp}\fi
+  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=40bp}\fi
   \chapter*{#3}%
-  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=15bp}\fi
+  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=30bp}\fi
   \IfValueTF{#4}{%
     \ifthenelse{\equal{#4}{}}{%
       \@mkboth{}{}%
@@ -2770,7 +3050,11 @@
 % 目录生成命令。
 %    \begin{macrocode}
 \renewcommand\tableofcontents{%
-  \thu at chapter*[]{\contentsname}%
+  \ifthu at degree@graduate
+    \thu at chapter*[\thu at toc@contents at name]{\contentsname}%
+  \else
+    \thu at chapter*[]{\contentsname}%
+  \fi
   \@starttoc{toc}%
 }
 \thu at define@key{
@@ -2797,26 +3081,47 @@
 % 示例中的一级和二级节标题分别缩进 1 和 1.5 个汉字符。
 %    \begin{macrocode}
   \ifthu at degree@bachelor
-    \titlecontents{chapter}
-      [\z@]{\addvspace{6bp}
-        \ifthu at toc@chapter at style@arial
-          \sffamily
-        \else
-          \heiti
-        \fi
-      }
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
-      {\rmfamily\thu at leaders\thecontentspage}%
-    \titlecontents{section}
-      [1\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
-      {\thu at leaders\thecontentspage}%
-    \titlecontents{subsection}
-      [1.5\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
-      {\thu at leaders\thecontentspage}%
+    \ifthu at main@language at chinese
+      \titlecontents{chapter}
+        [\z@]{\addvspace{6bp}
+          \ifthu at toc@chapter at style@arial
+            \sffamily
+          \else
+            \heiti
+          \fi
+        }
+        {\contentspush{\thecontentslabel\quad}}{}
+        {\rmfamily\thu at leaders\thecontentspage}%
+      \titlecontents{section}
+        [1em]{}
+        {\contentspush{\thecontentslabel\quad}}{}
+        {\thu at leaders\thecontentspage}%
+      \titlecontents{subsection}
+        [1.5em]{}
+        {\contentspush{\thecontentslabel\quad}}{}
+        {\thu at leaders\thecontentspage}%
+    \else
 %    \end{macrocode}
 %
+% 本科生英文专业要求“左侧按级依次缩进 0.5cm”。
+%    \begin{macrocode}
+      \ifthu at main@language at english
+        \titlecontents{chapter}
+          [\z@]{\addvspace{6bp}\sffamily}
+          {\contentspush{\thecontentslabel\quad}}{}
+          {\rmfamily\thu at leaders\thecontentspage}%
+        \titlecontents{section}
+          [0.5cm]{}
+          {\contentspush{\thecontentslabel\quad}}{}
+          {\thu at leaders\thecontentspage}%
+        \titlecontents{subsection}
+          [1cm]{}
+          {\contentspush{\thecontentslabel\quad}}{}
+          {\thu at leaders\thecontentspage}%
+      \fi
+    \fi
+%    \end{macrocode}
+%
 % 研究生:
 % \begin{enumerate}
 %   \item 目录中的章标题行采用黑体小四号字,固定行距 20 磅,段前空 6 磅,
@@ -2831,16 +3136,22 @@
 %    \begin{macrocode}
   \else
     \titlecontents{chapter}
-      [\z@]{\addvspace{6bp}\sffamily}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+      [\z@]{\addvspace{6bp}
+        \ifthu at main@language at chinese
+          \heiti
+        \else
+          \sffamily
+        \fi
+      }
+      {\contentspush{\thecontentslabel\quad}}{}
       {\rmfamily\thu at leaders\thecontentspage}%
     \titlecontents{section}
-      [1\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+      [1em]{}
+      {\contentspush{\thecontentslabel\quad}}{}
       {\thu at leaders\thecontentspage}%
     \titlecontents{subsection}
-      [2\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+      [2em]{}
+      {\contentspush{\thecontentslabel\quad}}{}
       {\thu at leaders\thecontentspage}%
   \fi
 }
@@ -3097,6 +3408,7 @@
 % layout 一样,所以按照 \cs{thu at discipline}(工程领域)是否为空来区分“工程硕士”。
 %    \begin{macrocode}
 \newcommand\thu at titlepage{%
+  \thusetup{language = chinese}%
   \ifthu at degree@graduate
     \ifthu at degree@type at academic
       \thu at titlepage@graduate at academic
@@ -3118,6 +3430,7 @@
       \fi
     \fi
   \fi
+  \thu at reset@main at language
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3324,11 +3637,13 @@
     hmargin = 3.6cm,
   }%
   \thispagestyle{empty}%
+  \thusetup{language = english}%
   \ifthu at degree@type at academic
     \thu at titlepage@en at graduate@academic
   \else
     \thu at titlepage@en at graduate@professional
   \fi
+  \thu at reset@main at language
   \clearpage
   \restoregeometry
 }
@@ -3445,63 +3760,75 @@
     hmargin = 3.17cm,
   }%
   \thispagestyle{empty}%
-  \null\vskip 0.44cm%
   \begingroup
     \centering
-    \parbox[t][2cm][t]{\textwidth}{%
+    \parbox[t][0cm][t]{\textwidth}{%
       \hfill
-      \sffamily\CJKfamily+{}\xiaosi
-      \ifx\thu at secret@level\@empty
-        \phantom{秘密}%
-      \else
-        \thu at secret@level\makebox[3em][c]{\thu at secret@year}年%
-      \fi\par
-    }\par
-    \begingroup
-      \includegraphics{tsinghua-name-bachelor.pdf}%
-      \par
-    \endgroup
+      \CJKfamily+{}\xiaosi
+      \ifx\thu at secret@level\@empty\else
+        \thu at secret@level\space\thu at secret@year 年\par
+      \fi
+    }%
+  \endgroup
+  \vfill
+  \begingroup
+    \centering
+    \includegraphics{tsinghua-name-bachelor.pdf}%
     \vskip 0.94cm%
     {\sffamily\bfseries\xiaochu\ziju{0.5}综合论文训练\par}%
-    \vskip 2.3cm%
-    \parbox[t][2.4cm][t]{\textwidth}{%
-      \heiti\xiaoer[1.56]%
-      \parindent=2em%
-      \hangindent=5em%
-      \makebox[3em][l]{题目:}%
+  \endgroup
+  \vskip 1.8cm%
+  \begingroup
+    \heiti
+    \ifthu at main@language at chinese
       \yihao[1.56]%
-      \CJKunderline[skip=false, thickness=0.05em, depth=0.12em]{\thu at title}\par
-    }\par
-    \vskip 2.5cm%
-    \begingroup
-      \fangsong\sanhao[2.3]%
-      \leftskip=2.5cm%
-      \parindent=\z@
-      \def\thu at info@item##1##2##3{%
-        \ifx##3\@empty\else
-          \thu at fixed@box{%
-            \ifx\thu at joint@supervisor\@empty
-              4em%
-            \else
-              5.5em%
-            \fi
-          }{##1}:##2{##3}\\
-        \fi
-      }%
-      \def\thu at name@title at format##1##2{%
-        \thu at stretch{3em}{##1}\quad ##2%
-      }
-      \thu at info@item{系别}{}{\thu at department}%
-      \thu at info@item{专业}{}{\thu at discipline}%
-      \thu at info@item{姓名}{\thu at name@title}{\thu at author}%
-      \thu at info@item{指导教师}{\thu at name@title}{\thu at supervisor}%
-      \thu at info@item{辅导教师}{\thu at name@title}{\thu at associate@supervisor}%
-      \thu at info@item{联合指导教师}{\thu at name@title}{\thu at joint@supervisor}%
-      \par
-    \endgroup
-    \vskip 1.5cm%
+    \else
+      \fontsize{26bp}{32bp}\selectfont
+    \fi
+    \parindent=18bp%
+    \hangindent=72bp%
+    \makebox[54bp]{\xiaoer[1.2]题目:}%
+    \CJKunderline*[skip=false, thickness=0.05em, depth=0.12em]{\thu at title}%
+    \ifthu at main@language at english
+      \\
+      \thusetup{language=english}%
+      \ul\thu at title@en
+      \thusetup{language=chinese}%
+    \fi
+    \par
+  \endgroup
+  \vskip 1.9cm%
+  \begingroup
+    \fangsong\sanhao[2.32]%
+    \leftskip=2.5cm%
+    \parindent=\z@
+    \def\thu at info@item##1##2##3{%
+      \ifx##3\@empty\else
+        \thu at fixed@box{%
+          \ifx\thu at joint@supervisor\@empty
+            4em%
+          \else
+            5.5em%
+          \fi
+        }{##1}:##2{##3}\par
+      \fi
+    }%
+    \def\thu at name@title at format##1##2{%
+      \thu at stretch{3em}{##1}\quad ##2%
+    }%
+    \thu at info@item{系别}{}{\thu at department}%
+    \thu at info@item{专业}{}{\thu at discipline}%
+    \thu at info@item{姓名}{\thu at name@title}{\thu at author}%
+    \thu at info@item{指导教师}{\thu at name@title}{\thu at supervisor}%
+    \thu at info@item{辅导教师}{\thu at name@title}{\thu at associate@supervisor}%
+    \thu at info@item{联合指导教师}{\thu at name@title}{\thu at joint@supervisor}%
+  \endgroup
+  \vskip 1.4cm%
+  \begingroup
+    \centering
     {\CJKfamily+{}\xiaosi\thu at format@date{\thu at date@zh at digit}{\thu at date}\par}%
   \endgroup
+  \vfill
   \clearpage
   \restoregeometry
 }
@@ -3585,7 +3912,44 @@
 }
 %    \end{macrocode}
 %
-% \myentry{授权说明}
+% \subsubsection{答辩委员会名单}
+% \begin{environment}{committee}
+% 学位论文指导小组、公开评阅人和答辩委员会名单。
+%    \begin{macrocode}
+\def\thu at committee@name{学位论文指导小组、公开评阅人和答辩委员会名单}
+\newenvironment{committee}[1][]{%
+  \cleardoublepage
+  \let\thu at committee@file\@empty
+  \kv at define@key{thu at committee}{name}{\let\thu at committee@name\kv at value}%
+  \kv at define@key{thu at committee}{file}{\let\thu at committee@file\kv at value}%
+  \kv at set@family at handler{thu at committee}{%
+    \ifx\kv at value\relax
+      \let\thu at committee@file\kv at key
+    \else
+      \kv at handled@false
+    \fi
+  }%
+  \kvsetkeys{thu at committee}{#1}%
+  \ifx\thu at committee@file\@empty
+    \thu at chapter*[]{\thu at committee@name}%
+  \else
+    \thu at pdfbookmark{0}{\thu at committee@name}%
+    \includepdf{\thu at committee@file}%
+  \fi
+  \thispagestyle{empty}%
+  \ctexset{
+    section = {
+      format    += {\centering},
+      numbering = false,
+      afterindent = false,
+    },
+  }%
+}{%
+}
+%    \end{macrocode}
+% \end{environment}
+%
+% \subsubsection{授权说明}
 % \begin{macro}{\copyrightpage}
 % 授权说明
 %    \begin{macrocode}
@@ -3592,23 +3956,27 @@
 \newcommand{\thu at authorization@title}{关于学位论文使用授权的说明}
 \newcommand{\thu at authorization@content}{%
 \ifthu at degree@bachelor
-本人完全了解清华大学有关保留、使用学位论文的规定,即:学校有权保留学位
-论文的复印件,允许该论文被查阅和借阅;学校可以公布该论文的全部或部分内
-容,可以采用影印、缩印或其他复制手段保存该论文。
+    本人完全了解清华大学有关保留、使用学位论文的规定,%
+    即:学校有权保留学位论文的复印件,允许该论文被查阅和借阅;%
+    学校可以公布该论文的全部或部分内容,可以采用影印、缩印或其他复制手段保存该论文。%
 \else
-本人完全了解清华大学有关保留、使用学位论文的规定,即:
-
-清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:(1)已获学位的研究生
-必须按学校规定提交学位论文,学校可以采用影印、缩印或其他复制手段保存研究生上交的
-学位论文;(2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料
-室等场所供校内师生阅读,或在校园网上供校内师生浏览部分内容\ifthu at degree@master 。\else ;
-(3)根据《中华人民共和国学位条例暂行实施办法》,向国家图书馆报送可以公开的学位
-论文。\fi
-
-本人保证遵守上述规定。
-\fi}
+    本人完全了解清华大学有关保留、使用学位论文的规定,即:\par
+    清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:%
+    (1)已获学位的研究生必须按学校规定提交学位论文,%
+    学校可以采用影印、缩印或其他复制手段保存研究生上交的学位论文;%
+    (2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料室等场所供校内师生阅读,%
+    或在校园网上供校内师生浏览部分内容;%
+    \ifthu at degree@doctor
+      (3)根据《中华人民共和国学位条例暂行实施办法》及相关部门具体要求,向国家图书馆报送相应的学位论文。%
+    \else
+      (3)按照相关部门督导、抽查等要求,报送相应的学位论文。%
+    \fi
+    \par
+    本人保证遵守上述规定。%
+  \fi
+}
 \newcommand{\thu at authorization@addon}{%
-  \ifthu at degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后应遵守此规定)\fi}
+  \ifthu at degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后遵守此规定)\fi}
 \newcommand{\thu at authorization@authorsig}{\ifthu at degree@bachelor 签\hskip1em名:\else 作者签名:\fi}
 \newcommand{\thu at authorization@teachersig}{导师签名:}
 \newcommand{\thu at authorization@frontdate}{%
@@ -3632,7 +4000,15 @@
       \fi%
     \else
       \thu at phantomsection
-      \includepdf{#1}%
+      \kv at define@key{thu at copyright}{file}{\includepdf{\kv at value}}%
+      \kv at set@family at handler{thu at copyright}{%
+        \ifx\kv at value\relax
+          \includepdf{\kv at key}%
+        \else
+          \kv at handled@false
+        \fi
+      }%
+      \kvsetkeys{thu at copyright}{#1}%
     \fi
   \fi
 }
@@ -3691,19 +4067,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\thu at put@keywords}
-% 排版关键字。
-%    \begin{macrocode}
-\newbox\thu at kw
-\newcommand\thu at put@keywords[2]{%
-  \begingroup
-    \setbox\thu at kw=\hbox{#1}
-    \ifthu at degree@bachelor\indent\else\noindent\hangindent\wd\thu at kw\hangafter1\fi%
-    \box\thu at kw#2\par
-  \endgroup}
-%    \end{macrocode}
-% \end{macro}
-%
 % \begin{environment}{abstract}
 % 中文摘要部分的标题为“\textbf{摘要}”,用黑体三号字。
 % 摘要内容用小四号字书写,两端对齐,汉字用宋体,外文字用 Times New Roman 体,
@@ -3714,16 +4077,29 @@
     \cleardoublepage
   \fi
   \thusetup{language = chinese}%
-  \thu at chapter*[]{\thu at abstract@name}%  %no tocline
+  \ifthu at degree@graduate
+    \thu at chapter*{\thu at abstract@name}%
+  \else
+    \thu at chapter*[]{\thu at abstract@name}%
+  \fi
 }{%
 %    \end{macrocode}
 %
 % 每个关键词之间空两个汉字符宽度, 且为悬挂缩进。
 %    \begin{macrocode}
-  \ifthu at degree@doctor\vfill\else\vskip12bp\fi
-  \thu at put@keywords{\textbf{关键词:}}{%
-    \thu at clist@use{\thu at keywords}{;}%
-  }%
+  \par
+  \ifthu at degree@graduate
+    \vspace*{\stretch{4}}%
+    \noindent
+    \textsf{关键词:}%
+  \else
+    \null\par
+    \textbf{关键词:}%
+  \fi
+  \thu at clist@use{\thu at keywords}{;}%
+  \ifthu at degree@graduate
+    \vspace*{\stretch{1}}%
+  \fi
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
@@ -3733,8 +4109,7 @@
 % \end{environment}
 %
 % \begin{environment}{abstract*}
-% 英文摘要部分的标题为 \textbf{Abstract},用 Arial 体三号字。研究生的英文摘要要求
-% 非常怪异:虽然正文前的封面部分为右开,但是英文摘要要跟中文摘要连续。
+% 英文摘要部分的标题为 \textbf{Abstract},用 Arial 体三号字。
 % 摘要内容用小四号 Times New Roman。
 %    \begin{macrocode}
 \newenvironment{abstract*}{%
@@ -3742,14 +4117,28 @@
     \cleardoublepage
   \fi
   \thusetup{language = english}%
-  \thu at chapter*[]{\thu at abstract@name at en}%  no tocline
+  \ifthu at degree@graduate
+    \begingroup
+      \ctexset{chapter/format+=\bfseries}%
+      \thu at chapter*[\sffamily\bfseries\thu at abstract@name at en]{\thu at abstract@name at en}%
+    \endgroup
+  \else
+    \thu at chapter*[]{\thu at abstract@name at en}%
+  \fi
 }{%
-  \ifthu at degree@doctor\vfill\else\vskip12bp\fi
-  \thu at put@keywords{%
-    \textbf{\ifthu at degree@bachelor Keywords:\else Key Words:\fi\enskip}%
-  }{%
-    \thu at clist@use{\thu at keywords@en}{; }%
-  }%
+  \par
+  \ifthu at degree@graduate
+    \vspace*{\stretch{4}}%
+    \noindent
+    \textbf{Key Words:}\space
+  \else
+    \null\par
+    \textbf{Keywords:}\space
+  \fi
+  \thu at clist@use{\thu at keywords@en}{; }%
+  \ifthu at degree@graduate
+    \vspace*{\stretch{1}}%
+  \fi
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
@@ -3767,7 +4156,11 @@
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
-  \thu at chapter*[]{\thu at denotation@name} % no tocline
+  \ifthu at degree@graduate
+    \thu at chapter*{\thu at denotation@name}%
+  \else
+    \thu at chapter*[]{\thu at denotation@name}%
+  \fi
   \vskip-30bp\xiaosi[1.6]\begin{thu at denotation}[labelwidth=#1]
 }{%
   \end{thu at denotation}
@@ -3793,7 +4186,6 @@
 % \begin{environment}{acknowledgements}
 % 定义致谢环境
 %    \begin{macrocode}
-\newcommand\thu at statement@name{声\hspace{\ccwd}明}
 \newcommand{\thu at statement@text}{本人郑重声明:所呈交的学位论文,是本人在导师指导下
   ,独立进行研究工作所取得的成果。尽我所知,除文中已经注明引用的内容外,本学位论
   文的研究成果不包含任何他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的
@@ -3805,6 +4197,7 @@
 % 定义致谢与声明环境。
 %    \begin{macrocode}
 \newenvironment{acknowledgements}{%
+  \@mainmatterfalse
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
@@ -3815,9 +4208,9 @@
   \fi
 }
 %    \end{macrocode}
+% \end{environment}
 %
-% \end{environment}
-% \begin{environment}{statement}
+% \begin{macro}{statement}
 % 声明部分(支持扫描文件替换)
 %    \begin{macrocode}
 \thu at define@key{
@@ -3839,21 +4232,38 @@
   },
 }
 \thu at option@hook{statement-page-number}{%
+  \ifthu at statement@page at number@false
+    \thusetup{statement-page-style=empty}%
+  \else
+    \thusetup{statement-page-style=plain}%
+  \fi
   \thu at warning{%
     The "statement-page-number" option is deprecated.
-    Use "statement-page-style" instead%
+    Use "page-style" option of \protect\statement command instead%
   }%
 }
 \newcommand\statement[1][]{%
+  \@mainmatterfalse
   \ifthu at degree@bachelor
     \cleardoublepage
+    \def\thu at statement@name{声\hspace{2em}明}%
+  \else
+    \def\thu at statement@name{声\hspace{1em}明}%
   \fi
-  \def\thu@@tmp{#1}%
-  \ifx\thu@@tmp\@empty
+  \let\thu at statement@file\@empty
+  \kv at define@key{thu at statement}{page-style}{\thusetup{statement-page-style=##1}}%
+  \kv at define@key{thu at statement}{file}{\let\thu at statement@file\kv at value}%
+  \kv at set@family at handler{thu at statement}{%
+    \ifx\kv at value\relax
+      \let\thu at statement@file\kv at key
+    \else
+      \kv at handled@false
+    \fi
+  }%
+  \kvsetkeys{thu at statement}{#1}%
+  \ifx\thu at statement@file\@empty
     \thu at chapter*{\thu at statement@name}%
-    \ifthu at statement@page at number@false
-      \thispagestyle{\thu at statement@page at style}%
-    \fi
+    \thispagestyle{\thu at statement@page at style}%
     \thu at statement@text\par
     \ifthu at degree@graduate
       \vskip 2cm%
@@ -3867,7 +4277,7 @@
       \markboth{\thu at statement@name}{}%
       \thu at phantomsection
       \addcontentsline{toc}{chapter}{\thu at statement@name}%
-    }]{#1}%
+    }]{\thu at statement@file}%
   \fi
   \ifthu at degree@bachelor
     \cleardoublepage
@@ -3874,7 +4284,7 @@
   \fi
 }
 %    \end{macrocode}
-% \end{environment}
+% \end{macro}
 %
 % 兼容旧版本保留 \env{acknowledgement}。
 %    \begin{macrocode}
@@ -3882,12 +4292,8 @@
 \let\endacknowledgement\endacknowledgements
 %    \end{macrocode}
 %
-% \subsubsection{图表索引}
-% \label{sec:threeindex}
-% \begin{macro}{\listoffigures}
-% \begin{macro}{\listoffigures*}
-% \begin{macro}{\listoftables}
-% \begin{macro}{\listoftables*}
+% \subsubsection{插图和附表清单}
+% \label{sec:threelists}
 % 定义图表以及公式目录样式。
 %    \begin{macrocode}
 \def\thu at listof#1{% #1: float type
@@ -3896,36 +4302,50 @@
     {\thu at chapter*[]{\csname list#1name\endcsname}\@starttoc{\csname ext@#1\endcsname}}
     {\thu at chapter*{\csname list#1name\endcsname}\@starttoc{\csname ext@#1\endcsname}}%
 }
+%    \end{macrocode}
+%
+% \begin{macro}{\listoffigures}
+% \begin{macro}{\listoffigures*}
+% 插图清单。
+%    \begin{macrocode}
 \renewcommand\listoffigures{%
-  \thu at set@list at label@width{\figurename}%
   \thu at listof{figure}%
 }
+\titlecontents{figure}
+  [\z@]{}
+  {\contentspush{\figurename~\thecontentslabel\hspace{\ccwd}}}{}
+  {\nobreak\thu at leaders\nobreak\hfil\thecontentspage}
 %    \end{macrocode}
+% \end{macro}
+% \end{macro}
 %
-% 英文的图序“Figure X-X”比中文略宽,所以根据实际内容设置不同宽度。
+% \begin{macro}{\listoftables}
+% \begin{macro}{\listoftables*}
+% 附表清单。
 %    \begin{macrocode}
-\newlength{\thu at list@label at width}
-\newcommand\thu at set@list at label@width[1]{%
-  \settowidth{\thu at list@label at width}{#1~8.8}%
-  \addtolength{\thu at list@label at width}{1em}%
-}
-\titlecontents{figure}
-  [\thu at list@label at width]{\addvspace{6bp}}
-  {\contentslabel[\figurename~\thecontentslabel]{\thu at list@label at width}}{}
-  {\thu at leaders\thecontentspage}
 \renewcommand\listoftables{%
-  \thu at set@list at label@width{\tablename}%
   \thu at listof{table}%
 }
 \titlecontents{table}
-  [\thu at list@label at width]{\addvspace{6bp}}
-  {\contentslabel[\tablename~\thecontentslabel]{\thu at list@label at width}}{}
+  [\z@]{}
+  {\contentspush{\tablename~\thecontentslabel\hspace{\ccwd}}}{}
   {\thu at leaders\thecontentspage}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
+%
+% \begin{macro}{\listoffiguresandtables}
+% 将插图和附表合在一起列出“插图和附表清单”。
+%    \begin{macrocode}
+\newcommand\listoffiguresandtables{%
+  \thu at chapter*{\thu at list@figure at table@name}%
+  \@starttoc{lof}%
+  \par
+  \null\par
+  \@starttoc{lot}%
+}
+%    \end{macrocode}
 % \end{macro}
-% \end{macro}
 %
 % \begin{macro}{\equcaption}
 % 本命令只是为了生成公式列表,所以这个 caption 是假的。如果要编号最好用
@@ -3955,7 +4375,7 @@
 \titlecontents{equation}
   [0pt]{\addvspace{6bp}}
   {\thu at equation@name~\thecontentslabel}{}
-  {\thu at leaders\thecontentspage}
+  {\nobreak\thu at leaders\nobreak\thecontentspage}
 \contentsuse{equation}{loe}
 %    \end{macrocode}
 % \end{macro}
@@ -3965,109 +4385,397 @@
 % \subsection{参考文献}
 % \label{sec:ref}
 %
+% 参考文献的格式根据用户选择的 \BibTeX{}/BibLaTeX 分别进行配置,
+% 所以使用 \pkg{filehook} 的方式。
+%
+% 设置 \option{cite-style} 的接口,只对 \BibTeX{} 的编译方式有效。
+%    \begin{macrocode}
+  \thu at define@key{
+    cite-style = {
+      name = cite at style,
+    }
+  }
+%    \end{macrocode}
+%
+% \subsubsection{BibTeX + \pkg{natbib} 宏包}
+%
+% \BibTeX{} 和 \pkg{natbib} 宏包的配置。
+%    \begin{macrocode}
+\PassOptionsToPackage{compress}{natbib}
+\AtEndOfPackageFile*{natbib}{
+%    \end{macrocode}
 % \begin{macro}{\inlinecite}
 % 依赖于 \pkg{natbib} 宏包,修改其中的命令。 旧命令 \cs{onlinecite} 依然可用。
 %    \begin{macrocode}
-\DeclareRobustCommand\inlinecite{\@inlinecite}
-\def\@inlinecite#1{\begingroup\let\@cite\NAT at citenum\citep{#1}\endgroup}
-\let\onlinecite\inlinecite
+  \DeclareRobustCommand\inlinecite{\@inlinecite}
+  \def\@inlinecite#1{\begingroup\let\@cite\NAT at citenum\citep{#1}\endgroup}
+  \let\onlinecite\inlinecite
 %    \end{macrocode}
 % \end{macro}
 %
-% 参考文献的正文部分用五号字。
-% 行距采用固定值 16 磅,段前空 3 磅,段后空 0 磅。
-% 本科生要求固定行距 17pt,段前后间距 3pt。
+% 几种种引用样式,与 \file{bst} 文件名保持一致,
+% 这样在使用 \cs{bibliographystyle} 选择参考文献表的样式时也会设置对应的引用样式。
+%    \begin{macrocode}
+  \expandafter\newcommand\csname bibstyle at thuthesis-numeric\endcsname{%
+    \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+  \expandafter\newcommand\csname bibstyle at thuthesis-author-year\endcsname{%
+    \bibpunct{(}{)}{;}{a}{,}{,}}
+  \expandafter\newcommand\csname bibstyle at thuthesis-bachelor\endcsname{%
+    \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+  \@namedef{bibstyle at thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
+  \thu at option@hook{cite-style}{\@nameuse{bibstyle at thuthesis-\thu at cite@style}}
+%    \end{macrocode}
 %
-% 复用 \pkg{natbib} 的 \texttt{thebibliography} 环境,调整距离。
+% 修改引用的样式。
+% 这里在 filehook 中无法使用 \cs{patchcmd},所以只能手动重定义。
+%
+% 将 \cs{citep} super 式引用的页码改为上标。
 %    \begin{macrocode}
-\renewcommand\bibsection{\thu at chapter*{\bibname}}
-\renewcommand\bibfont{\ifthu at degree@bachelor\wuhao[1.619]\else\wuhao[1.5]\fi}
-\setlength\bibhang{2\ccwd}
-\addtolength{\bibsep}{-0.7em}
-\setlength{\labelsep}{0.4em}
-\def\@biblabel#1{[#1]\hfill}
+  \renewcommand\NAT at citesuper[3]{\ifNAT at swa
+    \if*#2*\else#2\NAT at spacechar\fi
+    % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%
+    %  \if*#3*\else\NAT at spacechar#3\fi\else #1\fi\endgroup}
+    \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+    \else #1\fi\endgroup}
 %    \end{macrocode}
 %
-% 几种种引用样式:
+% 将 \cs{citep} numbers 式引用的页码改为上标并置于括号外。
 %    \begin{macrocode}
-\expandafter\newcommand\csname bibstyle at thuthesis-numeric\endcsname{%
-  \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
-\expandafter\newcommand\csname bibstyle at thuthesis-author-year\endcsname{%
-  \bibpunct{(}{)}{;}{a}{,}{,}}
-\expandafter\newcommand\csname bibstyle at thuthesis-bachelor\endcsname{%
-  \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+  \renewcommand\NAT at citenum%
+      [3]{\ifNAT at swa\NAT@@open\if*#2*\else#2\NAT at spacechar\fi
+          % #1\if*#3*\else\NAT at cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+          #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
 %    \end{macrocode}
 %
-% 设置 \option{cite-style} 的接口:
+% 修改 \cs{citet} 引用的样式。
 %    \begin{macrocode}
-\@namedef{bibstyle at thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
-\thu at define@key{
-  cite-style = {
-    name = cite at style,
-  }
-}
-\thu at option@hook{cite-style}{\@nameuse{bibstyle at thuthesis-\thu at cite@style}}
+  \def\NAT at citexnum[#1][#2]#3{%
+    \NAT at reset@parser
+    \NAT at sort@cites{#3}%
+    \NAT at reset@citea
+    \@cite{\def\NAT at num{-1}\let\NAT at last@yr\relax\let\NAT at nm\@empty
+      \@for\@citeb:=\NAT at cite@list\do
+      {\@safe at activestrue
+      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+      \@safe at activesfalse
+      \@ifundefined{b@\@citeb\@extra at b@citeb}{%
+        {\reset at font\bfseries?}
+          \NAT at citeundefined\PackageWarning{natbib}%
+        {Citation `\@citeb' on page \thepage \space undefined}}%
+      {\let\NAT at last@num\NAT at num\let\NAT at last@nm\NAT at nm
+        \NAT at parse{\@citeb}%
+        \ifNAT at longnames\@ifundefined{bv@\@citeb\@extra at b@citeb}{%
+          \let\NAT at name=\NAT at all@names
+          \global\@namedef{bv@\@citeb\@extra at b@citeb}{}}{}%
+        \fi
+        \ifNAT at full\let\NAT at nm\NAT at all@names\else
+          \let\NAT at nm\NAT at name\fi
+        \ifNAT at swa
+        \@ifnum{\NAT at ctype>\@ne}{%
+          \@citea
+          \NAT at hyper@{\@ifnum{\NAT at ctype=\tw@}{\NAT at test{\NAT at ctype}}{\NAT at alias}}%
+        }{%
+          \@ifnum{\NAT at cmprs>\z@}{%
+          \NAT at ifcat@num\NAT at num
+            {\let\NAT at nm=\NAT at num}%
+            {\def\NAT at nm{-2}}%
+          \NAT at ifcat@num\NAT at last@num
+            {\@tempcnta=\NAT at last@num\relax}%
+            {\@tempcnta\m at ne}%
+          \@ifnum{\NAT at nm=\@tempcnta}{%
+            \@ifnum{\NAT at merge>\@ne}{}{\NAT at last@yr at mbox}%
+          }{%
+            \advance\@tempcnta by\@ne
+            \@ifnum{\NAT at nm=\@tempcnta}{%
 %    \end{macrocode}
 %
-% 下面修改 \pkg{natbib} 的引用格式,主要是将页码写在上标位置。
-% numeric 模式的 \cs{citet} 的页码:
+% 在顺序编码制下,\pkg{natbib} 只有在三个以上连续文献引用才会使用连接号,
+% 这里修改为允许两个引用使用连接号。
 %    \begin{macrocode}
-\patchcmd\NAT at citexnum{%
-  \@ifnum{\NAT at ctype=\z@}{%
-    \if*#2*\else\NAT at cmt#2\fi
-  }{}%
-  \NAT at mbox{\NAT@@close}%
-}{%
-  \NAT at mbox{\NAT@@close}%
-  \@ifnum{\NAT at ctype=\z@}{%
-    \if*#2*\else\textsuperscript{#2}\fi
-  }{}%
-}{}{}
+              % \ifx\NAT at last@yr\relax
+              %   \def at NAT@last at yr{\@citea}%
+              % \else
+              %   \def at NAT@last at yr{--\NAT at penalty}%
+              % \fi
+              \def at NAT@last at yr{-\NAT at penalty}%
+            }{%
+              \NAT at last@yr at mbox
+            }%
+          }%
+          }{%
+          \@tempswatrue
+          \@ifnum{\NAT at merge>\@ne}{\@ifnum{\NAT at last@num=\NAT at num\relax}{\@tempswafalse}{}}{}%
+          \if at tempswa\NAT at citea@mbox\fi
+          }%
+        }%
+        \NAT at def@citea
+        \else
+          \ifcase\NAT at ctype
+            \ifx\NAT at last@nm\NAT at nm \NAT at yrsep\NAT at penalty\NAT at space\else
+              \@citea \NAT at test{\@ne}\NAT at spacechar\NAT at mbox{\NAT at super@kern\NAT@@open}%
+            \fi
+            \if*#1*\else#1\NAT at spacechar\fi
+            \NAT at mbox{\NAT at hyper@{{\citenumfont{\NAT at num}}}}%
+            \NAT at def@citea at box
+          \or
+            \NAT at hyper@citea at space{\NAT at test{\NAT at ctype}}%
+          \or
+            \NAT at hyper@citea at space{\NAT at test{\NAT at ctype}}%
+          \or
+            \NAT at hyper@citea at space\NAT at alias
+          \fi
+        \fi
+      }%
+      }%
+        \@ifnum{\NAT at cmprs>\z@}{\NAT at last@yr}{}%
+        \ifNAT at swa\else
 %    \end{macrocode}
 %
-% Numeric 模式的 \cs{citep} 的页码:
+% 将页码放在括号外边,并且置于上标。
 %    \begin{macrocode}
-\renewcommand\NAT at citesuper[3]{\ifNAT at swa
-  \if*#2*\else#2\NAT at spacechar\fi
-\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
-   \else #1\fi\endgroup}
+          % \@ifnum{\NAT at ctype=\z@}{%
+          %   \if*#2*\else\NAT at cmt#2\fi
+          % }{}%
+          \NAT at mbox{\NAT@@close}%
+          \@ifnum{\NAT at ctype=\z@}{%
+            \if*#2*\else\textsuperscript{#2}\fi
+          }{}%
+        \fi
+    }{#1}{#2}%
+  }%
 %    \end{macrocode}
 %
-% Author-year 模式的 \cs{citet} 的页码:
+% 修改 \cs{citep} author-year 式的页码:
 %    \begin{macrocode}
-\patchcmd{\NAT at citex}{%
-  \if*#2*\else\NAT at cmt#2\fi
-  \if\relax\NAT at date\relax\else\NAT@@close\fi
-}{%
-  \if\relax\NAT at date\relax\else\NAT@@close\fi
-  \if*#2*\else\textsuperscript{#2}\fi
-}{}{}
+  \renewcommand\NAT at cite%
+      [3]{\ifNAT at swa\NAT@@open\if*#2*\else#2\NAT at spacechar\fi
+          % #1\if*#3*\else\NAT at cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+          #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
 %    \end{macrocode}
 %
-% Author-year 模式的 \cs{citep} 的页码:
+% 修改 \cs{citet} author-year 式的页码:
 %    \begin{macrocode}
-\renewcommand\NAT at cite%
-    [3]{\ifNAT at swa\NAT@@open\if*#2*\else#2\NAT at spacechar\fi
-        #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
+  \def\NAT at citex%
+    [#1][#2]#3{%
+    \NAT at reset@parser
+    \NAT at sort@cites{#3}%
+    \NAT at reset@citea
+    \@cite{\let\NAT at nm\@empty\let\NAT at year\@empty
+      \@for\@citeb:=\NAT at cite@list\do
+      {\@safe at activestrue
+      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+      \@safe at activesfalse
+      \@ifundefined{b@\@citeb\@extra at b@citeb}{\@citea%
+        {\reset at font\bfseries ?}\NAT at citeundefined
+                  \PackageWarning{natbib}%
+        {Citation `\@citeb' on page \thepage \space undefined}\def\NAT at date{}}%
+      {\let\NAT at last@nm=\NAT at nm\let\NAT at last@yr=\NAT at year
+        \NAT at parse{\@citeb}%
+        \ifNAT at longnames\@ifundefined{bv@\@citeb\@extra at b@citeb}{%
+          \let\NAT at name=\NAT at all@names
+          \global\@namedef{bv@\@citeb\@extra at b@citeb}{}}{}%
+        \fi
+      \ifNAT at full\let\NAT at nm\NAT at all@names\else
+        \let\NAT at nm\NAT at name\fi
+      \ifNAT at swa\ifcase\NAT at ctype
+        \if\relax\NAT at date\relax
+          \@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}\NAT at date}%
+        \else
+          \ifx\NAT at last@nm\NAT at nm\NAT at yrsep
+              \ifx\NAT at last@yr\NAT at year
+                \def\NAT at temp{{?}}%
+                \ifx\NAT at temp\NAT at exlab\PackageWarningNoLine{natbib}%
+                {Multiple citation on page \thepage: same authors and
+                year\MessageBreak without distinguishing extra
+                letter,\MessageBreak appears as question mark}\fi
+                \NAT at hyper@{\NAT at exlab}%
+              \else\unskip\NAT at spacechar
+                \NAT at hyper@{\NAT at date}%
+              \fi
+          \else
+            \@citea\NAT at hyper@{%
+              \NAT at nmfmt{\NAT at nm}%
+              \hyper at natlinkbreak{%
+                \NAT at aysep\NAT at spacechar}{\@citeb\@extra at b@citeb
+              }%
+              \NAT at date
+            }%
+          \fi
+        \fi
+      \or\@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}}%
+      \or\@citea\NAT at hyper@{\NAT at date}%
+      \or\@citea\NAT at hyper@{\NAT at alias}%
+      \fi \NAT at def@citea
+      \else
+        \ifcase\NAT at ctype
+          \if\relax\NAT at date\relax
+            \@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}}%
+          \else
+          \ifx\NAT at last@nm\NAT at nm\NAT at yrsep
+              \ifx\NAT at last@yr\NAT at year
+                \def\NAT at temp{{?}}%
+                \ifx\NAT at temp\NAT at exlab\PackageWarningNoLine{natbib}%
+                {Multiple citation on page \thepage: same authors and
+                year\MessageBreak without distinguishing extra
+                letter,\MessageBreak appears as question mark}\fi
+                \NAT at hyper@{\NAT at exlab}%
+              \else
+                \unskip\NAT at spacechar
+                \NAT at hyper@{\NAT at date}%
+              \fi
+          \else
+            \@citea\NAT at hyper@{%
+              \NAT at nmfmt{\NAT at nm}%
+              \hyper at natlinkbreak{\NAT at spacechar\NAT@@open\if*#1*\else#1\NAT at spacechar\fi}%
+                {\@citeb\@extra at b@citeb}%
+              \NAT at date
+            }%
+          \fi
+          \fi
+        \or\@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}}%
+        \or\@citea\NAT at hyper@{\NAT at date}%
+        \or\@citea\NAT at hyper@{\NAT at alias}%
+        \fi
+        \if\relax\NAT at date\relax
+          \NAT at def@citea
+        \else
+          \NAT at def@citea at close
+        \fi
+      \fi
+      }}\ifNAT at swa\else
 %    \end{macrocode}
 %
-% 在顺序编码制下,\pkg{natbib} 只有在三个以上连续文献引用才会使用连接号,
-% 这里修改为允许两个引用使用连接号。
+% 将页码放在括号外边,并且置于上标。
 %    \begin{macrocode}
-\patchcmd{\NAT at citexnum}{%
-  \ifx\NAT at last@yr\relax
-    \def at NAT@last at yr{\@citea}%
+        % \if*#2*\else\NAT at cmt#2\fi
+        \if\relax\NAT at date\relax\else\NAT@@close\fi
+        \if*#2*\else\textsuperscript{#2}\fi
+      \fi}{#1}{#2}}
+%    \end{macrocode}
+%
+% 参考文献表的正文部分用五号字。
+% 行距采用固定值 16 磅,段前空 3 磅,段后空 0 磅。
+%
+% 本科生要求宋体五号/Times New Roman 10.5 pt,固定行距 17pt,段前后间距 3pt;
+% 英文专业要求悬挂缩进 0.5inch(1.27 厘米)。
+%
+% 复用 \pkg{natbib} 的 \texttt{thebibliography} 环境,调整距离。
+%    \begin{macrocode}
+  \renewcommand\bibsection{\thu at chapter*{\bibname}}
+  \newcommand\thu at set@bibliography at format{%
+    \ifthu at degree@bachelor
+      \renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
+      \setlength{\bibsep}{6bp}%
+      \ifthu at main@language at chinese
+        \setlength{\bibhang}{21bp}%
+      \else
+        \setlength{\bibhang}{0.5in}%
+      \fi
+    \else
+      \renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
+      \setlength{\bibsep}{3bp}%
+      \setlength{\bibhang}{21bp}%
+    \fi
+  }
+  \thu at set@bibliography at format
+  \thu at option@hook{degree}{\thu at set@bibliography at format}
+  \thu at option@hook{main-language}{\thu at set@bibliography at format}
+%    \end{macrocode}
+%
+% 参考文献表的编号居左,宽度 1 cm。
+%    \begin{macrocode}
+  \def\@biblabel#1{[#1]\hfill}
+  \renewcommand\NAT at bibsetnum[1]{%
+    % \settowidth\labelwidth{\@biblabel{#1}}%
+    % \setlength{\leftmargin}{\labelwidth}%
+    % \addtolength{\leftmargin}{\labelsep}%
+    \setlength{\leftmargin}{1cm}%
+    \setlength{\itemindent}{\z@}%
+    \setlength{\labelsep}{0.1cm}%
+    \setlength{\labelwidth}{0.9cm}%
+    \setlength{\itemsep}{\bibsep}
+    \setlength{\parsep}{\z@}%
+    \ifNAT at openbib
+      \addtolength{\leftmargin}{\bibindent}%
+      \setlength{\itemindent}{-\bibindent}%
+      \setlength{\listparindent}{\itemindent}%
+      \setlength{\parsep}{0pt}%
+    \fi
+  }
+}
+%    \end{macrocode}
+%
+% \subsubsection{\pkg{biblatex} 宏包}
+%
+%    \begin{macrocode}
+\AtEndOfPackageFile*{biblatex}{
+  \AtBeginDocument{
+    \ifthenelse{\equal{\blx at bbxfile}{apa}}{\def\bibname{REFERENCES}}{}
+    \ifthenelse{\equal{\blx at bbxfile}{apa6}}{\def\bibname{REFERENCES}}{}
+    \ifthenelse{\equal{\blx at bbxfile}{mla}}{\def\bibname{WORKS CITED}}{}
+    \ifthenelse{\equal{\blx at bbxfile}{mla-new}}{\def\bibname{WORKS CITED}}{}
+  }
+  \DeclareRobustCommand\inlinecite{\parencite}
+  \defbibheading{bibliography}[\bibname]{\thu at chapter*{\bibname}}
+  \newcommand\thu at set@bibliography at format{%
+    \ifthu at degree@bachelor
+      \renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
+      \setlength{\bibitemsep}{6bp}%
+      \ifthu at main@language at chinese
+        \setlength{\bibhang}{21bp}%
+      \else
+        \setlength{\bibhang}{0.5in}%
+      \fi
+    \else
+      \renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
+      \setlength{\bibitemsep}{3bp}%
+      \setlength{\biblabelsep}{0.1cm}%
+      \setlength{\bibhang}{21bp}%
+    \fi
+  }
+  \thu at set@bibliography at format
+  \thu at option@hook{degree}{\thu at set@bibliography at format}
+  \thu at option@hook{main-language}{\thu at set@bibliography at format}
+}
+%    \end{macrocode}
+%
+% \subsubsection{\pkg{apacite} 宏包}
+%
+% \pkg{apacite} 在 \cs{begindocument} 处载入的 \file{english.apc}
+% 会覆盖掉 \cs{bibname} 的定义,所以需要重新 \cs{thu at set@chapter at names}。
+%    \begin{macrocode}
+\AtEndOfPackageFile*{apacite}{
+  \AtBeginDocument{
+    \thu at set@chapter at names
+  }
+  \renewcommand\bibliographytypesize{\fontsize{10.5bp}{17bp}\selectfont}
+  \setlength{\bibitemsep}{6bp}
+  \ifthu at main@language at chinese
+    \setlength{\bibleftmargin}{21bp}
+    \setlength{\bibindent}{-\bibleftmargin}
   \else
-    \def at NAT@last at yr{--\NAT at penalty}%
+    \setlength{\bibleftmargin}{0.5in}
+    \setlength{\bibindent}{-\bibleftmargin}
   \fi
-}{%
-  \def at NAT@last at yr{-\NAT at penalty}%
-}{}{}
+  \def\st at rtbibchapter{%
+    \if at numberedbib%
+      \chapter{\bibname}%   e.g.,   6. References
+    \else%
+      \thu at chapter*{\bibname}%   e.g.,   References
+    \fi%
+  }%
+}
 %    \end{macrocode}
 %
 % \subsection{附录}
 % \label{sec:appendix}
 %
+%    \begin{macrocode}
+\g at addto@macro\appendix{%
+  \@mainmattertrue
+}
+%    \end{macrocode}
+%
 % 研究生和本科生的写作指南均未规定附录的节标题是否加入目录,
 % 但是从示例来看,目录中只出现附录的 chapter 标题,
 % 不出现附录中的 section 及 subsection 的标题。
@@ -4123,7 +4831,7 @@
   }%
   \renewcommand\bibname{参考文献}%
   \let\bibsection\thu at appendix@bibsection
-  \renewcommand\@bibunitname{main-survey}%
+  \renewcommand\@bibunitname{\jobname-survey}%
   \let\bibliographystyle\defaultbibliographystyle
   \let\bibliography\thu at appendix@bibliography
   \begin{bibunit}%
@@ -4156,7 +4864,7 @@
       \section{\bibname}%
     \endgroup
   }%
-  \renewcommand\@bibunitname{main-translation}%
+  \renewcommand\@bibunitname{\jobname-translation}%
   \let\bibliographystyle\defaultbibliographystyle
   \let\bibliography\thu at appendix@bibliography
   \begin{bibunit}%
@@ -4174,7 +4882,7 @@
 %    \begin{macrocode}
 \newenvironment{translation-index}{%
   \begin{bibunit}%
-    \renewcommand\@bibunitname{main-index}%
+    \renewcommand\@bibunitname{\jobname-index}%
     \renewcommand\bibname{书面翻译对应的原文索引}%
     \let\bibsection\thu at appendix@bibsection
 }{%
@@ -4234,6 +4942,7 @@
 % 个人简历发表文章等。
 %    \begin{macrocode}
 \newenvironment{resume}[1][\thu at resume@name]{%
+  \@mainmatterfalse
   \thu at chapter*{#1}}{}
 %    \end{macrocode}
 % \end{environment}
@@ -4286,9 +4995,22 @@
 %
 %    \begin{macrocode}
 \newcommand{\record}[1]{%
+  \let\thu at record@file\@empty
+  \kv at define@key{thu at record}{file}{\let\thu at record@file\kv at value}%
+  \kv at set@family at handler{thu at record}{%
+    \ifx\kv at value\relax
+      \let\thu at record@file\kv at key
+    \else
+      \kv at handled@false
+    \fi
+  }%
+  \kvsetkeys{thu at record}{#1}%
+  \ifx\thu at record@file\@empty
+    \thu at error{File path of \protect\record\space is required}
+  \fi
   \cleardoublepage
   \thu at pdfbookmark{0}{综合论文训练记录表}%
-  \includepdf[pages=-]{#1}%
+  \includepdf[pages=-]{\thu at record@file}%
 }
 %    \end{macrocode}
 %
@@ -4341,7 +5063,7 @@
   \@ifpackagelater{hyperref}{2019/04/27}{}{%
     \g at addto@macro\psdmapshortnames{\let\mu\textmu}
   }%
-  \ifthu at language@chinese
+  \ifthu at main@language at chinese
     \hypersetup{
       pdflang = zh-CN,
     }%
@@ -4351,7 +5073,7 @@
     }%
   \fi
   \AtBeginDocument{%
-    \ifthu at language@chinese
+    \ifthu at main@language at chinese
       \hypersetup{
         pdftitle    = \thu at title,
         pdfauthor   = \thu at author,
@@ -4503,7 +5225,6 @@
   \floatname{algorithm}{\thu at algorithm@name}
   \g at addto@macro\appendix{\renewcommand*{\thealgorithm}{\thechapter-\arabic{algorithm}}}
   \renewcommand\listofalgorithms{%
-    \thu at set@list at label@width{\fname at algorithm}%
     \thu at listof{algorithm}%
   }
   \renewcommand\listalgorithmname{\thu at list@algorithm at name}
@@ -4510,8 +5231,8 @@
   \def\ext at algorithm{loa}
   \contentsuse{algorithm}{loa}
   \titlecontents{algorithm}
-    [\thu at list@label at width]{\addvspace{6bp}}
-    {\contentslabel[\fname at algorithm~\thecontentslabel]{\thu at list@label at width}}{}
+    [\z@]{}
+    {\contentspush{\fname at algorithm~\thecontentslabel\hspace{\ccwd}}}{}
     {\thu at leaders\thecontentspage}
 }
 %    \end{macrocode}
@@ -4529,7 +5250,6 @@
   \SetAlgoCaptionSeparator{\hspace*{1em}}
   \SetAlFnt{\dawu}
   \renewcommand\listofalgorithms{%
-    \thu at set@list at label@width{\algorithmcfname}%
     \thu at listof{algorithmcf}%
   }
   \renewcommand\listalgorithmcfname{\thu at list@algorithm at name}
@@ -4536,8 +5256,8 @@
   \def\ext at algorithmcf{loa}
   \contentsuse{algocf}{loa}
   \titlecontents{algocf}
-    [\thu at list@label at width]{\addvspace{6bp}}
-    {\contentslabel[\algorithmcfname~\thecontentslabel]{\thu at list@label at width}}{}
+    [\z@]{}
+    {\contentspush{\algorithmcfname~\thecontentslabel\hspace{\ccwd}}}{}
     {\thu at leaders\thecontentspage}
 }
 %    \end{macrocode}
@@ -4618,7 +5338,7 @@
     }%
   \fi
   \thispagestyle{empty}%
-  \ifthu at language@chinese
+  \ifthu at main@language at chinese
     \thu at pdfbookmark{0}{书脊}%
   \else
     \thu at pdfbookmark{0}{Spine}%
@@ -4688,7 +5408,7 @@
 \RequirePackage{fontspec}[2017/01/20]
 \RequirePackage{amsmath}
 \RequirePackage{unicode-math}
-\RequirePackage[UTF8,scheme=chinese,fontset=fandol]{ctex}
+\RequirePackage[UTF8,scheme=chinese]{ctex}
 \RequirePackage[
   top=2.5cm, bottom=2.5cm,
   left=4cm, right=2cm,

Modified: trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/source/latex/thuthesis/thuthesis.ins	2020-09-09 20:57:31 UTC (rev 56305)
@@ -17,8 +17,6 @@
 \input docstrip
 
 \askforoverwritefalse
-%\askonceonly
-\showprogress
 \keepsilent
 
 \usedir{tex/latex/thuthesis}
@@ -43,27 +41,6 @@
 \endpreamble
 
 \generate{\file{\jobname.cls}{\from{\jobname.dtx}{cls}}
-          \usepreamble\defaultpreamble\usepostamble\defaultpostamble
           \file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}}
 
-\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-author-year.bst}
-  \Msg{* \space\space thuthesis-numeric.bst}
-  \Msg{* \space\space thuthesis-bachelor.bst}
-  \Msg{* \space\space tsinghua-name-bachelor.pdf}
-  \Msg{*}
-  \Msg{* To produce the documentation run the files ending with}
-  \Msg{* `.dtx' through LaTeX.}
-  \Msg{*}
-  \Msg{* Happy TeXing!}
-  \Msg{***********************************************************}}
-
 \endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.bbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,20 @@
+\ProvidesFile{thuthesis-author-year.bbx}[2020/08/01 v1.0 ThuThesis biblatex
+  bibliography style]
+
+\RequireBibliographyStyle{gb7714-2015ay}
+
+\ExecuteBibliographyOptions{
+  gbnamefmt = lowercase,
+  gbpub     = false,
+  gbalign   = left,
+}
+
+\defbibenvironment{bibliography}
+  {\list
+     {}
+     {\setlength{\leftmargin}{\bibhang}%
+      \setlength{\itemindent}{-\leftmargin}%
+      \setlength{\itemsep}{\bibitemsep}%
+      \setlength{\parsep}{\bibparsep}}}
+  {\endlist}
+  {\item}

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-author-year.cbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,4 @@
+\ProvidesFile{thuthesis-author-year.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+  citation style]
+
+\RequireCitationStyle{gb7714-2015ay}

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.bbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,26 @@
+\ProvidesFile{thuthesis-bachelor.bbx}[2020/08/01 v1.0 ThuThesis biblatex
+  bibliography style]
+
+\RequireBibliographyStyle{gb7714-2015}
+
+\ExecuteBibliographyOptions{
+  gbpub     = false,
+  gbalign   = left,
+}
+
+\defbibenvironment{bibliography}
+  {\list
+     {\printtext[labelnumberwidth]{%
+        \printfield{labelprefix}%
+        \printfield{labelnumber}}}
+     {\addtolength{\labelnumberwidth}{\biblabelextend}%
+     \setlength{\labelwidth}{0.9cm}%
+      \setlength{\labelsep}{\biblabelsep}%
+      \setlength{\leftmargin}{\labelwidth}%
+      \addtolength{\leftmargin}{\labelsep}%
+      \setlength{\itemindent}{\bibitemindent}%
+      \setlength{\itemsep}{\bibitemsep}%
+      \setlength{\parsep}{\bibparsep}}%
+      \renewcommand*{\makelabel}[1]{\hss##1}}
+  {\endlist}
+  {\item}

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-bachelor.cbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,4 @@
+\ProvidesFile{thuthesis-bachelor.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+  citation style]
+
+\RequireCitationStyle{gb7714-2015}

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-inline.cbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,18 @@
+\ProvidesFile{thuthesis-inline.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+  citation style]
+
+\RequireCitationStyle{gb7714-2015}
+
+\ExecuteBibliographyOptions{
+  autocite = inline ,
+}
+
+\DeclareCiteCommand{\cite}%[\mkbibbrackets]
+  {[\usebibmacro{cite:init}%]
+   \usebibmacro{prenote}}%
+  {\usebibmacro{citeindex}%
+   \usebibmacro{cite:comp}}
+  {}
+  {%[
+  \usebibmacro{cite:dump}]%
+   \mkbibsuperscript{\printfield{postnote}}}

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.bbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,27 @@
+\ProvidesFile{thuthesis-numeric.bbx}[2020/08/01 v1.0 ThuThesis biblatex
+  bibliography style]
+
+\RequireBibliographyStyle{gb7714-2015}
+
+\ExecuteBibliographyOptions{
+  gbnamefmt = lowercase,
+  gbpub     = false,
+  gbalign   = left,
+}
+
+\defbibenvironment{bibliography}
+  {\list
+     {\printtext[labelnumberwidth]{%
+        \printfield{labelprefix}%
+        \printfield{labelnumber}}}
+     {\addtolength{\labelnumberwidth}{\biblabelextend}%
+     \setlength{\labelwidth}{0.9cm}%
+      \setlength{\labelsep}{\biblabelsep}%
+      \setlength{\leftmargin}{\labelwidth}%
+      \addtolength{\leftmargin}{\labelsep}%
+      \setlength{\itemindent}{\bibitemindent}%
+      \setlength{\itemsep}{\bibitemsep}%
+      \setlength{\parsep}{\bibparsep}}%
+      \renewcommand*{\makelabel}[1]{\hss##1}}
+  {\endlist}
+  {\item}

Added: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis-numeric.cbx	2020-09-09 20:57:31 UTC (rev 56305)
@@ -0,0 +1,4 @@
+\ProvidesFile{thuthesis-numeric.cbx}[2020/08/01 v1.0 ThuThesis biblatex
+  citation style]
+
+\RequireCitationStyle{gb7714-2015}

Modified: trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls	2020-09-09 20:57:07 UTC (rev 56304)
+++ trunk/Master/texmf-dist/tex/latex/thuthesis/thuthesis.cls	2020-09-09 20:57:31 UTC (rev 56305)
@@ -23,7 +23,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2017/04/15]
 \ProvidesClass{thuthesis}
-[2020/07/09 6.1.3 Tsinghua University Thesis Template]
+[2020/09/09 7.0.0 Tsinghua University Thesis Template]
 \newcommand\thu at error[1]{%
   \ClassError{thuthesis}{#1}{}%
 }
@@ -30,6 +30,9 @@
 \newcommand\thu at warning[1]{%
   \ClassWarning{thuthesis}{#1}%
 }
+\newcommand\thu at patch@error[1]{%
+  \thu at error{Failed to patch command \protect#1}%
+}
 \@ifl at t@r\fmtversion{2017/04/15}{}{
   \thu at error{%
     TeX Live 2017 or later version is required to compile this document%
@@ -39,9 +42,12 @@
 \ifXeTeX\else
   \thu at error{XeLaTeX is required to compile this document}
 \fi
+\InputIfFileExists{thuthesis-pdf-test-config.tex}{}{
+  \InputIfFileExists{thuthesis-log-test-config.tex}{}{}
+}
 \hyphenation{Thu-Thesis}
 \def\thuthesis{ThuThesis}
-\def\version{6.1.3}
+\def\version{7.0.0}
 \RequirePackage{kvdefinekeys}
 \RequirePackage{kvsetkeys}
 \RequirePackage{kvoptions}
@@ -122,6 +128,13 @@
     },
     name = degree at type,
   },
+  main-language = {
+    name = main at language,
+    choices = {
+      chinese,
+      english,
+    },
+  },
   language = {
     choices = {
       chinese,
@@ -217,6 +230,7 @@
 \PassOptionsToPackage{quiet}{fontspec}
 \LoadClass[a4paper,UTF8,zihao=-4,scheme=plain,fontset=none]{ctexbook}[2017/04/01]
 \RequirePackage{etoolbox}
+\RequirePackage{filehook}
 \RequirePackage{xparse}
 \RequirePackage{geometry}%
 \RequirePackage{fancyhdr}
@@ -237,12 +251,22 @@
   \RequirePackage[perpage,hang]{footmisc}
 \fi
 \RequirePackage{xeCJKfntef}
+\RequirePackage{soul}
 \RequirePackage{array}
 \RequirePackage{booktabs}
-\RequirePackage[sort&compress]{natbib}
-\RequirePackage{bibunits}
 \RequirePackage{url}
-\RequirePackage{filehook}
+\AtEndPreamble{
+  \@ifpackageloaded{biblatex}{}{
+    \@ifpackageloaded{apacite}{}{
+      \RequirePackage{natbib}
+    }
+  }
+}
+\AtEndOfPackageFile*{natbib}{
+  \@ifpackageloaded{apacite}{}{
+    \RequirePackage{bibunits}
+  }
+}
 \newcommand\thu at package@conflict[2]{
   \AtBeginOfPackageFile*{#2}{
     \thu at error{The "#2" package is incompatible with required "#1"}
@@ -257,9 +281,9 @@
 \thu at package@conflict{unicode-math}{eufrak}
 \thu at package@conflict{unicode-math}{mathrsfs}
 \geometry{
-  a4paper, % 210 * 297mm
+  paper          = a4paper,  % 210 * 297mm
   marginparwidth = 2cm,
-  marginparsep = 0.5cm
+  marginparsep   = 0.5cm,
 }
 \newcommand\thu at set@geometry{%
   \ifthu at degree@bachelor
@@ -314,7 +338,6 @@
   \cleardoublepage
   \@mainmatterfalse
   \pagenumbering{Roman}%
-  \let\@tabular\thu at tabular
 }
 \renewcommand\mainmatter{%
   \cleardoublepage
@@ -327,7 +350,8 @@
   \else
     \clearpage
   \fi
-  \@mainmattertrue}
+  \@mainmatterfalse
+}
 \ifthu at fontset@mac
   \thusetup{
     font     = times,
@@ -715,58 +739,84 @@
 \thu at def@fontsize{xiaoliu}{6.5bp}
 \thu at def@fontsize{qihao}{5.5bp}
 \thu at def@fontsize{bahao}{5bp}
+\thusetup{main-language=\thu at language}%
 \let\thu at main@language\thu at language
 \thu at option@hook{language}{%
   \ifx\@begindocumenthook\@undefined\else
+    \thusetup{main-language=\thu at language}%
     \let\thu at main@language\thu at language
   \fi
 }
-\newcommand\thu at reset@main at language{
-  \thusetup{language = \thu at main@language}
+\newcommand\thu at reset@main at language{%
+    \thusetup{language = \thu at main@language}%
+    \let\thu at language\thu at main@language
 }
 \newcommand\thu at set@chapter at names{%
-  \ifthu at language@chinese
+  \ifthu at main@language at chinese
     \ctexset{
       chapter/name   = {第,章},
-      appendixname   = 附录,
-      contentsname   = 目\hspace{\ccwd}录,
-      listfigurename = 插图索引,
-      listtablename  = 表格索引,
-      bibname        = 参考文献,
-      indexname      = 索引,
     }%
-    \def\thu at denotation@name{主要符号对照表}%
-    \def\thu at list@algorithm at name{算法索引}%
-    \def\listequationname{公式索引}%
+    \def\bibname{参考文献}%
+    \def\appendixname{附录}%
+    \def\indexname{索引}%
     \def\thu at acknowledgements@name{致\hspace{\ccwd}谢}%
     \ifthu at degree@bachelor
+      \def\contentsname{目\hspace{\ccwd}录}%
+      \def\listfigurename{插图索引}%
+      \def\listtablename{表格索引}%
+      \def\thu at list@figure at table@name{插图和附表索引}%
+      \def\thu at list@algorithm at name{算法索引}%
+      \def\listequationname{公式索引}%
+      \def\thu at denotation@name{主要符号对照表}%
       \def\thu at resume@name{在学期间参加课题的研究成果}%
     \else
-      \ifthu at degree@postdoc
+      \def\listfigurename{插图清单}%
+      \def\listtablename{附表清单}%
+      \def\thu at list@figure at table@name{插图和附表清单}%
+      \def\thu at list@algorithm at name{算法清单}%
+      \def\listequationname{公式清单}%
+      \ifthu at degree@graduate
+        \def\contentsname{目\hspace{\ccwd}录}%
+        \def\thu at toc@contents at name{目录}%
+        \def\thu at denotation@name{符号和缩略语说明}%
+        \def\thu at resume@name{个人简历、在学期间完成的相关学术成果}%
+      \else  % degree = postdoc
+        \def\contentsname{目\hspace{2\ccwd}次}%
+        \def\thu at denotation@name{符号表}%
         \def\thu at resume@name{个人简历、发表的学术论文与科研成果}%
-      \else
-        \def\thu at resume@name{个人简历、在学期间发表的学术论文与研究成果}%
       \fi
     \fi
   \else
-    \ifthu at language@english
+    \ifthu at main@language at english
       \ctexset{
         chapter/name   = \chaptername\space,
-        appendixname   = Appendix,
-        contentsname   = Contents,
-        listfigurename = List of Figures,
-        listtablename  = List of Tables,
-        bibname        = Bibliography,
-        indexname      = Index,
       }%
-      \def\thu at denotation@name{Nomenclature}%
-      \def\thu at list@algorithm at name{List of Algorithms}%
-      \def\listequationname{List of Equations}%
-      \def\thu at acknowledgements@name{Acknowledgements}%
+      \def\indexname{Index}%
       \ifthu at degree@bachelor
-        \def\thu at resume@name{Research Achievements}%
+        \def\contentsname{CONTENTS}%
+        \def\listfigurename{FIGURES}%
+        \def\listtablename{TABLES}%
+        \def\thu at list@figure at table@name{FIGURES AND TABLES}%
+        \def\thu at list@algorithm at name{ALGORITHMS}%
+        \def\listequationname{EQUATIONS}%
+        \def\thu at denotation@name{ABBREVIATIONS}%
+        \def\bibname{REFERENCES}%
+        \def\appendixname{APPENDIX}%
+        \def\thu at acknowledgements@name{ACKNOWLEDGEMENTS}%
+        \def\thu at resume@name{PUBLICATIONS}%
       \else
-        \def\thu at resume@name{Resume, Publications and Research Achievements}%
+        \def\contentsname{Contents}%
+        \def\thu at toc@contents at name{Contents}%
+        \def\listfigurename{List of Figures}%
+        \def\listtablename{List of Tables}%
+        \def\thu at list@figure at table@name{List of Figures and Tables}%
+        \def\thu at list@algorithm at name{List of Algorithms}%
+        \def\listequationname{List of Equations}%
+        \def\thu at denotation@name{Nomenclature}%
+        \def\bibname{Bibliography}%
+        \def\appendixname{Appendix}%
+        \def\thu at acknowledgements@name{Acknowledgements}%
+        \def\thu at resume@name{Resume and Academic Achievements}%
       \fi
     \fi
   \fi
@@ -773,11 +823,7 @@
 }
 \thu at set@chapter at names
 \thu at option@hook{degree}{\thu at set@chapter at names}
-\thu at option@hook{language}{%
-  \ifx\@begindocumenthook\@undefined\else
-    \thu at set@chapter at names
-  \fi
-}
+\thu at option@hook{main-language}{\thu at set@chapter at names}
 \newcommand\thu at set@names{%
   \ifthu at language@chinese
     \ctexset{
@@ -850,17 +896,26 @@
   \renewcommand\footrulewidth{0pt}%
   \ifthu at degree@bachelor
     \renewcommand\headrulewidth{0pt}%
-    \fancyfoot[C]{\xiaowu\thepage}%
+    \fancyfoot[C]{
+      \ifthu at main@language at chinese
+        \xiaowu
+      \else
+        \normalsize
+      \fi
+      \thepage
+    }%
     \let\@mkboth\@gobbletwo
+    \let\chaptermark\@gobble
   \else
     \renewcommand\headrulewidth{0.75bp}%
     \fancyhead[C]{\wuhao\leftmark}%
     \fancyfoot[C]{\wuhao\thepage}%
     \let\@mkboth\markboth
+    \def\chaptermark##1{%
+      \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
+    }%
   \fi
-  \def\chaptermark##1{%
-    \markboth{\CTEXifname{\CTEXthechapter\hskip\ccwd}{}##1}{}%
-  }%
+  \let\sectionmark\@gobble
 }
 \pagestyle{plain}
 \ctexset{chapter/pagestyle = plain}
@@ -867,7 +922,21 @@
 \ctexset{%
   punct=quanjiao,
   space=auto,
-  autoindent=true}
+}
+\newcommand\thu at set@indent{%
+  \ifthu at main@language at english
+    \ifthu at degree@bachelor
+      \ctexset{autoindent=0.8cm}%
+    \else
+      \ctexset{autoindent=2}%
+    \fi
+  \else
+    \ctexset{autoindent=2}%
+  \fi
+}
+\thu at set@indent
+\thu at option@hook{degree}{\thu at set@indent}
+\thu at option@hook{main-language}{\thu at set@indent}
 \setlist{nosep}
 \def\thu at textcircled#1{%
   \ifnum\value{#1} >10\relax
@@ -959,6 +1028,12 @@
 \renewcommand{\topfraction}{0.85}
 \renewcommand{\bottomfraction}{0.65}
 \renewcommand{\floatpagefraction}{0.60}
+\patchcmd\@floatboxreset{%
+  \normalsize
+}{%
+  \fontsize{11bp}{14.3bp}\selectfont
+  \renewcommand\arraystretch{1.2}%
+}{}{\thu at patch@error{\@floatboxreset}}
 \ifthu at degree@bachelor
   \AtBeginDocument{% delay the check until all packages are loaded
     \g at addto@macro\appendix{\renewcommand*{\thefigure}{\thechapter-\arabic{figure}}}
@@ -965,8 +1040,6 @@
     \g at addto@macro\appendix{\renewcommand*{\thetable}{\thechapter-\arabic{table}}}
   }
 \fi
-\let\old at tabular\@tabular
-\def\thu at tabular{\dawu[1.5]\old at tabular}
 \DeclareCaptionFont{thu}{\dawu}
 \DeclareCaptionLabelSeparator{thu}{\hspace{\ccwd}}
 \captionsetup{
@@ -993,50 +1066,117 @@
   \newcommand{\thu at abstract@name}{摘\hspace{\ccwd}要}
   \newcommand{\thu at abstract@name at en}{Abstract}
 \fi
-\newcommand\thu at chapter@titleformat[1]{%
-  \ifthu at degree@bachelor #1\else%
-    \ifthenelse%
-      {\equal{#1}{\thu at abstract@name at en}}%
-      {\bfseries #1}%
-      {#1}%
-  \fi}
 \ctexset{%
-  chapter={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 15bp\else 9bp\fi},
-    aftername=\hskip\ccwd,
-    afterskip={\ifthu at degree@bachelor 20bp\else 24bp\fi},
-    format={\centering\sffamily\ifthu at degree@bachelor\xiaosan[1.333]\else\sanhao[1]\fi},
-    nameformat=\relax,
-    numberformat=\relax,
-    titleformat=\thu at chapter@titleformat,
-    lofskip=0pt,
-    lotskip=0pt,
+  chapter = {
+    nameformat   = {},
+    numberformat = {},
+    titleformat  = {},
+    aftername    = \quad,
+    fixskip      = true,
+    afterindent  = true,
+    lofskip      = 0pt,
+    lotskip      = 0pt,
   },
-  section={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 25bp\else 24bp\fi\@plus 1ex \@minus .2ex},
-    afterskip={\ifthu at degree@bachelor 12bp\else 6bp\fi \@plus .2ex},
-    format={\sffamily\ifthu at degree@bachelor\sihao[1.286]\else\sihao[1.429]\fi},
+  section = {
+    aftername    = \quad,
+    afterindent  = true,
   },
-  subsection={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
-    afterskip={6bp \@plus .2ex},
-    format={\sffamily\ifthu at degree@bachelor\xiaosi[1.25]\else\banxiaosi[1.538]\fi},
-    numberformat={\sffamily\ifthu at degree@bachelor\banxiaosi[1.154]\else\banxiaosi[1.538]\fi},
+  subsection = {
+    aftername    = \quad,
+    afterindent  = true,
   },
-  subsubsection={
-    afterindent=true,
-    beforeskip={\ifthu at degree@bachelor 12bp\else 16bp\fi\@plus 1ex \@minus .2ex},
-    afterskip={6bp \@plus .2ex},
-    format={\sffamily\ifthu at degree@bachelor\xiaosi[1.25]\else\xiaosi[1.667]\fi},
+  subsubsection = {
+    aftername    = \quad,
+    afterindent  = true,
   },
-  paragraph/afterindent=true,
-  subparagraph/afterindent=true}
+  paragraph/afterindent = true,
+  subparagraph/afterindent = true,
+}
+\newcommand\thu at set@section at format{%
+  \ifthu at degree@bachelor
+    \ctexset{%
+      chapter = {
+        format     = \centering\sffamily\fontsize{15bp}{20bp}\selectfont,
+        beforeskip = 30bp,
+        afterskip  = 20bp,
+      },
+      section = {
+        format     = \sffamily\fontsize{14bp}{18bp}\selectfont,
+        beforeskip = 25bp,
+        afterskip  = 12bp,
+      },
+      subsection = {
+        format     = \sffamily\fontsize{13bp}{15bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+      subsubsection = {
+        format     = \sffamily\fontsize{12bp}{14bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+    }%
+    \ifthu at main@language at chinese
+      \ctexset{chapter/number = \thechapter}%
+    \else
+      \ctexset{chapter/number = \thu at english@number{chapter}}%
+    \fi
+  \else
+    \ctexset{%
+      chapter = {
+        format     = \centering\sffamily\sanhao,
+        beforeskip = 32bp,
+        afterskip  = 32bp,
+      },
+      section = {
+        format     = \sffamily\fontsize{14bp}{20bp}\selectfont,
+        beforeskip = 24bp,
+        afterskip  = 6bp,
+      },
+      subsection = {
+        format     = \sffamily\fontsize{13bp}{20bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+      subsubsection = {
+        format     = \sffamily\fontsize{12bp}{20bp}\selectfont,
+        beforeskip = 12bp,
+        afterskip  = 6bp,
+      },
+    }%
+  \fi
+}
+\thu at set@section at format
+\thu at option@hook{degree}{\thu at set@section at format}
+\newcommand\thu at english@number[1]{%
+  \expandafter\ifcase\csname c@#1\endcsname
+    Zero\or
+    One\or
+    Two\or
+    Three\or
+    Four\or
+    Five\or
+    Six\or
+    Seven\or
+    Eight\or
+    Nine\or
+    Ten\or
+    Eleven\or
+    Twelve\or
+    Thirteen\or
+    Fourteen\or
+    Fifteen\or
+    Sixteen\or
+    Seventeen\or
+    Eighteen\or
+    Nineteen\or
+    Twenty\or
+    \thu at error{You are genius}%
+  \fi
+}
 \newcommand\thu at pdfbookmark[2]{}
 \newcommand\thu at phantomsection{}
-\NewDocumentCommand\thu at chapter{s o m o}{
+\NewDocumentCommand\thu at chapter{s o m o}{%
   \IfBooleanF{#1}{%
     \thu at error{You have to use the star form: \string\thu at chapter*}%
   }%
@@ -1046,15 +1186,15 @@
       \thu at pdfbookmark{0}{#3}%
     }{%
       \thu at phantomsection
-      \addcontentsline{toc}{chapter}{#3}%
+      \addcontentsline{toc}{chapter}{#2}%
     }%
   }{%
     \thu at phantomsection
     \addcontentsline{toc}{chapter}{#3}%
   }%
-  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=25bp}\fi
+  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=40bp}\fi
   \chapter*{#3}%
-  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=15bp}\fi
+  \ifthu at degree@bachelor\ctexset{chapter/beforeskip=30bp}\fi
   \IfValueTF{#4}{%
     \ifthenelse{\equal{#4}{}}{%
       \@mkboth{}{}%
@@ -1068,7 +1208,11 @@
 \setcounter{secnumdepth}{3}
 \setcounter{tocdepth}{2}
 \renewcommand\tableofcontents{%
-  \thu at chapter*[]{\contentsname}%
+  \ifthu at degree@graduate
+    \thu at chapter*[\thu at toc@contents at name]{\contentsname}%
+  \else
+    \thu at chapter*[]{\contentsname}%
+  \fi
   \@starttoc{toc}%
 }
 \thu at define@key{
@@ -1085,37 +1229,60 @@
 \newcommand\thu at set@toc at format{%
   \contentsmargin{\z@}%
   \ifthu at degree@bachelor
+    \ifthu at main@language at chinese
+      \titlecontents{chapter}
+        [\z@]{\addvspace{6bp}
+          \ifthu at toc@chapter at style@arial
+            \sffamily
+          \else
+            \heiti
+          \fi
+        }
+        {\contentspush{\thecontentslabel\quad}}{}
+        {\rmfamily\thu at leaders\thecontentspage}%
+      \titlecontents{section}
+        [1em]{}
+        {\contentspush{\thecontentslabel\quad}}{}
+        {\thu at leaders\thecontentspage}%
+      \titlecontents{subsection}
+        [1.5em]{}
+        {\contentspush{\thecontentslabel\quad}}{}
+        {\thu at leaders\thecontentspage}%
+    \else
+      \ifthu at main@language at english
+        \titlecontents{chapter}
+          [\z@]{\addvspace{6bp}\sffamily}
+          {\contentspush{\thecontentslabel\quad}}{}
+          {\rmfamily\thu at leaders\thecontentspage}%
+        \titlecontents{section}
+          [0.5cm]{}
+          {\contentspush{\thecontentslabel\quad}}{}
+          {\thu at leaders\thecontentspage}%
+        \titlecontents{subsection}
+          [1cm]{}
+          {\contentspush{\thecontentslabel\quad}}{}
+          {\thu at leaders\thecontentspage}%
+      \fi
+    \fi
+  \else
     \titlecontents{chapter}
       [\z@]{\addvspace{6bp}
-        \ifthu at toc@chapter at style@arial
+        \ifthu at main@language at chinese
+          \heiti
+        \else
           \sffamily
-        \else
-          \heiti
         \fi
       }
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+      {\contentspush{\thecontentslabel\quad}}{}
       {\rmfamily\thu at leaders\thecontentspage}%
     \titlecontents{section}
-      [1\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+      [1em]{}
+      {\contentspush{\thecontentslabel\quad}}{}
       {\thu at leaders\thecontentspage}%
     \titlecontents{subsection}
-      [1.5\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
+      [2em]{}
+      {\contentspush{\thecontentslabel\quad}}{}
       {\thu at leaders\thecontentspage}%
-  \else
-    \titlecontents{chapter}
-      [\z@]{\addvspace{6bp}\sffamily}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
-      {\rmfamily\thu at leaders\thecontentspage}%
-    \titlecontents{section}
-      [1\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
-      {\thu at leaders\thecontentspage}%
-    \titlecontents{subsection}
-      [2\ccwd]{}
-      {\contentspush{\thecontentslabel\hspace{\ccwd}}}{}
-      {\thu at leaders\thecontentspage}%
   \fi
 }
 \thu at set@toc at format
@@ -1290,6 +1457,7 @@
   \clearpage
 }
 \newcommand\thu at titlepage{%
+  \thusetup{language = chinese}%
   \ifthu at degree@graduate
     \ifthu at degree@type at academic
       \thu at titlepage@graduate at academic
@@ -1311,6 +1479,7 @@
       \fi
     \fi
   \fi
+  \thu at reset@main at language
 }
 \newcommand\thu at titlepage@graduate at academic{%
   \newgeometry{
@@ -1473,11 +1642,13 @@
     hmargin = 3.6cm,
   }%
   \thispagestyle{empty}%
+  \thusetup{language = english}%
   \ifthu at degree@type at academic
     \thu at titlepage@en at graduate@academic
   \else
     \thu at titlepage@en at graduate@professional
   \fi
+  \thu at reset@main at language
   \clearpage
   \restoregeometry
 }
@@ -1580,63 +1751,75 @@
     hmargin = 3.17cm,
   }%
   \thispagestyle{empty}%
-  \null\vskip 0.44cm%
   \begingroup
     \centering
-    \parbox[t][2cm][t]{\textwidth}{%
+    \parbox[t][0cm][t]{\textwidth}{%
       \hfill
-      \sffamily\CJKfamily+{}\xiaosi
-      \ifx\thu at secret@level\@empty
-        \phantom{秘密}%
-      \else
-        \thu at secret@level\makebox[3em][c]{\thu at secret@year}年%
-      \fi\par
-    }\par
-    \begingroup
-      \includegraphics{tsinghua-name-bachelor.pdf}%
-      \par
-    \endgroup
+      \CJKfamily+{}\xiaosi
+      \ifx\thu at secret@level\@empty\else
+        \thu at secret@level\space\thu at secret@year 年\par
+      \fi
+    }%
+  \endgroup
+  \vfill
+  \begingroup
+    \centering
+    \includegraphics{tsinghua-name-bachelor.pdf}%
     \vskip 0.94cm%
     {\sffamily\bfseries\xiaochu\ziju{0.5}综合论文训练\par}%
-    \vskip 2.3cm%
-    \parbox[t][2.4cm][t]{\textwidth}{%
-      \heiti\xiaoer[1.56]%
-      \parindent=2em%
-      \hangindent=5em%
-      \makebox[3em][l]{题目:}%
+  \endgroup
+  \vskip 1.8cm%
+  \begingroup
+    \heiti
+    \ifthu at main@language at chinese
       \yihao[1.56]%
-      \CJKunderline[skip=false, thickness=0.05em, depth=0.12em]{\thu at title}\par
-    }\par
-    \vskip 2.5cm%
-    \begingroup
-      \fangsong\sanhao[2.3]%
-      \leftskip=2.5cm%
-      \parindent=\z@
-      \def\thu at info@item##1##2##3{%
-        \ifx##3\@empty\else
-          \thu at fixed@box{%
-            \ifx\thu at joint@supervisor\@empty
-              4em%
-            \else
-              5.5em%
-            \fi
-          }{##1}:##2{##3}\\
-        \fi
-      }%
-      \def\thu at name@title at format##1##2{%
-        \thu at stretch{3em}{##1}\quad ##2%
-      }
-      \thu at info@item{系别}{}{\thu at department}%
-      \thu at info@item{专业}{}{\thu at discipline}%
-      \thu at info@item{姓名}{\thu at name@title}{\thu at author}%
-      \thu at info@item{指导教师}{\thu at name@title}{\thu at supervisor}%
-      \thu at info@item{辅导教师}{\thu at name@title}{\thu at associate@supervisor}%
-      \thu at info@item{联合指导教师}{\thu at name@title}{\thu at joint@supervisor}%
-      \par
-    \endgroup
-    \vskip 1.5cm%
+    \else
+      \fontsize{26bp}{32bp}\selectfont
+    \fi
+    \parindent=18bp%
+    \hangindent=72bp%
+    \makebox[54bp]{\xiaoer[1.2]题目:}%
+    \CJKunderline*[skip=false, thickness=0.05em, depth=0.12em]{\thu at title}%
+    \ifthu at main@language at english
+      \\
+      \thusetup{language=english}%
+      \ul\thu at title@en
+      \thusetup{language=chinese}%
+    \fi
+    \par
+  \endgroup
+  \vskip 1.9cm%
+  \begingroup
+    \fangsong\sanhao[2.32]%
+    \leftskip=2.5cm%
+    \parindent=\z@
+    \def\thu at info@item##1##2##3{%
+      \ifx##3\@empty\else
+        \thu at fixed@box{%
+          \ifx\thu at joint@supervisor\@empty
+            4em%
+          \else
+            5.5em%
+          \fi
+        }{##1}:##2{##3}\par
+      \fi
+    }%
+    \def\thu at name@title at format##1##2{%
+      \thu at stretch{3em}{##1}\quad ##2%
+    }%
+    \thu at info@item{系别}{}{\thu at department}%
+    \thu at info@item{专业}{}{\thu at discipline}%
+    \thu at info@item{姓名}{\thu at name@title}{\thu at author}%
+    \thu at info@item{指导教师}{\thu at name@title}{\thu at supervisor}%
+    \thu at info@item{辅导教师}{\thu at name@title}{\thu at associate@supervisor}%
+    \thu at info@item{联合指导教师}{\thu at name@title}{\thu at joint@supervisor}%
+  \endgroup
+  \vskip 1.4cm%
+  \begingroup
+    \centering
     {\CJKfamily+{}\xiaosi\thu at format@date{\thu at date@zh at digit}{\thu at date}\par}%
   \endgroup
+  \vfill
   \clearpage
   \restoregeometry
 }
@@ -1710,26 +1893,60 @@
     {\wuhao\thu at format@date{\thu at date@zh at digit@short}{\thu at date}\par}%
   \end{center}%
 }
+\def\thu at committee@name{学位论文指导小组、公开评阅人和答辩委员会名单}
+\newenvironment{committee}[1][]{%
+  \cleardoublepage
+  \let\thu at committee@file\@empty
+  \kv at define@key{thu at committee}{name}{\let\thu at committee@name\kv at value}%
+  \kv at define@key{thu at committee}{file}{\let\thu at committee@file\kv at value}%
+  \kv at set@family at handler{thu at committee}{%
+    \ifx\kv at value\relax
+      \let\thu at committee@file\kv at key
+    \else
+      \kv at handled@false
+    \fi
+  }%
+  \kvsetkeys{thu at committee}{#1}%
+  \ifx\thu at committee@file\@empty
+    \thu at chapter*[]{\thu at committee@name}%
+  \else
+    \thu at pdfbookmark{0}{\thu at committee@name}%
+    \includepdf{\thu at committee@file}%
+  \fi
+  \thispagestyle{empty}%
+  \ctexset{
+    section = {
+      format    += {\centering},
+      numbering = false,
+      afterindent = false,
+    },
+  }%
+}{%
+}
 \newcommand{\thu at authorization@title}{关于学位论文使用授权的说明}
 \newcommand{\thu at authorization@content}{%
 \ifthu at degree@bachelor
-本人完全了解清华大学有关保留、使用学位论文的规定,即:学校有权保留学位
-论文的复印件,允许该论文被查阅和借阅;学校可以公布该论文的全部或部分内
-容,可以采用影印、缩印或其他复制手段保存该论文。
+    本人完全了解清华大学有关保留、使用学位论文的规定,%
+    即:学校有权保留学位论文的复印件,允许该论文被查阅和借阅;%
+    学校可以公布该论文的全部或部分内容,可以采用影印、缩印或其他复制手段保存该论文。%
 \else
-本人完全了解清华大学有关保留、使用学位论文的规定,即:
-
-清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:(1)已获学位的研究生
-必须按学校规定提交学位论文,学校可以采用影印、缩印或其他复制手段保存研究生上交的
-学位论文;(2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料
-室等场所供校内师生阅读,或在校园网上供校内师生浏览部分内容\ifthu at degree@master 。\else ;
-(3)根据《中华人民共和国学位条例暂行实施办法》,向国家图书馆报送可以公开的学位
-论文。\fi
-
-本人保证遵守上述规定。
-\fi}
+    本人完全了解清华大学有关保留、使用学位论文的规定,即:\par
+    清华大学拥有在著作权法规定范围内学位论文的使用权,其中包括:%
+    (1)已获学位的研究生必须按学校规定提交学位论文,%
+    学校可以采用影印、缩印或其他复制手段保存研究生上交的学位论文;%
+    (2)为教学和科研目的,学校可以将公开的学位论文作为资料在图书馆、资料室等场所供校内师生阅读,%
+    或在校园网上供校内师生浏览部分内容;%
+    \ifthu at degree@doctor
+      (3)根据《中华人民共和国学位条例暂行实施办法》及相关部门具体要求,向国家图书馆报送相应的学位论文。%
+    \else
+      (3)按照相关部门督导、抽查等要求,报送相应的学位论文。%
+    \fi
+    \par
+    本人保证遵守上述规定。%
+  \fi
+}
 \newcommand{\thu at authorization@addon}{%
-  \ifthu at degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后应遵守此规定)\fi}
+  \ifthu at degree@bachelor(涉密的学位论文在解密后应遵守此规定)\else (保密的论文在解密后遵守此规定)\fi}
 \newcommand{\thu at authorization@authorsig}{\ifthu at degree@bachelor 签\hskip1em名:\else 作者签名:\fi}
 \newcommand{\thu at authorization@teachersig}{导师签名:}
 \newcommand{\thu at authorization@frontdate}{%
@@ -1753,7 +1970,15 @@
       \fi%
     \else
       \thu at phantomsection
-      \includepdf{#1}%
+      \kv at define@key{thu at copyright}{file}{\includepdf{\kv at value}}%
+      \kv at set@family at handler{thu at copyright}{%
+        \ifx\kv at value\relax
+          \includepdf{\kv at key}%
+        \else
+          \kv at handled@false
+        \fi
+      }%
+      \kvsetkeys{thu at copyright}{#1}%
     \fi
   \fi
 }
@@ -1794,24 +2019,30 @@
   }%
   \expandafter\comma at parse\expandafter{#1}{\thu at clist@processor}%
 }
-\newbox\thu at kw
-\newcommand\thu at put@keywords[2]{%
-  \begingroup
-    \setbox\thu at kw=\hbox{#1}
-    \ifthu at degree@bachelor\indent\else\noindent\hangindent\wd\thu at kw\hangafter1\fi%
-    \box\thu at kw#2\par
-  \endgroup}
 \newenvironment{abstract}{%
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
   \thusetup{language = chinese}%
-  \thu at chapter*[]{\thu at abstract@name}%  %no tocline
+  \ifthu at degree@graduate
+    \thu at chapter*{\thu at abstract@name}%
+  \else
+    \thu at chapter*[]{\thu at abstract@name}%
+  \fi
 }{%
-  \ifthu at degree@doctor\vfill\else\vskip12bp\fi
-  \thu at put@keywords{\textbf{关键词:}}{%
-    \thu at clist@use{\thu at keywords}{;}%
-  }%
+  \par
+  \ifthu at degree@graduate
+    \vspace*{\stretch{4}}%
+    \noindent
+    \textsf{关键词:}%
+  \else
+    \null\par
+    \textbf{关键词:}%
+  \fi
+  \thu at clist@use{\thu at keywords}{;}%
+  \ifthu at degree@graduate
+    \vspace*{\stretch{1}}%
+  \fi
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
@@ -1822,14 +2053,28 @@
     \cleardoublepage
   \fi
   \thusetup{language = english}%
-  \thu at chapter*[]{\thu at abstract@name at en}%  no tocline
+  \ifthu at degree@graduate
+    \begingroup
+      \ctexset{chapter/format+=\bfseries}%
+      \thu at chapter*[\sffamily\bfseries\thu at abstract@name at en]{\thu at abstract@name at en}%
+    \endgroup
+  \else
+    \thu at chapter*[]{\thu at abstract@name at en}%
+  \fi
 }{%
-  \ifthu at degree@doctor\vfill\else\vskip12bp\fi
-  \thu at put@keywords{%
-    \textbf{\ifthu at degree@bachelor Keywords:\else Key Words:\fi\enskip}%
-  }{%
-    \thu at clist@use{\thu at keywords@en}{; }%
-  }%
+  \par
+  \ifthu at degree@graduate
+    \vspace*{\stretch{4}}%
+    \noindent
+    \textbf{Key Words:}\space
+  \else
+    \null\par
+    \textbf{Keywords:}\space
+  \fi
+  \thu at clist@use{\thu at keywords@en}{; }%
+  \ifthu at degree@graduate
+    \vspace*{\stretch{1}}%
+  \fi
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
@@ -1839,7 +2084,11 @@
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
-  \thu at chapter*[]{\thu at denotation@name} % no tocline
+  \ifthu at degree@graduate
+    \thu at chapter*{\thu at denotation@name}%
+  \else
+    \thu at chapter*[]{\thu at denotation@name}%
+  \fi
   \vskip-30bp\xiaosi[1.6]\begin{thu at denotation}[labelwidth=#1]
 }{%
   \end{thu at denotation}
@@ -1855,7 +2104,6 @@
   labelsep*=0.5cm,
   itemindent=0pt,
 }
-\newcommand\thu at statement@name{声\hspace{\ccwd}明}
 \newcommand{\thu at statement@text}{本人郑重声明:所呈交的学位论文,是本人在导师指导下
   ,独立进行研究工作所取得的成果。尽我所知,除文中已经注明引用的内容外,本学位论
   文的研究成果不包含任何他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的
@@ -1863,6 +2111,7 @@
 \newcommand{\thu at signature}{签\hspace{1em}名:}
 \newcommand{\thu at backdate}{日\hspace{1em}期:}
 \newenvironment{acknowledgements}{%
+  \@mainmatterfalse
   \ifthu at degree@bachelor
     \cleardoublepage
   \fi
@@ -1891,21 +2140,38 @@
   },
 }
 \thu at option@hook{statement-page-number}{%
+  \ifthu at statement@page at number@false
+    \thusetup{statement-page-style=empty}%
+  \else
+    \thusetup{statement-page-style=plain}%
+  \fi
   \thu at warning{%
     The "statement-page-number" option is deprecated.
-    Use "statement-page-style" instead%
+    Use "page-style" option of \protect\statement command instead%
   }%
 }
 \newcommand\statement[1][]{%
+  \@mainmatterfalse
   \ifthu at degree@bachelor
     \cleardoublepage
+    \def\thu at statement@name{声\hspace{2em}明}%
+  \else
+    \def\thu at statement@name{声\hspace{1em}明}%
   \fi
-  \def\thu@@tmp{#1}%
-  \ifx\thu@@tmp\@empty
+  \let\thu at statement@file\@empty
+  \kv at define@key{thu at statement}{page-style}{\thusetup{statement-page-style=##1}}%
+  \kv at define@key{thu at statement}{file}{\let\thu at statement@file\kv at value}%
+  \kv at set@family at handler{thu at statement}{%
+    \ifx\kv at value\relax
+      \let\thu at statement@file\kv at key
+    \else
+      \kv at handled@false
+    \fi
+  }%
+  \kvsetkeys{thu at statement}{#1}%
+  \ifx\thu at statement@file\@empty
     \thu at chapter*{\thu at statement@name}%
-    \ifthu at statement@page at number@false
-      \thispagestyle{\thu at statement@page at style}%
-    \fi
+    \thispagestyle{\thu at statement@page at style}%
     \thu at statement@text\par
     \ifthu at degree@graduate
       \vskip 2cm%
@@ -1919,7 +2185,7 @@
       \markboth{\thu at statement@name}{}%
       \thu at phantomsection
       \addcontentsline{toc}{chapter}{\thu at statement@name}%
-    }]{#1}%
+    }]{\thu at statement@file}%
   \fi
   \ifthu at degree@bachelor
     \cleardoublepage
@@ -1934,26 +2200,26 @@
     {\thu at chapter*{\csname list#1name\endcsname}\@starttoc{\csname ext@#1\endcsname}}%
 }
 \renewcommand\listoffigures{%
-  \thu at set@list at label@width{\figurename}%
   \thu at listof{figure}%
 }
-\newlength{\thu at list@label at width}
-\newcommand\thu at set@list at label@width[1]{%
-  \settowidth{\thu at list@label at width}{#1~8.8}%
-  \addtolength{\thu at list@label at width}{1em}%
-}
 \titlecontents{figure}
-  [\thu at list@label at width]{\addvspace{6bp}}
-  {\contentslabel[\figurename~\thecontentslabel]{\thu at list@label at width}}{}
-  {\thu at leaders\thecontentspage}
+  [\z@]{}
+  {\contentspush{\figurename~\thecontentslabel\hspace{\ccwd}}}{}
+  {\nobreak\thu at leaders\nobreak\hfil\thecontentspage}
 \renewcommand\listoftables{%
-  \thu at set@list at label@width{\tablename}%
   \thu at listof{table}%
 }
 \titlecontents{table}
-  [\thu at list@label at width]{\addvspace{6bp}}
-  {\contentslabel[\tablename~\thecontentslabel]{\thu at list@label at width}}{}
+  [\z@]{}
+  {\contentspush{\tablename~\thecontentslabel\hspace{\ccwd}}}{}
   {\thu at leaders\thecontentspage}
+\newcommand\listoffiguresandtables{%
+  \thu at chapter*{\thu at list@figure at table@name}%
+  \@starttoc{lof}%
+  \par
+  \null\par
+  \@starttoc{lot}%
+}
 \def\ext at equation{loe}
 \def\equcaption#1{%
   \addcontentsline{\ext at equation}{equation}%
@@ -1962,64 +2228,308 @@
 \titlecontents{equation}
   [0pt]{\addvspace{6bp}}
   {\thu at equation@name~\thecontentslabel}{}
-  {\thu at leaders\thecontentspage}
+  {\nobreak\thu at leaders\nobreak\thecontentspage}
 \contentsuse{equation}{loe}
-\DeclareRobustCommand\inlinecite{\@inlinecite}
-\def\@inlinecite#1{\begingroup\let\@cite\NAT at citenum\citep{#1}\endgroup}
-\let\onlinecite\inlinecite
-\renewcommand\bibsection{\thu at chapter*{\bibname}}
-\renewcommand\bibfont{\ifthu at degree@bachelor\wuhao[1.619]\else\wuhao[1.5]\fi}
-\setlength\bibhang{2\ccwd}
-\addtolength{\bibsep}{-0.7em}
-\setlength{\labelsep}{0.4em}
-\def\@biblabel#1{[#1]\hfill}
-\expandafter\newcommand\csname bibstyle at thuthesis-numeric\endcsname{%
-  \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
-\expandafter\newcommand\csname bibstyle at thuthesis-author-year\endcsname{%
-  \bibpunct{(}{)}{;}{a}{,}{,}}
-\expandafter\newcommand\csname bibstyle at thuthesis-bachelor\endcsname{%
-  \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
-\@namedef{bibstyle at thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
-\thu at define@key{
-  cite-style = {
-    name = cite at style,
+  \thu at define@key{
+    cite-style = {
+      name = cite at style,
+    }
   }
+\PassOptionsToPackage{compress}{natbib}
+\AtEndOfPackageFile*{natbib}{
+  \DeclareRobustCommand\inlinecite{\@inlinecite}
+  \def\@inlinecite#1{\begingroup\let\@cite\NAT at citenum\citep{#1}\endgroup}
+  \let\onlinecite\inlinecite
+  \expandafter\newcommand\csname bibstyle at thuthesis-numeric\endcsname{%
+    \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+  \expandafter\newcommand\csname bibstyle at thuthesis-author-year\endcsname{%
+    \bibpunct{(}{)}{;}{a}{,}{,}}
+  \expandafter\newcommand\csname bibstyle at thuthesis-bachelor\endcsname{%
+    \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
+  \@namedef{bibstyle at thuthesis-inline}{\bibpunct{[}{]}{,}{n}{,}{,}}
+  \thu at option@hook{cite-style}{\@nameuse{bibstyle at thuthesis-\thu at cite@style}}
+  \renewcommand\NAT at citesuper[3]{\ifNAT at swa
+    \if*#2*\else#2\NAT at spacechar\fi
+    % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%
+    %  \if*#3*\else\NAT at spacechar#3\fi\else #1\fi\endgroup}
+    \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
+    \else #1\fi\endgroup}
+  \renewcommand\NAT at citenum%
+      [3]{\ifNAT at swa\NAT@@open\if*#2*\else#2\NAT at spacechar\fi
+          % #1\if*#3*\else\NAT at cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+          #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
+  \def\NAT at citexnum[#1][#2]#3{%
+    \NAT at reset@parser
+    \NAT at sort@cites{#3}%
+    \NAT at reset@citea
+    \@cite{\def\NAT at num{-1}\let\NAT at last@yr\relax\let\NAT at nm\@empty
+      \@for\@citeb:=\NAT at cite@list\do
+      {\@safe at activestrue
+      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+      \@safe at activesfalse
+      \@ifundefined{b@\@citeb\@extra at b@citeb}{%
+        {\reset at font\bfseries?}
+          \NAT at citeundefined\PackageWarning{natbib}%
+        {Citation `\@citeb' on page \thepage \space undefined}}%
+      {\let\NAT at last@num\NAT at num\let\NAT at last@nm\NAT at nm
+        \NAT at parse{\@citeb}%
+        \ifNAT at longnames\@ifundefined{bv@\@citeb\@extra at b@citeb}{%
+          \let\NAT at name=\NAT at all@names
+          \global\@namedef{bv@\@citeb\@extra at b@citeb}{}}{}%
+        \fi
+        \ifNAT at full\let\NAT at nm\NAT at all@names\else
+          \let\NAT at nm\NAT at name\fi
+        \ifNAT at swa
+        \@ifnum{\NAT at ctype>\@ne}{%
+          \@citea
+          \NAT at hyper@{\@ifnum{\NAT at ctype=\tw@}{\NAT at test{\NAT at ctype}}{\NAT at alias}}%
+        }{%
+          \@ifnum{\NAT at cmprs>\z@}{%
+          \NAT at ifcat@num\NAT at num
+            {\let\NAT at nm=\NAT at num}%
+            {\def\NAT at nm{-2}}%
+          \NAT at ifcat@num\NAT at last@num
+            {\@tempcnta=\NAT at last@num\relax}%
+            {\@tempcnta\m at ne}%
+          \@ifnum{\NAT at nm=\@tempcnta}{%
+            \@ifnum{\NAT at merge>\@ne}{}{\NAT at last@yr at mbox}%
+          }{%
+            \advance\@tempcnta by\@ne
+            \@ifnum{\NAT at nm=\@tempcnta}{%
+              % \ifx\NAT at last@yr\relax
+              %   \def at NAT@last at yr{\@citea}%
+              % \else
+              %   \def at NAT@last at yr{--\NAT at penalty}%
+              % \fi
+              \def at NAT@last at yr{-\NAT at penalty}%
+            }{%
+              \NAT at last@yr at mbox
+            }%
+          }%
+          }{%
+          \@tempswatrue
+          \@ifnum{\NAT at merge>\@ne}{\@ifnum{\NAT at last@num=\NAT at num\relax}{\@tempswafalse}{}}{}%
+          \if at tempswa\NAT at citea@mbox\fi
+          }%
+        }%
+        \NAT at def@citea
+        \else
+          \ifcase\NAT at ctype
+            \ifx\NAT at last@nm\NAT at nm \NAT at yrsep\NAT at penalty\NAT at space\else
+              \@citea \NAT at test{\@ne}\NAT at spacechar\NAT at mbox{\NAT at super@kern\NAT@@open}%
+            \fi
+            \if*#1*\else#1\NAT at spacechar\fi
+            \NAT at mbox{\NAT at hyper@{{\citenumfont{\NAT at num}}}}%
+            \NAT at def@citea at box
+          \or
+            \NAT at hyper@citea at space{\NAT at test{\NAT at ctype}}%
+          \or
+            \NAT at hyper@citea at space{\NAT at test{\NAT at ctype}}%
+          \or
+            \NAT at hyper@citea at space\NAT at alias
+          \fi
+        \fi
+      }%
+      }%
+        \@ifnum{\NAT at cmprs>\z@}{\NAT at last@yr}{}%
+        \ifNAT at swa\else
+          % \@ifnum{\NAT at ctype=\z@}{%
+          %   \if*#2*\else\NAT at cmt#2\fi
+          % }{}%
+          \NAT at mbox{\NAT@@close}%
+          \@ifnum{\NAT at ctype=\z@}{%
+            \if*#2*\else\textsuperscript{#2}\fi
+          }{}%
+        \fi
+    }{#1}{#2}%
+  }%
+  \renewcommand\NAT at cite%
+      [3]{\ifNAT at swa\NAT@@open\if*#2*\else#2\NAT at spacechar\fi
+          % #1\if*#3*\else\NAT at cmt#3\fi\NAT@@close\else#1\fi\endgroup}
+          #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
+  \def\NAT at citex%
+    [#1][#2]#3{%
+    \NAT at reset@parser
+    \NAT at sort@cites{#3}%
+    \NAT at reset@citea
+    \@cite{\let\NAT at nm\@empty\let\NAT at year\@empty
+      \@for\@citeb:=\NAT at cite@list\do
+      {\@safe at activestrue
+      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+      \@safe at activesfalse
+      \@ifundefined{b@\@citeb\@extra at b@citeb}{\@citea%
+        {\reset at font\bfseries ?}\NAT at citeundefined
+                  \PackageWarning{natbib}%
+        {Citation `\@citeb' on page \thepage \space undefined}\def\NAT at date{}}%
+      {\let\NAT at last@nm=\NAT at nm\let\NAT at last@yr=\NAT at year
+        \NAT at parse{\@citeb}%
+        \ifNAT at longnames\@ifundefined{bv@\@citeb\@extra at b@citeb}{%
+          \let\NAT at name=\NAT at all@names
+          \global\@namedef{bv@\@citeb\@extra at b@citeb}{}}{}%
+        \fi
+      \ifNAT at full\let\NAT at nm\NAT at all@names\else
+        \let\NAT at nm\NAT at name\fi
+      \ifNAT at swa\ifcase\NAT at ctype
+        \if\relax\NAT at date\relax
+          \@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}\NAT at date}%
+        \else
+          \ifx\NAT at last@nm\NAT at nm\NAT at yrsep
+              \ifx\NAT at last@yr\NAT at year
+                \def\NAT at temp{{?}}%
+                \ifx\NAT at temp\NAT at exlab\PackageWarningNoLine{natbib}%
+                {Multiple citation on page \thepage: same authors and
+                year\MessageBreak without distinguishing extra
+                letter,\MessageBreak appears as question mark}\fi
+                \NAT at hyper@{\NAT at exlab}%
+              \else\unskip\NAT at spacechar
+                \NAT at hyper@{\NAT at date}%
+              \fi
+          \else
+            \@citea\NAT at hyper@{%
+              \NAT at nmfmt{\NAT at nm}%
+              \hyper at natlinkbreak{%
+                \NAT at aysep\NAT at spacechar}{\@citeb\@extra at b@citeb
+              }%
+              \NAT at date
+            }%
+          \fi
+        \fi
+      \or\@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}}%
+      \or\@citea\NAT at hyper@{\NAT at date}%
+      \or\@citea\NAT at hyper@{\NAT at alias}%
+      \fi \NAT at def@citea
+      \else
+        \ifcase\NAT at ctype
+          \if\relax\NAT at date\relax
+            \@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}}%
+          \else
+          \ifx\NAT at last@nm\NAT at nm\NAT at yrsep
+              \ifx\NAT at last@yr\NAT at year
+                \def\NAT at temp{{?}}%
+                \ifx\NAT at temp\NAT at exlab\PackageWarningNoLine{natbib}%
+                {Multiple citation on page \thepage: same authors and
+                year\MessageBreak without distinguishing extra
+                letter,\MessageBreak appears as question mark}\fi
+                \NAT at hyper@{\NAT at exlab}%
+              \else
+                \unskip\NAT at spacechar
+                \NAT at hyper@{\NAT at date}%
+              \fi
+          \else
+            \@citea\NAT at hyper@{%
+              \NAT at nmfmt{\NAT at nm}%
+              \hyper at natlinkbreak{\NAT at spacechar\NAT@@open\if*#1*\else#1\NAT at spacechar\fi}%
+                {\@citeb\@extra at b@citeb}%
+              \NAT at date
+            }%
+          \fi
+          \fi
+        \or\@citea\NAT at hyper@{\NAT at nmfmt{\NAT at nm}}%
+        \or\@citea\NAT at hyper@{\NAT at date}%
+        \or\@citea\NAT at hyper@{\NAT at alias}%
+        \fi
+        \if\relax\NAT at date\relax
+          \NAT at def@citea
+        \else
+          \NAT at def@citea at close
+        \fi
+      \fi
+      }}\ifNAT at swa\else
+        % \if*#2*\else\NAT at cmt#2\fi
+        \if\relax\NAT at date\relax\else\NAT@@close\fi
+        \if*#2*\else\textsuperscript{#2}\fi
+      \fi}{#1}{#2}}
+  \renewcommand\bibsection{\thu at chapter*{\bibname}}
+  \newcommand\thu at set@bibliography at format{%
+    \ifthu at degree@bachelor
+      \renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
+      \setlength{\bibsep}{6bp}%
+      \ifthu at main@language at chinese
+        \setlength{\bibhang}{21bp}%
+      \else
+        \setlength{\bibhang}{0.5in}%
+      \fi
+    \else
+      \renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
+      \setlength{\bibsep}{3bp}%
+      \setlength{\bibhang}{21bp}%
+    \fi
+  }
+  \thu at set@bibliography at format
+  \thu at option@hook{degree}{\thu at set@bibliography at format}
+  \thu at option@hook{main-language}{\thu at set@bibliography at format}
+  \def\@biblabel#1{[#1]\hfill}
+  \renewcommand\NAT at bibsetnum[1]{%
+    % \settowidth\labelwidth{\@biblabel{#1}}%
+    % \setlength{\leftmargin}{\labelwidth}%
+    % \addtolength{\leftmargin}{\labelsep}%
+    \setlength{\leftmargin}{1cm}%
+    \setlength{\itemindent}{\z@}%
+    \setlength{\labelsep}{0.1cm}%
+    \setlength{\labelwidth}{0.9cm}%
+    \setlength{\itemsep}{\bibsep}
+    \setlength{\parsep}{\z@}%
+    \ifNAT at openbib
+      \addtolength{\leftmargin}{\bibindent}%
+      \setlength{\itemindent}{-\bibindent}%
+      \setlength{\listparindent}{\itemindent}%
+      \setlength{\parsep}{0pt}%
+    \fi
+  }
 }
-\thu at option@hook{cite-style}{\@nameuse{bibstyle at thuthesis-\thu at cite@style}}
-\patchcmd\NAT at citexnum{%
-  \@ifnum{\NAT at ctype=\z@}{%
-    \if*#2*\else\NAT at cmt#2\fi
-  }{}%
-  \NAT at mbox{\NAT@@close}%
-}{%
-  \NAT at mbox{\NAT@@close}%
-  \@ifnum{\NAT at ctype=\z@}{%
-    \if*#2*\else\textsuperscript{#2}\fi
-  }{}%
-}{}{}
-\renewcommand\NAT at citesuper[3]{\ifNAT at swa
-  \if*#2*\else#2\NAT at spacechar\fi
-\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
-   \else #1\fi\endgroup}
-\patchcmd{\NAT at citex}{%
-  \if*#2*\else\NAT at cmt#2\fi
-  \if\relax\NAT at date\relax\else\NAT@@close\fi
-}{%
-  \if\relax\NAT at date\relax\else\NAT@@close\fi
-  \if*#2*\else\textsuperscript{#2}\fi
-}{}{}
-\renewcommand\NAT at cite%
-    [3]{\ifNAT at swa\NAT@@open\if*#2*\else#2\NAT at spacechar\fi
-        #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
-\patchcmd{\NAT at citexnum}{%
-  \ifx\NAT at last@yr\relax
-    \def at NAT@last at yr{\@citea}%
+\AtEndOfPackageFile*{biblatex}{
+  \AtBeginDocument{
+    \ifthenelse{\equal{\blx at bbxfile}{apa}}{\def\bibname{REFERENCES}}{}
+    \ifthenelse{\equal{\blx at bbxfile}{apa6}}{\def\bibname{REFERENCES}}{}
+    \ifthenelse{\equal{\blx at bbxfile}{mla}}{\def\bibname{WORKS CITED}}{}
+    \ifthenelse{\equal{\blx at bbxfile}{mla-new}}{\def\bibname{WORKS CITED}}{}
+  }
+  \DeclareRobustCommand\inlinecite{\parencite}
+  \defbibheading{bibliography}[\bibname]{\thu at chapter*{\bibname}}
+  \newcommand\thu at set@bibliography at format{%
+    \ifthu at degree@bachelor
+      \renewcommand\bibfont{\fontsize{10.5bp}{17bp}\selectfont}%
+      \setlength{\bibitemsep}{6bp}%
+      \ifthu at main@language at chinese
+        \setlength{\bibhang}{21bp}%
+      \else
+        \setlength{\bibhang}{0.5in}%
+      \fi
+    \else
+      \renewcommand\bibfont{\fontsize{10.5bp}{16bp}\selectfont}%
+      \setlength{\bibitemsep}{3bp}%
+      \setlength{\biblabelsep}{0.1cm}%
+      \setlength{\bibhang}{21bp}%
+    \fi
+  }
+  \thu at set@bibliography at format
+  \thu at option@hook{degree}{\thu at set@bibliography at format}
+  \thu at option@hook{main-language}{\thu at set@bibliography at format}
+}
+\AtEndOfPackageFile*{apacite}{
+  \AtBeginDocument{
+    \thu at set@chapter at names
+  }
+  \renewcommand\bibliographytypesize{\fontsize{10.5bp}{17bp}\selectfont}
+  \setlength{\bibitemsep}{6bp}
+  \ifthu at main@language at chinese
+    \setlength{\bibleftmargin}{21bp}
+    \setlength{\bibindent}{-\bibleftmargin}
   \else
-    \def at NAT@last at yr{--\NAT at penalty}%
+    \setlength{\bibleftmargin}{0.5in}
+    \setlength{\bibindent}{-\bibleftmargin}
   \fi
-}{%
-  \def at NAT@last at yr{-\NAT at penalty}%
-}{}{}
+  \def\st at rtbibchapter{%
+    \if at numberedbib%
+      \chapter{\bibname}%   e.g.,   6. References
+    \else%
+      \thu at chapter*{\bibname}%   e.g.,   References
+    \fi%
+  }%
+}
+\g at addto@macro\appendix{%
+  \@mainmattertrue
+}
 \thu at define@key{
   toc-depth = {
     name = toc at depth,
@@ -2053,7 +2563,7 @@
   }%
   \renewcommand\bibname{参考文献}%
   \let\bibsection\thu at appendix@bibsection
-  \renewcommand\@bibunitname{main-survey}%
+  \renewcommand\@bibunitname{\jobname-survey}%
   \let\bibliographystyle\defaultbibliographystyle
   \let\bibliography\thu at appendix@bibliography
   \begin{bibunit}%
@@ -2080,7 +2590,7 @@
       \section{\bibname}%
     \endgroup
   }%
-  \renewcommand\@bibunitname{main-translation}%
+  \renewcommand\@bibunitname{\jobname-translation}%
   \let\bibliographystyle\defaultbibliographystyle
   \let\bibliography\thu at appendix@bibliography
   \begin{bibunit}%
@@ -2092,7 +2602,7 @@
 }
 \newenvironment{translation-index}{%
   \begin{bibunit}%
-    \renewcommand\@bibunitname{main-index}%
+    \renewcommand\@bibunitname{\jobname-index}%
     \renewcommand\bibname{书面翻译对应的原文索引}%
     \let\bibsection\thu at appendix@bibsection
 }{%
@@ -2132,6 +2642,7 @@
 }%
 \newcommand\thu at appendix@bibliography[1]{\putbib[#1]}
 \newenvironment{resume}[1][\thu at resume@name]{%
+  \@mainmatterfalse
   \thu at chapter*{#1}}{}
 \newcommand{\resumeitem}[1]{%
   \vspace{24bp}{\sihao\heiti\centerline{#1}}\par\vspace{6bp}}
@@ -2145,9 +2656,22 @@
   leftmargin=10mm,labelsep=!,before=\xiaosi[1.26]}
 \def\publicationskip{\bigskip\bigskip}
 \newcommand{\record}[1]{%
+  \let\thu at record@file\@empty
+  \kv at define@key{thu at record}{file}{\let\thu at record@file\kv at value}%
+  \kv at set@family at handler{thu at record}{%
+    \ifx\kv at value\relax
+      \let\thu at record@file\kv at key
+    \else
+      \kv at handled@false
+    \fi
+  }%
+  \kvsetkeys{thu at record}{#1}%
+  \ifx\thu at record@file\@empty
+    \thu at error{File path of \protect\record\space is required}
+  \fi
   \cleardoublepage
   \thu at pdfbookmark{0}{综合论文训练记录表}%
-  \includepdf[pages=-]{#1}%
+  \includepdf[pages=-]{\thu at record@file}%
 }
 \AtEndOfPackageFile*{hyperref}{
   \hypersetup{
@@ -2180,7 +2704,7 @@
   \@ifpackagelater{hyperref}{2019/04/27}{}{%
     \g at addto@macro\psdmapshortnames{\let\mu\textmu}
   }%
-  \ifthu at language@chinese
+  \ifthu at main@language at chinese
     \hypersetup{
       pdflang = zh-CN,
     }%
@@ -2190,7 +2714,7 @@
     }%
   \fi
   \AtBeginDocument{%
-    \ifthu at language@chinese
+    \ifthu at main@language at chinese
       \hypersetup{
         pdftitle    = \thu at title,
         pdfauthor   = \thu at author,
@@ -2304,7 +2828,6 @@
   \floatname{algorithm}{\thu at algorithm@name}
   \g at addto@macro\appendix{\renewcommand*{\thealgorithm}{\thechapter-\arabic{algorithm}}}
   \renewcommand\listofalgorithms{%
-    \thu at set@list at label@width{\fname at algorithm}%
     \thu at listof{algorithm}%
   }
   \renewcommand\listalgorithmname{\thu at list@algorithm at name}
@@ -2311,8 +2834,8 @@
   \def\ext at algorithm{loa}
   \contentsuse{algorithm}{loa}
   \titlecontents{algorithm}
-    [\thu at list@label at width]{\addvspace{6bp}}
-    {\contentslabel[\fname at algorithm~\thecontentslabel]{\thu at list@label at width}}{}
+    [\z@]{}
+    {\contentspush{\fname at algorithm~\thecontentslabel\hspace{\ccwd}}}{}
     {\thu at leaders\thecontentspage}
 }
 \PassOptionsToPackage{algochapter}{algorithm2e}
@@ -2323,7 +2846,6 @@
   \SetAlgoCaptionSeparator{\hspace*{1em}}
   \SetAlFnt{\dawu}
   \renewcommand\listofalgorithms{%
-    \thu at set@list at label@width{\algorithmcfname}%
     \thu at listof{algorithmcf}%
   }
   \renewcommand\listalgorithmcfname{\thu at list@algorithm at name}
@@ -2330,8 +2852,8 @@
   \def\ext at algorithmcf{loa}
   \contentsuse{algocf}{loa}
   \titlecontents{algocf}
-    [\thu at list@label at width]{\addvspace{6bp}}
-    {\contentslabel[\algorithmcfname~\thecontentslabel]{\thu at list@label at width}}{}
+    [\z@]{}
+    {\contentspush{\algorithmcfname~\thecontentslabel\hspace{\ccwd}}}{}
     {\thu at leaders\thecontentspage}
 }
 \AtEndOfPackageFile*{minted}{
@@ -2392,7 +2914,7 @@
     }%
   \fi
   \thispagestyle{empty}%
-  \ifthu at language@chinese
+  \ifthu at main@language at chinese
     \thu at pdfbookmark{0}{书脊}%
   \else
     \thu at pdfbookmark{0}{Spine}%



More information about the tex-live-commits mailing list.