summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-02-27 03:05:21 +0000
committerNorbert Preining <norbert@preining.info>2023-02-27 03:05:21 +0000
commit86d5a04282aa958addab4585c4df899ec9a92e50 (patch)
tree7736ac0fb49348cb6ae88770b4b72ed5ee9d8081 /macros/latex
parente7ae872926eddb0de09ecfe1c578e0680033955a (diff)
CTAN sync 202302270305
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/fduthesis/README.md6
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis-code.dtx6316
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis-code.pdfbin965673 -> 977630 bytes
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis-doc.dtx185
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis-en.pdfbin162961 -> 151111 bytes
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis-logo.dtx9
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis.dtx598
-rw-r--r--macros/latex/contrib/fduthesis/fduthesis.pdfbin424983 -> 445548 bytes
-rw-r--r--macros/latex/contrib/hrefhide/README136
-rw-r--r--macros/latex/contrib/hrefhide/hrefhide-example.pdfbin114343 -> 111632 bytes
-rw-r--r--macros/latex/contrib/hrefhide/hrefhide.dtx746
-rw-r--r--macros/latex/contrib/hrefhide/hrefhide.pdfbin319943 -> 329925 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/README.md11
-rw-r--r--macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdfbin6204530 -> 6310183 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex106
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv3-JS.pdfbin0 -> 35063 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv4-AP.pdfbin2281 -> 2283 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10C.pdfbin0 -> 2415 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10K.pdfbin0 -> 2067 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10P.pdfbin0 -> 3078 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10T.pdfbin0 -> 4703 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2C.pdfbin0 -> 1784 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2K.pdfbin0 -> 1663 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2P.pdfbin0 -> 1979 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2T.pdfbin0 -> 2520 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3C.pdfbin0 -> 1905 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3K.pdfbin0 -> 1755 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3P.pdfbin0 -> 2150 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3T.pdfbin0 -> 2831 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4C.pdfbin0 -> 1886 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4K.pdfbin0 -> 1705 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4P.pdfbin0 -> 2199 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4T.pdfbin0 -> 3027 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5C.pdfbin0 -> 2070 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5K.pdfbin0 -> 1858 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5P.pdfbin0 -> 2466 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5T.pdfbin0 -> 3495 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6C.pdfbin0 -> 2162 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6K.pdfbin0 -> 1934 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6P.pdfbin0 -> 2586 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6T.pdfbin0 -> 3662 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7C.pdfbin0 -> 2129 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7K.pdfbin0 -> 1865 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7P.pdfbin0 -> 2639 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7T.pdfbin0 -> 3893 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8C.pdfbin0 -> 2369 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8K.pdfbin0 -> 2084 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8P.pdfbin0 -> 2957 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8T.pdfbin0 -> 4365 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9C.pdfbin0 -> 2412 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9K.pdfbin0 -> 2101 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9P.pdfbin0 -> 3018 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9T.pdfbin0 -> 4498 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AC.pdfbin0 -> 1682 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AK.pdfbin0 -> 1584 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AP.pdfbin0 -> 1817 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AT.pdfbin0 -> 2212 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DC.pdfbin0 -> 1737 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DK.pdfbin0 -> 1669 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DP.pdfbin0 -> 1790 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DT.pdfbin0 -> 1992 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosNoir.pdfbin0 -> 5951 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosRouge.pdfbin0 -> 5697 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JN.pdfbin0 -> 5084 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JR.pdfbin0 -> 5082 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RC.pdfbin0 -> 1731 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RK.pdfbin0 -> 1663 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RP.pdfbin0 -> 1783 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RT.pdfbin0 -> 1992 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VC.pdfbin0 -> 1633 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VK.pdfbin0 -> 1560 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VP.pdfbin0 -> 1683 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VT.pdfbin0 -> 1889 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/CaJ-UnOv1-Dos.pdfbin0 -> 6481 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty81
-rw-r--r--macros/latex/contrib/l3build/CHANGELOG.md14
-rw-r--r--macros/latex/contrib/l3build/CONTRIBUTING.md52
-rw-r--r--macros/latex/contrib/l3build/README.md4
-rw-r--r--macros/latex/contrib/l3build/l3build-arguments.lua8
-rw-r--r--macros/latex/contrib/l3build/l3build-check.lua2
-rw-r--r--macros/latex/contrib/l3build/l3build-typesetting.lua3
-rw-r--r--macros/latex/contrib/l3build/l3build-variables.lua3
-rw-r--r--macros/latex/contrib/l3build/l3build.12
-rw-r--r--macros/latex/contrib/l3build/l3build.dtx2
-rwxr-xr-xmacros/latex/contrib/l3build/l3build.lua43
-rw-r--r--macros/latex/contrib/l3build/l3build.pdfbin741730 -> 742105 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/README.md6
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdfbin193359 -> 196376 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex40
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdfbin126724 -> 126723 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex2
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdfbin154061 -> 158171 bytes
-rw-r--r--macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex26
-rw-r--r--macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty163
94 files changed, 7459 insertions, 1105 deletions
diff --git a/macros/latex/contrib/fduthesis/README.md b/macros/latex/contrib/fduthesis/README.md
index abbb1b2e8e..4f36d2bb81 100644
--- a/macros/latex/contrib/fduthesis/README.md
+++ b/macros/latex/contrib/fduthesis/README.md
@@ -1,7 +1,7 @@
The `fduthesis` Class
=====================
-*LaTeX thesis template for Fudan University, v0.8*
+*LaTeX thesis template for Fudan University, v0.9*
Overview
--------
@@ -41,7 +41,7 @@ To install `fduthesis`, you can use one of the following methods:
git clone https://github.com/stone-zeng/fduthesis.git
- Run `install-win.bat` (on Windows) or `install-linux.sh` (on Linux)
+ Run `install-win.bat` (Windows) or `install-unix.sh` (Linux or macOS)
to generate the templates and configuration files. These files would
be found in a new-created `thesis` folder. You can enjoy `fduthesis`
here at once.
@@ -78,4 +78,4 @@ version.
-----
-Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
+Copyright (C) 2017&ndash;2023 by Xiangdong Zeng <xdzeng96@gmail.com>.
diff --git a/macros/latex/contrib/fduthesis/fduthesis-code.dtx b/macros/latex/contrib/fduthesis/fduthesis-code.dtx
new file mode 100644
index 0000000000..786bbfa049
--- /dev/null
+++ b/macros/latex/contrib/fduthesis/fduthesis-code.dtx
@@ -0,0 +1,6316 @@
+% \iffalse meta-comment
+% !TeX program = XeLaTeX
+% !TeX encoding = UTF-8
+%
+% Copyright (C) 2017--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Xiangdong Zeng.
+%
+% This work consists of the files fduthesis.dtx,
+% fduthesis-doc.dtx,
+% fduthesis-logo.dtx,
+% and the derived files fduthesis.ins,
+% fduthesis.cls,
+% fduthesis-en.cls,
+% fduthesis.def,
+% fdudoc.cls,
+% fdulogo.sty,
+% fdulogo-example.tex,
+% fduthesis-cover.tex,
+% fduthesis-en.tex,
+% fudan-emblem.pdf,
+% fudan-emblem-new.pdf,
+% fudan-name.pdf,
+% fduthesis.pdf,
+% fduthesis-en.pdf,
+% fduthesis-code.pdf,
+% and README.md.
+%
+%<*internal>
+\iffalse
+%</internal>
+%
+%<*readme>
+The `fduthesis` Class
+=====================
+
+*LaTeX thesis template for Fudan University, v0.9*
+
+Overview
+--------
+
+This template supports doctoral or master dissertion and undergraduate
+thesis, both in Chinese or English. With the help of modern LaTeX
+technology, `fduthesis` aims to create a simple interface, a normative
+format, as well as a hackable class for the users.
+
+At present, `fduthesis` only supports XeTeX and LuaTeX engines.
+Support for pdfTeX and [ApTeX](https://github.com/clerkma/ptex-ng) is
+still under development. `fduthesis` only allows UTF-8 encoding.
+
+The documentation can be found in
+[fduthesis.pdf](http://mirrors.ctan.org/macros/latex/contrib/fduthesis/fduthesis.pdf)
+(in Chinese) or
+[fduthesis-en.pdf](http://mirrors.ctan.org/macros/latex/contrib/fduthesis/fduthesis-en.pdf)
+(in English).
+
+GitHub repository: <https://github.com/stone-zeng/fduthesis>.
+
+Installation
+------------
+
+To install `fduthesis`, you can use one of the following methods:
+
+- If you are running TeX Live, the simplest way is to run
+
+ tlmgr install fduthesis
+
+- Download
+ [fduthesis.tds.zip](http://mirror.ctan.org/install/macros/latex/contrib/fduthesis.tds.zip)
+ from CTAN, extract it in the root of one of your TDS trees, and
+ update the filename database.
+
+- Get the source from GitHub:
+
+ git clone https://github.com/stone-zeng/fduthesis.git
+
+ Run `install-win.bat` (Windows) or `install-unix.sh` (Linux or macOS)
+ to generate the templates and configuration files. These files would
+ be found in a new-created `thesis` folder. You can enjoy `fduthesis`
+ here at once.
+
+ For permanent installation, you may move the following files into a
+ directory where LaTeX will find them (e.g.
+ `TEXMF/tex/latex/fduthesis/`):
+
+ - `fduthesis.cls`
+ - `fduthesis-en.cls`
+ - `fduthesis.def`
+ - `fdudoc.cls`
+ - `fdulogo.sty`
+ - `fudan-emblem.pdf`
+ - `fudan-emblem-new.pdf`
+ - `fudan-name.pdf`
+
+ Do not forget to update the filename database afterwards.
+
+Contributing
+------------
+
+[Issues](https://github.com/stone-zeng/fduthesis/issues) and
+[pull requests](https://github.com/stone-zeng/fduthesis/pulls)
+are always welcome.
+
+License
+-------
+
+This work may be distributed and/or modified under the conditions of
+the [LaTeX Project Public License](http://www.latex-project.org/lppl.txt),
+either version 1.3c of this license or (at your option) any later
+version.
+
+-----
+
+Copyright (C) 2017&ndash;2023 by Xiangdong Zeng <xdzeng96@gmail.com>.
+%</readme>
+%
+%<*internal>
+\fi
+\begingroup
+ \def\NameOfLaTeXe{LaTeX2e}
+\expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else
+\csname fi\endcsname
+%</internal>
+%
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+ Copyright (C) 2017--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
+
+ This work may be distributed and/or modified under the
+ conditions of the LaTeX Project Public License, either
+ version 1.3c of this license or (at your option) any later
+ version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+ and version 1.3 or later is part of all distributions of
+ LaTeX version 2005/12/01 or later.
+
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Xiangdong Zeng.
+
+ This work consists of the files fduthesis.dtx,
+ fduthesis-doc.dtx,
+ fduthesis-logo.dtx,
+ and the derived files fduthesis.ins,
+ fduthesis.cls,
+ fduthesis-en.cls,
+ fduthesis.def,
+ fdudoc.cls,
+ fdulogo.sty,
+ fdulogo-example.tex,
+ fduthesis-cover.tex,
+ fduthesis-en.tex,
+ fudan-emblem.pdf,
+ fudan-emblem-new.pdf,
+ fudan-name.pdf,
+ fduthesis.pdf,
+ fduthesis-en.pdf,
+ fduthesis-code.pdf,
+ and README.md.
+
+\endpreamble
+
+\generate{
+ \usedir{tex/latex/fduthesis}
+ \file{\jobname.cls} {\from{\jobname.dtx}{class}}
+ \file{\jobname-en.cls} {\from{\jobname.dtx}{class-en}}
+ \file{\jobname.def} {\from{\jobname.dtx}{definition}}
+ \file{fdudoc.cls} {\from{\jobname.dtx}{doc}
+ \from{\jobname-doc.dtx}{doc}}
+ \file{fdulogo.sty} {\from{\jobname.dtx}{logo}
+ \from{\jobname-logo.dtx}{logo}}
+ \file{fdulogo-example.tex} {\from{\jobname.dtx}{ex-logo}
+ \from{\jobname-logo.dtx}{ex-logo}}
+ \file{\jobname-cover.tex} {\from{\jobname.dtx}{cover}
+ \from{\jobname-logo.dtx}{cover}}
+%<*internal>
+ \usedir{source/latex/fduthesis}
+ \file{\jobname.ins} {\from{\jobname.dtx}{install}}
+%</internal>
+ \usedir{doc/latex/fduthesis}
+ \nopreamble\nopostamble
+ \file{README.md} {\from{\jobname.dtx}{readme}}
+}
+
+\obeyspaces
+\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 TDS:tex/latex/fduthesis *}
+\Msg{* *}
+\Msg{* fduthesis.cls *}
+\Msg{* fduthesis-en.cls *}
+\Msg{* fduthesis.def *}
+\Msg{* fdudoc.cls *}
+\Msg{* fdulogo.sty *}
+\Msg{* *}
+\Msg{* To produce the documentation, run the file fduthesis.dtx *}
+\Msg{* through XeLaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
+%</install>
+%
+%<*internal>
+\fi
+%</internal>
+%
+%<class|class-en|doc|logo>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+%<*!(driver|install|ex-logo|cover)>
+%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $
+%<class> {Thesis template for Fudan University}
+%<class>\ProvidesExplClass{\ExplFileName}
+%<class-en> {Thesis template for Fudan University (English version)}
+%<class-en>\ProvidesExplClass{\ExplFileName-en}
+%<definition> {Definition file for fduthesis}
+%<definition>\ProvidesExplFile{\ExplFileName.def}
+%<doc> {Documentation class for fduthesis}
+%<doc>\ProvidesExplClass{fdudoc}
+%<logo> {Fudan University's Visual Identity}
+%<logo>\ProvidesExplPackage{fdulogo}
+%<!readme> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
+%</!(driver|install|ex-logo|cover)>
+%<*driver>
+% \PassOptionsToPackage{showframe}{geometry}
+\documentclass{fdudoc}
+\usepackage{xeCJKfntef}
+\hypersetup{
+ pdftitle = {fduthesis: 复旦大学论文模板},
+ pdfauthor = {曾祥东}}
+% 全角标点放在引号中,需要改成半角式,否则间距过大,不好看
+\def\FSID{“{\xeCJKsetup{PunctStyle=banjiao}。}”} % U+3002
+\def\FSFW{“{\xeCJKsetup{PunctStyle=banjiao}.}”} % U+FF0E
+\def\COFW{“{\xeCJKsetup{PunctStyle=banjiao}:}”} % U+FF1A
+\def\SCFW{“{\xeCJKsetup{PunctStyle=banjiao};}”} % U+FF1B
+%^^A! \PassOptionsToPackage{scheme=plain, linespread=1.1}{ctex}
+%^^A! \documentclass{fdudoc}
+%^^A! \hypersetup{
+%^^A! pdftitle = {fduthesis: LaTeX Thesis Template for Fudan University},
+%^^A! pdfauthor = {Xiangdong Zeng}}
+%^^A! \ctexset{
+%^^A! section = {name = {}, format+ = \raggedright},
+%^^A! subsubsection/tocline = {\CTEXnumberline{#1}#2}}
+%^^A! \pagestyle{headings}
+%^^A! \def\FSID{{\xeCJKsetup{PunctStyle=banjiao}。}}
+%^^A! \def\FSFW{{\xeCJKsetup{PunctStyle=banjiao}.}}
+%^^A!
+
+\title{\textcolor{MaterialIndigo800}{\textbf{fduthesis: 复旦大学论文模板}}}
+\author{曾祥东}
+\date{2023/02/26\quad v0.9%
+ \thanks{\url{https://github.com/stone-zeng/fduthesis}.}}
+%^^A! \title{\textcolor{MaterialIndigo800}{%
+%^^A! \textbf{The \textsf{fduthesis} Class \\
+%^^A! \LaTeX{} Thesis Template for Fudan University}}}
+%^^A! \author{Xiangdong Zeng}
+%^^A! \date{2023/02/26\quad v0.9%
+%^^A! \thanks{\url{https://github.com/stone-zeng/fduthesis}.}}
+%^^A!
+
+\begin{document}
+%^^A! \begin{document}
+%^^A!
+ \DisableImplementation
+ \EnableImplementation
+ \def\FDUCODEDOC{}
+ \DocInput{fduthesis.dtx}
+ \DocInput{fduthesis-doc.dtx,fduthesis-logo.dtx}
+ \IndexLayout
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{v0.1}{2017/02/15}{开始编写模板。}
+% \changes{v0.2}{2017/02/19}{使用 Git 进行版本控制,并发布至 GitHub。}
+% \changes{v0.3}{2017/02/21}{使用 \cls{doc} 和 \pkg{DocStrip}。}
+% \changes{v0.3}{2017/03/04}{支持 \LuaLaTeX{}。}
+% \changes{v0.3}{2017/03/20}{添加测试文件。}
+% \changes{v0.3}{2017/05/26}{使用 Travis CI 进行持续集成。}
+% \changes{v0.3}{2017/06/23}{添加复旦大学视觉识别系统。}
+% \changes{v0.3}{2017/07/05}{新增声明页。}
+% \changes{v0.3}{2017/07/10}{添加英文模板。}
+% \changes{v0.3}{2017/07/19}{使用 \pkg{l3docstrip} 管理名字空间。}
+% \changes{v0.3}{2017/07/28}{整理代码,编写用户文档。}
+% \changes{v0.4}{2017/08/03}{拆分 \file{.dtx} 文件。}
+% \changes{v0.4}{2017/08/11}{添加错误信息提示。}
+% \changes{v0.6}{2017/11/23}{同步 \pkg{ctex} v2.4.11。}
+% \changes{v0.6}{2017/11/29}{添加英文版用户文档。}
+% \changes{v0.7}{2018/01/26}{使用 \pkg{l3build} 进行回归测试。}
+% \changes{v0.7}{2018/01/31}{不再需要 \file{fduthesis-user.def}。}
+% \changes{v0.7}{2018/03/04}{所有选项更改为用连字符隔开的形式。}
+% \changes{v0.7a}{2018/04/09}{更新文档,发布至 CTAN。}
+% \changes{v0.7b}{2018/04/29}{支持 \TeXLive{} 2018。}
+% \changes{v0.7b}{2018/05/06}{将校名、校徽图片添加至发行版。}
+%
+%^^A 禁止使用 " 符号作为抄录文本缩略符
+% \DeleteShortVerb\"
+%^^A! \DeleteShortVerb\"
+%^^A!
+%
+%^^A 封面与目录的页边距
+%^^A+
+% \newgeometry{
+% left = 1.25 in,
+% right = 1.25 in,
+% top = 1.25 in,
+% bottom = 1.00 in
+% }
+%
+% \maketitle
+% \vfill
+% \begin{center}
+% \includegraphics[width=8cm]{../logo/fduthesis-cover.pdf}
+% \end{center}
+% \vfill
+% \thispagestyle{plain}
+% \clearpage
+%
+% \tableofcontents
+%
+%^^A-
+%
+% \EnableDocumentation
+%^^A \DisableDocumentation
+%
+% \begin{documentation}
+%
+%^^A 用户手册的页边距
+%^^A+
+% \newgeometry{
+% left = 1.65 in,
+% right = 0.80 in,
+% top = 1.25 in,
+% bottom = 1.00 in
+% }
+%
+%^^A-
+%
+% \section{介绍}
+%^^A! \section{Introduction}
+%^^A!
+%
+% 本模板编写之初,可以找到的复旦大学 \LaTeX{} 论文模板有以下这些:
+% \begin{itemize}
+% \item 数学科学学院的本科毕业论文模版 \cite{数院本科毕业论文写作模板},主要贡献者为 2001 级的
+% 何力同学、李湛同学和 2004 级的张越同学;
+% \item Pandoxie 编写的 \cls{FDU-Thesis-Latex} \cite{pandoxie2014fduthesislatex},基本满足了博士
+% (硕士)毕业论文格式要求,在当时使用人数较多;
+% \item richarddzh 编写的硕士论文模板 \cls{fudan-thesis} \cite{richard2016fudanthesis}。
+% \end{itemize}
+% 以上模板大都没有经过系统的设计,也缺乏后续维护。相比之下,清华大学 \cite{thuthesis}、
+% 北京大学 \cite{pkuthss}、重庆大学 \cite{cquthesis}、中国科学技术大学 \cite{ustcthesis}、
+% 中国科学院大学 \cite{ucasthesis} 以及友校上海交通大学 \cite{sjtuthesis} 等,都有较为成熟、稳定
+% 的解决方案,也积累了广泛的用户基础,值得参考与借鉴。
+%
+% 考虑到开发与持续维护的需要,本模板使用 \LaTeX3 \cite{source3} 语法编写。同时将构建一套简洁的
+% 接口,以方便用户使用。
+%^^A! \cls{fduthesis} is a thesis template for Fudan University.
+%^^A! This template is mostly written in \LaTeX3 syntax, and
+%^^A! provides a simple interface for users.
+%^^A!
+%
+% \subsection*{\LaTeX{} 入门}
+%^^A! \subsection*{Getting started with \LaTeX{}}
+%^^A!
+%
+% 本文档不是一份 \LaTeX{} 零基础教程。如果缺乏使用 \LaTeX{} 的经验,建议先阅读有关入门文档,如
+% 刘海洋编著的《\LaTeX{} 入门》\cite{刘海洋2013latex入门} 第一章,或“\pkg{lshort}” \cite{lshort}
+% 及其中文翻译版 \cite{lshort-zh-cn}。当然,网络上的 \LaTeX{} 教程数量甚多,也可自行选取。
+%^^A! This documentation is \emph{not} a \LaTeX{} tutorial at
+%^^A! starter's level. If you are totally a newbie, please read some
+%^^A! introductions like the famous \pkg{lshort}. Of course, there
+%^^A! are countless \LaTeX{} tutorials on the Internet. You can
+%^^A! choose whatever you like.
+%^^A!
+%
+% \subsection*{关于本文档}
+%^^A! \subsection*{About this documentation}
+%^^A!
+%
+% 本文档采用不同字体表示不同内容。无衬线字体表示宏包名称,如 \pkg{xeCJK} 宏包、\cls{fduthesis}
+% 文档类等;等宽字体表示代码或文件名,如 \cs{fdusetup} 命令、\env{abstract} 环境、\TeX{} 文档
+% \file{thesis.tex} 等;带有尖括号的楷体(或西文斜体)表示命令参数,如 \meta{模板选项}、
+% \meta{English title} 等。在使用时,参数两侧的尖括号不必输入。示例代码进行了语法高亮处理,
+% 以方便阅读。
+%^^A! In this documentation, different typefaces are used to
+%^^A! represent different contents. Packages and classes are shown
+%^^A! in sans-serif font, e.g.\ \pkg{xeCJK} package and
+%^^A! \cls{fduthesis} class. Commands and file names are shown in
+%^^A! monospaced font, e.g.\ command \cs{fdusetup}, environment
+%^^A! \env{abstract} and \TeX{} document \file{thesis.tex}.
+%^^A! Italic-shaped font with angle brackets outside means arguments,
+%^^A! e.g.\ \meta{English title}. However, you do not need to type
+%^^A! the brackets when using these commands. The example code has
+%^^A! proper syntax highlighting so it will be much easier to read.
+%^^A!
+%
+% 在用户手册中,带有蓝色侧边线的为 \LaTeX{} 代码,而带有粉色侧边线的则为命令行代码,请注意区分。
+% 模板提供的选项、命令、环境等,均列在左边栏并用横线框起,同时给出使用语法和相关说明。
+%^^A! \LaTeX{} code lines will have a blue line on their left, while
+%^^A! for command lines there will be a pink line. The options,
+%^^A! commands and environments in \cls{fduthesis} will be surrounded
+%^^A! by two horizontal lines. Their usages and descriptions are
+%^^A! provided at the same time.
+%^^A!
+%
+% 本模板中的选项、命令或环境可以分为以下三类:
+% \begin{itemize}
+% \item 名字后面带有 \rexptarget\rexpstar{} 的,表示只能在\emph{中文模板}中使用;
+% \item 名字后面带有 \exptarget\expstar{} 的,表示只能在\emph{英文模板}中使用;
+% \item 名字后面不带有特殊标记的,表示既可以在中文模板中使用,也可以在英文模板中使用。
+% \end{itemize}
+%^^A! The options, commands and environments in \cls{fduthesis} can be
+%^^A! divided into the following three types:
+%^^A! \begin{itemize}
+%^^A! \item Those can be only used in \emph{Chinese templates} are
+%^^A! indicated by \rexptarget\rexpstar{}.
+%^^A! \item Those can be only used in \emph{English templates} are
+%^^A! indicated by \rexptarget\expstar{}.
+%^^A! \item If they do not have marks afterwards, then you can use
+%^^A! them in both Chinese and English templates.
+%^^A! \end{itemize}
+%^^A!
+%
+% \section{安装}
+%^^A! \section{Installation}
+%^^A!
+%
+% \subsection{获取 \cls{fduthesis}}
+%^^A! \subsection{Obtaining \cls{fduthesis}}
+%^^A!
+%
+% \subsubsection{标准安装}
+%^^A! \subsubsection{Standard installation}
+%^^A!
+%
+% 如果没有特殊理由,始终建议使用宏包管理器安装 \cls{fduthesis}。例如在 \TeXLive{} 中,执行(可能
+% 需要管理员权限)
+% \begin{shellexample}[morekeywords={tlmgr,install}]
+% tlmgr install fduthesis
+% \end{shellexample}
+% 即可完成安装。如果已经装有完整版的 \TeXLive{},则 \cls{fduthesis} 应当已经包含在其中,此时即可
+% 直接使用,也可以执行
+% \begin{shellexample}[morekeywords={tlmgr,update},emph={--all}]
+% tlmgr update --all
+% \end{shellexample}
+% 检查并更新全部宏包。
+%^^A! If there are no special reasons, it is always recommended to
+%^^A! install \cls{fduthesis} with a package manager. For example,
+%^^A! the following command will install the package in \TeXLive{}
+%^^A! (administrator permission may be required):
+%^^A! \begin{shellexample}[morekeywords={tlmgr,install}]
+%^^A! tlmgr install fduthesis
+%^^A! \end{shellexample}
+%^^A!
+%
+% 在 \TeXLive{} 和 \MiKTeX{} 中,还可以通过图形界面进行安装和更新,此处不再赘述。
+%^^A! In \TeXLive{} and \MiKTeX{}, you can also install \cls{fduthesis}
+%^^A! through a graphical interface. It's rather simple and will not be
+%^^A! described here.
+%^^A!
+%
+% \subsubsection{手动安装}
+%^^A! \subsubsection{Install manually}
+%^^A!
+%
+% 如果需要从 CTAN 上自行下载并手动安装,可使用 TDS 安装包:
+% \begin{itemize}
+% \item 从 CTAN 上下载 \cls{fduthesis} 的
+% \href{https://mirror.ctan.org/install/macros/latex/contrib/fduthesis.tds.zip}{TDS 安装包};
+% \item 按目录结构将 \file{fduthesis.tds.zip} 中的文件复制到 \TeX{} 发行版的本地 TDS 根目录;
+% \item 执行 \texttt{mktexlsr} 命令刷新文件名数据库以完成安装。
+% \end{itemize}
+%^^A! If you want to download the template from CTAN and install it
+%^^A! manually, the recommended way is to use the TDS ZIP file:
+%^^A! \begin{itemize}
+%^^A! \item Download the \href{http://mirror.ctan.org/install/macros/latex/contrib/fduthesis.tds.zip}%
+%^^A! {TDS ZIP file} for \cls{fduthesis};
+%^^A! \item Copy all the files in \file{fduthesis.tds.zip} into the
+%^^A! local TDS directory of \TeX{} distribution.
+%^^A! \item Run \texttt{mktexlsr} to update the ls-R database.
+%^^A! \end{itemize}
+%^^A
+%
+% \subsubsection{开发版本}
+%^^A! \subsubsection{Development version}
+%^^A!
+%
+% CTAN 上仅提供了 \cls{fduthesis} 的稳定版,其更新可能较为滞后,一些 bug 常常不能得到及时修复。
+% 如果需要使用开发版(托管在 GitHub 上),可以使用模板提供的安装脚本:
+% \begin{itemize}
+% \item 打开 \href{https://github.com/stone-zeng/fduthesis}{项目主页},点击“Code”按钮,并选择
+% “Download ZIP”,下载 \file{fduthesis-main.zip};如果已经装有 Git 程序,也可通过以下命令直接
+% 克隆代码仓库:
+% \begin{shellexample}[gobble=7,alsoletter={.},morekeywords={git,clone}]
+% git clone https://github.com/stone-zeng/fduthesis.git
+% \end{shellexample}
+% \item 执行 \file{install-win.bat}(Windows 系统)或 \file{install-unix.sh}(Linux 或 macOS
+% 系统),所有需要的文件便会在 \file{thesis} 文件夹中生成。
+% \end{itemize}
+%^^A! On CTAN, only the stable version of \cls{fduthesis} is provided, where new features and
+%^^A! bug fixes may not be included in time. To use the latest development version on GitHub,
+%^^A! you can use the install script:
+%^^A! \begin{itemize}
+%^^A! \item Open the project's \href{https://github.com/stone-zeng/fduthesis}{homepage}, click
+%^^A! ``Code'' button and choose ``Download ZIP'' to download \file{fduthesis-main.zip}.
+%^^A! If you have git program on your computer, you can also clone the repository directly:
+%^^A! \begin{shellexample}[gobble=5,alsoletter={.},morekeywords={git,clone}]
+%^^A! git clone https://github.com/stone-zeng/fduthesis.git
+%^^A! \end{shellexample}
+%^^A! \item Run \file{install-win.bat} (Windows) or \file{install-unix.sh} (Linux or macOS),
+%^^A! all the necessary files will be found in the \file{thesis} folder then.
+%^^A! \end{itemize}
+%^^A!
+%
+% \subsubsection{Overleaf}
+%^^A! \subsubsection{Overleaf}
+%^^A!
+%
+% \cls{fduthesis} 也提供了 \href{https://www.overleaf.com/latex/templates/fduthesis-latex-thesis-template-for-fudan-university/svtdhhstkmkt}{Overleaf 的版本},
+% 打开链接并登录后即可直接编辑。
+%^^A! \cls{fduthesis} also provides the \href{https://www.overleaf.com/latex/templates/fduthesis-latex-thesis-template-for-fudan-university/svtdhhstkmkt}{Overleaf version}.
+%^^A! You can follow the link and login to edit directly on the web.
+%^^A!
+%
+% \subsection{模板组成}
+%^^A! \subsection{Composition of the template}
+%^^A!
+%
+% 本模板主要包含核心文档类、配置文件、附属宏包以及用户文档等几个部分,其具体组成见
+% 表~\ref{tab:fduthesis-components}。
+%^^A! There are several parts in \cls{fduthesis}, including kernel template
+%^^A! classes, configuration files, affiliated packages and user's guides.
+%^^A! More details are listed in table~\ref{tab:fduthesis-components}.
+%^^A!
+%
+% \begin{table}[ht]
+% \caption{\cls{fduthesis} 的主要组成部分}
+% \label{tab:fduthesis-components}
+% \centering
+% \small
+% \begin{tabular}{ll}
+% \toprule
+% \textbf{文件} & \textbf{功能说明} \\
+% \midrule
+% \file{fduthesis.cls} & 中文模板文档类 \\
+% \file{fduthesis-en.cls} & 英文模板文档类 \\
+% \file{fduthesis.def} & 参数配置文件,用于设定初始参数,不建议自行改动 \\
+% \file{fdudoc.cls} & 用户手册文档类 \\
+% \file{fdulogo.sty} & 复旦大学视觉识别系统 \\
+% \file{fudan-emblem.pdf} & 校徽 \\
+% \file{fudan-emblem-new.pdf} & 校徽(重修版) \\
+% \file{fudan-name.pdf} & 校名图片 \\
+% \file{README.md} & 简要自述 \\
+% \ifdefined\FDUCODEDOC
+% \file{fduthesis.pdf} & 中文用户手册 \\
+% \file{fduthesis-en.pdf} & 英文用户手册 \\
+% \file{fduthesis-code.pdf} & 模板实现代码(本文档) \\
+% \else
+% \file{fduthesis.pdf} & 中文用户手册(本文档) \\
+% \file{fduthesis-en.pdf} & 英文用户手册 \\
+% \file{fduthesis-code.pdf} & 模板实现代码 \\
+% \fi
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%^^A! \begin{table}[ht]
+%^^A! \caption{The main components of \cls{fduthesis}}
+%^^A! \label{tab:fduthesis-components}
+%^^A! \centering
+%^^A! \begin{tabular}{lp{24em}}
+%^^A! \toprule
+%^^A! \textbf{Files} & \textbf{Descriptions} \\
+%^^A! \midrule
+%^^A! \file{fduthesis.cls} & Document class for Chinese thesis. \\
+%^^A! \file{fduthesis-en.cls} & Document class for English thesis.\\
+%^^A! \file{fduthesis.def} & Configuration parameters file
+%^^A! for \cls{fduthesis}. Please do \emph{not} modify it. \\
+%^^A! \file{fdudoc.cls} & Document class for user guides. \\
+%^^A! \file{fdulogo.sty} & Fudan University's visual identity. \\
+%^^A! \file{fudan-emblem.pdf} & University emblem. \\
+%^^A! \file{fudan-emblem-new.pdf} & University emblem (revised version). \\
+%^^A! \file{fudan-name.pdf} & Figure of university name. \\
+%^^A! \file{README.md} & The brief introduction. \\
+%^^A! \file{fduthesis.pdf} & User's guide in Chinese. \\
+%^^A! \file{fduthesis-en.pdf} & User's guide in English (this
+%^^A! document). \\
+%^^A! \file{fduthesis-code.pdf} & Code implementation. \\
+%^^A! \bottomrule
+%^^A! \end{tabular}
+%^^A! \end{table}
+%^^A!
+%
+% \section{使用说明}
+%^^A! \section{User's guide}
+%^^A!
+%
+% \subsection{基本用法}
+%^^A! \subsection{Getting started}
+%^^A!
+%
+% 以下是一份简单的 \TeX{} 文档,它演示了 \cls{fduthesis} 的最基本用法:
+%^^A! Here is a minimal \TeX{} file for \cls{fduthesis}:
+%^^A+
+% \begin{latexexample}[deletetexcs={\documentclass},
+% moretexcs={\chapter},morekeywords={\documentclass},
+% emph={[2]document}]
+% % thesis.tex
+% \documentclass{fduthesis}
+% \begin{document}
+% \chapter{欢迎}
+% \section{Welcome to fduthesis!}
+% 你好,\LaTeX{}!
+% \end{document}
+% \end{latexexample}
+%^^A-
+%^^A!
+%
+% 按照 \ref{subsec:编译方式}~小节中的方式编译该文档,您应当得到
+% 一篇 5 页的文章。当然,这篇文章的绝大部分都是空白的。
+%^^A! Compile this file under the instructions in
+%^^A! subsection~\ref{subsec:compilation}, you will get a 5-page article.
+%^^A! Of course, most of it will be blank, as you may predicate.
+%^^A!
+%
+% 英文模板可以用类似的方式使用:
+%^^A! The English version can be used in the same way:
+%^^A+
+% \begin{latexexample}[deletetexcs={\documentclass},
+% moretexcs={\chapter},morekeywords={\documentclass},
+% emph={[2]document}]
+% % thesis-en.tex
+% \documentclass{fduthesis-en}
+% \begin{document}
+% \chapter{Welcome}
+% \section{Welcome to fduthesis!}
+% Hello, \LaTeX{}!
+% \end{document}
+% \end{latexexample}
+%^^A-
+% 英文模板只对正文部分进行了改动,封面、指导小组成员以及声明页仍将
+% 显示为中文。
+%^^A! The differences between English and Chinese version only
+%^^A! live in the main body. Thesis cover, instructors list and
+%^^A! declaration page are still printed in Chinese.
+%^^A!
+%
+% \subsection{编译方式} \label{subsec:编译方式}
+%^^A! \subsection{Compilation} \label{subsec:compilation}
+%^^A!
+%
+% 本模板不支持 \pdfTeX{} 引擎,请使用 \XeLaTeX{} 或 \LuaLaTeX{}
+% 编译。推荐使用 \XeLaTeX{}。为了生成正确的目录、脚注以及交叉引用,
+% 您至少需要连续编译两次。
+%^^A! \cls{fduthesis} does NOT support \pdfTeX{}. Please use
+%^^A! \XeLaTeX{} or \LuaLaTeX{} to compile, and \XeLaTeX{} is
+%^^A! recommended. To get the correct table of contents, footnotes
+%^^A! and cross-references, you need to compile the source file at
+%^^A! least twice.
+%^^A!
+%
+% 以下代码中,假设您的 \TeX{} 源文件名为 \file{thesis.tex}。
+% 使用 \XeLaTeX{} 编译论文,请在命令行中执行
+% \begin{shellexample}[morekeywords={xelatex}]
+% xelatex thesis
+% xelatex thesis
+% \end{shellexample}
+% 或使用 \pkg{latexmk}:
+% \begin{shellexample}[morekeywords={latexmk},emph={-xelatex}]
+% latexmk -xelatex thesis
+% \end{shellexample}
+%^^A! In the following example, suppose your \TeX{} source file is
+%^^A! \file{thesis.tex}. Please execute the following commands if
+%^^A! you want to use \XeLaTeX{}:
+%^^A! \begin{shellexample}[morekeywords={xelatex}]
+%^^A! xelatex thesis
+%^^A! xelatex thesis
+%^^A! \end{shellexample}
+%^^A! You can use \pkg{latexmk} as well:
+%^^A! \begin{shellexample}[morekeywords={latexmk},emph={-xelatex}]
+%^^A! latexmk -xelatex thesis
+%^^A! \end{shellexample}
+%^^A!
+%
+% 使用 \LuaLaTeX{} 编译论文,请在命令行中执行
+% \begin{shellexample}[morekeywords={lualatex}]
+% lualatex thesis
+% lualatex thesis
+% \end{shellexample}
+% 或者
+% \begin{shellexample}[morekeywords={latexmk},emph={-lualatex}]
+% latexmk -lualatex thesis
+% \end{shellexample}
+%^^A! \LuaLaTeX{} can be used in a similar way:
+%^^A! \begin{shellexample}[morekeywords={lualatex}]
+%^^A! lualatex thesis
+%^^A! lualatex thesis
+%^^A! \end{shellexample}
+%^^A! or
+%^^A! \begin{shellexample}[morekeywords={latexmk},emph={-lualatex}]
+%^^A! latexmk -lualatex thesis
+%^^A! \end{shellexample}
+%^^A!
+%
+% \subsection{模板选项}
+%^^A! \subsection{Options of the template}
+%^^A!
+%
+% 所谓“模板选项”,指需要在引入文档类的时候指定的选项:
+% \begin{latexexample}[deletetexcs={\documentclass},
+% morekeywords={\documentclass}]
+% \documentclass(*\oarg{模板选项}*){fduthesis}
+% \documentclass(*\oarg{模板选项}*){fduthesis-en}
+% \end{latexexample}
+%^^A! You can specify some \emph{template options} when loading
+%^^A! \cls{fduthesis}:
+%^^A! \begin{latexexample}[deletetexcs={\documentclass},
+%^^A! morekeywords={\documentclass}]
+%^^A! \documentclass(*\oarg{options}*){fduthesis}
+%^^A! \documentclass(*\oarg{options}*){fduthesis-en}
+%^^A! \end{latexexample}
+%^^A!
+%
+% 有些模板选项为布尔型,它们只能在 \opt{true} 和 \opt{false}
+% 中取值。对于这些选项,\kvopt{\meta{选项}}{true} 中的“|= true|”
+% 可以省略。
+%^^A! Some options are \emph{boolean} --- they only take the value
+%^^A! \opt{true} or \opt{false}. For these options, you can
+%^^A! abbreviate ``\kvopt{\meta{option}}{true}'' simply to
+%^^A! ``\opt{\meta{option}}''.
+%^^A!
+%
+%^^A+
+% \begin{function}[added=2018-02-01]{type}
+% \begin{fdusyntax}[emph={[1]type}]
+% type = (*<doctor|master|(bachelor)>*)
+% \end{fdusyntax}
+%^^A-
+% 选择论文类型。三种选项分别代表博士学位论文、硕士学位论文和本科
+% 毕业论文。
+% \end{function}
+%^^A! Choose the type of your thesis. The three options represent
+%^^A! doctoral dissertation, master degree thesis and undergraduate
+%^^A! thesis, respectively.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{oneside,twoside}
+% 指明论文的单双面模式,默认为 \opt{twoside}。该选项会影响每章
+% 的开始位置,还会影响页眉样式。
+% \end{function}
+%^^A! \begin{function}{oneside,twoside}
+%^^A! Specify whether single or double sided output should be
+%^^A! generated. \opt{twoside} will be chosen by default. These
+%^^A! option will determine where the new chapters begin and how
+%^^A! the headers display. The option \opt{twoside} does
+%^^A! \emph{not} tell the printer to actually make a two-sided
+%^^A! printout.
+%^^A! \end{function}
+%^^A!
+%
+% 在双面模式(\opt{twoside})下,按照通常的排版惯例,每章应只从
+% 奇数页(在右)开始;而在单页模式(\opt{oneside})下,则可以从
+% 任意页面开始。本模板中,目录、摘要、符号表等均视作章,也按相同
+% 方式排版。
+%^^A! If choosing \opt{twoside}, chapters will begin at the odd pages
+%^^A! (right hand). However, they will begin at arbitrary pages
+%^^A! available when choosing \opt{oneside}. Table of contents,
+%^^A! abstract and the list of symbols are considered as chapters and
+%^^A! processed in the same way.
+%^^A!
+%
+% 双面模式下,正文部分偶数页(在左)的左页眉显示章标题,奇数页
+% (在右)的右页眉显示节标题;前置部分的页眉按同样格式显示,但文字
+% 均为对应标题(如“目录”、“摘要”等)。
+% 而在单面模式下,正文部分则页面不分奇偶,均同时显示左、右页眉,
+% 文字分别为章标题和节标题;前置部分只有中间页眉,显示对应标题。
+%^^A! At two-sided mode, left headers on the even pages (left hand)
+%^^A! in \emph{main body} will show the title of chapters, while the
+%^^A! right headers on the odd pages (right hand) will show the
+%^^A! title of sections. Headers in \emph{front matter} have the
+%^^A! same style, but they will only show the title as ``Contents'',
+%^^A! ``Abstract'', etc.
+%^^A!
+%^^A! At one-sided mode, both left and right headers on \emph{all}
+%^^A! pages in main body will be shown. The text is the title of
+%^^A! chapters and sections, respectively. In front matter, there
+%^^A! are only middle headers, which show the corresponding titles.
+%^^A!
+%
+% \begin{function}{draft}
+% \begin{fdusyntax}[emph={[1]draft}]
+% draft = (*<\TFF>*)
+% \end{fdusyntax}
+% 选择是否开启草稿模式,默认关闭。
+% \end{function}
+%^^A! \begin{function}{draft}
+%^^A! \begin{fdusyntax}[emph={[1]draft}]
+%^^A! draft = (*<\TFF>*)
+%^^A! \end{fdusyntax}
+%^^A! Enable draft mode. Default off.
+%^^A! \end{function}
+%^^A!
+%
+% 草稿模式为全局选项,会影响到很多宏包的工作方式。
+% 开启之后,主要的变化有:
+% \begin{itemize}
+% \item 把行溢出的盒子显示为黑色方块;
+% \item 不实际插入图片,只输出一个占位方框;
+% \item 关闭超链接渲染,也不再生成 PDF 书签;
+% \item 显示页面边框。
+% \end{itemize}
+%^^A! \opt{draft} is a global option and will affect many packages.
+%^^A! You may notice the following changes when using \opt{draft}:
+%^^A! \begin{itemize}
+%^^A! \item Lines with overfull \tn{hbox}'s will be marked with
+%^^A! a thick black square on the right margin.
+%^^A! \item Will not include graphics files actually, but instead
+%^^A! print a box of the size the graphic would take up, as well
+%^^A! as the file name.
+%^^A! \item Will not make hyperlinks and PDF bookmarks.
+%^^A! \item Show the page frames.
+%^^A! \end{itemize}
+%^^A!
+%
+% \begin{function}[added=2018-01-31]{config}
+% \begin{fdusyntax}[emph={[1]config}]
+% config = (*\marg{文件}*)
+% \end{fdusyntax}
+% 用户配置文件的文件名。默认为空,即不载入用户配置文件。
+% \end{function}
+%^^A! \begin{function}[added=2018-01-31]{config}
+%^^A! \begin{fdusyntax}[emph={[1]config}]
+%^^A! config = (*\marg{file}*)
+%^^A! \end{fdusyntax}
+%^^A! File name of user profile. Default value is empty, so no
+%^^A! profile is loaded automatically.
+%^^A! \end{function}
+%^^A!
+%
+% \subsection{参数设置}
+%^^A! \subsection{More options}
+%^^A!
+%
+% \begin{function}{\fdusetup}
+% \begin{fdusyntax}[morekeywords={\fdusetup}]
+% \fdusetup(*\marg{键值列表}*)
+% \end{fdusyntax}
+% 本模板提供了一系列选项,可由您自行配置。载入文档类之后,以下
+% 所有选项均可通过统一的命令 \cs{fdusetup} 来设置。
+% \end{function}
+%^^A! \begin{function}{\fdusetup}
+%^^A! \begin{fdusyntax}[morekeywords={\fdusetup}]
+%^^A! \fdusetup(*\marg{key-value list}*)
+%^^A! \end{fdusyntax}
+%^^A! \cls{fduthesis} has provided a number of options, which
+%^^A! can be given via the general command \cs{fdusetup}.
+%^^A! \end{function}
+%^^A!
+%
+% \cs{fdusetup} 的参数是一组由(英文)逗号隔开的选项列表,列表中的
+% 选项通常是 \kvopt{\meta{key}}{\meta{value}} 的形式。部分选项的
+% \meta{value} 可以省略。对于同一项,后面的设置将会覆盖前面的设置。
+% 在下文的说明中,将用\textbf{粗体}表示默认值。
+%^^A! The argument of \cs{fdusetup} is a set of comma-separated option list.
+%^^A! The options usually have the form of \kvopt{\meta{key}}{\meta{value}}
+%^^A! and in some cases \meta{value} can be omitted.
+%^^A! For the same option, the values given later will override the
+%^^A! the previous ones. Default values are indicated in
+%^^A! \textbf{boldface} in the following descriptions.
+%^^A!
+%
+% \cs{fdusetup} 采用 \LaTeX3 风格的键值设置,支持不同类型以及多种
+% 层次的选项设定。键值列表中,“|=|”左右的空格不影响设置;但需注意,
+% 参数列表中不可以出现空行。
+%^^A! \cs{fdusetup} follows \LaTeX3 key-value style, and different
+%^^A! types as well as various levels options are supported. In the
+%^^A! key-value list, spaces around ``|=|'' will be trimmed; however,
+%^^A! blank lines should never appear in the argument.
+%^^A!
+%
+% 与模板选项相同,布尔型的参数可以省略 \kvopt{\meta{选项}}{true}
+% 中的“\kvopt{}{true}”。
+%^^A! Similar with template options, ``\kvopt{\meta{option}}{true}''
+%^^A! can be abbreviated to \opt{\meta{option}} for boolean type.
+%^^A!
+%
+% 另有一些选项包含子选项,如 \opt{style} 和 \opt{info} 等。它们可以
+% 按如下两种等价方式来设定:
+%^^A! Some options, such as \opt{style} and \opt{info}, may have
+%^^A! sub-options. They can be set by the following two equivalent
+%^^A! methods:
+%^^A+
+% \begin{latexexample}[morekeywords={\fdusetup},
+% emph={[1]style,cjk-font,font-size,info,title,title*,author,author*,department}]
+% \fdusetup{
+% style = {cjk-font = adobe, font-size = -4},
+% info = {
+% title = {论动体的电动力学},
+% title* = {On the Electrodynamics of Moving Bodies},
+% author = {阿尔伯特·爱因斯坦},
+% author* = {Albert Einstein},
+% department = {物理学系}
+% }
+% }
+% \end{latexexample}
+%^^A-
+% 或者
+%^^A! or
+%^^A+
+% \begin{latexexample}[morekeywords={\fdusetup},
+% emph={[1]style,cjk-font,font-size,info,title,title*,author,author*,department}]
+% \fdusetup{
+% style/cjk-font = adobe,
+% style/font-size = -4,
+% info/title = {论动体的电动力学},
+% info/title* = {On the Electrodynamics of Moving Bodies},
+% info/author = {阿尔伯特·爱因斯坦},
+% info/author* = {Albert Einstein},
+% info/department = {物理学系}
+% }
+% \end{latexexample}
+%^^A-
+%^^A!
+%
+% 注意 “|/|” 的前后均不可以出现空白字符。
+%^^A! Note that you may \emph{not} put spaces around ``|/|''.
+%^^A!
+%
+% \subsubsection{论文格式} \label{subsubsec:论文格式}
+%^^A! \subsubsection{Style and format} \label{subsubsec:style-and-format}
+%^^A!
+%
+% \begin{function}{style}
+% \begin{fdusyntax}[emph={[1]style}]
+% style = (*\marg{键值列表}*)
+% style/(*\meta{key}*) = (*\meta{value}*)
+% \end{fdusyntax}
+% 该选项包含许多子项目,用于设置论文格式。具体内容见下。
+% \end{function}
+%^^A! \begin{function}{style}
+%^^A! \begin{fdusyntax}[emph={[1]style}]
+%^^A! style = (*\marg{key-value list}*)
+%^^A! style/(*\meta{key}*) = (*\meta{value}*)
+%^^A! \end{fdusyntax}
+%^^A! This general option is for setting the thesis style and format.
+%^^A! See the following details.
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \begin{function}[updated=2019-03-05]{style/font}
+% \begin{fdusyntax}[emph={[1]font}]
+% font = (*<garamond|libertinus|lm|palatino|(times)|times*|none>*)
+% \end{fdusyntax}
+%^^A-
+% 设置西文字体(包括数学字体)。具体配置见表~\ref{tab:font}。
+% \end{function}
+%^^A! Set fonts (including math fonts). The details can be found in table~\ref{tab:font}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{table}[ht]
+% \centering
+% \begin{threeparttable}
+% \caption{西文字体配置}
+% \label{tab:font}
+% \small
+% \begin{tabular}{ccccc}
+% \toprule
+% & \textbf{正文字体} & \textbf{无衬线字体} & \textbf{等宽字体} & \textbf{数学字体} \\
+% \midrule
+% |garamond| & EB Garamond & Libertinus Sans & LM Mono\tnote{a} & Garamond Math \\
+% |libertinus| & Libertinus Serif & Libertinus Sans & LM Mono & Libertinus Math \\
+% |lm| & LM Roman & LM Sans & LM Mono & LM Math \\
+% |palatino| & TG Pagella\tnote{b} & Libertinus Sans & LM Mono & TG Pagella Math \\
+% |times| & XITS & TG Heros & TG Cursor & XITS Math \\
+% |times*|\tnote{c} & Times New Roman & Arial & Courier New & XITS Math \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+% \item[a] “LM”是 Latin Modern 的缩写。
+% \item[b] “TG”是 TeX Gyre 的缩写。
+% \item[c] 本行中,Times New Roman、Arial 和 Courier New 是商业字体,
+% 不包含在 \TeXLive{} 发行版中,但在 Windows 和 macOS 系统上均默认安装。
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+%^^A! \begin{table}[ht]
+%^^A! \begin{threeparttable}
+%^^A! \caption{Font configuration}
+%^^A! \label{tab:font}
+%^^A! \centering
+%^^A! \begin{tabular}{ccccc}
+%^^A! \toprule
+%^^A! & \textbf{Roman} & \textbf{Sans-serif} & \textbf{Monospaced} & \textbf{Math} \\
+%^^A! \midrule
+%^^A! |garamond| & EB Garamond & Libertinus Sans & LM Mono\tnote{a} & Garamond Math \\
+%^^A! |libertinus| & Libertinus Serif & Libertinus Sans & LM Mono & Libertinus Math \\
+%^^A! |lm| & LM Roman & LM Sans & LM Mono & LM Math \\
+%^^A! |palatino| & TG Pagella\tnote{b} & Libertinus Sans & LM Mono & TG Pagella Math \\
+%^^A! |times| & XITS & TG Heros & TG Cursor & XITS Math \\
+%^^A! |times*|\tnote{c} & Times New Roman & Arial & Courier New & XITS Math \\
+%^^A! \bottomrule
+%^^A! \end{tabular}
+%^^A! \begin{tablenotes}
+%^^A! \item[a] ``LM'' is the abbreviation of Latin Modern.
+%^^A! \item[b] ``TG'' is the abbreviation of TeX Gyre.
+%^^A! \item[c] Here, Times New Roman, Arial and Courier New are commercial fonts. They are
+%^^A! installed on Windows and macOS by default.
+%^^A! \end{tablenotes}
+%^^A! \end{threeparttable}
+%^^A! \end{table}
+%
+%^^A+
+% \begin{function}[rEXP,updated=2019-03-05]{style/cjk-font}
+% \begin{fdusyntax}[emph={[1]cjk-font}]
+% cjk-font = (*<adobe|(fandol)|founder|mac|sinotype|sourcehan|windows|none>*)
+% \end{fdusyntax}
+%^^A-
+% 设置中文字体。具体配置见表~\ref{tab:cjk-font}。
+% \end{function}
+%^^A! Set CJK (Chinese, Japanese and Korean) fonts. The details can be found in
+%^^A! table~\ref{tab:cjk-font}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{table}[ht]
+% \caption{中文字体配置}
+% \label{tab:cjk-font}
+% \centering
+% \small
+% \begin{tabular}{ccccc}
+% \toprule
+% & \textbf{正文字体(宋体)} & \textbf{无衬线字体(黑体)} & \textbf{等宽字体(仿宋)} & \textbf{楷体} \\
+% \midrule
+% |adobe| & Adobe 宋体 & Adobe 黑体 & Adobe 仿宋 & Adobe 楷体 \\
+% |fandol| & Fandol 宋体 & Fandol 黑体 & Fandol 仿宋 & Fandol 楷体 \\
+% |founder| & 方正书宋 & 方正黑体 & 方正仿宋 & 方正楷体 \\
+% |mac| & (华文)宋体-简 & (华文)黑体-简 & 华文仿宋 & (华文)楷体-简 \\
+% |sinotype| & 华文宋体 & 华文黑体 & 华文仿宋 & 华文楷体 \\
+% |sourcehan| & 思源宋体 & 思源黑体 & --- & --- \\
+% |windows| & (中易)宋体 & (中易)黑体 & (中易)仿宋 & (中易)楷体 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%^^A! \begin{table}[ht]
+%^^A! \caption{CJK font configuration}
+%^^A! \label{tab:cjk-font}
+%^^A! \centering
+%^^A! \begin{tabular}{cccc}
+%^^A! \toprule
+%^^A! & \textbf{Roman (song)} & \textbf{Sans-serif (hei)} & \textbf{Monospaced (fang)} \\
+%^^A! \midrule
+%^^A! |adobe| & Adobe Song Std & Adobe Heiti Std & Adobe Fangsong Std \\
+%^^A! |fandol| & FandolSong & FandolHei & FandolFang \\
+%^^A! |founder| & FZShuSong-Z01 & FZHei-B01 & FZFangSong-Z02 \\
+%^^A! |mac| & Songti SC & Heiti SC & STFangsong \\
+%^^A! |sinotype| & STSong & STHeiti & STFangsong \\
+%^^A! |sourcehan| & Source Han Serif SC & Source Han Sans SC & --- \\
+%^^A! |windows| & SimSun & SimHei & FangSong \\
+%^^A! \bottomrule
+%^^A! \end{tabular}
+%^^A! \end{table}
+%^^A!
+%
+% 启用 \kvopt{font}{none} 或 \kvopt{cjk-font}{none} 之后,模板将关闭
+% 默认西文 / 中文字体设置。此时,您需要自行使用 \cs{setmainfont}、
+% \cs{setCJKmainfont}、\cs{setmathfont} 等命令来配置字体。
+%^^A! When you choose \kvopt{font}{none} or \kvopt{cjk-font}{none},
+%^^A! \cls{fduthesis} will disable the default western/CJK font
+%^^A! settings. You may use \cs{setmainfont}, \cs{setCJKmainfont}
+%^^A! and \cs{set\-math\-font}, etc.\ to configure the fonts manually.
+%^^A!
+%
+%^^A+
+% \begin{function}{style/font-size}
+% \begin{fdusyntax}[emph={[1]font-size}]
+% font-size = (*<(-4)|5>*)
+% \end{fdusyntax}
+%^^A-
+% 设置论文的基础字号。
+% \end{function}
+%^^A! Specify the basic font size in your thesis.
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \begin{function}[rEXP,updated=2017-10-14]{style/fullwidth-stop}
+% \begin{fdusyntax}[emph={[1]fullwidth-stop}]
+% fullwidth-stop = (*<catcode|mapping|(false)>*)
+% \end{fdusyntax}
+%^^A-
+% 选择是否把全角实心句点\FSFW 作为默认的句号形状。
+% 这种句号一般用于科技类文章,以避免与下标“$_o$”或“$_0$”混淆。
+% \end{function}
+%^^A! Let full-width full stop ``\FSFW'' as the default full stop.
+%^^A! Generally, this punctuation is used for scientific articles,
+%^^A! where ``\FSID'' is easily to be confused with subscript
+%^^A! ``$_o$'' or ``$_0$''.
+%^^A! \end{function}
+%^^A!
+%
+% 选择 \kvopt{fullwidth-stop}{catcode} 或 \opt{mapping} 后,都会实现上述效果。
+% 有所不同的是,在选择 \opt{catcode} 后,只有\emph{显式的}\FSID 会被替换
+% 为\FSFW;但在选择 \opt{mapping} 后,\emph{所有的}\FSID 都会被替换。例如,
+% 如果您用宏保存了一些含有\FSID 的文字,那么在选择 \opt{catcode} 时,其中
+% 的\FSID 不会将被替换为\FSFW。
+%^^A! If you choose \kvopt{fullwidth-stop}{catcode}, only
+%^^A! \emph{explicit} ``\FSID'' will be replaced by ``\FSFW''; when
+%^^A! choosing \kvopt{fullwidth-stop}{mapping}, however, \emph{all}
+%^^A! the ``\FSID'' will be replaced.
+%^^A!
+%
+% 选项 \kvopt{fullwidth-stop}{mapping} 只在 \XeTeX{} 下有效。使用
+% \LuaTeX{} 编译时,该选项相当于 \kvopt{fullwidth-stop}{catcode}。
+%^^A! \opt{mapping} is valid only under \XeTeX{}. When compiling
+%^^A! with \LuaTeX{}, it is equivalent to \opt{catcode}.
+%^^A!
+%
+% 如果您在选择 \kvopt{fullwidth-stop}{mapping} 后仍需要临时显示\FSID,
+% 可以按如下方法操作:
+% \begin{latexexample}[moretexcs={\CJKfontspec},emph={[1]Mapping}]
+% % 请使用 XeTeX 编译
+% % 外侧的花括号表示分组
+% 这是一个句号{\CJKfontspec{(*\meta{字体名}*)}[Mapping=full-stop]。}
+% \end{latexexample}
+%^^A! If you want to display ``\FSID'' temporarily after setting
+%^^A! \kvopt{fullwidth-stop}{mapping}, the following code snippet
+%^^A! will be helpful:
+%^^A! \begin{latexexample}[moretexcs={\CJKfontspec},emph={[1]Mapping}]
+%^^A! % Compiled with XeTeX
+%^^A! % The outside braces is used for group
+%^^A! 这是一个句号{\CJKfontspec{(*\meta{font name}*)}[Mapping=full-stop]。}
+%^^A! \end{latexexample}
+%^^A!
+%
+% \begin{function}{style/footnote-style}
+%^^A 这里奇怪的东西是用来控制对齐的。fdusyntax 会吃掉开头的几个
+%^^A 空格,因此这里用 . 来占位。
+% \begin{fdusyntax}[emph={[1]footnote-style}]
+% footnote-style = (*<plain|\\
+% ......\mbox{}~~~~~~~~~~~~~~~~~libertinus|libertinus*|libertinus-sans|\\
+% ......\mbox{}~~~~~~~~~~~~~~~~~pifont|pifont*|pifont-sans|pifont-sans*|\\
+% ......\mbox{}~~~~~~~~~~~~~~~~~xits|xits-sans|xits-sans*>*)
+% \end{fdusyntax}
+% 设置脚注编号样式。西文字体设置会影响其默认取值(见
+% 表~\ref{tab:footnote-font})。因此,要使得该选项生效,需将其
+% 放置在 \opt{font} 选项之后。带有 |sans| 的为相应的无衬线字体
+% 版本;带有 |*| 的为阴文样式(即黑底白字)。
+% \end{function}
+%^^A! \begin{function}{style/footnote-style}
+%^^A! \begin{fdusyntax}[emph={[1]footnote-style}]
+%^^A! footnote-style = (*<plain|\\
+%^^A! ....\mbox{}~~~~~~~~~~~~~~~~~libertinus|libertinus*|libertinus-sans|\\
+%^^A! ....\mbox{}~~~~~~~~~~~~~~~~~pifont|pifont*|pifont-sans|pifont-sans*|\\
+%^^A! ....\mbox{}~~~~~~~~~~~~~~~~~xits|xits-sans|xits-sans*>*)
+%^^A! \end{fdusyntax}
+%^^A! Set the style of footnote numbers. Note that western fonts
+%^^A! will affect its default value (see table~\ref{tab:footnote-font}),
+%^^A! so you may put it after |font| option. The one with |sans|
+%^^A! is for the corresponding sans-serif version, while |*|
+%^^A! for white on black version.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{table}[ht]
+% \caption{西文字体与脚注编号样式默认值的对应关系}
+% \label{tab:footnote-font}
+% \centering
+% \small
+% \begin{tabular}{ccccc}
+% \toprule
+% \textbf{西文字体设置} &
+% |libertinus| & |lm| & |palatino| & |times| \\
+% \midrule
+% \textbf{脚注编号样式默认值} &
+% |libertinus| & |pifont| & |pifont| & |xits| \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%^^A! \begin{table}[ht]
+%^^A! \caption{Relationship between option \opt{font} and the
+%^^A! default value of \opt{footnote-style}}
+%^^A! \label{tab:footnote-font}
+%^^A! \centering
+%^^A! \begin{tabular}{ccccc}
+%^^A! \toprule
+%^^A! \textbf{Western fonts settings} &
+%^^A! |libertinus| & |lm| & |palatino| & |times| \\
+%^^A! \midrule
+%^^A! \textbf{Default value of footnote number style} &
+%^^A! |libertinus| & |pifont| & |pifont| & |xits| \\
+%^^A! \bottomrule
+%^^A! \end{tabular}
+%^^A! \end{table}
+%^^A!
+%
+%^^A+
+% \begin{function}[added=2017-08-13]{style/hyperlink}
+% \begin{fdusyntax}[emph={[1]hyperlink}]
+% hyperlink = (*<border|(color)|none>*)
+% \end{fdusyntax}
+%^^A-
+% 设置超链接样式。\opt{border} 表示在超链接四周绘制方框;
+% \opt{color} 表示用彩色显示超链接;\opt{none} 表示没有特殊装饰,
+% 可用于生成最终的打印版文稿。
+% \end{function}
+%^^A! Set the style of hyperlinks. \opt{border} draws borders around
+%^^A! hyperlinks; \opt{color} displays hyperlinks in colorful text;
+%^^A! \opt{none} leads to plain text, which is useful when printing
+%^^A! the final document.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2017-08-13,updated=2021-12-27]{style/hyperlink-color}
+% \begin{fdusyntax}[emph={[1]hyperlink-color}]
+% hyperlink-color = (*<(default)|classic|material|graylevel|prl>*)
+% \end{fdusyntax}
+% 设置超链接颜色。该选项在 \kvopt{hyperlink}{none} 时无效。
+% 各选项所代表的颜色见表~\ref{tab:hyperlink-color}。
+% \end{function}
+%^^A! \begin{function}[added=2017-08-13,updated=2021-12-27]{style/hyperlink-color}
+%^^A! \begin{fdusyntax}[emph={[1]hyperlink-color}]
+%^^A! hyperlink-color = (*<(default)|classic|material|graylevel|prl>*)
+%^^A! \end{fdusyntax}
+%^^A! Set the color of hyperlinks. It is invalid if
+%^^A! \kvopt{hyperlink}{none}. The related colors can be found
+%^^A! in table~\ref{tab:hyperlink-color}.
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \begin{table}[ht]
+% \centering
+% \small
+%^^A-
+% \newcommand\linkcolorexam[3]{^^A
+% {\small 图~\textcolor[HTML]{#1}{1-2},
+% (\textcolor[HTML]{#1}{3.4})~式} &
+% {\small \textcolor[HTML]{#2}{\texttt{https://g.cn}}} &
+% {\small 文献~[\textcolor[HTML]{#3}{1}],
+% (\textcolor[HTML]{#3}{Knuth~1986})}}
+%^^A! \newcommand\linkcolorexam[3]{%
+%^^A! {\small Fig.~\textcolor[HTML]{#1}{1-2},
+%^^A! Eq.~(\textcolor[HTML]{#1}{3.4})} &
+%^^A! {\small \textcolor[HTML]{#2}{\texttt{http://g.cn}}} &
+%^^A! {\small Ref.~[\textcolor[HTML]{#3}{1}],
+%^^A! (\textcolor[HTML]{#3}{Knuth~1986})}}
+% \begin{threeparttable}
+% \caption{预定义的超链接颜色方案}
+% \label{tab:hyperlink-color}
+%^^A! \begin{threeparttable}
+%^^A! \caption{Pre-defined hyperlink color schemes}
+%^^A! \label{tab:hyperlink-color}
+% \begin{tabular}{c*{3}{>{\hspace{0.2cm}}c<{\hspace{0.2cm}}}}
+% \toprule
+% \textbf{选项} & \textbf{链接} & \textbf{URL} & \textbf{引用} \\
+%^^A! \begin{tabular}{c*{3}{>{\hspace{0.2cm}}c<{\hspace{0.2cm}}}}
+%^^A! \toprule
+%^^A! \textbf{Options} & \textbf{Cross references} & \textbf{URL} & \textbf{Citation} \\
+%^^A+
+% \midrule
+% \opt{default} & \linkcolorexam{990000}{0000B2}{007F00} \\
+% \opt{classic} & \linkcolorexam{FF0000}{0000FF}{00FF00} \\
+% \opt{material}\tnote{a} & \linkcolorexam{E91E63}{009688}{4CAF50} \\
+% \opt{graylevel}\tnote{a} & \linkcolorexam{616161}{616161}{616161} \\
+% \opt{prl}\tnote{b} & \linkcolorexam{2D3092}{2D3092}{2D3092} \\
+% \bottomrule
+% \end{tabular}
+% \begin{tablenotes}
+%^^A-
+% \item[a] 取自 Material 色彩方案
+% (见 \url{https://material.io/guidelines/style/color.html})。
+% \item[b] \textit{Physical Review Letter} 杂志配色。
+%^^A! \item[a] Material Design color palette
+%^^A! (See \url{https://material.io/guidelines/style/color.html}).
+%^^A! \item[b] \textit{Physical Review Letter} magazine.
+%^^A+
+% \end{tablenotes}
+% \end{threeparttable}
+% \end{table}
+%^^A-
+%^^A!
+%
+%^^A+
+% \begin{function}[added=2018-01-25]{style/bib-backend}
+% \begin{fdusyntax}[emph={[1]bib-backend}]
+% bib-backend = (*<bibtex|biblatex>*)
+% \end{fdusyntax}
+%^^A-
+% 选择参考文献的支持方式。选择 \opt{bibtex} 后,将使用 \BibTeX{}
+% 处理文献,样式由 \pkg{natbib} 宏包负责;选择 \opt{biblatex} 后,
+% 将使用 \biber{} 处理文献,样式则由 \pkg{biblatex} 宏包负责。
+% \end{function}
+%^^A! Specify the backend or driver of bibliography processing.
+%^^A! \BibTeX{} and \pkg{natbib} package will be used if you choose
+%^^A! \opt{bibtex}, while \biber{} and \pkg{biblatex} will be used
+%^^A! if you choose \opt{biblatex}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2017-10-28,updated=2018-01-25]{style/bib-style}
+% \begin{fdusyntax}[emph={[1]bib-style}]
+% bib-style = (*<author-year|(numerical)|\meta{其他样式}>*)
+% \end{fdusyntax}
+% 设置参考文献样式。\opt{author-year} 和 \opt{numerical} 分别对应
+% 国家标准 GB/T 7714--2015 \cite{gb-t-7714-2015} 中的著者—出版年制和
+% 顺序编码制。选择 \meta{其他样式} 时,如果 \kvopt{bib-backend}{bibtex},
+% 需保证相应的 \file{.bst} 格式文件能被调用;而如果
+% \kvopt{bib-backend}{biblatex},则需保证相应的 \file{.bbx} 格式文件
+% 能被调用。
+% \end{function}
+%^^A! \begin{function}[added=2017-10-28,updated=2018-01-25]{style/bib-style}
+%^^A! \begin{fdusyntax}[emph={[1]bib-style}]
+%^^A! bib-style = (*<author-year|(numerical)|\meta{other style}>*)
+%^^A! \end{fdusyntax}
+%^^A! Set the style of bibliography. \opt{author-year} and
+%^^A! \opt{numerical} will follow the standard GB/T 7714--2015.
+%^^A! By setting \kvopt{bib-style}{\meta{other style}}, you can use
+%^^A! other bibliography style (\file{.bst} file for
+%^^A! \kvopt{bib-backend}{bibtex} and \file{.bbx} file for
+%^^A! \kvopt{bib-backend}{biblatex}). Suffix is not needed.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2018-01-25]{style/cite-style}
+% \begin{fdusyntax}[emph={[1]cite-style}]
+% cite-style = (*\marg{引用样式}*)
+% \end{fdusyntax}
+% 选择引用格式。默认为空,即与参考文献样式(著者—出版年制或顺序
+% 编码制)保持一致。如果手动填写,需保证相应的 \file{.cbx} 格式文件
+% 能被调用。该选项在 \kvopt{bib-backend}{bibtex} 时无效。
+% \end{function}
+%^^A! \begin{function}[added=2018-01-25]{style/cite-style}
+%^^A! \begin{fdusyntax}[emph={[1]cite-style}]
+%^^A! cite-style = (*\marg{style}*)
+%^^A! \end{fdusyntax}
+%^^A! Select citation style. Default value is empty, which means
+%^^A! the citation style will follow your bibliography style
+%^^A! (author-year or numeric). If you want change the citation
+%^^A! style, the corresponding \file{.cbx} file must be available.
+%^^A! This option is invalid when \kvopt{bib-backend}{bibtex}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2018-01-25]{style/bib-resource}
+% \begin{fdusyntax}[emph={[1]bib-resource}]
+% bib-resource = (*\marg{文件}*)
+% \end{fdusyntax}
+% 参考文献数据源。可以是单个文件,也可以是用英文逗号隔开的一组文件。
+% 如果 \kvopt{bib-backend}{biblatex},则必须明确给出 \file{.bib}
+% 后缀名。
+% \end{function}
+%^^A! \begin{function}[added=2018-01-25]{style/bib-resource}
+%^^A! \begin{fdusyntax}[emph={[1]bib-resource}]
+%^^A! bib-resource = (*\marg{bib file\symbol{"28}s\symbol{"29}}*)
+%^^A! \end{fdusyntax}
+%^^A! Specify the bibliography database (usually in \file{.bib}
+%^^A! format). If using more than one files, the file names should
+%^^A! be separated with comma. When \kvopt{bib-backend}{biblatex},
+%^^A! you must type in the ``\file{.bib}'' suffix.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2017-08-10]{style/logo}
+% \begin{fdusyntax}[emph={[1]logo}]
+% logo = (*\marg{文件}*)
+% \end{fdusyntax}
+% 封面中校名图片的文件名。默认值为 \file{fudan-name.pdf}。
+% \end{function}
+%^^A! \begin{function}[added=2017-08-10]{style/logo}
+%^^A! \begin{fdusyntax}[emph={[1]logo}]
+%^^A! logo = (*\marg{file}*)
+%^^A! \end{fdusyntax}
+%^^A! File name of the logo in thesis cover. Default value is
+%^^A! \file{fudan-name.pdf}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2017-08-10]{style/logo-size}
+% \begin{fdusyntax}[emph={[1]logo-size}]
+% logo-size = (*\marg{宽度}*)
+% logo-size = {(*\meta{宽度}*), (*\meta{高度}*)}
+% \end{fdusyntax}
+% 校名图片的大小。默认仅指定了宽度,为 |0.5\textwidth|\/。
+% 如果仅需指定高度,可在 \meta{宽度} 处填入一个空的分组 |{}|。
+% \end{function}
+%^^A! \begin{function}[added=2017-08-10]{style/logo-size}
+%^^A! \begin{fdusyntax}[emph={[1]logo-size}]
+%^^A! logo-size = (*\marg{width}*)
+%^^A! logo-size = {(*\meta{width}*), (*\meta{height}*)}
+%^^A! \end{fdusyntax}
+%^^A! Size of the logo. By default, only width is set to
+%^^A! |0.5\textwidth|. To set height only, you can put an
+%^^A! empty group ``|{}|'' at \meta{width}.
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \begin{function}[added=2017-07-06]{style/auto-make-cover}
+% \begin{fdusyntax}[emph={[1]auto-make-cover}]
+% auto-make-cover = (*<\TTF>*)
+% \end{fdusyntax}
+%^^A-
+% 是否自动生成论文封面(封一)、指导小组成员名单(封二)和
+% 声明页(封三)。封面中的各项信息,可通过 \cs{fdusetup} 录入,
+% 具体请参阅 \ref{subsubsec:信息录入}~节。
+% \end{function}
+%^^A! Whether generate thesis cover, list of instructors (inside
+%^^A! front cover) and declaration page (inside back cover)
+%^^A! automatically. Entries in the cover can be specified also
+%^^A! via \cs{fdusetup}, and you can find more details in
+%^^A! subsubsection~\ref{subsubsec:information}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2021-09-21]{style/declaration-page}
+% \begin{fdusyntax}[emph={[1]declaration-page}]
+% declaration-page = (*\marg{文件}*)
+% \end{fdusyntax}
+% 插入扫描版的声明页 PDF 文档。如果为空(默认),则使用模板预定义的声明页。
+% \end{function}
+%^^A! \begin{function}[added=2021-09-21]{style/declaration-page}
+%^^A! \begin{fdusyntax}[emph={[1]declaration-page}]
+%^^A! declaration-page = (*\marg{file}*)
+%^^A! \end{fdusyntax}
+%^^A! Insert the scanned declaration page PDF file. If empty (default),
+%^^A! then the pre-defined declaration page will be inserted.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{\makecoveri,\makecoverii,\makecoveriii}
+% 用于手动生成论文封面、指导小组成员名单和声明页。这几个命令不能
+% 确保页码的正确编排,因此除非必要,您应当始终使用自动生成的封面。
+% \end{function}
+%^^A! \begin{function}{\makecoveri,\makecoverii,\makecoveriii}
+%^^A! For generating thesis cover, list of instructors and
+%^^A! declaration page manually. These commands cannot guarantee
+%^^A! the correct page numbers, hence you should always use the
+%^^A! auto-generated thesis cover unless necessary.
+%^^A! \end{function}
+%^^A!
+%
+% \subsubsection{信息录入} \label{subsubsec:信息录入}
+%^^A! \subsubsection{Personal information} \label{subsubsec:information}
+%^^A!
+%
+% \begin{function}{info}
+% \begin{fdusyntax}[emph={[1]info}]
+% info = (*\marg{键值列表}*)
+% info/(*\meta{key}*) = (*\meta{value}*)
+% \end{fdusyntax}
+% 该选项包含许多子项目,用于录入论文信息。具体内容见下。以下带“|*|”
+% 的项目表示对应的英文字段。
+% \end{function}
+%^^A! \begin{function}{info}
+%^^A! \begin{fdusyntax}[emph={[1]info}]
+%^^A! info = (*\marg{key-value list}*)
+%^^A! info/(*\meta{key}*) = (*\meta{value}*)
+%^^A! \end{fdusyntax}
+%^^A! This general option is for entering your personal information.
+%^^A! See the following details. Note that options with ``|*|'' are
+%^^A! the corresponding English items.
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \begin{function}[added=2018-02-01,updated=2019-03-12]{info/degree}
+% \begin{fdusyntax}[emph={[1]degree}]
+% degree = (*<(academic)|professional>*)
+% \end{fdusyntax}
+%^^A-
+% 学位类型,仅适用于博士和硕士学位论文。\opt{academic} 和 \opt{professional}
+% 分别表示学术学位和专业学位。
+% \end{function}
+%^^A! Degree type. This option can only be used in master degree
+%^^A! thesis.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/title,info/title*}
+% \begin{fdusyntax}[emph={[1]title,title*}]
+% title = (*\marg{中文标题}*)
+% title* = (*\marg{英文标题}*)
+% \end{fdusyntax}
+% 论文标题。默认会在约 20 个汉字字宽处强制断行,但为了语义的
+% 连贯以及排版的美观,如果您的标题长于一行,建议使用“|\\|”
+% 手动断行。
+% \end{function}
+%^^A! \begin{function}{info/title,info/title*}
+%^^A! \begin{fdusyntax}[emph={[1]title,title*}]
+%^^A! title = (*\marg{title in Chinese}*)
+%^^A! title* = (*\marg{title in English}*)
+%^^A! \end{fdusyntax}
+%^^A! Title of your thesis. The line width is about \qty{30}{em} by
+%^^A! default, but you may break it with |\\| manually.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/author,info/author*}
+% \begin{fdusyntax}[emph={[1]author,author*}]
+% author = (*\marg{姓名}*)
+% author* = (*\marg{英文姓名(或拼音)}*)
+% \end{fdusyntax}
+% 作者姓名。
+% \end{function}
+%^^A! \begin{function}{info/author,info/author*}
+%^^A! \begin{fdusyntax}[emph={[1]author,author*}]
+%^^A! author = (*\marg{name in Chinese}*)
+%^^A! author* = (*\marg{name in English \lparen or Pinyin\rparen}*)
+%^^A! \end{fdusyntax}
+%^^A! Author's name.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/supervisor}
+% \begin{fdusyntax}[emph={[1]supervisor}]
+% supervisor = (*\marg{姓名}*)
+% \end{fdusyntax}
+% 导师姓名。
+% \end{function}
+%^^A! \begin{function}{info/supervisor}
+%^^A! \begin{fdusyntax}[emph={[1]supervisor}]
+%^^A! supervisor = (*\marg{name}*)
+%^^A! \end{fdusyntax}
+%^^A! Supervisor's name.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/department}
+% \begin{fdusyntax}[emph={[1]department}]
+% department = (*\marg{名称}*)
+% \end{fdusyntax}
+% 院系名称。
+% \end{function}
+%^^A! \begin{function}{info/department}
+%^^A! \begin{fdusyntax}[emph={[1]department}]
+%^^A! department = (*\marg{name}*)
+%^^A! \end{fdusyntax}
+%^^A! Name of the department.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/major}
+% \begin{fdusyntax}[emph={[1]major}]
+% major = (*\marg{名称}*)
+% \end{fdusyntax}
+% 专业名称。
+% \end{function}
+%^^A! \begin{function}{info/major}
+%^^A! \begin{fdusyntax}[emph={[1]major}]
+%^^A! major = (*\marg{name}*)
+%^^A! \end{fdusyntax}
+%^^A! Name of the major.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/student-id}
+% \begin{fdusyntax}[emph={[1]student-id}]
+% student-id = (*\marg{数字}*)
+% \end{fdusyntax}
+% 作者学号。
+% \end{function}
+%^^A! \begin{function}{info/student-id}
+%^^A! \begin{fdusyntax}[emph={[1]student-id}]
+%^^A! student-id = (*\marg{number}*)
+%^^A! \end{fdusyntax}
+%^^A! Author's student ID.
+%^^A! \end{function}
+%^^A!
+%
+% 复旦大学学号共 11 位,前两位为入学年份,之后一位为学生类型
+% 代码(博士生为 1,硕士生为 2,本科生为 3),接下来的五位为
+% 专业代码,最后三位为顺序号。
+%^^A! In Fudan University, student ID has 11 digits. The first two
+%^^A! are the year of attendance; next one represents the student's
+%^^A! type (1 for doctor, 2 for master and 3 for bachelor); the
+%^^A! following five digits are major ID while the last three are
+%^^A! serial number.
+%^^A!
+%
+% \begin{function}{info/school-id}
+% \begin{fdusyntax}[emph={[1]school-id}]
+% school-id = (*\marg{数字}*)
+% \end{fdusyntax}
+% 学校代码。默认值为 10246(这是复旦大学的学校代码)。
+% \end{function}
+%^^A! \begin{function}{info/school-id}
+%^^A! \begin{fdusyntax}[emph={[1]school-id}]
+%^^A! school-id = (*\marg{number}*)
+%^^A! \end{fdusyntax}
+%^^A! School ID. Default value is 10246 (school ID of Fudan University).
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/date}
+% \begin{fdusyntax}[emph={[1]date}]
+% date = (*\marg{日期}*)
+% \end{fdusyntax}
+% 论文完成日期。默认值为文档编译日期(\tn{today})。
+% \end{function}
+%^^A! \begin{function}{info/date}
+%^^A! \begin{fdusyntax}[emph={[1]date}]
+%^^A! date = (*\marg{date}*)
+%^^A! \end{fdusyntax}
+%^^A! Finish date of your thesis. Default value is the compilation
+%^^A! date (\tn{today}).
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \begin{function}[added=2017-07-04]{info/secret-level}
+% \begin{fdusyntax}[emph={[1]secret-level}]
+% secret-level = (*<(none)|i|ii|iii>*)
+% \end{fdusyntax}
+%^^A-
+% 密级。\opt{i}、\opt{ii}、\opt{iii} 分别表示秘密、机密、绝密;
+% \opt{none} 表示论文不涉密,即不显示密级与保密年限。
+% \end{function}
+%^^A! Secret level. \opt{i}, \opt{ii} and \opt{iii} means
+%^^A! ``秘密'' (secret), ``机密'' (confidential) and ``绝密''
+%^^A! (top secret) respectively. \opt{none} means your thesis is
+%^^A! not secret-related and secret level and year will not be
+%^^A! shown.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2017-07-04]{info/secret-year}
+% \begin{fdusyntax}[emph={[1]secret-year}]
+% secret-year = (*\marg{年限}*)
+% \end{fdusyntax}
+% 保密年限。建议您使用中文,如“五年”。该选项在设置
+% \kvopt{secret-level}{none} 时无效。
+% \end{function}
+%^^A! \begin{function}[added=2017-07-04]{info/secret-year}
+%^^A! \begin{fdusyntax}[emph={[1]secret-year}]
+%^^A! secret-year = (*\marg{year}*)
+%^^A! \end{fdusyntax}
+%^^A! Secret year. It's recommended to use Chinese word as ``五年''
+%^^A! (5 years) here. This option is invalid if you have set
+%^^A! \kvopt{secret-level}{none}.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/instructors}
+% \begin{fdusyntax}[emph={[1]instructors}]
+% instructors = (*\marg{成员 1, 成员 2, ...}*)
+% \end{fdusyntax}
+% 指导小组成员。各成员之间需使用英文逗号隔开。为防止歧义,
+% 可以用分组括号“|{...}|”把各成员字段括起来。
+% \end{function}
+%^^A! \begin{function}{info/instructors}
+%^^A! \begin{fdusyntax}[emph={[1]instructors}]
+%^^A! instructors = (*\marg{member 1, member 2, ...}*)
+%^^A! \end{fdusyntax}
+%^^A! Instructors' name. Each name should be separated with
+%^^A! comma. To disambiguate, you may put text containing comma
+%^^A! into a group ``|{...}|''.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/keywords,info/keywords*}
+% \begin{fdusyntax}[emph={[1]keywords,keywords*}]
+% keywords = (*\marg{中文关键字}*)
+% keywords* = (*\marg{英文关键字}*)
+% \end{fdusyntax}
+% 关键字列表。各关键字之间需使用英文逗号隔开。为防止歧义,
+% 可以用分组括号“|{...}|”把各字段括起来。
+% \end{function}
+%^^A! \begin{function}{info/keywords,info/keywords*}
+%^^A! \begin{fdusyntax}[emph={[1]keywords,keywords*}]
+%^^A! keywords = (*\marg{keywords in Chinese}*)
+%^^A! keywords* = (*\marg{keywords in English}*)
+%^^A! \end{fdusyntax}
+%^^A! Keywords list. Each keyword should be separated with comma.
+%^^A! To disambiguate, you may put text containing comma into a
+%^^A! group ``|{...}|''.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{info/clc}
+% \begin{fdusyntax}[emph={[1]clc}]
+% clc = (*\marg{分类号}*)
+% \end{fdusyntax}
+% 中图分类号(CLC)。
+% \end{function}
+%^^A! \begin{function}{info/clc}
+%^^A! \begin{fdusyntax}[emph={[1]clc}]
+%^^A! clc = (*\marg{classification codes}*)
+%^^A! \end{fdusyntax}
+%^^A! Chinese Library Classification (CLC).
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2021-09-16]{info/jel}
+% \begin{fdusyntax}[emph={[1]jel}]
+% jel = (*\marg{分类号}*)
+% \end{fdusyntax}
+% JEL 分类号,仅适用于部分院系。当被指定时,英文摘要中将仅显示 JEL
+% 分类号,而不再显示中图分类号。
+% \end{function}
+%^^A! \begin{function}[added=2021-09-16]{info/jel}
+%^^A! \begin{fdusyntax}[emph={[1]jel}]
+%^^A! jel = (*\marg{classification codes}*)
+%^^A! \end{fdusyntax}
+%^^A! \textit{Journal of Economic Literature} (JEL) Classification
+%^^A! Code. It's only mandatory for some departments. When specified,
+%^^A! CLC code in the English abstract will be replaced by it.
+%^^A! \end{function}
+%^^A!
+%
+% \subsection{正文编写}
+%^^A! \subsection{Writing your thesis}
+%^^A!
+%
+% \begin{quotation}
+% 喬孟符(吉)博學多能,以樂府稱。嘗云:「作樂府亦有法,
+% 曰\CJKunderdot{鳳頭、豬肚、豹尾}六字是也。」大概起要美麗,中要浩蕩,
+% 結要響亮。尤貴在首尾貫穿,意思清新。苟能若是,斯可以言樂府矣。
+% \end{quotation}
+% \hfill ^^^^2e3a陶宗儀《南村輟耕錄·作今樂府法》 ^^A ^^^^2e3a = 破折号
+%
+% \subsubsection{凤头}
+%^^A! \subsubsection{Front matter}
+%^^A!
+%
+% \begin{function}{\frontmatter}
+% 声明前置部分开始。
+% \end{function}
+%^^A! \begin{function}{\frontmatter}
+%^^A! Declare the beginning of front matter.
+%^^A! \end{function}
+%^^A!
+%
+% 在本模板中,前置部分包含目录、中英文摘要以及符号表等。
+% 前置部分的页码采用小写罗马字母,并且与正文分开计数。
+%^^A! Front matter contains table of contents, abstracts and notation
+%^^A! list. The page numbers in front matter will be shown in
+%^^A! lowercase Roman numerals, and will be counted separately with
+%^^A! main matter.
+%^^A!
+%
+% \begin{function}{\tableofcontents,\listoffigures,\listoftables}
+% 生成目录。为了生成完整、正确的目录,您至少需要编译\emph{两次}。对于图表
+% 较多的论文,也可以使用 \cs{listoffigures} 和 \cs{listoftables} 生成单独的
+% 插图、表格目录。
+% \end{function}
+%^^A! \begin{function}{\tableofcontents}
+%^^A! Generate the table of contents (TOC). You need to compile
+%^^A! the source file at least \emph{twice} to get the correct TOC.
+%^^A! If your thesis contains many figures or tables, you may also
+%^^A! use \cs{listoffigures} or \cs{listoftables} to generate a list
+%^^A! of them.
+%^^A! \end{function}
+%^^A!
+%
+%^^A TODO: \DescribeEnv{abstract}
+%^^A TODO: \DescribeEnv{abstract*}
+% \begin{function}{abstract}
+% \begin{fdusyntax}[emph={[2]abstract}]
+% % 中文论文模板 (fduthesis) % 英文论文模板 (fduthesis-en)
+% \begin{abstract} \begin{abstract}
+% (*\meta{中文摘要} \hspace{3.52cm} \meta{英文摘要}*)
+% \end{abstract} \end{abstract}
+% \end{fdusyntax}
+% \end{function}
+% \begin{function}[rEXP]{abstract*}
+% \begin{fdusyntax}[emph={[2]abstract*}]
+% % 中文论文模板 (fduthesis)
+% \begin{abstract*}
+% (*\meta{英文摘要}*)
+% \end{abstract*}
+% \end{fdusyntax}
+% 摘要。中文模板中,不带星号和带星号的版本分别用来输入中文摘要
+% 和英文摘要;英文模板中没有带星号的版本,您只需输入英文摘要。
+% \end{function}
+%^^A! \begin{function}{abstract}
+%^^A! \begin{fdusyntax}[emph={[2]abstract}]
+%^^A! % fduthesis (Chinese thesis) % fduthesis-en (English thesis)
+%^^A! \begin{abstract} \begin{abstract}
+%^^A! (*\meta{Chinese abstract} \hspace{3cm} \meta{English abstract}*)
+%^^A! \end{abstract} \end{abstract}
+%^^A! \end{fdusyntax}
+%^^A! \end{function}
+%^^A! \begin{function}[rEXP]{abstract*}
+%^^A! \begin{fdusyntax}[emph={[2]abstract*}]
+%^^A! % Only for fduthesis
+%^^A! \begin{abstract*}
+%^^A! (*\meta{English abstract}*)
+%^^A! \end{abstract*}
+%^^A! \end{fdusyntax}
+%^^A! Abstract environment. In \cls{fduthesis}, \env{abstract} and
+%^^A! \env{abstract*} are used for Chinese and English abstract,
+%^^A! respectively; while in \cls{fduthesis-en}, there is no
+%^^A! \env{abstract*} environment and you need to write the English
+%^^A! abstract merely.
+%^^A! \end{function}
+%^^A!
+%
+% 摘要的最后,会显示关键字列表以及中图分类号(CLC)或 JEL 分类号。这两项
+% 可通过 \cs{fdusetup} 录入,具体请参阅 \ref{subsubsec:信息录入}~节。
+%^^A! At the end of abstract (both Chinese and English, if available),
+%^^A! keywords list and CLC or JEL code will be shown. They can be
+%^^A! specified via command \cs{fdusetup} and you may refer to
+%^^A! subsubsection~\ref{subsubsec:information} for more details.
+%^^A!
+%
+%^^A TODO: \DescribeEnv{notation}
+% \begin{function}{notation}
+% \begin{fdusyntax}[emph={[2]notation}]
+% \begin{notation}(*\oarg{列格式说明}*)
+% (*\meta{符号 1}*) & (*\meta{说明}*) \\
+% (*\meta{符号 2}*) & (*\meta{说明}*) \\
+% (*\phantom{\meta{符号 $n$}}*) (*$\vdots$*)
+% (*\meta{符号\ \kern-0.1em$n$}*) & (*\meta{说明}*)
+% \end{notation}
+% \end{fdusyntax}
+% 符号表。可选参数 \meta{列格式说明}与 \LaTeX{} 中标准表格的列格
+% 式说明语法一致,默认值为“|lp{7.5cm}|”,即第一列宽度自动调整,
+% 第二列限宽 \qty{7.5}{cm},两列均为左对齐。
+% \end{function}
+%^^A! \begin{function}{notation}
+%^^A! \begin{fdusyntax}[emph={[2]notation}]
+%^^A! \begin{notation}(*\oarg{column format}*)
+%^^A! (*\meta{symbol 1}*) & (*\meta{description}*) \\
+%^^A! (*\meta{symbol 2}*) & (*\meta{description}*) \\
+%^^A! (*\phantom{\meta{symbol $n$}}*) (*$\vdots$*)
+%^^A! (*\meta{symbol \kern-0.1em$n$}*) & (*\meta{description}*)
+%^^A! \end{notation}
+%^^A! \end{fdusyntax}
+%^^A! Notation list (or symbol list, nomenclature) environment.
+%^^A! The optional argument \meta{column format} is the same as
+%^^A! in a standard \LaTeX{} table. The default value is
+%^^A! ``|lp{7.5cm}|'', which means auto-width for the first column
+%^^A! and fix-width (\qty{7.5}{cm}) for the second; both columns will
+%^^A! be left-aligned.
+%^^A! \end{function}
+%^^A!
+%
+% \subsubsection{猪肚}
+%^^A! \subsubsection{Main matter}
+%^^A!
+%
+% \begin{function}{\mainmatter}
+% 声明主体部分开始。
+% \end{function}
+%^^A! \begin{function}{\mainmatter}
+%^^A! Declare the beginning of main matter.
+%^^A! \end{function}
+%^^A!
+%
+% 主体部分是论文的核心,您可以分章节撰写。如有需求,也可以采用
+% 多文件编译的方式。主体部分的页码采用阿拉伯数字。
+%^^A! As the name suggests, ``main matter'' is the main body of your
+%^^A! thesis. When working on a big projects, it's usually a good
+%^^A! idea to split the source file into several parts. The page
+%^^A! numbers in main matter are shown in arabic numerals.
+%^^A!
+%
+% \begin{function}[updated=2018-01-15]{\footnote}
+% \begin{fdusyntax}[deletetexcs={\footnote},morekeywords={\footnote}]
+% \footnote(*\marg{脚注文字}*)
+% \end{fdusyntax}
+% 插入脚注。脚注编号样式可利用 \opt{style/footnote-style} 选项控制,
+% 具体见 \ref{subsubsec:论文格式}~小节。
+% \end{function}
+%^^A! \begin{function}[updated=2018-01-15]{\footnote}
+%^^A! \begin{fdusyntax}[deletetexcs={\footnote},morekeywords={\footnote}]
+%^^A! \footnote(*\marg{text}*)
+%^^A! \end{fdusyntax}
+%^^A! Insert a footnote. The style of footnote numbers can be set
+%^^A! with option \opt{style/foot\-note\-style}. See
+%^^A! subsubsection~\ref{subsubsec:style-and-format} for more details.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{\caption}
+% \begin{fdusyntax}[deletetexcs={\caption},morekeywords={\caption}]
+% \caption(*\marg{图表标题}*)
+% \caption(*\oarg{短标题}\marg{长标题}*)
+% \end{fdusyntax}
+% 插入图表标题。可选参数 \meta{短标题} 用于图表目录。在
+% \meta{长标题} 中,您可以进行长达多段的叙述;但 \meta{短标题}
+% 和单独的 \meta{图表标题} 中则不允许分段。
+% \cite{刘海洋2013latex入门}
+% \end{function}
+%^^A! \begin{function}{\caption}
+%^^A! \begin{fdusyntax}[deletetexcs={\caption},morekeywords={\caption}]
+%^^A! \caption(*\marg{caption}*)
+%^^A! \caption(*\oarg{short caption}\marg{long caption}*)
+%^^A! \end{fdusyntax}
+%^^A! Insert the caption of figure or table. The optional argument
+%^^A! \meta{short caption} will be shown in the list of figures/tables.
+%^^A! In \meta{long caption}, you can write descriptions for several
+%^^A! paragraphs, but \meta{short caption} and the single
+%^^A! \meta{caption} will not allow multi-paragraph text (i.e.\
+%^^A! text containing \tn{par}) inside.
+%^^A! \end{function}
+%^^A!
+%
+% 按照排版惯例,建议您将表格的标题放置在绘制表格的命令之前,
+% 而将图片的标题放置在绘图或插图的命令之后。另需注意,
+% \tn{caption} 命令必须放置在浮动体环境(如 \env{table} 和
+% \env{figure})中。
+%^^A! By convention, caption of a table is usually put \emph{before}
+%^^A! the table itself, while for figure it's the opposite.
+%^^A! In addition, command \tn{caption} must be put inside float
+%^^A! environments (e.g.\ \env{table} and \env{figure}).
+%^^A!
+%
+% \paragraph{参考文献引用}
+%^^A! \paragraph{Citations}
+%
+% \begin{function}[updated=2021-09-20]{\cite}
+% \begin{fdusyntax}[deletetexcs={\cite},morekeywords={\cite}]
+% \cite(*\marg{文献标签}*)
+% \cite(*\oarg{页码}\marg{文献标签}*)
+% \end{fdusyntax}
+% 插入所引用的文献。可选参数 \meta{页码} 可用来标注引文的页码。在不同的
+% 参考文献样式中,引用的样式也不尽相同。根据需要,模板还提供了更多的命令
+% 用来标记引用。顺序编码制和著者—出版年制下的各种引用方式见
+% 表~\ref{tab:citation-numerical} 和表~\ref{tab:citation-author-year}。
+% \end{function}
+%^^A! \begin{function}[updated=2021-09-20]{\cite}
+%^^A! \begin{fdusyntax}[deletetexcs={\cite},morekeywords={\cite}]
+%^^A! \cite(*\marg{bib key}*)
+%^^A! \cite(*\oarg{page number}\marg{bib key}*)
+%^^A! \end{fdusyntax}
+%^^A! Insert citations. The optional argument \meta{page number} can be
+%^^A! used to indicate the page number of the citation. The citation style
+%^^A! varies among different bibliography styles. More commands are also
+%^^A! provided to mark the citations, which can be found in
+%^^A! table~\ref{tab:citation-numerical} (numerical style) and
+%^^A! \ref{tab:citation-author-year} (author-year style).
+%^^A! \end{function}
+%^^A!
+%
+%^^A+
+% \NewDocumentCommand\verbcite{O{cite}om}{^^A
+% \IfNoValueTF{#2}{^^A
+% \texttt{\textbackslash#1\{#3\}}^^A
+% }{^^A
+% \texttt{\textbackslash#1[#2]\{#3\}}^^A
+% }}
+%^^A-
+%
+% \begin{table}[ht]
+% \caption{顺序编码制下的引用样式} \label{tab:citation-numerical}
+% \centering
+% \small
+% \begin{tabularx}{\textwidth}{cCll}
+% \toprule
+% \textbf{引用方式} &
+% \textbf{排版效果} &
+% \textbf{\kvopt{bib-backend}{bibtex}} &
+% \textbf{\kvopt{bib-backend}{biblatex}} \\
+% \midrule
+% 单篇文献 &
+% 引文\cite{texbook} &
+% \verbcite{texbook} &
+% 同左 \\
+% 多篇文献 &
+% 引文\cite{texbook,companion} &
+% \verbcite{texbook,companion} &
+% 同左 \\
+% 标注页码 &
+% 引文\cite[126--137]{texbook} &
+% \verbcite[cite][126--137]{texbook} &
+% 同左 \\
+% 标注作者 &
+% \citet{texbook}指出 &
+% \verbcite[citet]{texbook} &
+% \verbcite[authornumcite]{texbook} \\
+% 标注作者、页码 &
+% \citet[42]{texbook}指出 &
+% \verbcite[citet][42]{texbook} &
+% \verbcite[authornumcite][42]{texbook} \\
+% 非上标 &
+% 引文{\citestyle{numbers}\cite{texbook}} &
+% \verbcite[parencite]{texbook} &
+% 同左 \\
+% \bottomrule
+% \end{tabularx}
+% \end{table}
+%^^A! \begin{table}[ht]
+%^^A! \caption{Citations in numerical style} \label{tab:citation-numerical}
+%^^A! \centering
+%^^A! \small
+%^^A! \def\C#1{\textcolor{MaterialGreen}{#1}}
+%^^A! \begin{tabularx}{\textwidth}{cCll}
+%^^A! \toprule
+%^^A! \textbf{Styles} &
+%^^A! \textbf{Results} &
+%^^A! \textbf{\kvopt{bib-backend}{bibtex}} &
+%^^A! \textbf{\kvopt{bib-backend}{biblatex}} \\
+%^^A! \midrule
+%^^A! Single &
+%^^A! Text\textsuperscript{[\C1]} &
+%^^A! \verbcite{texbook} &
+%^^A! Same as left \\
+%^^A! Multiple &
+%^^A! Text\textsuperscript{[\C1--\C2]} &
+%^^A! \verbcite{texbook,companion} &
+%^^A! Same as left \\
+%^^A! With page &
+%^^A! Text\textsuperscript{[\C1]126--137} &
+%^^A! \verbcite[cite][126--137]{texbook} &
+%^^A! Same as left \\
+%^^A! With author &
+%^^A! Knuth\textsuperscript{[\C1]} states &
+%^^A! \verbcite[citet]{texbook} &
+%^^A! \verbcite[authornumcite]{texbook} \\
+%^^A! With page and author &
+%^^A! Knuth\textsuperscript{[\C1]42} states &
+%^^A! \verbcite[citet][42]{texbook} &
+%^^A! \verbcite[authornumcite][42]{texbook} \\
+%^^A! No superscript &
+%^^A! Text [\C1] &
+%^^A! \verbcite[parencite]{texbook} &
+%^^A! Same as left \\
+%^^A! \bottomrule
+%^^A! \end{tabularx}
+%^^A! \end{table}
+%^^A!
+%
+% \begin{table}[ht]
+% \caption{著者—出版年制下的引用样式} \label{tab:citation-author-year}
+% \centering
+% \small
+% \def\!{\kern-1.5pt}
+% \begin{tabularx}{\textwidth}{cCll}
+% \toprule
+% \textbf{引用方式} &
+% \textbf{排版效果} &
+% \textbf{\kvopt{bib-backend}{bibtex}} &
+% \textbf{\kvopt{bib-backend}{biblatex}} \\
+% \midrule
+% 单篇文献 &
+% (\citeauthor{texbook}\!, \citeyear{texbook}\!) &
+% \verbcite[citep]{texbook} &
+% \verbcite{texbook} \\
+% 多篇文献 &
+% (\citeauthor{texbook}\!, \citeyear{texbook}\!;
+% \citeauthor{companion}\!, \citeyear{companion}\!) &
+% \verbcite[citep]{texbook,companion} &
+% \verbcite{texbook,companion} \\
+% 标注页码 &
+% (\citeauthor{texbook}\!, \citeyear{texbook}\!)^^A
+% \textsuperscript{126--137} &
+% \verbcite[citep][126--137]{texbook} &
+% \verbcite[cite][126--137]{texbook} \\
+% 标注作者 &
+% \citeauthor{texbook}(\citeyear{texbook}\!) &
+% \verbcite[citet]{texbook} &
+% 同左 \\
+% 标注作者、页码 &
+% \citeauthor{texbook}(\citeyear{texbook}\!)\textsuperscript{42} &
+% \verbcite[citet][42]{texbook} &
+% 同左 \\
+% \bottomrule
+% \end{tabularx}
+% \end{table}
+%^^A! \begin{table}[ht]
+%^^A! \caption{Citations in author-year style} \label{tab:citation-author-year}
+%^^A! \centering
+%^^A! \small
+%^^A! \def\C#1{\textcolor{MaterialGreen}{#1}}
+%^^A! \begin{tabularx}{\textwidth}{cCll}
+%^^A! \toprule
+%^^A! \textbf{Styles} &
+%^^A! \textbf{Results} &
+%^^A! \textbf{\kvopt{bib-backend}{bibtex}} &
+%^^A! \textbf{\kvopt{bib-backend}{biblatex}} \\
+%^^A! \midrule
+%^^A! Single &
+%^^A! (\C{Knuth}, \C{1986}) &
+%^^A! \verbcite[citep]{texbook} &
+%^^A! \verbcite{texbook} \\
+%^^A! Multiple &
+%^^A! (\C{Knuth}, \C{1986}; \C{Mittelbach et al.}, \C{2004}) &
+%^^A! \verbcite[citep]{texbook,companion} &
+%^^A! \verbcite{texbook,companion} \\
+%^^A! With page &
+%^^A! (\C{Knuth}, \C{1986})\textsuperscript{126--137} &
+%^^A! \verbcite[citep][126--137]{texbook} &
+%^^A! \verbcite[cite][126--137]{texbook} \\
+%^^A! With author &
+%^^A! \C{Knuth} (\C{1986}) &
+%^^A! \verbcite[citet]{texbook} &
+%^^A! Same as left \\
+%^^A! With page and author &
+%^^A! \C{Knuth} (\C{1986})\textsuperscript{42} &
+%^^A! \verbcite[citet][42]{texbook} &
+%^^A! Same as left \\
+%^^A! \bottomrule
+%^^A! \end{tabularx}
+%^^A! \end{table}
+%^^A!
+%
+% \paragraph{定理类环境}
+%^^A! \paragraph{Theorem-like environments}
+%
+%^^A TODO: \DescribeEnv{proof}
+% \begin{function}{axiom,corollary,definition,example,lemma,
+% proof,theorem}
+% \begin{fdusyntax}[emph={[2]proof}]
+% \begin{proof}(*\oarg{小标题}*)
+% (*\meta{证明过程}*)
+% \end{proof}
+% \end{fdusyntax}
+% 一系列预定义的数学环境。具体含义见表~\ref{tab:theorem}。
+% \end{function}
+%^^A! \begin{function}{axiom,corollary,definition,example,lemma,
+%^^A! proof,theorem}
+%^^A! \begin{fdusyntax}[emph={[2]proof}]
+%^^A! \begin{proof}(*\oarg{subheading}*)
+%^^A! (*\meta{procedure of proof}*)
+%^^A! \end{proof}
+%^^A! \end{fdusyntax}
+%^^A! A series of pre-defined math environments.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{table}[ht]
+% \caption{预定义的数学环境} \label{tab:theorem}
+% \centering
+% \small
+% \begin{tabular}{*{8}{c}}
+% \toprule
+% \textbf{名称} &
+% \env{axiom} & \env{corollary} & \env{definition} & \env{example} &
+% \env{lemma} & \env{proof} & \env{theorem} \\
+% \midrule
+% \textbf{含义} &
+% 公理 & 推论 & 定义 & 例 &
+% 引理 & 证明 & 定理 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% 证明环境(\env{proof})的最后会添加证毕符号“$\QED$”。要确保
+% 该符号在正确的位置显示,您需要按照 \ref{subsec:编译方式}~节
+% 中的有关说明编译\emph{两次}。
+%^^A! A QED\footnote{Abbreviation of Latin phrase \emph{quod erat
+%^^A! demonstrandum}, means ``what was to be demonstrated''.}
+%^^A! symbol ``$\QED$'' will be added at the end of \env{proof}
+%^^A! environment. You need to compile the source file \emph{twice}
+%^^A! as in subsection~\ref{subsec:compilation} in order to make
+%^^A! the position of QED symbol correct.
+%^^A!
+%
+% \begin{function}[updated=2023-02-08]{\newtheorem}
+% \begin{fdusyntax}[deletetexcs={\newtheorem},
+% morekeywords={\newtheorem,\newtheorem*}]
+% \newtheorem(*\oarg{选项}\marg{环境名}\marg{标题}*)
+% \newtheorem*(*\oarg{选项}\marg{环境名}\marg{标题}*)
+% \begin(*\marg{环境名}\oarg{小标题}*)
+% (*\meta{内容}*)
+% \end(*\marg{环境名}*)
+% \end{fdusyntax}
+% 声明新的定理类环境(数学环境)。带星号的版本表示不进行编号,
+% 并且会默认添加证毕符号“$\QED$”。声明后,即可同预定义的数学环境
+% 一样使用。
+% \end{function}
+%^^A! \begin{function}[updated=2017-12-12]{\newtheorem}
+%^^A! \begin{fdusyntax}[deletetexcs={\newtheorem},
+%^^A! morekeywords={\newtheorem,\newtheorem*}]
+%^^A! \newtheorem(*\oarg{options}\marg{environment}\marg{title}*)
+%^^A! \newtheorem*(*\oarg{options}\marg{environment}\marg{title}*)
+%^^A! \begin(*\marg{environment}\oarg{subheading}*)
+%^^A! (*\meta{contents}*)
+%^^A! \end(*\marg{environment}*)
+%^^A! \end{fdusyntax}
+%^^A! Declare new math environments (theorems). If you use
+%^^A! \cs{newtheorem*}, then the theorem will not be numbered, and
+%^^A! a QED symbol ``$\QED$'' will be added at the end of the
+%^^A! environment. All the theorem environments defined by yourself
+%^^A! can be used as the pre-defined ones.
+%^^A! \end{function}
+%^^A!
+%
+% 事实上,表~\ref{tab:theorem} 中预定义的环境正是通过以下方式定义的:
+% \begin{latexexample}[deletetexcs={\newtheorem},
+% morekeywords={\newtheorem,\newtheorem*}]
+% \newtheorem*{proof}{证明}
+% \newtheorem{axiom}{公理}
+% \newtheorem{corollary}{定理}
+% ...
+% \end{latexexample}
+%^^A! Actually, the pre-defined math environments are just defined
+%^^A! with \cs{new\-the\-o\-rem} and \cs{new\-the\-o\-rem*}:
+%^^A! \begin{latexexample}[deletetexcs={\newtheorem},
+%^^A! morekeywords={\newtheorem,\newtheorem*}]
+%^^A! \newtheorem*{proof}{proof}
+%^^A! \newtheorem{axiom}{axiom}
+%^^A! \newtheorem{corollary}{corollary}
+%^^A! ...
+%^^A! \end{latexexample}
+%^^A!
+%
+% 与 \cs{fdusetup} 相同,\cs{newtheorem} 的可选参数 \meta{选项}
+% 也为一组键值列表。可用的选项见下。注意您无需输入“|theorem/|”。
+%^^A! Similar with \cs{fdusetup}, the optional argument \meta{options}
+%^^A! of \cs{newtheorem} is a key-value list as well. The available
+%^^A! are described below. Note that you don't need to type in the
+%^^A! ``|theorem/|'' prefix.
+%^^A!
+%
+% \begin{function}{theorem/style}
+% \begin{fdusyntax}[emph={[1]style}]
+% style = (*<(plain)|margin|change|\\
+% XXXXXX\mbox{}~~~~~~~~break|marginbreak|changebreak>*)
+% \end{fdusyntax}
+% 定理类环境的总体样式。
+% \end{function}
+%^^A! \begin{function}{theorem/style}
+%^^A! \begin{fdusyntax}[emph={[1]style}]
+%^^A! style = (*<(plain)|margin|change|\\
+%^^A! XXXX\mbox{}~~~~~~~~break|marginbreak|changebreak>*)
+%^^A! \end{fdusyntax}
+%^^A! The overall style of the theorem environment.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{theorem/header-font}
+% \begin{fdusyntax}[emph={[1]header-font}]
+% header-font = (*\marg{字体}*)
+% \end{fdusyntax}
+% 定理头(即标题)的字体。中文模板默认为 \tn{sffamily},即无衬线体
+% (黑体);英文模板默认为 |\bfseries\upshape|,即加粗直立体。
+% \end{function}
+%^^A! \begin{function}{theorem/header-font}
+%^^A! \begin{fdusyntax}[emph={[1]header-font}]
+%^^A! header-font = (*\marg{font}*)
+%^^A! \end{fdusyntax}
+%^^A! Font of the theorem header. Default value is \tn{sffamily}
+%^^A! and |\bfseries\upshape| for Chinese and English template,
+%^^A! respectively.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{theorem/body-font}
+% \begin{fdusyntax}[emph={[1]body-font}]
+% body-font = (*\marg{字体}*)
+% \end{fdusyntax}
+% 定理内容的字体。中文模板默认为 \tn{fdu@kai},即楷体;英文模板
+% 默认为 \tn{itshape},即斜体。
+% \end{function}
+%^^A! \begin{function}{theorem/body-font}
+%^^A! \begin{fdusyntax}[emph={[1]body-font}]
+%^^A! body-font = (*\marg{font}*)
+%^^A! \end{fdusyntax}
+%^^A! Font of the theorem body. Default value is \tn{fdu@kai}
+%^^A! (\textit{楷体}) and \tn{itshape} for Chinese and English
+%^^A! template, respectively.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{theorem/qed}
+% \begin{fdusyntax}[emph={[1]qed}]
+% qed = (*\marg{符号}*)
+% \end{fdusyntax}
+% 定理结束标记(即证毕符号)。如果用 \cs{newtheorem} 声明定理,则默认为空;
+% 用 \cs{newtheorem*} 声明,则默认为 |\ensuremath{\QED}|,即“$\QED$”。
+% \end{function}
+%^^A! \begin{function}{theorem/qed}
+%^^A! \begin{fdusyntax}[emph={[1]qed}]
+%^^A! qed = (*\marg{symbol}*)
+%^^A! \end{fdusyntax}
+%^^A! Theorem end mark. For \cs{newtheorem}, default value is
+%^^A! empty; for \cs{newtheorem*}, default value is
+%^^A! |\ensuremath{\QED}| (i.e.\ ``$\QED$'').
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}{theorem/counter}
+% \begin{fdusyntax}[emph={[1]counter}]
+% counter = (*\marg{计数器}*)
+% \end{fdusyntax}
+% 定理计数器,表示定理编号在 \meta{计数器} 的下一级,并会随 \meta{计数器}
+% 的变化而清零。\cite{刘海洋2013latex入门}默认为 |chapter|,表示按章编号。
+% 使用 \cs{newtheorem*} 时,该选项无效。
+% \end{function}
+%^^A! \begin{function}{theorem/counter}
+%^^A! \begin{fdusyntax}[emph={[1]counter}]
+%^^A! counter = (*\marg{counter}*)
+%^^A! \end{fdusyntax}
+%^^A! The theorem will be enumerated within \meta{counter}. For
+%^^A! example, the default value is |chapter|, which means with
+%^^A! each new \tn{chapter}, the enumeration begins again with 1.
+%^^A! This option is invalid for \cs{newtheorem*}.
+%^^A! \end{function}
+%^^A!
+%
+% \subsubsection{豹尾}
+%^^A! \subsubsection{Back matter}
+%^^A!
+%
+% \begin{function}{\backmatter}
+% 声明后置部分开始。
+% \end{function}
+%^^A! \begin{function}{\backmatter}
+%^^A! Declare the beginning of back matter.
+%^^A! \end{function}
+%^^A!
+%
+% 后置部分包含参考文献、声明页等。
+%^^A! Back matter contains bibliography, declaration page, etc.
+%^^A!
+%
+% \begin{function}[updated=2018-01-25]{\printbibliography}
+% \begin{fdusyntax}[morekeywords={\printbibliography}]
+% \printbibliography(*\oarg{选项}*)
+% \end{fdusyntax}
+% 打印参考文献列表。如果 \kvopt{bib-backend}{bibtex},则 \meta{选项}
+% 无效,相当于 \tn{bibliography} \texttt{\marg{文献数据库}},其中的
+% \meta{文献数据库} 可利用 \opt{style/bib-resource} 选项指定,具体见
+% \ref{subsubsec:论文格式}~小节;而如果 \kvopt{bib-backend}{biblatex},
+% 则该命令由 \pkg{biblatex} 宏包直接提供,可用选项请参阅其文档
+% \cite{biblatex}。
+% \end{function}
+%^^A! \begin{function}[updated=2018-01-25]{\printbibliography}
+%^^A! \begin{fdusyntax}[morekeywords={\printbibliography}]
+%^^A! \printbibliography(*\oarg{options}*)
+%^^A! \end{fdusyntax}
+%^^A! Print the bibliography. When \kvopt{bib-backend}{bibtex}, then
+%^^A! \meta{options} is invalid and this command is equivalent to
+%^^A! \tn{bibliography} \texttt{\marg{bib files}}, where \meta{bib files}
+%^^A! should be specified with option \opt{style/bib-resource} (see
+%^^A! subsubsection~\ref{subsubsec:style-and-format}). When
+%^^A! \kvopt{bib-backend}{bibtex}, then \tn{printbibliography} is
+%^^A! provided by \pkg{biblatex} and the available options can be
+%^^A! found in its documentation.
+%^^A! \end{function}
+%^^A!
+%
+% \begin{function}[added=2023-02-06]{acknowledgements}
+% \begin{fdusyntax}[emph={[2]acknowledgements}]
+% \begin{acknowledgements}
+% (*\meta{致谢内容}*)
+% \end{acknowledgements}
+% \end{fdusyntax}
+% 致谢。
+% \end{function}
+%^^A! \begin{function}[added=2023-02-06]{acknowledgements}
+%^^A! \begin{fdusyntax}[emph={[2]acknowledgements}]
+%^^A! \begin{acknowledgements}
+%^^A! (*\meta{acknowledgements}*)
+%^^A! \end{acknowledgements}
+%^^A! \end{fdusyntax}
+%^^A! Acknowledgements.
+%^^A! \end{function}
+%^^A!
+%
+% \section{宏包依赖情况}
+%^^A! \section{Packages dependencies}
+%^^A!
+%
+% 使用不同编译方式、指定不同选项,会导致宏包依赖情况有所不同。
+% 具体如下:
+% \begin{itemize}
+% \item 在任何情况下,本模板都会\emph{显式}调用以下宏包
+% (或文档类):
+% \begin{itemize}
+% \item \pkg{xtemplate} 和 \pkg{l3keys2e},用于扩展 \LaTeX3 编程环境。
+% 它们属于 \pkg{l3packages} 宏集。
+% \item \cls{ctexbook},提供中文排版的通用框架。属于 \CTeX{}
+% 宏集 \cite{CTeX}。
+% \item \pkg{amsmath},对 \LaTeX{} 的数学排版功能进行了
+% 全面扩展。属于 \AmSLaTeX{} 套件。
+% \item \pkg{unicode-math},负责处理 Unicode 编码的
+% OpenType 数学字体。
+% \item \pkg{geometry},用于调整页面尺寸。
+% \item \pkg{fancyhdr},处理页眉页脚。
+% \item \pkg{footmisc},处理脚注。
+% \item \pkg{ntheorem},提供增强版的定理类环境。
+% \item \pkg{graphicx},提供图形插入的接口。
+% \item \pkg{longtable},长表格(允许跨页)支持。
+% \item \pkg{caption},用于设置题注。
+% \item \pkg{xcolor},提供彩色支持。
+% \item \pkg{hyperref},提供交叉引用、超链接、电子书签等功能。
+% \end{itemize}
+% \item 开启 \kvopt{style/footnote-style}{pifont} 后,会调用
+% \pkg{pifont} 宏包。它属于 \pkg{psnfss} 套件。
+% \item 开启 \kvopt{style/bib-backend}{bibtex} 后,会调用
+% \pkg{natbib} 宏包,并依赖 \BibTeX{} 程序。参考文献样式由
+% \pkg{gbt7714} 宏包提供 \cite{natbib,gbt7714}。
+% \item 开启 \kvopt{style/bib-backend}{biblatex} 后,会调用
+% \pkg{biblatex} 宏包,并依赖 \biber{} 程序。参考文献样式由
+% \pkg{biblatex-gb7714-2015} 宏包提供
+% \cite{biblatex,biblatex-gb7714-2015}。
+% \end{itemize}
+%^^A! Different compilation methods and options will result in a
+%^^A! different packages dependency. Details are as follows:
+%^^A! \begin{itemize}
+%^^A! \item In any case, \cls{fduthesis} will load the following
+%^^A! packages \emph{explicitly}:
+%^^A! \begin{itemize}
+%^^A! \item \pkg{xtemplate} and \pkg{l3keys2e}, belong to
+%^^A! \pkg{l3packages} bundle
+%^^A! \item \cls{ctexbook}, belongs to \CTeX{} bundle
+%^^A! \item \pkg{amsmath}, belongs to \AmSLaTeX{} bundle
+%^^A! \item \pkg{unicode-math}
+%^^A! \item \pkg{geometry}
+%^^A! \item \pkg{fancyhdr}
+%^^A! \item \pkg{footmisc}
+%^^A! \item \pkg{ntheorem}
+%^^A! \item \pkg{graphicx}
+%^^A! \item \pkg{longtable}
+%^^A! \item \pkg{caption}
+%^^A! \item \pkg{xcolor}
+%^^A! \item \pkg{hyperref}
+%^^A! \end{itemize}
+%^^A! \item When chosen \kvopt{style/footnote-style}{pifont},
+%^^A! package \pkg{pifont} will be loaded. It belongs to
+%^^A! \pkg{psnfss} bundle.
+%^^A! \item When chosen \kvopt{style/bib-backend}{bibtex},
+%^^A! package \pkg{natbib} will be loaded. Meanwhile, program
+%^^A! \BibTeX{} will be required for compilation. The
+%^^A! bibliography style is provided by \pkg{gbt7714}.
+%^^A! \item When chosen \kvopt{style/bib-backend}{biblatex},
+%^^A! package \pkg{biblatex} will be loaded. Program \biber{}
+%^^A! will be required then. The bibliography style is provided
+%^^A! by \pkg{biblatex-gb7714-2015}.
+%^^A! \end{itemize}
+%^^A!
+%
+% 这里只列出了本模板直接调用的宏包。这些宏包自身的调用情况,
+% 此处不再具体展开。如有需要,请参阅相关文档。
+%^^A! Only the packages loaded directly by \cls{fduthesis} are listed
+%^^A! here. If you need to know the dependencies of the packages
+%^^A! themselves, please refer to the corresponding manuals.
+%^^A!
+%
+% \begin{thebibliography}{99}
+%
+% \newcommand\urlprefix{\newline\hspace*{\fill}}
+% \let\OldUrl=\url
+% \renewcommand\url[2][]{{\small\textit{#1}~\OldUrl{#2}}}
+% \newcommand\CTANurl[2][]{{^^A
+% \small\textit{#1}~\href{https://mirror.ctan.org/#2}{\texttt{CTAN://#2}}}}
+%
+% \subsection{图书}
+%
+% \bibitem[Knuth(1986)]{texbook}
+% \textsc{Knuth D E}.
+% \newblock \textit{The \TeX book: Computers \& Typesetting, volume A} [M].
+% \newblock Boston: Addison--Wesley Publishing Company, 1986
+% \urlprefix \CTANurl[源代码^^A
+% \footnote{此代码只可作为学习之用。未经 Knuth 本人同意,您不应当编译此文档。}:]^^A
+% {systems/knuth/dist/tex/texbook.tex}
+%
+% \bibitem[Mittelbach et~al.(2004)]{companion}
+% \textsc{Mittelbach F} and \textsc{Goossens M}.
+% \newblock \textit{The \LaTeX{} Companion} [M].
+% \newblock 2nd ed.
+% \newblock Boston: Addison--Wesley Publishing Company, 2004
+%
+% \bibitem[()]{胡伟2017latex2e}
+% 胡伟.
+% \newblock \textit{\LaTeXe{} 文类和宏包学习手册} [M].
+% \newblock 北京: 清华大学出版社, 2017
+%
+% \bibitem[()]{刘海洋2013latex入门}
+% 刘海洋.
+% \newblock \textit{\LaTeX{} 入门} [M].
+% \newblock 北京: 电子工业出版社, 2013
+%
+% \subsection{标准、规范}
+%
+% \bibitem[()]{gb-t-7713.1-2006}
+% 国务院学位委员会办公室, 全国信息与文献标准化技术委员会.
+% \newblock \textit{学位论文编写规则: GB/T 7713.1--2006} [S].
+% \newblock 北京: 中国标准出版社, 2007
+%
+% \bibitem[()]{gb-t-7714-2015}
+% 全国信息与文献标准化技术委员会.
+% \newblock \textit{信息与文献\quad 参考文献著录规则: GB/T 7714--2015} [S].
+% \newblock 北京: 中国标准出版社, 2015
+%
+% \bibitem[()]{gb-t-15834-2011}
+% 教育部语言文字信息管理司.
+% \newblock \textit{标点符号用法: GB/T 15834--2011} [S/OL].
+% \newblock 北京: 中国标准出版社, 2012
+% \urlprefix\url{http://www.moe.gov.cn/ewebeditor/uploadfile/2015/01/13/20150113091548267.pdf}
+%
+% \bibitem[()]{clreq}
+% W3C.
+% \newblock \textit{中文排版需求(Requirements for Chinese Text Layout)} [EB/OL].
+% \newblock W3C Editor's Draft.
+% \newblock (2022-09-01)
+% \urlprefix\url{https://w3c.github.io/clreq/}
+%
+% \bibitem[()]{复旦大学论文规范}
+% 复旦大学图书馆, 复旦大学研究生院.
+% \newblock \textit{复旦大学博士、硕士学位论文规范} [EB/OL].
+% \newblock 2017 年 3 月修订版.
+% \newblock (2017-03-27)
+% \urlprefix\url{http://www.gs.fudan.edu.cn/_upload/article/4c/a8/a82545ef443b9c057c14ba13782c/c883c6f3-6d7f-410c-8f30-d8bde6fcb990.doc}
+%
+% \subsection{宏包、模版}
+%
+% \bibitem[()]{source2e}
+% \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et al.
+% \newblock \textit{The \LaTeXe{} Sources} [CP/OL].
+% \newblock (2022-06-01)
+% \urlprefix\url{https://ctan.org/pkg/latex}
+% \urlprefix\CTANurl[源代码:]{macros/latex/base/source2e.pdf}
+%
+% \bibitem[()]{CTeX}
+% \textsc{CTEX.ORG}.
+% \newblock \textit{\CTeX{} 宏集手册} [EB/OL].
+% \newblock version 2.5.10,
+% \newblock (2022-07-14)
+% \urlprefix\url{https://ctan.org/pkg/ctex}
+% \urlprefix\CTANurl[文档及源代码:]{language/chinese/ctex/ctex.pdf}
+%
+% \bibitem[()]{xeCJK}
+% \textsc{CTEX.ORG}.
+% \newblock \textit{\pkg{xeCJK} 宏包} [EB/OL].
+% \newblock version 3.9.1,
+% \newblock (2022-08-05)
+% \urlprefix\url{https://ctan.org/pkg/xecjk}
+% \urlprefix\CTANurl[文档及源代码:]{macros/xetex/latex/xecjk/xeCJK.pdf}
+%
+% \bibitem[()]{natbib}
+% \textsc{Daly P W}.
+% \newblock \textit{Natural Sciences Citations and References} [EB/OL].
+% \newblock version 8.31b,
+% \newblock (2010-09-13)
+% \urlprefix\url{https://ctan.org/pkg/natbib}
+% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/natbib/natbib.pdf}
+%
+% \bibitem[()]{source3}
+% \textsc{The \LaTeX3 Project}.
+% \newblock \textit{The \LaTeX3 Sources} [CP/OL].
+% \newblock (2022-08-30)
+% \urlprefix\url{https://ctan.org/pkg/l3kernel}
+% \urlprefix\CTANurl[源代码:]{macros/latex/contrib/l3kernel/source3.pdf}
+%
+% \bibitem[()]{biblatex}
+% \textsc{Kime P}, \textsc{Wemheuer M}, \textsc{Lehman P}.
+% \newblock \textit{The \pkg{biblatex} Package} [EB/OL].
+% \newblock version 3.18b,
+% \newblock (2022-07-12)
+% \urlprefix\url{https://ctan.org/pkg/biblatex}
+% \urlprefix\CTANurl[文档:]{macros/latex/contrib/biblatex/doc/biblatex.pdf}
+%
+% \bibitem[()]{lshort}
+% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al.
+% \newblock \textit{The Not So Short Introduction to \LaTeXe{}: Or \LaTeXe{} in 139 minutes} [EB/OL].
+% \newblock version 6.4,
+% \newblock (2021-03-09)
+% \urlprefix\url{https://ctan.org/pkg/lshort-english}
+% \urlprefix\CTANurl[文档:]{info/lshort/english/lshort.pdf}
+%
+% \bibitem[()]{lshort-zh-cn}
+% \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, et al.
+% \newblock \textit{一份(不太)简短的 \LaTeXe{} 介绍: 或 111 分钟了解 \LaTeXe{}} [EB/OL].
+% \newblock \CTeX{} 开发小组, 译.
+% \newblock 原版版本 version 6.4, 中文版本 version 6.03,
+% \newblock (2021-11-20)
+% \urlprefix\url{https://ctan.org/pkg/lshort-zh-cn}
+% \urlprefix\CTANurl[文档:]{info/lshort/chinese/lshort-zh-cn.pdf}
+%
+% \bibitem[()]{biblatex-gb7714-2015}
+% 胡振震.
+% \newblock \textit{符合 GB/T 7714-2015 标准的 biblatex 参考文献样式} [EB/OL].
+% \newblock version 1.1j,
+% \newblock (2022-08-29)
+% \urlprefix\url{https://ctan.org/pkg/biblatex-gb7714-2015}
+% \urlprefix\CTANurl[文档:]{biblatex-contrib/biblatex-gb7714-2015/biblatex-gb7714-2015.pdf}
+%
+% \bibitem[()]{gbt7714}
+% 李泽平(\textsc{Zeping L}).
+% \newblock \textit{GB/T 7714-2015 \BibTeX{} Style} [EB/OL].
+% \newblock version 2.1.4,
+% \newblock (2022-03-12)
+% \urlprefix\url{https://ctan.org/pkg/gbt7714}
+% \urlprefix\CTANurl[文档:]{biblio/bibtex/contrib/gbt7714/gbt7714.pdf}
+%
+% \bibitem[()]{cquthesis}
+% 李振楠.
+% \newblock \textit{\textsc{CquThesis}:重庆大学毕业论文 \LaTeX{} 模板} [EB/OL].
+% \newblock version 1.50,
+% \newblock (2020-06-23)
+% \urlprefix\url{https://ctan.org/pkg/cquthesis}
+% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/cquthesis/cquthesis.pdf}
+%
+% \bibitem[()]{pkuthss}
+% Casper Ti. Vector.
+% \newblock \textit{北京大学学位论文模版:pkuthss} [EB/OL].
+% \newblock version 1.9.2,
+% \newblock (2022-05-05)
+% \urlprefix\url{https://ctan.org/pkg/pkuthss}
+% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/pkuthss/pkuthss.pdf}
+%
+% \bibitem[()]{thuthesis}
+% 清华大学 TUNA 协会.
+% \newblock \textit{\textsc{ThuThesis}:清华大学学位论文模板} [EB/OL].
+% \newblock version 7.3.0,
+% \newblock (2022-05-17)
+% \urlprefix\url{https://ctan.org/pkg/thuthesis}
+% \urlprefix\CTANurl[文档及源代码:]{macros/latex/contrib/thuthesis/thuthesis.pdf}
+%
+% \emph{以下模版未收录至 CTAN,但仍然保持活跃更新。}
+%
+% \bibitem[()]{sjtuthesis}
+% \textsc{SJTUG}.
+% \newblock \textit{上海交通大学学位论文模板} [EB/OL].
+% \newblock version 1.1.1,
+% \newblock (2022-08-04)
+% \urlprefix\url{https://github.com/sjtug/SJTUThesis}
+% \urlprefix\url[源代码仓库:]{https://github.com/sjtug/SJTUTeX}
+%
+% \bibitem[()]{ustcthesis}
+% \textsc{USTC \TeX{} User Group}.
+% \newblock \textit{中国科学技术大学学位论文 \LaTeX{} 模板} [EB/OL].
+% \newblock version 3.3.3,
+% \newblock (2022-05-17)
+% \urlprefix\url{https://github.com/ustctug/ustcthesis}
+%
+% \bibitem[()]{ucasthesis}
+% \textsc{mohuangrui}.
+% \newblock \textit{\pkg{ucasthesis} 国科大学位论文 \LaTeX{} 模板} [EB/OL].
+% \newblock (2021-10-29)
+% \urlprefix\url{https://github.com/mohuangrui/ucasthesis}
+%
+% \emph{以下模版现已停止更新。}
+%
+% \bibitem[()]{pandoxie2014fduthesislatex}
+% \textsc{Pandoxie}.
+% \newblock \textit{Fudan University-Latex Template} [EB/OL].
+% \newblock (2014-06-07)
+% \urlprefix\url{https://github.com/Pandoxie/FDU-Thesis-Latex}
+%
+% \bibitem[()]{richard2016fudanthesis}
+% \textsc{richard}.
+% \newblock \textit{复旦大学硕士学位论文模板} [EB/OL].
+% \newblock (2016-01-31)
+% \urlprefix\url{https://github.com/richarddzh/fudan-thesis}
+%
+% \bibitem{数院本科毕业论文写作模板}
+% 复旦大学数学科学学院.
+% \newblock \textit{2019 春季本科毕业论文写作模板} [EB/OL].
+% \newblock (2019-03-12)
+% \urlprefix\url{https://math.fudan.edu.cn/f3/e1/c30360a324577/page.htm}
+%
+% \subsection{其他}
+%
+% \bibitem[()]{wright2009dtxfile}
+% \textsc{Wright J}.
+% \newblock \textit{A model dtx file} [EB/OL].
+% \newblock (2009-10-06)
+% \urlprefix\url{https://www.texdev.net/2009/10/06/a-model-dtx-file/}
+%
+% \bibitem[()]{孔雀计划}
+% 刘庆(\textsc{Eric Q L}).
+% \newblock \textit{孔雀计划:中文字体排印的思路} [EB/OL].
+% \urlprefix\url{https://thetype.com/kongque/}
+%
+% \end{thebibliography}
+%
+% \clearpage
+%
+%^^A! \end{document}
+%
+% \end{documentation}
+%
+% \begin{implementation}
+%
+%^^A 代码部分的页边距
+% \newgeometry{
+% left = 2.25 in,
+% right = 1.00 in,
+% top = 1.25 in,
+% bottom = 1.00 in,
+% marginpar = 2.25 in
+% }
+%
+% \section{实现细节}
+%
+% 本模板使用 \LaTeX3 语法编写,依赖 \pkg{expl3} 环境,
+% 并需调用 \pkg{l3packages} 中的相关宏包。
+%
+% 按照 \LaTeX3 语法,代码中的空格、换行、回车与制表符完全忽略,
+% 而下划线“|_|”和冒号“|:|”则可作为一般字母使用。
+% 正常的空格可以使用“|~|”代替;至于 |~| 原来所表示的“带子”,
+% 则要用 \LaTeXe{} 的原始命令 \tn{nobreakspace} 代替。
+%
+% 以下代码中有一些形如 \textcolor[HTML]{2E3191}{\textsf{<*class>}}
+% 的标记,这是 \pkg{DocStrip} 中的“guard”,用来选择性地提取文件。
+% “\textsf{*}”和“\textsf{/}”分别表示该部分的开始和结束。不含
+% “\textsf{*}”和“\textsf{/}”的 guard 出现在行号左侧,它们用来确定
+% 单独一行代码的归属。这些 guard 的颜色深浅不一,用以明确嵌套关系。
+%
+% 另有若干形如 \textcolor{MaterialPink}{\textsf{<@@=fdu>}} 的 guard,
+% 它们用来指示名字空间(模块)。
+%
+% \subsection{准备}
+%
+% \begin{macrocode}
+%<@@=fdu>
+%<*class|class-en>
+% \end{macrocode}
+%
+% \changes{v0.8}{2021/09/15}{同步 \LaTeX{} 2020/10/01,不再显式调用
+% \pkg{expl3} 和 \pkg{xparse} 宏包。}
+% \changes{v0.8}{2022/02/17}{在使用前声明提示信息。}
+%
+% 检查 \LaTeX3 编程环境。
+% \begin{macrocode}
+\RequirePackage { xtemplate, l3keys2e }
+\msg_new:nnn { fduthesis } { l3-too-old }
+ {
+ Package~ "#1"~ is~ too~ old. \\\\
+ Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\
+ "l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\
+ manager~ or~ from~ CTAN.
+ }
+\clist_map_inline:nn { xtemplate, l3keys2e }
+ {
+ \@ifpackagelater {#1} { 2020/07/17 }
+ { } { \msg_error:nnn { fduthesis } { l3-too-old } {#1} }
+ }
+% \end{macrocode}
+%
+% 目前 \cls{fduthesis} 仅支持 \XeTeX{} 和 \LuaTeX{}。
+% \begin{macrocode}
+\msg_new:nnn { fduthesis } { unsupported-engine }
+ {
+ The~ fduthesis~ class~ requires~ either~ XeTeX~ or~ LuaTeX. \\\\
+ "#1"~ is~ not~ supported~ at~ present.~ You~ must~ change \\
+ your~ typesetting~ engine~ to~ "xelatex"~ or~ "lualatex".
+ }
+\sys_if_engine_xetex:F
+ {
+ \sys_if_engine_luatex:F
+ {
+ \msg_fatal:nnx { fduthesis } { unsupported-engine }
+ { \c_sys_engine_str }
+ }
+ }
+% \end{macrocode}
+%
+% \subsubsection{内部变量声明}
+%
+% \begin{variable}{\l_@@_tmpa_box,
+% \l_@@_tmpa_clist,
+% \l_@@_tmpa_dim,
+% \l_@@_tmpa_skip,
+% \l_@@_tmpa_tl,\l_@@_tmpb_tl}
+% 临时变量。
+% \begin{macrocode}
+\box_new:N \l_@@_tmpa_box
+\clist_new:N \l_@@_tmpa_clist
+\dim_new:N \l_@@_tmpa_dim
+\skip_new:N \l_@@_tmpa_skip
+\tl_new:N \l_@@_tmpa_tl
+\tl_new:N \l_@@_tmpb_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_thesis_type_int}
+% 论文类型。取值 1、2、3 分别对应博士、硕士、本科(学士),这与学号
+% 第三位是一致的。
+% \begin{macrocode}
+\int_new:N \g_@@_thesis_type_int
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_to_ctexbook_clist,\g_@@_to_hyperref_clist}
+% 分别保存由 \cls{fduthesis} 传入 \cls{ctexbook} 文档类和
+% \pkg{hyperref} 宏包的选项列表。
+% \begin{macrocode}
+\clist_new:N \g_@@_to_ctexbook_clist
+\clist_new:N \g_@@_to_hyperref_clist
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_twoside_bool}
+% 是否开启双页模式(默认打开)。
+% \begin{macrocode}
+\bool_new:N \g_@@_twoside_bool
+\bool_set_true:N \g_@@_twoside_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_draft_bool}
+% 是否开启草稿模式。
+% \begin{macrocode}
+\bool_new:N \g_@@_draft_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\g_@@_config_tl}
+% 保存配置文件名称。默认为空。
+% \begin{macrocode}
+\tl_new:N \g_@@_config_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \subsubsection{内部函数}
+%
+% \begin{macro}{\file_input:V,\int_to_arabic:v,\keys_define:nx,\regex_replace_all:nnc}
+% \begin{macro}[TF]{\tl_if_eq:Vn}
+% \LaTeX3{} 函数变体。
+% \begin{macrocode}
+\cs_generate_variant:Nn \file_input:n { V }
+\cs_generate_variant:Nn \int_to_arabic:n { v }
+\cs_generate_variant:Nn \keys_define:nn { nx }
+\cs_generate_variant:Nn \regex_replace_all:nnN { nnc }
+\prg_generate_conditional_variant:Nnn \tl_if_eq:nn { Vn } { T, TF }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_quad:,\@@_qquad:}
+% 等价于 \LaTeXe{} 中的 \tn{quad} 和 \tn{qquad}。
+% \begin{macrocode}
+\cs_new:Npn \@@_quad: { \skip_horizontal:n { 1 em } }
+\cs_new:Npn \@@_qquad: { \skip_horizontal:n { 2 em } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_vspace:N,\@@_vspace:n,\@@_vspace:c}
+% 类似 \LaTeXe{} 中的 \tn{vspace*}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_vspace:N #1
+ {
+ \dim_set_eq:NN \l_@@_tmpa_dim \prevdepth
+ \hrule height \c_zero_dim
+ \nobreak
+ \skip_vertical:N #1
+ \skip_vertical:N \c_zero_skip
+ \dim_set_eq:NN \prevdepth \l_@@_tmpa_dim
+ }
+\cs_new_protected:Npn \@@_vspace:n #1
+ {
+ \skip_set:Nn \l_@@_tmpa_skip {#1}
+ \@@_vspace:N \l_@@_tmpa_skip
+ }
+\cs_generate_variant:Nn \@@_vspace:N { c }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_symbol:n}
+% 等价于 \LaTeXe{} 中的 \tn{symbol}。
+% \begin{macrocode}
+\cs_new:Npn \@@_symbol:n #1 { \tex_char:D #1 \scan_stop: }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_arabic:n}
+% 等价于 \LaTeXe{} 中的 \tn{arabic}。
+% \begin{macrocode}
+\cs_new:Npn \@@_arabic:n #1
+ { \int_to_arabic:v { c@ #1 } }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.8}{2021/09/15}{统一使用 \LaTeX{} 2020/10/01 新的钩子机制。}
+%
+% \begin{macro}{\@@_gadd_ltxhook:nn}
+% 封装 \LaTeX{} 的钩子管理机制。本模板中的字体加载命令位于
+% \texttt{begindocument/\allowbreak before} 钩子中,需确保在 \pkg{xeCJK} 之前执行。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gadd_ltxhook:nn #1#2
+ { \hook_gput_code:nnn {#1} { . } {#2} }
+\hook_gset_rule:nnnn { begindocument/before } { . } { < } { xeCJK }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_patch_cmd:Nnn,\@@_appto_cmd:Nn}
+% 补丁工具,来自 \pkg{ctexpatch} 宏包。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_patch_cmd:Nnn #1#2#3
+ {
+ \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
+ { } { \ctex_patch_failure:N #1 }
+ }
+\cs_new_protected:Npn \@@_appto_cmd:Nn #1#2
+ {
+ \ctex_appto_cmd:NnnTF #1 { } {#2}
+ { } { \ctex_patch_failure:N #1 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_define_fn_style:nn,
+% \@@_define_punct:nn,
+% \@@_define_name:nn,
+% \@@_define_name:nnn}
+% 用来定义脚注样式、标点、默认名称的辅助函数。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_define_fn_style:nn #1#2
+ { \tl_const:cn { c_@@_fn_style_ #1 _tl } {#2} }
+\cs_new_protected:Npn \@@_define_punct:nn #1#2
+ { \tl_const:cn { c_@@_ #1 _tl } {#2} }
+\cs_new_protected:Npn \@@_define_name:nn #1#2
+ { \tl_const:cn { c_@@_name_ #1 _tl } {#2} }
+\cs_new_protected:Npn \@@_define_name:nnn #1#2#3
+ {
+ \tl_const:cn { c_@@_name_ #1 _tl } {#2}
+ \tl_const:cn { c_@@_name_ #1 _en_tl } {#3}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_msg_new:nn,
+% \@@_error:n,\@@_error:nn,\@@_error:nx,\@@_error:nnn,\@@_error:nnnn,
+% \@@_warning:n,\@@_warning:nn,\@@_warning:nxx,
+% \@@_info:nx}
+% 各种信息函数的缩略形式。
+% \begin{macrocode}
+\cs_new:Npn \@@_msg_new:nn { \msg_new:nnn { fduthesis } }
+\cs_new:Npn \@@_error:n { \msg_error:nn { fduthesis } }
+\cs_new:Npn \@@_error:nn { \msg_error:nnn { fduthesis } }
+\cs_new:Npn \@@_error:nx { \msg_error:nnx { fduthesis } }
+\cs_new:Npn \@@_error:nnn { \msg_error:nnnn { fduthesis } }
+\cs_new:Npn \@@_error:nnnn { \msg_error:nnnnn { fduthesis } }
+\cs_new:Npn \@@_warning:n { \msg_warning:nn { fduthesis } }
+\cs_new:Npn \@@_warning:nn { \msg_warning:nnn { fduthesis } }
+\cs_new:Npn \@@_warning:nxx { \msg_warning:nnxx { fduthesis } }
+\cs_new:Npn \@@_info:nx { \msg_info:nnx { fduthesis } }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{选项处理}
+%
+% 定义 |fdu/option| 键值类。
+% \begin{macrocode}
+\keys_define:nn { fdu / option }
+ {
+% \end{macrocode}
+%
+% \changes{v0.7}{2018/02/01}{新增 \opt{type} 选项。}
+%
+% \begin{macro}{type}
+% 设置论文类型。设为模板选项主要是为了以后的兼容性。论文类型可能会
+% 影响很多设置,只是暂时还不考虑。默认为本科毕业论文。
+% \begin{macrocode}
+ type .choice:,
+ type .value_required:n = true,
+ type .choices:nn =
+ { doctor, master, bachelor }
+ { \int_set_eq:NN \g_@@_thesis_type_int \l_keys_choice_int },
+ type .initial:n = bachelor,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{oneside,twoside}
+% 设置页面类型为单面或双面。
+% \begin{macrocode}
+ oneside .value_forbidden:n = true,
+ twoside .value_forbidden:n = true,
+ oneside .code:n =
+ {
+ \clist_gput_right:Nn \g_@@_to_ctexbook_clist { oneside }
+ \bool_set_false:N \g_@@_twoside_bool
+ },
+ twoside .code:n =
+ {
+ \clist_gput_right:Nn \g_@@_to_ctexbook_clist { twoside }
+ \bool_set_true:N \g_@@_twoside_bool
+ },
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.5}{2017/09/23}{移除 \opt{nofonts} 选项。}
+%
+% \begin{macro}{draft}
+% 是否开启草稿模式(默认关闭)。
+% \begin{macrocode}
+ draft .choice:,
+ draft / true .code:n =
+ {
+ \bool_set_true:N \g_@@_draft_bool
+ \clist_gput_right:Nn \g_@@_to_ctexbook_clist { draft }
+ },
+ draft / false .code:n =
+ { \bool_set_false:N \g_@@_draft_bool },
+ draft .default:n = true,
+ draft .initial:n = false,
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.7}{2018/01/31}{新增 \opt{config} 选项。}
+%
+% \begin{macro}{config}
+% 配置文件名。
+% \begin{macrocode}
+ config .tl_set:N = \g_@@_config_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% 处理未知选项。
+% \begin{macrocode}
+ unknown .code:n = { \@@_error:n { unknown-option } }
+ }
+\@@_msg_new:nn { unknown-option }
+ { Class~ option~ "\l_keys_key_str"~ is~ unknown. }
+% \end{macrocode}
+%
+% 将文档类选项传给 |fdu/option|。
+% \begin{macrocode}
+\ProcessKeysOptions { fdu / option }
+% \end{macrocode}
+%
+% 载入参数配置文件。
+% \begin{macrocode}
+\file_input:n { fduthesis.def }
+\@@_msg_new:nn { load-config-file }
+ { You~ are~ loading~ config~ file~ "#1". }
+\tl_if_empty:NF \g_@@_config_tl
+ {
+ \@@_info:nx { load-config-file } { \g_@@_config_tl }
+ \file_input:V \g_@@_config_tl
+ }
+% \end{macrocode}
+%
+% \subsection{载入宏包、文档类}
+%
+% \changes{v0.7}{2018/01/19}{使用 \cls{ctexbook} 文档类,而非直接使用
+% 标准文档类 \cls{book}。}
+%
+% 将选项传入 \cls{ctexbook} 文档类。
+% \begin{macrocode}
+% TODO: (2017-07-22) Chinese fonts in fduthesis-en
+\PassOptionsToClass
+ {
+ UTF8,
+%<class-en> scheme = plain,
+ heading = true,
+%<class> fontset = none,
+%<class-en> fontset = fandol,
+ zihao = -4,
+%<class> linespread = \c_@@_line_spread_fp,
+ \g_@@_to_ctexbook_clist
+ }
+ { ctexbook }
+% \end{macrocode}
+%
+% 传入各宏包选项。
+% \begin{macrocode}
+\clist_map_inline:nn
+ {
+ { no-math } { fontspec },
+ { perpage } { footmisc },
+ { amsmath, thmmarks } { ntheorem }
+ }
+ { \PassOptionsToPackage #1 }
+% \end{macrocode}
+%
+% 载入 \cls{ctexbook} 文档类。
+% 在使用 \XeLaTeX{} 编译时,\cls{ctexbook} 的底层将调用 \pkg{xeCJK}
+% 宏包;而在使用 \LuaLaTeX{} 编译时,则将调用 \pkg{LuaTeX-ja} 宏包。
+% 两种情况下 \cls{ctexbook} 均会调用 \pkg{fontspec} 宏包。
+% \begin{macrocode}
+\LoadClass { ctexbook }
+% \end{macrocode}
+%
+% \changes{v0.4}{2017/08/13}{提供彩色支持。}
+%
+% 载入各宏包。其中,\pkg{amsmath} 必须在 \pkg{unicode-math} 之前引入。
+% \begin{macrocode}
+\RequirePackage
+ {
+ amsmath,
+ unicode-math,
+ geometry,
+ fancyhdr,
+ footmisc,
+ ntheorem,
+ graphicx,
+ longtable,
+ caption,
+ xcolor
+ }
+% \end{macrocode}
+%
+% \changes{v0.8}{2021/09/16}{只检查 \cls{ctexbook} 和 \pkg{xeCJK} 的版本。}
+%
+% \begin{macro}{\@@_check_package:nnn,\@@_check_class:nnn}
+% 检查过时宏包和文档类。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_check_package:nnn #1#2#3
+ {
+ \@ifpackagelater {#1} {#2}
+ { } { \@@_error:nnnn { package-too-old } { Package } {#1} {#3} }
+ }
+\cs_new_protected:Npn \@@_check_class:nnn #1#2#3
+ {
+ \@ifclasslater {#1} {#2}
+ { } { \@@_error:nnnn { package-too-old } { Class } {#1} {#3} }
+ }
+\@@_msg_new:nn { package-too-old }
+ {
+ #1~ "#2"~ is~ too~ old. \\
+ The~ fduthesis~ class~ only~ supports~ "#2" \\
+ with~ a~ version~ higher~ than~ v#3. \\\\
+ Please~ update~ an~ up-to-date~ version~ of~ it \\
+ using~ your~ TeX~ package~ manager~ or~ from~ CTAN.
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\@@_check_class:nnn { ctexbook } { 2021/03/14 } { 2.5.6 }
+\sys_if_engine_xetex:T
+ { \@@_check_package:nnn { xeCJK } { 2020/05/01 } { 3.8.3 } }
+% \end{macrocode}
+%
+% \subsection{页面布局}
+%
+% 利用 \pkg{geometry} 宏包设置纸张大小、页面边距以及页眉高度。这里,
+% $\qty{2.54}{\centi\meter}=\qty{1}{in}$,
+% $\qty{3.18}{\centi\meter}=\qty{1.25}{in}$。
+% \begin{macrocode}
+\geometry
+ {
+ paper = a4paper,
+ vmargin = 2.54 cm,
+ hmargin = 3.18 cm,
+ headheight = 15 pt
+ }
+% \end{macrocode}
+%
+% 草稿模式下显示页面边框及页眉、页脚线。
+% \begin{macrocode}
+\bool_if:NT \g_@@_draft_bool { \geometry { showframe } }
+% \end{macrocode}
+%
+% \subsection{字体}
+%
+% \subsubsection{预定义字体配置}
+%
+% \changes{v0.7c}{2019/03/05}{重构字体配置,并兼容 macOS。}
+%
+% \begin{variable}{\g_@@_fontset_tl, \g_@@_cjk_fontset_tl}
+% 存放字体选项值。
+% \begin{macrocode}
+\tl_new:N \g_@@_fontset_tl
+%<class>\tl_new:N \g_@@_cjk_fontset_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{style/font}
+% \changes{v0.7c}{2019/03/05}{新增 \opt{garamond} 和 \opt{times*} 样式。}
+% 预定义西文字体。
+% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
+ font .choices:nn =
+ { garamond, libertinus, lm, palatino, times, times*, none }
+ { \tl_set_eq:NN \g_@@_fontset_tl \l_keys_choice_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{style/cjk-font}
+% \changes{v0.7c}{2019/03/05}{新增 \opt{sinotype} 和 \opt{sourcehan} 样式。}
+% 预定义中文字体。
+% \begin{macrocode}
+%<*class>
+\keys_define:nn { fdu / style }
+ {
+ cjk-font .choices:nn =
+ { adobe, fandol, founder, mac, sinotype, sourcehan, windows, none }
+ { \tl_set_eq:NN \g_@@_cjk_fontset_tl \l_keys_choice_tl }
+ }
+% \end{macrocode}
+%</class>
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_setmainfont:nn,
+% \@@_setsansfont:nn,
+% \@@_setmonofont:nn,
+% \@@_setmathfont:nn}
+% 用于设置西文字体的辅助函数,来源于 \pkg{fontspec} 和 \pkg{unicode-math}。
+% \begin{arguments}
+% \item 字体名
+% \item 选项
+% \end{arguments}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_setmainfont:nn #1#2
+ { \__fontspec_main_setmainfont:nn {#2} {#1} }
+\cs_new_protected:Npn \@@_setsansfont:nn #1#2
+ { \__fontspec_main_setsansfont:nn {#2} {#1} }
+\cs_new_protected:Npn \@@_setmonofont:nn #1#2
+ { \__fontspec_main_setmonofont:nn {#2} {#1} }
+\cs_new_protected:Npn \@@_setmathfont:nn #1#2
+ { \__um_setmathfont:nn {#2} {#1} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \@@_setCJKmainfont:nn,
+% \@@_setCJKsansfont:nn,
+% \@@_setCJKmonofont:nn}
+% \changes{v0.8}{2021/09/15}{展开字体族名称。}
+% 用于设置中文字体的辅助函数,来源于 \pkg{xeCJK} 和 \pkg{ctex} 宏包。
+% \begin{macrocode}
+%<*class>
+\cs_new_protected:Npn \@@_setCJKmainfont:nn #1#2
+ { \@@_set_family:xnn { \CJKrmdefault } {#2} {#1} }
+\cs_new_protected:Npn \@@_setCJKsansfont:nn #1#2
+ { \@@_set_family:xnn { \CJKsfdefault } {#2} {#1} }
+\cs_new_protected:Npn \@@_setCJKmonofont:nn #1#2
+ { \@@_set_family:xnn { \CJKttdefault } {#2} {#1} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_cjk_font_kai:nn,\fdu@kai}
+% 楷体需要单独设置。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_set_cjk_font_kai:nn #1#2
+ { \@@_set_family:nnn { fdu@kai } {#2} {#1} }
+\cs_new_protected:Npn \fdu@kai
+ { \@@_switch_family:n { fdu@kai } }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.7d}{2019/03/29}{在字体未提供对应粗体的情况下,允许使用伪粗。}
+%
+% \begin{macro}{
+% \@@_cjk_font_options:,
+% \@@_setCJKmainfont:n,
+% \@@_setCJKsansfont:n,
+% \@@_setCJKmonofont:n,
+% \@@_set_cjk_font_kai:n}
+% 将 bold、italic 和 bold italic 统一按照 roman 设置。
+% \begin{macrocode}
+\tl_const:Nn \@@_cjk_font_options:
+ { UprightFont = *, ItalicFont = *, AutoFakeBold = true }
+\cs_new_protected:Npx \@@_setCJKmainfont:n #1
+ { \@@_setCJKmainfont:nn {#1} { \@@_cjk_font_options: } }
+\cs_new_protected:Npx \@@_setCJKsansfont:n #1
+ { \@@_setCJKsansfont:nn {#1} { \@@_cjk_font_options: } }
+\cs_new_protected:Npx \@@_setCJKmonofont:n #1
+ { \@@_setCJKmonofont:nn {#1} { \@@_cjk_font_options: } }
+\cs_new_protected:Npx \@@_set_cjk_font_kai:n #1
+ { \@@_set_cjk_font_kai:nn {#1} { \@@_cjk_font_options: } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_family:nnn,\@@_set_family:xnn,\@@_switch_family:n}
+% 封装 CJK 字体族的设定和切换命令。
+% \begin{macrocode}
+\sys_if_engine_xetex:TF
+ {
+ \cs_new_eq:NN \@@_set_family:nnn \xeCJK_set_family:nnn
+ \cs_new_eq:NN \@@_switch_family:n \xeCJK_switch_family:n
+ }
+ {
+ \cs_new_eq:NN \@@_set_family:nnn \ctex_ltj_set_family:nnn
+ \cs_new_eq:NN \@@_switch_family:n \ctex_ltj_switch_family:n
+ }
+\cs_generate_variant:Nn \@@_set_family:nnn { x }
+%</class>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{
+% \setmainfont,
+% \setsansfont,
+% \setmonofont,
+% \setmathfont,
+% \setCJKmainfont,
+% \setCJKsansfont,
+% \setCJKmonofont}
+% 重新定义以上宏包提供的字体选择命令。我们把它放在导言区末尾,使得用户配置不被
+% 模板配置覆盖。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_set_font_helper:n #1
+ {
+ \exp_args:Nc \RenewDocumentCommand { set #1 font } { O { } m O { } }
+ {
+ \ctex_at_end_preamble:n
+ { \use:c { @@_set #1 font:nn } {##2} { ##1, ##3 } }
+ }
+ }
+\clist_map_inline:nn { main, sans, mono, math }
+ { \@@_set_font_helper:n {#1} }
+%<class>\clist_map_inline:nn { CJKmain, CJKsans, CJKmono }
+%<class> { \@@_set_font_helper:n {#1} }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.7e}{2019/04/10}{兼容 Libertinus 和 XITS 字体的文件名变动。}
+% \changes{v0.8}{2021/09/15}{判断 Libertinus Sans Bold Oblique 字体是否存在。}
+% \changes{v0.9}{2023/02/18}{不再检查 Libertinus 和 XITS 字体的文件名。}
+%
+% \begin{macro}{\@@_load_font_garamond:}
+% EB Garamond 系列。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_font_garamond:
+ {
+ \@@_setmainfont:nn { EBGaramond }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic
+ }
+ \@@_setsansfont:nn { LibertinusSans }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ }
+ \@@_setmonofont:nn { lmmonolt10 }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique
+ }
+ \@@_setmathfont:nn { Garamond-Math.otf } { }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font_libertinus:}
+% Libertinus 系列。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_font_libertinus:
+ {
+ \@@_setmainfont:nn { LibertinusSerif }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
+ }
+ \@@_setsansfont:nn { LibertinusSans }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ }
+ \@@_setmonofont:nn { lmmonolt10 }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique
+ }
+ \@@_setmathfont:nn { LibertinusMath-Regular.otf } { }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font_lm:}
+% Latin Modern 系列。在 \XeLaTeX{} 和 \LuaLaTeX{} 中已作为默认字体,所以仅需
+% 额外处理数学部分。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_font_lm:
+ { \@@_setmathfont:nn { latinmodern-math.otf } { } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font_palatino:}
+% Palatino 系列。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_font_palatino:
+ {
+ \@@_setmainfont:nn { texgyrepagella }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic
+ }
+ \@@_setsansfont:nn { LibertinusSans }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ Scale = MatchUppercase,
+ }
+ \@@_setmonofont:nn { lmmonolt10 }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique
+ }
+ \@@_setmathfont:nn { texgyrepagella-math.otf } { }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font_times:}
+% Times 系列。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_font_times:
+ {
+ \@@_setmainfont:nn { XITS }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
+ }
+ \@@_setsansfont:nn { texgyreheros }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic
+ }
+ \@@_setmonofont:nn { texgyrecursor }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic,
+ Ligatures = CommonOff
+ }
+ \@@_setmathfont:nn { XITSMath-Regular.otf }
+ { BoldFont = XITSMath-Bold.otf }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font_times*:}
+% Times* 系列,除数学部分外采用系统字体。
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_load_font_ times* : }
+ {
+ \@@_setmainfont:nn { Times~ New~ Roman } { }
+ \@@_setsansfont:nn { Arial } { }
+ \@@_setmonofont:nn { Courier~ New } { }
+ \@@_setmathfont:nn { XITSMath-Regular.otf }
+ { BoldFont = XITSMath-Bold.otf }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_adobe:}
+% Adobe 字库。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_adobe:
+ {
+ \@@_setCJKmainfont:n { AdobeSongStd-Light }
+ \@@_setCJKsansfont:n { AdobeHeitiStd-Regular }
+ \@@_setCJKmonofont:n { AdobeFangsongStd-Regular }
+ \@@_set_cjk_font_kai:n { AdobeKaitiStd-Regular }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_fandol:}
+% Fandol 字库。注意它是安装在 TeX 发行版中的,所以使用文件名调用。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_fandol:
+ {
+ \@@_setCJKmainfont:nn { FandolSong }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold
+ }
+ \@@_setCJKsansfont:nn { FandolHei }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold
+ }
+ \@@_setCJKmonofont:nn { FandolFang }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Regular,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Regular
+ }
+ \@@_set_cjk_font_kai:nn { FandolKai }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Regular,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Regular
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_founder:}
+% 方正字库。虽然有粗体(方正小标宋)等,但并非免费,故这里不做处理。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_founder:
+ {
+ \@@_setCJKmainfont:n { FZShuSong-Z01 }
+ \@@_setCJKsansfont:n { FZHei-B01 }
+ \@@_setCJKmonofont:n { FZFangSong-Z02 }
+ \@@_set_cjk_font_kai:n { FZKai-Z03 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_mac:}
+% macOS 自带中文字体。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_mac:
+ {
+ \@@_setCJKmainfont:nn { STSongti-SC }
+ {
+ UprightFont = *-Light,
+ BoldFont = *-Bold,
+ ItalicFont = *-Light,
+ BoldItalicFont = *-Bold
+ }
+ \@@_setCJKsansfont:nn { STHeitiSC }
+ {
+ UprightFont = *-Medium,
+ BoldFont = *-Medium,
+ ItalicFont = *-Medium,
+ BoldItalicFont = *-Medium
+ }
+ \@@_setCJKmonofont:n { STFangsong }
+ \@@_set_cjk_font_kai:nn { STKaitiSC }
+ {
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_sinotype:}
+% 华文字库。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_sinotype:
+ {
+ \@@_setCJKmainfont:n { STSong }
+ \@@_setCJKsansfont:n { STHeiti }
+ \@@_setCJKmonofont:n { STFangsong }
+ \@@_set_cjk_font_kai:n { STKaiti }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_sourcehan:}
+% 思源宋体、思源黑体。由于没有对应的楷体和仿宋,这里直接给出警告。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_sourcehan:
+ {
+ \@@_setCJKmainfont:nn { SourceHanSerifSC }
+ {
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold
+ }
+ \@@_setCJKsansfont:nn { SourceHanSansSC }
+ {
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Regular,
+ BoldItalicFont = *-Bold
+ }
+ \@@_warning:n { source-han }
+ }
+\@@_msg_new:nn { source-han }
+ { Font~ set~ "sourcehan"~ does~ not~ contain~ kaiti~ and~ fangsong. }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_cjk_font_windows:}
+% Windows 自带中文字体。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_cjk_font_windows:
+ {
+ \@@_setCJKmainfont:n { SimSun }
+ \@@_setCJKsansfont:n { SimHei }
+ \@@_setCJKmonofont:n { FangSong }
+ \@@_set_cjk_font_kai:n { KaiTi }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_load_font:}
+% 字体加载命令。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_load_font:
+ {
+ \use:c { @@_load_font_ \g_@@_fontset_tl : }
+%<class> \use:c { @@_load_cjk_font_ \g_@@_cjk_fontset_tl : }
+ }
+\ctex_at_end_preamble:n { \@@_load_font: }
+% \end{macrocode}
+% \end{macro}
+%
+%^^A 以下相关代码已在 v0.7c 中移除。
+% \changes{v0.5}{2017/09/09}{重新实现字体调用。核心内容是分离字体的声明与设定,
+% 并按照宋、黑、仿、楷划分中文字体。}
+% \changes{v0.6}{2017/11/11}{额外处理 XITS 字体的小型大写字母。}
+% \changes{v0.5}{2017/09/23}{新增 \kvopt{font}{none} 选项。}
+% \changes{v0.5}{2017/09/23}{新增 \kvopt{cjk-font}{none} 选项。}
+% \changes{v0.5}{2017/09/23}{同步 \pkg{fontspec} v2.6e。}
+% \changes{v0.6}{2017/10/11}{同步 \pkg{unicode-math} v0.8h。}
+%
+% \subsubsection{数学字体设置}
+%
+% 根据 GB 3102.11--93 以及 ISO 80000-2:2009 的规定,数学表达式中
+% 表示变量的拉丁字母和希腊字母均应当使用斜体。
+% 这里的 |\keys_set:nn{unicode-math}| 实际相当于 \cs{unimathsetup}。
+% \begin{macrocode}
+% TODO: (2018-01-19) Do we need `mathrm=sym`?
+\keys_set:nn { unicode-math }
+ {
+ math-style = ISO,
+ bold-style = ISO,
+% mathrm = sym
+ }
+% \end{macrocode}
+%
+% \subsubsection{字号}
+%
+% \begin{macro}{style/font-size}
+% \changes{v0.9}{2023/02/08}{通过引入 \file{ctex-c5size.clo} 来修改字号。}
+% |font-size| 不是文档类选项,不能传给 \cls{ctexbook} 文档类,因此
+% 需要手动引入 |.clo| 文件。
+% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
+ font-size .choice:,
+ font-size .value_required:n = true,
+ font-size / -4 .code:n = { },
+ font-size / 5 .code:n = { \ctex_file_input:n { ctex-c5size.clo } },
+%<class-en> }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{其他设置}
+%
+% \begin{macro}{style/fullwidth-stop}
+% \changes{v0.6}{2017/10/14}{支持类别码和 TECKit 映射两种机制。}
+% 设置句号形状(圆圈或是圆点)。
+% \begin{macrocode}
+%<*class>
+ fullwidth-stop .choice:,
+ fullwidth-stop .value_required:n = true,
+% \end{macrocode}
+% 利用类别码机制切换,只有显式的\FSID 会被替换。
+% \begin{macrocode}
+ fullwidth-stop / catcode .code:n =
+ { \@@_set_fullwidth_stop_catcode: },
+% \end{macrocode}
+% 利用 TECKit 映射机制切换,相当于设置了 \tn{defaultCJKfontfeatures}
+% |{|\kvopt{Map\-ping}{fullwidth-stop}|}|。这种手段会替换所有出现的\FSID,
+% 并且将影响所有字体。只在 \XeTeX{} 下可用。
+% \begin{macrocode}
+ fullwidth-stop / mapping .code:n =
+ {
+ \sys_if_engine_xetex:TF
+ {
+ \clist_gset:Nn \g__xeCJK_default_features_clist
+ { Mapping = fullwidth-stop }
+ }
+ {
+% \end{macrocode}
+% \LuaTeX{} 下改用类别码机制代替,并给出警告。
+% \begin{macrocode}
+ \sys_if_engine_luatex:T
+ {
+ \@@_warning:n { mapping-not-available }
+ \@@_set_fullwidth_stop_catcode:
+ }
+ }
+ },
+ fullwidth-stop / false .code:n = { }
+ }
+% \end{macrocode}
+% \end{macro}
+% 提示信息。
+% \begin{macrocode}
+\@@_msg_new:nn { mapping-not-available }
+ {
+ Option~ "fullwidth-stop = mapping"~ is~ not~ available~ in~ LuaTeX. \\
+ "fullwidth-stop = catcode"~ will~ be~ set~ instead.
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_set_fullwidth_stop_catcode:}
+% \changes{v0.8}{2021/09/16}{将类别码设置应用于预定义的文本中,并优化实现。}
+% 将\FSID 设置为活动符,并定义为句点\FSFW。
+% \begin{macrocode}
+\cs_new:Npn \@@_set_fullwidth_stop_catcode:
+ {
+ \char_set_active_eq:NN ^^^^3002 \c_@@_fwid_full_stop_tl
+ \char_set_catcode_active:N ^^^^3002
+ \clist_map_inline:nn
+ { \c_@@_orig_decl_text_tl, \c_@@_auth_decl_text_tl }
+ { \tl_set_rescan:Nno ##1 { } {##1} }
+ }
+%</class>
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.8}{2021/09/15}{允许 \tn{emph} 对中文生效。}
+%
+% 声明 \tn{emph} 样式序列,使得中文强调以楷体显示。
+% \begin{macrocode}
+%<*class>
+\DeclareEmphSequence
+ {
+ \itshape \fdu@kai,
+ \upshape \CJKfamily { \CJKfamilydefault },
+ }
+%</class>
+% \end{macrocode}
+%
+% \changes{v0.6}{2017/10/28}{优化 \LuaTeX{} 下希腊字母、西里尔字母和带圈数字的
+% 显示(\pkg{ctex} v2.4.11 已默认进行处理)。}
+%
+% \subsection{页眉页脚}
+%
+% 清除默认页眉页脚格式。
+% \begin{macrocode}
+\fancyhf { }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_fancy_head:nn}
+% 页眉样式。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_fancy_head:nn #1#2
+ {
+ \fancyhead [#1]
+%<class> { \small \fdu@kai \nouppercase {#2} }
+%<class-en> { \small \itshape \nouppercase {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 构建页眉,要在单面或双面下分别设置。
+%
+% \cs{fancyhead} 的选项中,\opt{E} 和 \opt{O} 分别表示偶数(even)和奇数(odd), 而 \opt{L}、
+% \opt{R} 和 \opt{C} 则分别表示左(left)、右(right)和中间(center)。按照通常的排版规则,
+% 双面模式下,偶数页的中间页眉文字在左,奇数页则在右;单面模式下,左右页眉都会显示。
+% \begin{macrocode}
+\bool_if:NTF \g_@@_twoside_bool
+ {
+ \@@_fancy_head:nn { EL } { \leftmark }
+ \@@_fancy_head:nn { OR } { \rightmark }
+ }
+ {
+ \@@_fancy_head:nn { L } { \leftmark }
+ \@@_fancy_head:nn { R } { \rightmark }
+ }
+% \end{macrocode}
+%
+% 构建页脚,用来显示页码。选项 \opt{C} 表示居中(center)。
+% \begin{macrocode}
+\fancyfoot [ C ] { \small \thepage }
+% \end{macrocode}
+%
+% 关闭横线显示(未启用)。
+% \begin{macrocode}
+% \RenewDocumentCommand \headrulewidth { } { 0 pt }
+% \end{macrocode}
+%
+% \begin{macro}{\cleardoublepage}
+% 重定义 \tn{cleardoublepage},使得偶数页面在没有内容时也不显示页眉页脚,见
+% \url{https://tex.stackexchange.com/a/1683}。
+% \begin{macrocode}
+\RenewDocumentCommand \cleardoublepage { }
+ {
+ \clearpage
+ \bool_if:NT \g_@@_twoside_bool
+ {
+ \int_if_odd:nF \c@page
+ { \hbox:n { } \thispagestyle { empty } \newpage }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \pkg{ctex} 宏包使用 \opt{heading} 选项后,会把页面格式设置为 |headings|。
+% 因此必须在 \pkg{ctex} 调用之后重新设置 \cs{pagestyle} 为 |fancy|。
+% \begin{macrocode}
+\pagestyle { fancy }
+% \end{macrocode}
+%
+% \subsection{章节标题结构}
+%
+% |\keys_set:nn{ctex}| 实际相当于 \cs{ctexset}。
+% \begin{macrocode}
+\keys_set:nn { ctex }
+ {
+% \end{macrocode}
+% 设置章(chapter)、节(section)与小节(sub-section)标题样式。
+% 此处使用 \kvopt{fixskip}{true} 选项来抑制前后的多余间距。
+% \begin{macrocode}
+ chapter =
+ {
+%<class> format = \huge \normalfont \sffamily \centering,
+%<*class-en>
+ format = \centering,
+ nameformat = \LARGE \bfseries,
+ titleformat = \huge \bfseries,
+ aftername = \par \nobreak \vskip 10 pt,
+%</class-en>
+ beforeskip = 50 pt,
+ afterskip = 40 pt,
+ number = \@@_arabic:n { chapter },
+ fixskip = true
+ },
+ section =
+ {
+%<class> format = \Large \normalfont \sffamily \raggedright,
+%<class-en> format = \Large \bfseries \raggedright,
+ beforeskip = 3.5 ex plus 1.0 ex minus 0.2 ex,
+ afterskip = 2.7 ex plus 0.5 ex,
+ fixskip = true
+ },
+ subsection =
+ {
+%<class> format = \large \normalfont \sffamily \raggedright,
+%<class-en> format = \large \bfseries \raggedright,
+ beforeskip = 3.25 ex plus 1.0 ex minus 0.2 ex,
+ afterskip = 2.5 ex plus 0.3 ex,
+ fixskip = true
+ }
+ }
+% \end{macrocode}
+%
+% \changes{v0.7d}{2019/03/24}{优化目录、摘要、参考文献等的标题实现。}
+% \changes{v0.9}{2023/02/05}{在目录和书签中删除章标题中的 \tn{quad}。}
+%
+% \begin{macro}{\@@_sanitize_chapter_title:n}
+% 删除章标题中的 \tn{quad}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_sanitize_chapter_title:n #1
+ {
+ \tl_clear:N \l_@@_tmpa_tl
+ \tl_set:No \l_@@_tmpa_tl {#1}
+ \tl_remove_all:Nn \l_@@_tmpa_tl { \quad }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_chapter:n,\@@_chapter:V}
+% 手动生成章的标题,用于摘要、参考文献等。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_chapter:n #1
+ {
+ \@@_sanitize_chapter_title:n {#1}
+ \group_begin:
+ \ctexset { chapter / numbering = false }
+ \chapter [ \l_@@_tmpa_tl ] {#1}
+ \group_end:
+ \@@_chapter_header:n {#1}
+ }
+\cs_generate_variant:Nn \@@_chapter:n { V }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_chapter_no_toc:n,\@@_chapter_no_toc:V}
+% 目录自身不出现在目录中,需特别处理。参考
+% \url{https://tex.stackexchange.com/a/1821}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_chapter_no_toc:n #1
+ {
+ \chapter * {#1}
+ \@@_sanitize_chapter_title:n {#1}
+ \pdfbookmark [0] { \l_@@_tmpa_tl } { toc }
+ \@@_chapter_header:n {#1}
+ }
+\cs_generate_variant:Nn \@@_chapter_no_toc:n { V }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_chapter_header:n}
+% \changes{v0.8}{2022/01/18}{简化单页模式下页眉的实现方式。}
+% 单页模式下,目录、摘要、符号表等的页眉中间为相应标题,左右为空。这里通过居中的
+% \tn{leftmark} 实现。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_chapter_header:n #1
+ {
+ \bool_if:NTF \g_@@_twoside_bool
+ { \markboth {#1} {#1} }
+ { \markboth { \hfill #1 \hfill } { } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{脚注}
+%
+% \changes{v0.3}{2017/02/21}{支持脚注。}
+%
+% \subsubsection{编号样式}
+%
+% 各种脚注编号样式的名称。
+% \begin{macrocode}
+\clist_map_inline:nn
+ {
+ { plain } { plain },
+ { libertinus } { libertinus },
+ { libertinus_neg } { libertinus* },
+ { libertinus_sans } { libertinus-sans },
+ { pifont } { pifont },
+ { pifont_neg } { pifont* },
+ { pifont_sans } { pifont-sans },
+ { pifont_sans_neg } { pifont-sans* },
+ { xits } { xits },
+ { xits_sans } { xits-sans },
+ { xits_sans_neg } { xits-sans* }
+ }
+ { \@@_define_fn_style:nn #1 }
+% \end{macrocode}
+%
+% \begin{variable}{\l_@@_fn_style_tl}
+% 保存当前使用的脚注编号样式。
+% \begin{macrocode}
+\tl_new:N \l_@@_fn_style_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
+% \end{macrocode}
+%
+% \begin{macro}{style/footnote-style}
+% 脚注类型共分四大类:
+% \begin{itemize}
+% \item \opt{plain}:使用当前字体;
+% \item \opt{libertinus}:取自 Libertinus Serif 和 Libertinus Sans
+% 字体;
+% \item \opt{pifont}:使用 \pkg{pifont} 宏包;
+% \item \opt{xits}:取自 XITS 字体。
+% \end{itemize}
+% 不带任何修饰的为衬线阳文符号,带“|sans|”的为无衬线符号,带“|*|”的
+% 为阴文版本。
+% \begin{macrocode}
+ footnote-style .choices:nn =
+ {
+ plain,
+ libertinus, libertinus*, libertinus-sans,
+ pifont, pifont*, pifont-sans, pifont-sans*,
+ xits, xits-sans, xits-sans*
+ }
+% \end{macrocode}
+% \changes{v0.6}{2017/11/12}{不再依赖 XITS-Math 字体。}
+% 若使用 \opt{pifont} 类型,则需引入 \pkg{pifont} 宏包。
+% \begin{macrocode}
+ {
+ \tl_gset_eq:NN \l_@@_fn_style_tl \l_keys_choice_tl
+ \int_compare:nT { 5 <= \l_keys_choice_int <= 8 }
+ { \RequirePackage { pifont } }
+ },
+ footnote-style .value_required:n = true
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_libertinus:n}
+% \opt{libertinus} 普通版。\numrange{1}{20} 为数字,\numrange{21}{46}
+% 为小写英文字母,\numrange{47}{72} 为大写英文字母。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_libertinus:n #1
+ {
+ \int_compare:nTF { #1 >= 21 }
+ {
+ \int_compare:nTF { #1 >= 47 }
+ { \@@_symbol:n { \int_eval:n { "24B6 - 47 + #1 } } }
+ { \@@_symbol:n { \int_eval:n { "24D0 - 21 + #1 } } }
+ }
+ { \@@_symbol:n { \int_eval:n { "2460 - 1 + #1 } } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_libertinus_neg:n}
+% \opt{libertinus} 阴文衬线版。只含 \numrange{1}{20}。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_libertinus_neg:n #1
+ {
+ \int_compare:nTF { #1 >= 11 }
+ { \@@_symbol:n { \int_eval:n { "24EB - 11 + #1 } } }
+ { \@@_symbol:n { \int_eval:n { "2776 - 1 + #1 } } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_pifont:n}
+% \opt{pifont} 普通版。以下四种都只包含 \numrange{1}{10}。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_pifont:n #1
+ { \ding { \int_eval:n { 171 + #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_pifont_neg:n}
+% \opt{pifont} 阴文衬线版。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_pifont_neg:n #1
+ { \ding { \int_eval:n { 181 + #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_pifont_sans:n}
+% \opt{pifont} 阳文无衬线版。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_pifont_sans:n #1
+ { \ding { \int_eval:n { 191 + #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_pifont_sans_neg:n}
+% \opt{pifont} 阴文无衬线版。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_pifont_sans_neg:n #1
+ { \ding { \int_eval:n { 201 + #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_xits:n}
+% \opt{xits} 普通版。\numrange{1}{9} 为数字,\numrange{10}{35}
+% 为小写英文字母,\numrange{36}{61} 为大写英文字母。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_xits:n #1
+ {
+ \int_compare:nTF { #1 >= 10 }
+ {
+ \int_compare:nTF { #1 >= 36 }
+ { \@@_symbol:n { \int_eval:n { "24B6 - 36 + #1 } } }
+ { \@@_symbol:n { \int_eval:n { "24D0 - 10 + #1 } } }
+ }
+ { \@@_symbol:n { \int_eval:n { "2460 - 1 + #1 } } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_xits_sans:n}
+% \opt{xits} 阳文无衬线版。只包含 \numrange{1}{10}。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_xits_sans:n #1
+ { \@@_symbol:n { \int_eval:n { "2780 - 1 + #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fn_symbol_xits_sans_neg:n}
+% \opt{xits} 阴文无衬线版。也只包含 \numrange{1}{10}。
+% \begin{macrocode}
+\cs_new:Npn \@@_fn_symbol_xits_sans_neg:n #1
+ { \@@_symbol:n { \int_eval:n { "278A - 1 + #1 } } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\thefootnote}
+% \changes{v0.7}{2018/01/17}{改为可完全展开的命令。}
+% 重定义脚注编号。
+% \begin{macrocode}
+\cs_set:Npn \thefootnote { \fdu_footnote_number:N \c@footnote }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fdu_footnote_number:N}
+% 脚注编号样式。
+% \begin{macrocode}
+\cs_new:Npn \fdu_footnote_number:N #1
+ {
+ \tl_case:NnF \l_@@_fn_style_tl
+ {
+% \end{macrocode}
+% \opt{plain} 类型直接使用计数器 |footnote| 的值。
+% \begin{macrocode}
+ \c_@@_fn_style_plain_tl
+ { \int_use:N #1 }
+% \end{macrocode}
+% \opt{libertinus} 类型需要使用 Libertinus Serif 或
+% Libertinus Sans 字体。
+% \begin{macrocode}
+ \c_@@_fn_style_libertinus_tl
+ {
+ \fontspec { LibertinusSerif-Regular.otf }
+ \@@_fn_symbol_libertinus:n {#1}
+ }
+ \c_@@_fn_style_libertinus_neg_tl
+ {
+ \fontspec { LibertinusSerif-Regular.otf }
+ \@@_fn_symbol_libertinus_neg:n {#1}
+ }
+ \c_@@_fn_style_libertinus_sans_tl
+ {
+ \fontspec { LibertinusSans-Regular.otf }
+ \@@_fn_symbol_libertinus:n {#1}
+ }
+% \end{macrocode}
+% \opt{pifont} 类型无需进行额外的操作。
+% \begin{macrocode}
+ \c_@@_fn_style_pifont_tl
+ { \@@_fn_symbol_pifont:n {#1} }
+ \c_@@_fn_style_pifont_neg_tl
+ { \@@_fn_symbol_pifont_neg:n {#1} }
+ \c_@@_fn_style_pifont_sans_tl
+ { \@@_fn_symbol_pifont_sans:n {#1} }
+ \c_@@_fn_style_pifont_sans_neg_tl
+ { \@@_fn_symbol_pifont_sans_neg:n {#1} }
+% \end{macrocode}
+% \opt{xits} 类型需要临时切换数学字体。
+% \begin{macrocode}
+ \c_@@_fn_style_xits_tl
+ {
+ \fontspec { XITS-Regular.otf }
+ \@@_fn_symbol_xits:n {#1}
+ }
+ \c_@@_fn_style_xits_sans_tl
+ {
+ \fontspec { XITS-Regular.otf }
+ \@@_fn_symbol_xits_sans:n {#1}
+ }
+ \c_@@_fn_style_xits_sans_neg_tl
+ {
+ \fontspec { XITS-Regular.otf }
+ \@@_fn_symbol_xits_sans_neg:n {#1}
+ }
+ }
+% \end{macrocode}
+% 变量 \cs{l_@@_fn_style_tl} 保存的类型未知时,默认使用 \opt{plain}
+% 类型。
+% \begin{macrocode}
+ { \int_use:N #1 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{整体样式}
+%
+% \begin{macro}[int]{\@makefntext}
+% \changes{v0.7}{2018/01/18}{简化实现,兼容 \pkg{fancyvrb} 宏包。
+% 不再使用悬挂缩进。}
+% 重定义内部脚注文字命令,使脚注编号不使用上标,宽度为 \qty{1.5}{em}。
+% 见 \url{http://tex.stackexchange.com/q/19844} 和
+% \url{https://www.zhihu.com/question/53030087}。
+% \begin{macrocode}
+\cs_set:Npn \@makefntext #1
+ {
+ \mode_leave_vertical:
+ \hbox_to_wd:nn { 1.5 em } { \@thefnmark \hfil }
+ #1
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{定理环境}
+%
+% \changes{v0.3}{2017/05/07}{新增定理环境。}
+%
+% \begin{variable}{\c_@@_thm_style_plain_clist,
+% \c_@@_thm_style_break_clist}
+% 保存 \opt{plain}、\opt{break} 两种类型的定理样式名称。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_thm_style_plain_clist
+ { plain, margin, change }
+\clist_const:Nn \c_@@_thm_style_break_clist
+ { break, marginbreak, changebreak }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_thm_style_tl,
+% \l_@@_thm_header_font_tl,
+% \l_@@_thm_body_font_tl,
+% \l_@@_thm_qed_tl,
+% \l_@@_thm_counter_tl}
+% 定理所需的一些字段。
+% \begin{macrocode}
+\tl_new:N \l_@@_thm_style_tl
+\tl_new:N \l_@@_thm_header_font_tl
+\tl_new:N \l_@@_thm_body_font_tl
+\tl_new:N \l_@@_thm_qed_tl
+\tl_new:N \l_@@_thm_counter_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{theorem/style,
+% theorem/header-font,
+% theorem/body-font,
+% theorem/qed,
+% theorem/counter}
+% 定义 |fdu/theorem| 键值类。
+% \begin{macrocode}
+\keys_define:nn { fdu / theorem }
+ {
+ style .tl_set:N = \l_@@_thm_style_tl,
+ header-font .tl_set:N = \l_@@_thm_header_font_tl,
+ body-font .tl_set:N = \l_@@_thm_body_font_tl,
+ qed .tl_set:N = \l_@@_thm_qed_tl,
+ counter .tl_set:N = \l_@@_thm_counter_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_thm_ntheorem_style:n,\@@_thm_ntheorem_new:w}
+% 拷贝 \pkg{ntheorem} 命令。
+% \begin{macrocode}
+\cs_new_eq:NN \@@_thm_ntheorem_style:n \theoremstyle
+\cs_new_eq:NN \@@_thm_ntheorem_new:w \newtheorem
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.7}{2017/12/12}{原 \cs{fdunewtheorem} 命令更名为
+% \cs{new\-the\-orem}。}
+%
+% \begin{macro}{\newtheorem}
+% \changes{v0.9}{2023/02/08}{改用 \cs{DeclareDocumentCommand} 定义。}
+% 定义新的定理环境。
+% \begin{macrocode}
+\DeclareDocumentCommand \newtheorem { s o m m }
+ {
+% \end{macrocode}
+% 默认情况下,由 \cs{newtheorem*} 创建的定理其证毕符号为 \cs{QED},
+% 而由 \cs{new\-the\-orem} 创建的则不带证毕符号。符号 \cs{QED} 由
+% \pkg{unicode-math} 宏包提供。
+% \begin{macrocode}
+ \IfBooleanTF {#1}
+ { \tl_set:Nn \l_@@_thm_qed_tl { \ensuremath { \QED } } }
+ { \tl_set:Nn \l_@@_thm_qed_tl { } }
+% \end{macrocode}
+% 设置默认样式为 \opt{plain}。
+% \begin{macrocode}
+% TODO: (2017-12-07) Move to interface
+ \tl_set:Nn \l_@@_thm_style_tl { plain }
+% \end{macrocode}
+% 处理可选参数。利用 |fdu/theorem| 键值对设置,并按此修改证毕符号、
+% 定理头字体和定理正文字体。
+% \begin{macrocode}
+ \IfValueT {#2} { \keys_set:nn { fdu / theorem } {#2} }
+ \fdu_thm_set_header_font:V \l_@@_thm_header_font_tl
+ \fdu_thm_set_body_font:V \l_@@_thm_body_font_tl
+ \fdu_thm_set_qed:V \l_@@_thm_qed_tl
+% \end{macrocode}
+% \cs{newtheorem} 负责创建编号定理,而 \cs{newtheorem*}
+% 则负责创建无编号定理。以下分这两种情况处理。
+% \begin{macrocode}
+ \IfBooleanTF {#1}
+ {
+% \end{macrocode}
+% 带 |*| 的版本原则上只接受 \opt{plain} 和 \opt{break} 两种样式,
+% 其余样式将被转换成这两者其中之一。
+% \begin{macrocode}
+ \clist_if_in:nVF { plain, break } \l_@@_thm_style_tl
+ {
+ \clist_if_in:NVTF
+ \c_@@_thm_style_plain_clist \l_@@_thm_style_tl
+ { \@@_thm_redefine_style:n { plain } }
+ {
+ \clist_if_in:NVTF
+ \c_@@_thm_style_break_clist \l_@@_thm_style_tl
+ { \@@_thm_redefine_style:n { break } }
+ {
+ \@@_error:nx { unknown-theorem-style }
+ { \l_@@_thm_style_tl }
+ }
+ }
+ }
+% \end{macrocode}
+% \pkg{ntheorem} 宏包提供的无编号定理带有 |nonumber| 前缀,
+% 这里将其加上。
+% \begin{macrocode}
+ \tl_put_left:Nn \l_@@_thm_style_tl { nonumber }
+ \fdu_thm_new_no_number:Vxx \l_@@_thm_style_tl {#3} {#4}
+ }
+ {
+% \end{macrocode}
+% 不带 |*| 的版本支持不含“|nonumber|”的所有定理样式。
+% \begin{macrocode}
+ \clist_clear:N \l_@@_tmpa_clist
+ \clist_concat:NNN \l_@@_tmpa_clist
+ \c_@@_thm_style_plain_clist \c_@@_thm_style_break_clist
+ \clist_if_in:NVF \l_@@_tmpa_clist \l_@@_thm_style_tl
+ {
+ \@@_error:nx { unknown-theorem-style }
+ { \l_@@_thm_style_tl }
+ }
+ \fdu_thm_new:VVxx \l_@@_thm_style_tl \l_@@_thm_counter_tl
+ {#3} {#4}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_thm_redefine_style:n}
+% 重定义定理样式,并给出警告。
+% \begin{macrocode}
+\cs_new:Npn \@@_thm_redefine_style:n #1
+ {
+ \@@_warning:nxx { redefine-theorem-style }
+ {#1} { \l_@@_thm_style_tl }
+ \tl_set:Nn \l_@@_thm_style_tl {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 提示信息。
+% \begin{macrocode}
+\@@_msg_new:nn { redefine-theorem-style }
+ { Theorem~ style~ "#2"~ will~ be~ redefined~ as~ "#1". }
+\@@_msg_new:nn { unknown-theorem-style }
+ { Theorem~ style~ "#1"~ is~ unknown. }
+% \end{macrocode}
+%
+% \begin{macro}{\fdu_thm_new:nnnn,\fdu_thm_new:VVxx}
+% 带编号的定理环境。
+% \begin{arguments}
+% \item 样式
+% \item 计数器
+% \item 定理环境名称
+% \item 定理头文字
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn \fdu_thm_new:nnnn #1#2#3#4
+ {
+ \@@_thm_ntheorem_style:n {#1}
+ \@@_thm_ntheorem_new:w {#3} {#4} [#2]
+ }
+\cs_generate_variant:Nn \fdu_thm_new:nnnn { VVxx }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fdu_thm_new_no_number:nnn,
+% \fdu_thm_new_no_number:Vxx}
+% 不带编号的定理环境。
+% \begin{arguments}
+% \item 样式
+% \item 定理环境名称
+% \item 定理头文字
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn \fdu_thm_new_no_number:nnn #1#2#3
+ {
+ \@@_thm_ntheorem_style:n {#1}
+ \@@_thm_ntheorem_new:w {#2} {#3}
+ }
+\cs_generate_variant:Nn \fdu_thm_new_no_number:nnn { Vxx }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\fdu_thm_set_qed:n,
+% \fdu_thm_set_header_font:n,
+% \fdu_thm_set_body_font:n,
+% \fdu_thm_set_qed:V,
+% \fdu_thm_set_header_font:V,
+% \fdu_thm_set_body_font:V}
+% 封装 \pkg{ntheorem} 宏包提供的若干命令,分别用以设置证毕符号、
+% 定理头字体和定理正文字体。
+% \begin{macrocode}
+\cs_new:Npn \fdu_thm_set_qed:n #1 { \theoremsymbol {#1} }
+\cs_new:Npn \fdu_thm_set_header_font:n #1 { \theoremheaderfont {#1} }
+\cs_new:Npn \fdu_thm_set_body_font:n #1 { \theorembodyfont {#1} }
+\cs_generate_variant:Nn \fdu_thm_set_qed:n { V }
+\cs_generate_variant:Nn \fdu_thm_set_header_font:n { V }
+\cs_generate_variant:Nn \fdu_thm_set_body_font:n { V }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{图表绘制;浮动体}
+%
+% \changes{v0.3}{2017/07/09}{支持浮动体。}
+%
+% 分别设置浮动体 \env{figure} 和 \env{table} 的标题样式。
+% \begin{macrocode}
+\captionsetup [ figure ]
+ {
+ font = small,
+ labelsep = quad
+ }
+\captionsetup [ table ]
+ {
+ font = { small, sf },
+ labelsep = quad
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\thefigure,\thetable}
+% \changes{v0.7}{2018/01/17}{改为可完全展开的命令。}
+% \changes{v0.8}{2021/03/10}{直接调用 \tn{thechapter} 使得附录中的图表编号正确显示。}
+% 重定义图表编号。
+% \begin{macrocode}
+\cs_set:Npn \thefigure
+ { \thechapter - \@@_arabic:n { figure } }
+\cs_set:Npn \thetable
+ { \thechapter - \@@_arabic:n { table } }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{封面}
+%
+% \subsubsection{信息录入}
+%
+% \begin{variable}{\l_@@_info_title_tl,
+% \l_@@_info_date_tl,
+% \l_@@_info_author_tl,
+% \l_@@_info_supervisor_tl,
+% \l_@@_info_department_tl,
+% \l_@@_info_major_tl,
+% \l_@@_info_student_id_tl,
+% \l_@@_info_school_id_tl,
+% \l_@@_info_clc_tl,
+% \l_@@_info_jel_tl,
+% \l_@@_info_instructors_clist,
+% \l_@@_info_keywords_clist}
+% 封面所需的一些字段。
+% \begin{macrocode}
+\clist_map_inline:nn
+ {
+ title, date, author, supervisor, department, major, student_id,
+ school_id, clc, jel
+ }
+ { \tl_new:c { l_@@_info_ #1 _tl } }
+\clist_new:N \l_@@_info_instructors_clist
+\clist_new:N \l_@@_info_keywords_clist
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_info_title_en_tl,
+% \l_@@_info_author_en_tl,
+% \l_@@_info_supervisor_en_tl,
+% \l_@@_info_department_en_tl,
+% \l_@@_info_major_en_tl,
+% \l_@@_info_keywords_en_clist}
+% 对应的英文字段。
+% \begin{macrocode}
+\clist_map_inline:nn
+ { title, author, supervisor, department, major }
+ { \tl_new:c { l_@@_info_ #1 _en_tl } }
+\clist_new:N \l_@@_info_keywords_en_clist
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_info_degree_type_int}
+% 学位类型。1 为学术学位,2 为专业学位。
+% \begin{macrocode}
+\int_new:N \l_@@_info_degree_type_int
+% \end{macrocode}
+% \end{variable}
+%
+% \changes{v0.9}{2023/02/12}{删除论文标题中的 \tn{\textbackslash} 和汉字间的空格。}
+%
+% \begin{variable}{\l_@@_info_title_sanitized_tl,
+% \l_@@_info_title_en_sanitized_tl}
+% 处理后的论文标题。
+% \begin{macrocode}
+\tl_new:N \l_@@_info_title_sanitized_tl
+\tl_new:N \l_@@_info_title_en_sanitized_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_set_title:nn}
+% 设置论文标题,并删除其中的 |\\| 和汉字间的空格。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_set_title:nn #1#2
+ {
+ \tl_set:cn { l_@@_info_ #1 _tl } {#2}
+ \tl_set:cn { l_@@_info_ #1 _sanitized_tl } {#2}
+ \tl_replace_all:cnn { l_@@_info_ #1 _sanitized_tl } { \\ } { ~ }
+ \regex_replace_all:nnc
+ { \s+ } { \ }
+ { l_@@_info_ #1 _sanitized_tl }
+ \regex_replace_all:nnc
+ { ([\x{4e00}-\x{9fff}]) \s+ ([\x{4e00}-\x{9fff}]) } { \1 \2 }
+ { l_@@_info_ #1 _sanitized_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 定义 |fdu/info| 键值类。
+% \begin{macrocode}
+\keys_define:nn { fdu / info }
+ {
+% \end{macrocode}
+%
+% \changes{v0.7}{2018/02/01}{新增 \opt{info/degree} 选项。}
+%
+% \begin{macro}{info/degree}
+% 学位类型。只对硕士论文有效。
+% \begin{macrocode}
+ degree .choices:nn =
+ { academic, professional }
+ { \int_set_eq:NN \l_@@_info_degree_type_int \l_keys_choice_int },
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/title,info/title*}
+% 论文题目。以下带星号的项目均表示相应的英文字段。
+% \begin{macrocode}
+ title .code:n = { \@@_set_title:nn { title } {#1} },
+ title* .code:n = { \@@_set_title:nn { title_en } {#1} },
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/date}
+% 论文完成日期。
+% \begin{macrocode}
+ date .tl_set:N = \l_@@_info_date_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/author,info/author*}
+% 作者姓名。
+% \begin{macrocode}
+ author .tl_set:N = \l_@@_info_author_tl,
+ author* .tl_set:N = \l_@@_info_author_en_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/supervisor,info/supervisor*}
+% 导师姓名。
+% \begin{macrocode}
+ supervisor .tl_set:N = \l_@@_info_supervisor_tl,
+% supervisor* .tl_set:N = \l_@@_info_supervisor_en_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/instructors}
+% 指导小组成员。
+% \begin{macrocode}
+ instructors .clist_set:N = \l_@@_info_instructors_clist,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/department,info/department*}
+% 院系。
+% \begin{macrocode}
+ department .tl_set:N = \l_@@_info_department_tl,
+% department* .tl_set:N = \l_@@_info_department_en_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/major,info/major*}
+% 专业。
+% \begin{macrocode}
+ major .tl_set:N = \l_@@_info_major_tl,
+% major* .tl_set:N = \l_@@_info_major_en_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/student-id}
+% 学号。
+% \begin{macrocode}
+ student-id .tl_set:N = \l_@@_info_student_id_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/school-id}
+% 学校代码。
+% \begin{macrocode}
+ school-id .tl_set:N = \l_@@_info_school_id_tl,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/keywords,info/keywords*}
+% 论文关键字。
+% \begin{macrocode}
+ keywords .clist_set:N = \l_@@_info_keywords_clist,
+ keywords* .clist_set:N = \l_@@_info_keywords_en_clist,
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.8}{2021/09/16}{新增 \opt{info/jel} 选项。}
+%
+% \begin{macro}{info/clc,info/jel}
+% 中图分类号和 JEL 分类号。
+% \begin{macrocode}
+ clc .tl_set:N = \l_@@_info_clc_tl,
+ jel .tl_set:N = \l_@@_info_jel_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.4}{2017/08/10}{新增 \opt{style/logo} 与
+% \opt{style/logo-size} 选项。}
+%
+% \begin{variable}{\l_@@_cover_logo_tl,\l_@@_cover_logo_size_clist}
+% \begin{macrocode}
+\tl_new:N \l_@@_cover_logo_tl
+\clist_new:N \l_@@_cover_logo_size_clist
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{style/logo,style/logo-size}
+% 校名图片的文件名和尺寸。
+% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
+ logo .tl_set:N = \l_@@_cover_logo_tl,
+ logo-size .clist_set:N = \l_@@_cover_logo_size_clist
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{密级}
+%
+% \changes{v0.3}{2017/07/04}{新增 \opt{info/secret-level} 与
+% \opt{info/secret-year} 选项。}
+%
+% \begin{variable}{\l_@@_secret_bool}
+% 是否显示密级。
+% \begin{macrocode}
+\bool_new:N \l_@@_secret_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_info_secret_level_tl}
+% 保存当前的密级。
+% \begin{macrocode}
+\tl_new:N \l_@@_info_secret_level_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macrocode}
+\keys_define:nn { fdu / info }
+ {
+% \end{macrocode}
+%
+% \begin{macro}{info/secret-level}
+% \changes{v0.6}{2017/11/11}{不再依赖 XITS-Math 字体。}
+% 密级。\opt{none} 表示不涉密,\opt{i}、\opt{ii}、\opt{iii} 分别为
+% 秘密、机密、绝密。
+% \begin{macrocode}
+ secret-level .choices:nn =
+ { none, i, ii, iii }
+ {
+ \int_compare:nTF { \l_keys_choice_int >= 2 }
+ {
+ \bool_set_true:N \l_@@_secret_bool
+ \tl_set:Nn \l_@@_info_secret_level_tl
+ {
+ \clist_item:Nn \c_@@_secret_clist
+ { \l_keys_choice_int - 1 }
+ }
+ }
+ { \bool_set_false:N \l_@@_secret_bool }
+ },
+ secret-level .value_required:n = true,
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{info/secret-year}
+% 保密年限。
+% \begin{macrocode}
+ secret-year .tl_set:N = \l_@@_info_secret_year_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{定义内部函数}
+%
+% \begin{macro}{\@@_spread_box:nn,\@@_spread_box:no}
+% 分散对齐的水平盒子。
+% \begin{arguments}
+% \item 宽度
+% \item 内容
+% \end{arguments}
+% 利用 \cs{tl_map_inline:nn} 在字符间插入 \tn{hfil};紧随其后的 \tn{unskip}
+% 将会去掉最后一个 \tn{hfil}。见 \url{https://tex.stackexchange.com/q/169689}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_spread_box:nn #1#2
+ {
+ \mode_leave_vertical:
+ \hbox_to_wd:nn {#1} { \tl_map_inline:nn {#2} { ##1 \hfil } \unskip }
+ }
+\cs_generate_variant:Nn \@@_spread_box:nn { no }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_center_box:nn,\@@_center_box:Vn}
+% 居中对齐的水平盒子。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_center_box:nn #1#2
+ {
+ \mode_leave_vertical:
+ \hbox_to_wd:nn {#1} { \hfil #2 \hfil }
+ }
+\cs_generate_variant:Nn \@@_center_box:nn { Vn }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fixed_width_box:nn}
+% 限宽盒子(允许换行)。
+% \begin{macrocode}
+\cs_new:Npn \@@_fixed_width_box:nn #1#2
+ { \parbox {#1} {#2} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_fixed_width_center_box:nn}
+% 居中对齐的限宽盒子(允许换行)。
+% \begin{macrocode}
+\cs_new:Npn \@@_fixed_width_center_box:nn #1#2
+ { \parbox {#1} { \centering #2 } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_text_width:Nn,\@@_get_text_width:NV}
+% 获取文本宽度,并存入 |dim| 型变量。
+% \begin{arguments}
+% \item |dim| 型变量
+% \item 内容
+% \end{arguments}
+% \begin{macrocode}
+\cs_new:Npn \@@_get_text_width:Nn #1#2
+ {
+ \hbox_set:Nn \l_@@_tmpa_box {#2}
+ \dim_set:Nn #1 { \box_wd:N \l_@@_tmpa_box }
+ }
+\cs_generate_variant:Nn \@@_get_text_width:Nn { NV }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_blank_underline:n}
+% \changes{v0.4}{2017/08/14}{改用 \tn{rule} 绘制下划线,不再依赖
+% \pkg{ulem} 宏包。}
+% 下划线占位符。|#1|: 长度。
+% \begin{macrocode}
+\cs_new:Npn \@@_blank_underline:n #1
+ { \rule [ -0.5 ex ] {#1} { 0.4 pt } }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_line_spread:N,\@@_line_spread:n}
+% 设置行距。|#1|: 行距倍数 |fp| 变量。
+% \begin{macrocode}
+\cs_new:Npn \@@_line_spread:N #1
+ { \linespread { \fp_use:N #1 } \selectfont }
+\cs_new:Npn \@@_line_spread:n #1
+ { \linespread {#1} \selectfont }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{封面各部件}
+%
+% \changes{v0.5}{2017/09/19}{使用 \pkg{expl3} 以及内部函数改写
+% 封面,减少对 \LaTeXe{} 的依赖。}
+%
+% \begin{macro}{\@@_cover_id:,\@@_cover_id_aux:n}
+% 右上角的学校代码和学号。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_id:
+ {
+ \@@_fixed_width_box:nn { 120 pt }
+ {
+ \bool_if:NT \l_@@_secret_bool
+ {
+ \group_begin:
+ \sffamily
+ \@@_cover_id_aux:n { secret_level }
+ \c_@@_name_secret_star_tl
+ \l_@@_info_secret_year_tl
+ \group_end:
+ \par
+ }
+ \@@_cover_id_aux:n { school_id } \par
+ \@@_cover_id_aux:n { student_id }
+ }
+% \end{macrocode}
+% 插入一个宽度为负的水平盒子以减少右侧边距。
+% \begin{macrocode}
+ \hbox_to_wd:nn { -24 pt } { }
+ }
+\cs_new:Npn \@@_cover_id_aux:n #1
+ {
+ \tl_use:c { c_@@_name_ #1 _tl }
+ \c_@@_fwid_colon_tl
+ \tl_use:c { l_@@_info_ #1 _tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_logo:}
+% 插入校名图片。根据参数 \opt{width} 和 \opt{height} 是否为空依次
+% 判断。\cs{l_@@_cover_logo_size_clist} 中超过两个的参数将被忽略。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_logo:
+ {
+ \clist_pop:NN \l_@@_cover_logo_size_clist \l_@@_tmpa_tl
+ \clist_pop:NNTF \l_@@_cover_logo_size_clist \l_@@_tmpb_tl
+ {
+ \tl_if_empty:NTF \l_@@_tmpa_tl
+ { \includegraphics [ height = \l_@@_tmpb_tl ] }
+ {
+ \includegraphics
+ [ width = \l_@@_tmpa_tl, height = \l_@@_tmpb_tl ]
+ }
+ }
+ { \includegraphics [ width = \l_@@_tmpa_tl ] }
+ { \l_@@_cover_logo_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_type:}
+% 论文类型。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_type:
+ {
+ \tl_set:Nx \l_@@_tmpa_tl
+ {
+ \clist_item:Nn \c_@@_thesis_type_clist
+ { \g_@@_thesis_type_int }
+ }
+ \@@_spread_box:no { 0.45 \textwidth } { \l_@@_tmpa_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_degree:}
+% \changes{v0.7c}{2019/03/12}{允许博士学位论文使用学位类型。}
+% 学位类型。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_degree:
+ {
+ \int_compare:nT { \g_@@_thesis_type_int != 3 }
+ {
+ \c_@@_fwid_left_paren_tl
+ \clist_item:Nn \c_@@_degree_type_clist
+ { \l_@@_info_degree_type_int }
+ \c_@@_fwid_right_paren_tl
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_info_left:n}
+% 信息栏左侧字段。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_info_left:n #1
+ {
+ \int_case:nn { \l_@@_info_degree_type_int }
+ {
+ { 1 } { \_@@_spread_box:nn { 6 em } {#1} }
+ { 2 } { \_@@_spread_box:nn { 9 em } {#1} }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\c_@@_cover_info_align_tl}
+% 信息栏对齐格式:左右两栏均居中,中间以冒号分隔。
+% \begin{macrocode}
+\tl_const:Nn \c_@@_cover_info_align_tl
+ { c @ { \c_@@_fwid_colon_tl } c }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_cover_info:}
+% \changes{v0.8}{2021/09/21}{调整专业学位的封面信息栏。}
+% \changes{v0.9}{2023/02/05}{封面信息栏改用表格实现。}
+% 信息栏。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_info:
+ {
+ \group_begin:
+ \zihao { 4 }
+% \end{macrocode}
+% 专业学位与学术学位对应的左侧字段有所不同,这里统一存入 \cs{c_@@_name_major_tl}。
+% \begin{macrocode}
+ \int_compare:nNnT { \l_@@_info_degree_type_int } = { 2 }
+ {
+ \tl_set_eq:NN
+ \c_@@_name_major_tl \c_@@_name_major_professional_tl
+ }
+% \end{macrocode}
+% 将信息栏的每一行存入 |clist| 变量中。
+% \begin{macrocode}
+ \clist_clear:N \l_@@_tmpa_clist
+ \clist_map_inline:nn { department, major, author, supervisor, date }
+ {
+ \clist_gput_right:Nn \l_@@_tmpa_clist
+ {
+ \exp_args:Nx \@@_cover_info_left:n
+ { \tl_use:c { c_@@_name_ ##1 _tl } }
+ &
+ \tl_use:c { l_@@_info_ ##1 _tl }
+ }
+ }
+% \end{macrocode}
+% 通过 \env{tabular} 环境输出。
+% \begin{macrocode}
+ \begin{tabular} { \c_@@_cover_info_align_tl }
+ \clist_use:Nn \l_@@_tmpa_clist { \\ [ 1 ex ] }
+ \end{tabular}
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_cover_signature:N}
+% 签名行。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_signature:N #1
+ {
+ \clist_map_inline:Nn #1
+ {
+ ##1 \c_@@_fwid_colon_tl
+ \@@_blank_underline:n { 6 em }
+ \@@_quad:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{封面模板}
+%
+% \changes{v0.7}{2018/02/27}{使用 \pkg{xtemplate} 重构封面布局。}
+%
+% 声明封面对象。不需要带参数。
+% \begin{macrocode}
+%<@@=fdu_cover>
+\DeclareObjectType { fdu / cover } { \c_zero_int }
+% \end{macrocode}
+%
+% \begin{macro}{\DeclareCoverTemplate,\fdu_cover_declare_template:nn}
+% 声明封面模板。
+% \begin{arguments}
+% \item 模板名称
+% \item 封面部件列表,以逗号分隔
+% \end{arguments}
+% \begin{macrocode}
+\NewDocumentCommand \DeclareCoverTemplate { m m }
+ { \fdu_cover_declare_template:nn {#1} {#2} }
+\cs_new_protected:Npn \fdu_cover_declare_template:nn #1#2
+ {
+ \tl_set:Nn \l_@@_template_tl {#1}
+% \end{macrocode}
+% 构建模板接口。
+% \begin{macrocode}
+ \@@_declare_template_interface:nx {#1}
+ {
+ format : tokenlist,
+ top-skip : skip,
+ bottom-skip : skip,
+ \clist_map_function:nN {#2} \@@_key_type:n
+ }
+% \end{macrocode}
+% 声明所用变量。
+% \begin{macrocode}
+ \tl_new:c { l_@@ / #1 / format_tl }
+ \skip_new:c { l_@@ / #1 / top_skip }
+ \skip_new:c { l_@@ / #1 / bottom_skip }
+ \clist_map_inline:nn {#2}
+ {
+ \tl_new:c { l_@@ / #1 / ##1 / content_tl }
+ \tl_new:c { l_@@ / #1 / ##1 / format_tl }
+ \skip_new:c { l_@@ / #1 / ##1 / bottom_skip }
+ }
+% \end{macrocode}
+% 声明模板代码。^^A 以下名字空间为 `fdu_cover' 而非 `fdu'
+% \begin{macrocode}
+ \@@_declare_template_code:nxn {#1}
+ {
+ format = \exp_not:c { l_@@ / #1 / format_tl },
+ top-skip = \use:c { l_@@ / #1 / top_skip },
+ bottom-skip = \use:c { l_@@ / #1 / bottom_skip },
+ \clist_map_function:nN {#2} \@@_key_binding:n
+ }
+ {
+ \AssignTemplateKeys
+ \tl_use:c { l_@@ / #1 / format_tl }
+ \__fdu_vspace:c { l_@@ / #1 / top_skip }
+ \clist_map_inline:nn {#2}
+ {
+ \use:c { @@ / #1 / ####1 / align:n }
+ {
+ \tl_use:c { l_@@ / #1 / ####1 / format_tl }
+ \tl_use:c { l_@@ / #1 / ####1 / content_tl }
+ \par
+ }
+ \__fdu_vspace:c { l_@@ / #1 / ####1 / bottom_skip }
+ }
+ \__fdu_vspace:c { l_@@ / #1 / bottom_skip }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\l_@@_template_tl}
+% 保存模板名称。
+% \begin{macrocode}
+\tl_new:N \l_@@_template_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_declare_template_interface:nn,
+% \@@_declare_template_code:nnn,
+% \@@_declare_template_interface:nx,
+% \@@_declare_template_code:nxn}
+% 为了展开的方便,这里需要封装 \pkg{xtemplate} 的一些函数。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_declare_template_interface:nn #1#2
+ { \DeclareTemplateInterface { fdu / cover } {#1} { \c_zero_int } {#2} }
+\cs_new_protected:Npn \@@_declare_template_code:nnn #1#2#3
+ { \DeclareTemplateCode { fdu / cover } {#1} { \c_zero_int } {#2} {#3} }
+\cs_generate_variant:Nn \@@_declare_template_interface:nn { nx }
+\cs_generate_variant:Nn \@@_declare_template_code:nnn { nxn }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_key_type:n}
+% \begin{macrocode}
+\cs_new:Npn \@@_key_type:n #1
+ {
+ #1 / content : tokenlist,
+ #1 / format : tokenlist,
+ #1 / bottom-skip : skip,
+ #1 / align : choice { left, right, center, normal } = normal,
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_key_binding:n}
+% \begin{macrocode}
+\cs_new:Npn \@@_key_binding:n #1
+ {
+ #1 / content =
+ \exp_not:c
+ { l_@@ / \l_@@_template_tl / #1 / content_tl },
+ #1 / format =
+ \exp_not:c
+ { l_@@ / \l_@@_template_tl / #1 / format_tl },
+ #1 / bottom-skip =
+ \exp_not:c
+ { l_@@ / \l_@@_template_tl / #1 / bottom_skip },
+ #1 / align =
+ {
+ left =
+ \exp_not:N \cs_set_protected:cpn
+ { @@ / \l_@@_template_tl / #1 / align:n }
+ \exp_not:n {##1}
+ {
+ \exp_not:n
+ {
+ \group_begin:
+ \flushleft ##1 \endflushleft
+ \group_end:
+ }
+ },
+ right =
+ \exp_not:N \cs_set_protected:cpn
+ { @@ / \l_@@_template_tl / #1 / align:n }
+ \exp_not:n {##1}
+ {
+ \exp_not:n
+ {
+ \group_begin:
+ \flushright ##1 \endflushright
+ \group_end:
+ }
+ },
+ center =
+ \exp_not:N \cs_set_protected:cpn
+ { @@ / \l_@@_template_tl / #1 / align:n }
+ \exp_not:n {##1}
+ {
+ \exp_not:n
+ {
+ \group_begin:
+ \center ##1 \endcenter
+ \group_end:
+ }
+ },
+ normal =
+ \exp_not:N \cs_set_protected:cpn
+ { @@ / \l_@@_template_tl / #1 / align:n }
+ \exp_not:n {##1}
+ { \exp_not:n { \group_begin: ##1 \group_end: } }
+ },
+ }
+%<@@=fdu>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{绘制封面}
+%
+% \changes{v0.9}{2023/02/18}{为封面添加 PDF 页码。}
+%
+% \begin{macro}{\makecoveri}
+% 论文封面(封一)。
+% \begin{macrocode}
+\NewDocumentCommand \makecoveri { }
+ {
+ \thispagestyle { empty }
+ \tl_set:Nn \thepage { A }
+ \UseInstance { fdu / cover } { cover-i-default }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makecoverii}
+% \changes{v0.8}{2021/09/21}{\opt{info/instructors} 为空时不再显示指导小组
+% 成员名单。}
+% 指导小组成员名单(封二)。
+% \begin{macrocode}
+\NewDocumentCommand \makecoverii { }
+ {
+ \thispagestyle { empty }
+ \tl_set:Nn \thepage { B }
+ \clist_if_empty:NTF \l_@@_info_instructors_clist
+ { \hbox:n { } }
+ { \UseInstance { fdu / cover } { cover-ii-default } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\makecoveriii}
+% 声明页(封三)。
+% \begin{macrocode}
+\NewDocumentCommand \makecoveriii { }
+ {
+ \cleardoublepage
+ \thispagestyle { empty }
+ \tl_set:Nn \thepage { C }
+ \tl_if_empty:NTF \l_@@_declaration_page_tl
+ { \UseInstance { fdu / cover } { cover-iii-default } }
+ { \includepdf { \l_@@_declaration_page_tl } }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 声明各封面模板组成部分。
+% \begin{macrocode}
+\DeclareCoverTemplate { cover-i }
+ { id, logo, type, degree, title, title-en, info }
+\DeclareCoverTemplate { cover-ii } { title, name-list }
+\DeclareCoverTemplate { cover-iii }
+ {
+ originality-decl-name,
+ originality-decl-text,
+ originality-decl-sig,
+ authorization-decl-name,
+ authorization-decl-text,
+ authorization-decl-sig
+ }
+% \end{macrocode}
+%
+% \changes{v0.7d}{2019/03/29}{封面中文标题改为加粗宋体(可能使用伪粗)。}
+%
+% 定义封面的具体配置参数。
+% \begin{macrocode}
+\DeclareInstance { fdu / cover } { cover-i-default } { cover-i }
+ {
+%<class-en> format = \@@_line_spread:N \c_@@_line_spread_fp,
+ bottom-skip = 0 pt plus 1.5 fill,
+ id / content = \@@_cover_id:,
+ logo / content = \@@_cover_logo:,
+ type / content = \@@_cover_type:,
+ degree / content = \@@_cover_degree:,
+ title / content =
+ \@@_fixed_width_center_box:nn
+ { 0.9 \textwidth } { \l_@@_info_title_tl },
+ title-en / content =
+ \@@_fixed_width_center_box:nn
+ { 0.9 \textwidth } { \l_@@_info_title_en_tl },
+ info / content = \@@_cover_info:,
+ id / format = \zihao { -5 },
+ type / format = \zihao { 2 },
+ degree / format = \zihao { 4 },
+ title / format = \zihao { -2 } \bfseries,
+ title-en / format =
+ \@@_line_spread:n { 1.2 } \zihao { 4 } \bfseries,
+ id / bottom-skip = 0 pt plus 1.6 fill,
+ logo / bottom-skip = 0 pt plus 0.3 fill,
+ type / bottom-skip = -18 pt,
+ degree / bottom-skip = 0 pt plus 0.8 fill,
+ title-en / bottom-skip = 0 pt plus 2.5 fill,
+ id / align = right,
+ logo / align = center,
+ type / align = center,
+ degree / align = center,
+ title / align = center,
+ title-en / align = center,
+ info / align = center,
+ }
+\DeclareInstance { fdu / cover } { cover-ii-default } { cover-ii }
+ {
+%<class-en> format = \@@_line_spread:N \c_@@_line_spread_fp,
+ title / content =
+ \@@_spread_box:no { 7 em } { \c_@@_name_instructors_tl },
+ name-list / content =
+ \clist_use:Nn \l_@@_info_instructors_clist { \par },
+ title / format = \zihao { 2 } \sffamily,
+ name-list / format = \large,
+ title / align = center,
+ name-list / align = center,
+ }
+\DeclareInstance { fdu / cover } { cover-iii-default } { cover-iii }
+ {
+ format =
+%<class> \@@_line_spread:n { 1.8 },
+%<class-en> \@@_line_spread:n { 1.8 } \dim_set:Nn \parindent { 2 \ccwd },
+ top-skip = 0 pt plus 0.2 fill,
+ bottom-skip = 0 pt plus 2.5 fill,
+ originality-decl-name / content = \c_@@_name_orig_decl_tl,
+ originality-decl-text / content = \c_@@_orig_decl_text_tl,
+ originality-decl-sig / content =
+ \@@_cover_signature:N \c_@@_orig_decl_sign_clist,
+ authorization-decl-name / content = \c_@@_name_auth_decl_tl,
+ authorization-decl-text / content = \c_@@_auth_decl_text_tl,
+ authorization-decl-sig / content =
+ \@@_cover_signature:N \c_@@_auth_decl_sign_clist,
+ originality-decl-name / format =
+ \@@_line_spread:n { 1.2 } \zihao { -2 } \bfseries,
+ authorization-decl-name / format =
+ \@@_line_spread:n { 1.2 } \zihao { -2 } \bfseries,
+ originality-decl-name / bottom-skip = 0.4 cm,
+ originality-decl-text / bottom-skip = 0.4 cm,
+ originality-decl-sig / bottom-skip = 0 pt plus 2.5 fill,
+ authorization-decl-name / bottom-skip = 0.4 cm,
+ authorization-decl-text / bottom-skip = 0.4 cm,
+ originality-decl-name / align = center,
+ originality-decl-sig / align = right,
+ authorization-decl-name / align = center,
+ authorization-decl-sig / align = right,
+ }
+% \end{macrocode}
+%
+% \begin{variable}{\l_@@_auto_make_cover_bool,\l_@@_declaration_page_tl}
+% \begin{macrocode}
+\bool_new:N \l_@@_auto_make_cover_bool
+\tl_new:N \l_@@_declaration_page_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{style/auto-make-cover}
+% 是否自动生成封面。
+% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
+ auto-make-cover .bool_set:N = \l_@@_auto_make_cover_bool,
+ auto-make-cover .default:n = true,
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.8}{2021/09/21}{新增 \opt{style/declaration-page} 选项。}
+%
+% \begin{macro}{style/declaration-page}
+% 设置扫描版的声明页 PDF 文档。
+% \begin{macrocode}
+ declaration-page .code:n =
+ {
+ \tl_set_eq:NN \l_@@_declaration_page_tl \l_keys_value_tl
+ \RequirePackage { pdfpages }
+ },
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 在 \env{document} 开始位置添加封面以及指导小组成员名单。
+% \begin{macrocode}
+\ctex_after_end_preamble:n
+ {
+ \bool_if:NT \l_@@_auto_make_cover_bool
+ {
+ \begin{titlepage}
+ \makecoveri \newpage \makecoverii
+ \end{titlepage}
+ }
+ }
+% \end{macrocode}
+%
+% 在 \env{document} 结束位置添加声明页。
+% \begin{macrocode}
+\@@_gadd_ltxhook:nn { enddocument }
+ { \bool_if:NT \l_@@_auto_make_cover_bool { \makecoveriii } }
+% \end{macrocode}
+%
+% \subsection{目录}
+%
+% 设置目录标题。
+% \begin{macrocode}
+\keys_set:nn { ctex }
+ {
+%<class> contentsname = \c_@@_name_toc_tl,
+%<class> listfigurename = \c_@@_name_lof_tl,
+%<class> listtablename = \c_@@_name_lot_tl,
+% \end{macrocode}
+%
+% 设置目录中章节标题的样式。
+% \begin{macrocode}
+ chapter / tocline =
+ {
+%<class> \normalfont \sffamily
+%<class-en> \bfseries
+ \CTEXnumberline {#1} #2
+ },
+ section / tocline =
+ {
+%<class-en> \bfseries
+ \CTEXnumberline {#1} #2
+ },
+ subsection / tocline =
+ {
+%<class> \fdu@kai
+ \CTEXnumberline {#1} #2
+ }
+ }
+% \end{macrocode}
+%
+% \changes{v0.7e}{2019/05/12}{增加对插图、表格目录的处理。}
+%
+% \begin{macro}{\tableofcontents,\listoffigures,\listoftables}
+% 修改 \cs{tableofcontents}、\cs{listoffigures} 和 \cs{listoftables} 的定义,
+% 使得页眉正确显示,并出现在目录及 PDF 书签中。来自于 \LaTeXe{} 标准文档类
+% \file{book.cls}^^A
+% \footnote{原代码中只有 \cs{tableofcontents} 的 \cs{@mkboth} 出现在
+% \cs{chapter*} 内部,这是出于兼容性的考虑而非 typo。}。
+% \begin{macrocode}
+\@@_patch_cmd:Nnn \tableofcontents
+ {
+ \chapter*{\contentsname
+ \@mkboth{\MakeUppercase\contentsname}
+ {\MakeUppercase\contentsname}}
+ }
+ { \@@_chapter_no_toc:V \contentsname }
+\@@_patch_cmd:Nnn \listoffigures
+ {
+ \chapter*{\listfigurename}
+ \@mkboth{\MakeUppercase\listfigurename}
+ {\MakeUppercase\listfigurename}
+ }
+ { \@@_chapter:V \listfigurename }
+\@@_patch_cmd:Nnn \listoftables
+ {
+ \chapter*{\listtablename}
+ \@mkboth{\MakeUppercase\listtablename}
+ {\MakeUppercase\listtablename}
+ }
+ { \@@_chapter:V \listtablename }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\@starttoc}
+% 修改 \tn{@starttoc} 的定义以调整英文模板中的目录行距。
+% \begin{macrocode}
+%<*class-en>
+\@@_patch_cmd:Nnn \@starttoc
+ { \begingroup }
+ {
+ \begingroup
+ \@@_line_spread:N \c_@@_line_spread_fp
+ }
+%</class-en>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{摘要}
+%
+% \begin{environment}{abstract}
+% \begin{environment}{abstract*}
+% \changes{v0.7}{2018/03/05}{整理代码。}
+% 摘要环境。在中文模板定义了中英文双语摘要,但在英文模板中则没有定义中文摘要。
+% \begin{macrocode}
+\NewDocumentEnvironment { abstract } { }
+%<class> { \@@_abstract_begin: } { \@@_abstract_end: }
+%<class-en> { \@@_abstract_en_begin: } { \@@_abstract_en_end: }
+%<*class>
+\NewDocumentEnvironment { abstract* } { }
+ { \@@_abstract_en_begin: } { \@@_abstract_en_end: }
+%</class>
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+%
+% \begin{macro}{\@@_abstract_begin:,\@@_abstract_en_begin:}
+% 摘要页标题。
+% \begin{macrocode}
+%<*class>
+\cs_new_protected:Npn \@@_abstract_begin:
+ { \@@_chapter:V \c_@@_name_abstract_tl }
+%</class>
+\cs_new_protected:Npn \@@_abstract_en_begin:
+ { \@@_chapter:V \c_@@_name_abstract_en_tl }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.7d}{2019/03/28}{优化关键字列表的显示。}
+% \changes{v0.8}{2021/12/22}{没有指定 CLC/JEL 分类号时不再显示。}
+%
+% \begin{macro}{\@@_abstract_end:}
+% 摘要正文完成后,输出关键字列表和 CLC/JEL 分类号。
+% \begin{macrocode}
+%<*class>
+\cs_new_protected:Npn \@@_abstract_end:
+ {
+ \@@_keywords:nNn
+ { \sffamily \c_@@_name_keywords_tl \c_@@_fwid_colon_tl }
+ \l_@@_info_keywords_clist { \c_@@_fwid_semicolon_tl }
+ \tl_if_empty:NF \l_@@_info_clc_tl
+ {
+ \@@_clc_jel:nn
+ { \sffamily \c_@@_name_clc_tl \c_@@_fwid_colon_tl }
+ { \l_@@_info_clc_tl }
+ }
+ }
+%</class>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_abstract_en_end:}
+% 英文摘要中,如果指定了 JEL 分类号,则 CLC 分类号不再显示。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_abstract_en_end:
+ {
+ \@@_keywords:nNn
+ { \bfseries \c_@@_name_keywords_en_tl \@@_quad: }
+ \l_@@_info_keywords_en_clist { ; ~ }
+ \tl_if_empty:NTF \l_@@_info_jel_tl
+ {
+ \tl_if_empty:NF \l_@@_info_clc_tl
+ {
+ \@@_clc_jel:nn
+ { \bfseries \c_@@_name_clc_en_tl \@@_quad: }
+ { \l_@@_info_clc_tl }
+ }
+ }
+ {
+ \@@_clc_jel:nn
+ { \bfseries \c_@@_name_jel_en_tl \@@_quad: }
+ { \l_@@_info_jel_tl }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:,\@@_clc_jel:nn}
+% 关键字列表前要空一行,使用悬挂缩进;分类号不缩进。\tn{parbox} 之后的间距
+% 需要调整,见 \url{https://tex.stackexchange.com/a/34982}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_keywords:nNn #1#2#3
+ {
+ \par \mode_leave_vertical: \par \noindent
+ \@@_get_text_width:Nn \l_@@_tmpa_dim {#1}
+ \group_begin: #1 \group_end:
+ \parbox [t] { \dim_eval:n { \textwidth - \l_@@_tmpa_dim } }
+ {
+ \clist_use:Nn #2 {#3} \par
+ \cs_gset:Npx \@@_keywords_prevdepth:
+ { \dim_use:N \tex_prevdepth:D }
+ }
+ }
+\cs_new_protected:Npn \@@_clc_jel:nn #1#2
+ {
+ \par \tex_prevdepth:D \@@_keywords_prevdepth: \noindent
+ \group_begin: #1 \group_end:
+ #2
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{符号表}
+%
+% \begin{environment}{notation}
+% \changes{v0.7}{2018/03/05}{整理代码。}
+% 符号表环境,利用 \env{longtable} 封装。可选参数为表格列格式说明符。
+% \begin{macrocode}
+\NewDocumentEnvironment { notation } { O { l p { 7.5 cm } } }
+ {
+ \@@_notation_begin:
+ \group_begin:
+ \@@_notation_long_table_setup:
+ \longtable {#1}
+ }
+ {
+ \endlongtable
+ \group_end:
+ }
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\@@_notation_begin:}
+% 符号表页标题。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_notation_begin:
+ {
+%<class> \@@_chapter:V \c_@@_name_notation_tl
+%<class-en> \@@_chapter:V \c_@@_name_notation_en_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_notation_long_table_setup:}
+% 调整 \cs{LTpre} 和 \cs{LTpost},以删去 \env{longtable} 前后的空白。
+% 英文模板中还需要调整表格的行距。注意 \tn{arraystretch} 只是一个简单
+% 宏,不能使用 \cs{fp_set:Nn}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_notation_long_table_setup:
+ {
+%<class-en> \tl_set:Nn \arraystretch { 1.3 }
+ \dim_set_eq:NN \LTpre \c_zero_dim
+ \dim_set_eq:NN \LTpost \c_zero_dim
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{致谢}
+%
+% \changes{v0.9}{2023/02/06}{新增致谢环境。}
+%
+% \begin{environment}{acknowledgements}
+% 致谢环境。
+% \begin{macrocode}
+\NewDocumentEnvironment { acknowledgements } { }
+ { \@@_acknowledgements_begin: } { }
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\@@_acknowledgements_begin:}
+% 致谢页标题。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_acknowledgements_begin:
+ {
+%<class> \@@_chapter:V \c_@@_name_acknowledgements_tl
+%<class-en> \@@_chapter:V \c_@@_name_acknowledgements_en_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{参考文献著录与引用}
+%
+% \changes{v0.6}{2017/10/27}{支持 \BibTeX{},以实现参考文献的著录与引用。}
+% \changes{v0.7}{2018/01/25}{支持 \biber{} 与 \pkg{biblatex}。}
+%
+% \begin{variable}{\l_@@_bibtex_bool}
+% 是否使用 \BibTeX{} 作为参考文献处理程序。若为否,则使用
+% \pkg{biblatex}/\biber{}。
+% \begin{macrocode}
+\bool_new:N \l_@@_bibtex_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_bib_style_tl,\l_@@_bib_gb_style_tl,
+% \l_@@_cite_style_tl}
+% 保存参考文献及引用样式。
+% \begin{macrocode}
+\tl_new:N \l_@@_bib_style_tl
+\tl_new:N \l_@@_bib_gb_style_tl
+\tl_new:N \l_@@_cite_style_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_bib_resource_clist}
+% \changes{v0.8}{2021/03/07}{改用 \texttt{clist} 型变量,允许在 \pkg{biblatex}
+% 下使用多个数据源。}
+% 保存参考文献数据库列表。
+% \begin{macrocode}
+\clist_new:N \l_@@_bib_resource_clist
+% \end{macrocode}
+% \end{variable}
+%
+% \changes{v0.6}{2017/10/28}{新增 \opt{style/bib-style} 选项。}
+% \changes{v0.7}{2018/01/25}{新增 \opt{style/bib-backend}、
+% \opt{style/cite-style} 和 \opt{style/bib-resource} 选项。}
+% \changes{v0.8}{2021/09/20}{直接调用 \pkg{gbt7714} 宏包。}
+%
+% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
+% \end{macrocode}
+% \begin{macro}{style/bib-backend}
+% 参考文献后端。
+% \begin{macrocode}
+ bib-backend .choice:,
+ bib-backend .value_required:n = true,
+ bib-backend / bibtex .code:n =
+ { \bool_set_true:N \l_@@_bibtex_bool },
+ bib-backend / biblatex .code:n =
+ { \bool_set_false:N \l_@@_bibtex_bool },
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{style/bib-style}
+% 参考文献样式。
+% \begin{macrocode}
+ bib-style .choice:,
+ bib-style .value_required:n = true,
+ bib-style / numerical .code:n =
+ {
+ \tl_set:Nn \l_@@_bib_gb_style_tl { numerical }
+ \tl_clear:N \l_@@_bib_style_tl
+ },
+ bib-style / author-year .code:n =
+ {
+ \tl_set:Nn \l_@@_bib_gb_style_tl { author-year }
+ \tl_clear:N \l_@@_bib_style_tl
+ },
+ bib-style / unknown .code:n =
+ {
+ \tl_set_eq:NN \l_@@_bib_style_tl \l_keys_value_tl
+ \tl_clear:N \l_@@_bib_gb_style_tl
+ },
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{style/cite-style}
+% \changes{v0.8}{2021/09/17}{允许在 \BibTeX{} 下使用。}
+% 引用样式。
+% \begin{macrocode}
+ cite-style .tl_set:N = \l_@@_cite_style_tl,
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{style/bib-resource}
+% 参考文献数据源。
+% \begin{macrocode}
+ bib-resource .clist_set:N = \l_@@_bib_resource_clist
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.8}{2021/03/28}{正确使用导言区末尾钩子。}
+%
+% 为了保证导言区中的设置能起作用,\pkg{gbt774}、\pkg{natbib} 或 \pkg{biblatex}
+% 宏包均需要在导言区末尾载入(仍在 \pkg{hyperref} 之前),并做相关设置。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \bool_if:NT \l_@@_bibtex_bool
+ {
+ \tl_if_empty:NTF \l_@@_bib_style_tl
+ {
+ \RequirePackage [ sort & compress ] { gbt7714 }
+ \exp_args:No \bibliographystyle
+ { gbt7714- \l_@@_bib_gb_style_tl }
+ }
+ {
+ \RequirePackage [ sort & compress ] { natbib }
+ \exp_args:No \bibliographystyle
+ { \l_@@_bib_style_tl }
+ }
+ \@@_bibtex_setup:
+ }
+ }
+% \end{macrocode}
+% \pkg{biblatex} 会写入 |begindocument/before| 钩子,因此需在其之前通过
+% \texttt{env/doc\-u\-ment/begin} 钩子载入 \pkg{biblatex} 宏包。注意这个
+% 钩子仅适用于 |\begin{document}| 的写法,对于 |\document| 命令本身无效。
+% \begin{macrocode}
+\@@_gadd_ltxhook:nn { env/document/begin }
+ {
+ \bool_if:NF \l_@@_bibtex_bool
+ {
+ \@@_biblatex_pre_setup:
+ \RequirePackage { biblatex }
+ \@@_biblatex_post_setup:
+ }
+ }
+% \end{macrocode}
+%
+% \changes{v0.7}{2018/01/25}{统一使用 \cs{printbibliography} 命令
+% 生成参考文献列表。}
+% \changes{v0.7d}{2019/03/23}{使参考文献在目录中正常显示。}
+% \changes{v0.7e}{2020/08/30}{同步 \pkg{gbt7714} v2.0。}
+% \changes{v0.8}{2021/09/20}{新增不带上标的文内引用命令。}
+%
+% \begin{macro}{\@@_bibtex_setup:,\parencite,\printbibliography}
+% \BibTeX{} 相关设置。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_bibtex_setup:
+ {
+% \end{macrocode}
+% 行内引用命令。这里定义比较繁琐,是为了与 \tn{cite} 等命令保持一致。
+% \begin{macrocode}
+ \tl_if_eq:VnTF \l_@@_bib_gb_style_tl { numerical }
+ {
+ \exp_args:NNx \DeclareRobustCommand \parencite
+ { \exp_args:No \exp_not:o { \cs:w cite ~ \cs_end: } }
+ \exp_args:Nc \ctex_patch_cmd:Nnn { parencite ~ }
+ { \begingroup }
+ { \begingroup \bibstyle@numbers }
+ }
+ { \cs_set_eq:NN \parencite \cite }
+% \end{macrocode}
+% 引用样式。
+% \begin{macrocode}
+ \tl_if_empty:NF \l_@@_cite_style_tl
+ { \exp_args:NV \citestyle \l_@@_cite_style_tl }
+% \end{macrocode}
+% 使用 \tn{textendash} “\textendash”作为数字间的连接号。
+% \begin{macrocode}
+ \ctex_patch_cmd:Nnn \NAT@citexnum
+ { - \NAT@penalty }
+ { \textendash \NAT@penalty }
+% \end{macrocode}
+% 修改参考文献标题。
+% \begin{macrocode}
+ \cs_set:Npn \bibsection { \@@_chapter:V \bibname }
+% \end{macrocode}
+% \BibTeX{} 下接口与 \pkg{biblatex} 保持统一。
+% \begin{macrocode}
+ \NewDocumentCommand \printbibliography { o }
+ {
+ \exp_args:NV \bibliography \l_@@_bib_resource_clist
+ \IfValueT {##1}
+ { \@@_warning:nn { invalid-option-in-bibtex } {##1} }
+ }
+ }
+\@@_msg_new:nn { invalid-option-in-bibtex }
+ { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.8}{2022/01/08}{补充定义 \tn{addbibresource} 命令以兼容 \pkg{biblatex} 的用法。}
+%
+% \begin{macro}{\addbibresource}
+% 由于 \pkg{biblatex} 在导言区后才载入,需要单独定义添加参考文献数据源的命令以实现兼容。
+% 该命令需要在载入宏包前取消定义。
+% \begin{macrocode}
+\bool_if:NF \l_@@_bibtex_bool
+ {
+ \NewDocumentCommand \addbibresource { m }
+ { \clist_gput_right:Nn \l_@@_bib_resource_clist {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_biblatex_pre_setup:,\@@_biblatex_post_setup:}
+% \pkg{biblatex} 相关设置。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_biblatex_pre_setup:
+ {
+ \cs_undefine:N \addbibresource
+ \clist_new:N \l_@@_biblatex_options_clist
+ \clist_put_right:Nn \l_@@_biblatex_options_clist { hyperref = manual }
+% \end{macrocode}
+% 参考文献样式。
+% \begin{macrocode}
+ \clist_put_right:Nx \l_@@_biblatex_options_clist
+ {
+ style =
+ \tl_if_empty:NTF \l_@@_bib_style_tl
+ {
+ \str_if_eq:VnTF \l_@@_bib_gb_style_tl { numerical }
+ { gb7714-2015 } { gb7714-2015ay }
+ }
+ { \l_@@_bib_style_tl }
+ }
+% \end{macrocode}
+% 引用样式。
+% \changes{v0.8}{2021/03/09}{正确调用引用样式。}
+% \begin{macrocode}
+ \tl_if_empty:NF \l_@@_cite_style_tl
+ {
+ \clist_put_right:Nx \l_@@_biblatex_options_clist
+ { citestyle = \l_@@_cite_style_tl }
+ }
+ \exp_args:NV \PassOptionsToPackage \l_@@_biblatex_options_clist
+ { biblatex }
+ }
+\cs_new_protected:Npn \@@_biblatex_post_setup:
+ {
+ \clist_map_function:NN \l_@@_bib_resource_clist \addbibresource
+ \@@_biblatex_allow_url_break:
+ \@@_biblatex_use_en_dash:
+% \end{macrocode}
+% 修改参考文献标题。
+% \begin{macrocode}
+ \defbibheading { bibliography } [ \bibname ] { \@@_chapter:n {##1} }
+%<*class-en>
+ \exp_args:Nnx \DefineBibliographyStrings { english }
+ { bibliography = { \c_@@_name_bib_en_tl } }
+%</class-en>
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_biblatex_allow_url_break:}
+% \pkg{biblatex} 下允许 URL 在字母、数字和一些特殊符号处断行。
+% \begin{macrocode}
+\cs_new:Npn \@@_biblatex_allow_url_break:
+ {
+ \int_set_eq:NN \c@biburlucpenalty \c_one_int
+ \int_set_eq:NN \c@biburlnumpenalty \c_one_int
+ \int_set_eq:NN \c@biburllcpenalty \c_one_int
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_biblatex_use_en_dash:}
+% 使用 \tn{textendash} “\textendash”作为数字间的连接号。
+% \begin{macrocode}
+\cs_new:Npn \@@_biblatex_use_en_dash:
+ {
+ \DefineBibliographyExtras { english }
+ {
+ \cs_set_nopar:Npn \bibrangedash
+ { \textendash \penalty \hyphenpenalty }
+ }
+ \DefineBibliographyExtras { russian }
+ {
+ \cs_set_nopar:Npn \bibrangedash
+ { \textendash \penalty \hyphenpenalty }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.7}{2018/01/25}{同步 \pkg{gbt7714} v1.0,移除有关超链接的额外设置。}
+% \changes{v0.8}{2021/09/20}{不再将著录用符号修改为中文标点符号。}
+%
+% \subsection{\pkg{hyperref} 相关配置}
+%
+% \changes{v0.4}{2017/08/13}{新增 \pkg{hyperref} 相关配置,包括超链接
+% 样式(\opt{style/hyperlink} 与 \opt{style/hyperlink-color} 选项)
+% 及 PDF 元信息等。}
+% \changes{v0.7}{2018/01/23}{将 \pkg{hyperref} 相关配置移至模板末尾,
+% 以减少冲突。}
+%
+% \begin{macro}{\hypersetup}
+% \changes{v0.9}{2023/02/08}{改用 \cs{DeclareDocumentCommand} 定义。}
+% \begin{macro}{\fdu_hyperref_setup:n}
+% \pkg{hyperref} 宏包是在导言区之后才引入的。若要在导言区中使用
+% \tn{hypersetup} 命令,必须另行定义。
+% \begin{macrocode}
+\DeclareDocumentCommand \hypersetup { m }
+ { \fdu_hyperref_setup:n {#1} }
+\cs_new_protected:Npn \fdu_hyperref_setup:n #1
+ { \clist_gput_right:Nn \g_@@_to_hyperref_clist {#1} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_set_hyperlink_color_key:n}
+% 设置超链接颜色选项。最后的逗号用于确保 \pkg{l3keys} 可以正确解析,不能省去。
+% \begin{macrocode}
+\cs_new:Npn \@@_set_hyperlink_color_key:n #1
+ {
+ hyperlink-color / \clist_item:nn {#1} {1} .code:n =
+ {
+ \@@_define_hyperlink_color:nnn
+ { \clist_item:nn {#1} {2} }
+ { \clist_item:nn {#1} {3} }
+ { \clist_item:nn {#1} {4} }
+ \fdu_hyperref_setup:n
+ {
+ linkcolor = fdu@link, linkbordercolor = fdu@link,
+ urlcolor = fdu@url, urlbordercolor = fdu@url,
+ citecolor = fdu@cite, citebordercolor = fdu@cite
+ }
+ },
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_define_hyperlink_color:nnn}
+% 定义超链接颜色。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_define_hyperlink_color:nnn #1#2#3
+ {
+ \definecolorset { HTML } { fdu@ } { }
+ { link, #1; url, #2; cite, #3 }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\keys_define:nx { fdu / style }
+ {
+% \end{macrocode}
+%
+% \begin{macro}{style/hyperlink}
+% \changes{v0.8}{2021/12/27}{修复边框不显示的问题;不需要为 \opt{hidelinks} 选项传递参数。}
+% 超链接样式。
+% \begin{macrocode}
+ hyperlink .choice:,
+ hyperlink .value_required:n = true,
+ hyperlink / border .code:n =
+ { \fdu_hyperref_setup:n { colorlinks = false } },
+ hyperlink / color .code:n =
+ { \fdu_hyperref_setup:n { colorlinks = true } },
+ hyperlink / none .code:n =
+ { \fdu_hyperref_setup:n { hidelinks } },
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{style/hyperlink-color}
+% \changes{v0.8}{2021/12/27}{移除不常用的超链接颜色。}
+% 超链接颜色。
+% \begin{macrocode}
+ hyperlink-color .choice:,
+ hyperlink-color .value_required:n = true,
+ \clist_map_function:nN
+ {
+ { classic, FF0000, 0000FF, 00FF00 },
+ { default, 990000, 0000B2, 007F00 },
+ { material, E91E63, 009688, 4CAF50 },
+ { graylevel, 616161, 616161, 616161 },
+ { prl, 2D3092, 2D3092, 2D3092 }
+ }
+ \@@_set_hyperlink_color_key:n
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v0.6}{2017/10/29}{优化 URL 断行设置。}
+%
+% \begin{macro}{\fdu_allow_url_break:,\@@_add_url_break_points:}
+% 允许 URL 在字母、数字和一些特殊符号处断行。见
+% \url{https://bit.ly/2hhIjLW}。
+% \begin{macrocode}
+\cs_new:Npn \fdu_allow_url_break:
+ {
+ \cs_new:Npn \@@_add_url_break_points:
+ { \tl_map_function:NN \c_@@_url_break_points_tl \do }
+ \@@_appto_cmd:Nn \UrlBreaks
+ { \UrlOrds \@@_add_url_break_points: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\c_@@_url_break_points_tl}
+% 额外的断行位置是 26 个英文字母(大小写)以及 10 个阿拉伯数字。
+% \pkg{url} 提供的宏 \tn{UrlBreaks} 还包含了特殊符号 |*|、|-|、
+% |~|、|'|、|"|、|-|,也被设置为允许断行。
+% \begin{macrocode}
+\tl_const:Nn \c_@@_url_break_points_tl
+ {
+ abcdefghijklmnopqrstuvwxyz
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ 0123456789
+ }
+% \end{macrocode}
+% \end{variable}
+%
+% \changes{v0.7e}{2019/04/23}{处理 \pkg{hyperref} 与 \pkg{unicode-math}
+% 的兼容性问题。}
+%
+% 在导言区末尾引入 \pkg{hyperref} 宏包。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \RequirePackage { hyperref }
+% \end{macrocode}
+% 此后 \tn{hypersetup} 命令由 \pkg{hyperref} 宏包接管。
+% \begin{macrocode}
+ \hypersetup
+ {
+ bookmarksnumbered = true,
+ psdextra = true,
+ unicode = true,
+% \end{macrocode}
+% 填写 PDF 元信息。
+% \begin{macrocode}
+%<*class>
+ pdftitle = \l_@@_info_title_sanitized_tl,
+ pdfauthor = \l_@@_info_author_tl,
+ pdfkeywords = \l_@@_info_keywords_clist,
+%</class>
+%<*class-en>
+ pdftitle = \l_@@_info_title_en_sanitized_tl,
+ pdfauthor = \l_@@_info_author_en_tl,
+ pdfkeywords = \l_@@_info_keywords_en_clist,
+%</class-en>
+% pdfsubject = ,
+ pdfcreator = \c_@@_name_pdf_creator_tl
+ }
+% \end{macrocode}
+% 将导言区中通过 \cs{fdu_hyperref_setup:n} 进行的设置传入 \tn{hypersetup}。
+% \begin{macrocode}
+ \exp_args:NV \hypersetup \g_@@_to_hyperref_clist
+% \end{macrocode}
+% URL 断行处理。
+% \begin{macrocode}
+ \fdu_allow_url_break:
+% \end{macrocode}
+% 由于 \pkg{hyperref} 在 \pkg{biblatex} 之后调用,所以需要手动开启相关功能。
+% \begin{macrocode}
+ \bool_if:NF \l_@@_bibtex_bool { \BiblatexManualHyperrefOn }
+ }
+% \end{macrocode}
+%
+% 在 PDF 字符串中设置 \tn{fdu@kai} 命令为空,以抑制 \pkg{hyperref} 的警告信息。
+% \begin{macrocode}
+\ctex_at_end_package:nn { hyperref }
+ {
+ \pdfstringdefDisableCommands
+ {
+ \cs_set_eq:NN \fdu@kai \prg_do_nothing:
+ \cs_set_eq:NN \quad \c_space_tl
+ \cs_set_eq:NN \qquad \c_space_tl
+ }
+ }
+% \end{macrocode}
+%
+% \subsection{用户接口}
+%
+% \begin{macro}{info,style}
+% 定义元(meta)键值对。
+% \begin{macrocode}
+\keys_define:nn { fdu }
+ {
+ info .meta:nn = { fdu / info } {#1},
+ style .meta:nn = { fdu / style } {#1}
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% 文档类初始设置。
+% \begin{macrocode}
+\keys_set:nn { fdu }
+ {
+ style / font = times,
+%<class> style / cjk-font = fandol,
+ style / font-size = -4,
+%<class> style / fullwidth-stop = false,
+ style / auto-make-cover = true,
+ style / logo = { fudan-name.pdf },
+ style / logo-size = { 0.5 \textwidth },
+ style / hyperlink = color,
+ style / hyperlink-color = default,
+ style / bib-style = numerical,
+ info / degree = academic,
+ info / secret-level = none,
+ info / school-id = { 10246 },
+ info / date = { \zhtoday },
+%<class> theorem / header-font = { \sffamily },
+%<class-en> theorem / header-font = { \bfseries \upshape },
+%<class> theorem / body-font = { \fdu@kai },
+%<class-en> theorem / body-font = { \itshape },
+ theorem / counter = { chapter }
+ }
+% \end{macrocode}
+%
+% \begin{macro}{\fdusetup}
+% 用户设置接口。
+% \begin{macrocode}
+\NewDocumentCommand \fdusetup { m }
+ { \keys_set:nn { fdu } {#1} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{environment}{proof}
+% \begin{environment}{axiom}
+% \begin{environment}{corollary}
+% \begin{environment}{definition}
+% \begin{environment}{example}
+% \begin{environment}{lemma}
+% \begin{environment}{theorem}
+% 模板预定义的常用数学环境。
+% 其中的“证明”比较特殊,它不编号,但会添加证毕符号。
+% \begin{macrocode}
+%<*class>
+\newtheorem* { proof } { \c_@@_name_proof_tl }
+\newtheorem { axiom } { \c_@@_name_axiom_tl }
+\newtheorem { corollary } { \c_@@_name_corollary_tl }
+\newtheorem { definition } { \c_@@_name_definition_tl }
+\newtheorem { example } { \c_@@_name_example_tl }
+\newtheorem { lemma } { \c_@@_name_lemma_tl }
+\newtheorem { theorem } { \c_@@_name_theorem_tl }
+%</class>
+%<*class-en>
+\newtheorem* { proof } { \c_@@_name_proof_en_tl }
+\newtheorem { axiom } { \c_@@_name_axiom_en_tl }
+\newtheorem { corollary } { \c_@@_name_corollary_en_tl }
+\newtheorem { definition } { \c_@@_name_definition_en_tl }
+\newtheorem { example } { \c_@@_name_example_en_tl }
+\newtheorem { lemma } { \c_@@_name_lemma_en_tl }
+\newtheorem { theorem } { \c_@@_name_theorem_en_tl }
+%</class-en>
+%</class|class-en>
+% \end{macrocode}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+%
+% \subsection{模板参数配置文件}
+%
+% \changes{v0.3}{2017/06/27}{分离文档类与参数配置文件。}
+%
+% \begin{macrocode}
+%<*definition>
+% \end{macrocode}
+%
+% \subsubsection{通用配置}
+%
+% \begin{variable}{\c_@@_name_simp_tl,\c_@@_name_trad_tl,\c_@@_name_en_tl}
+% 学校名称。
+% \begin{macrocode}
+\tl_const:Nn \c_@@_name_simp_tl { 复旦大学 }
+\tl_const:Nn \c_@@_name_trad_tl { 復旦大學 }
+\tl_const:Nn \c_@@_name_en_tl { Fudan~ University }
+% \end{macrocode}
+% \end{variable}
+%
+% 常用标点符号,见表~\ref{tab:punctuations}。
+% \begin{macrocode}
+\clist_map_inline:nn
+ {
+ { ideo_comma } { ^^^^3001 },
+ { ideo_full_stop } { ^^^^3002 },
+ { fwid_comma } { ^^^^ff0c },
+ { fwid_full_stop } { ^^^^ff0e },
+ { fwid_colon } { ^^^^ff1a },
+ { fwid_semicolon } { ^^^^ff1b },
+ { fwid_left_paren } { ^^^^ff08 },
+ { fwid_right_paren } { ^^^^ff09 }
+ }
+ { \@@_define_punct:nn #1 }
+% \end{macrocode}
+%
+% \begin{table}[ht]
+% \caption{常用标点符号}
+% \label{tab:punctuations}
+% \centering
+% \begin{tabular}{cccc}
+% \toprule
+% \textbf{中文名称} &
+% \textbf{英文名称} &
+% \textbf{符号} &
+% \textbf{Unicode 码位} \\
+% \midrule
+% 中文顿号 & Ideographic comma & ^^^^3001 & U+3001 \\
+% 中文句号 & Ideographic full stop & ^^^^3002 & U+3002 \\
+% 中文逗号 & Fullwidth comma & ^^^^ff0c & U+FF0C \\
+% 全角西文句点 & Fullwidth full stop & ^^^^ff0e & U+FF0E \\
+% 中文冒号 & Fullwidth colon & ^^^^ff1a & U+FF1A \\
+% 中文分号 & Fullwidth semicolon & ^^^^ff1b & U+FF1B \\
+% 中文左圆括号 & Fullwidth left parenthesis & ^^^^ff08 & U+FF08 \\
+% 中文右圆括号 & Fullwidth right parenthesis & ^^^^ff09 & U+FF09 \\
+% \bottomrule
+% \end{tabular}
+% \end{table}
+%
+% \begin{variable}{\c_@@_line_spread_fp}
+% 行距倍数。行距倍数 $k$ 由下式确定:
+% \begin{equation*}
+% 1.2 \times k \times \qty{12}{bp} = \qty{20}{pt}.
+% \end{equation*}
+% 式中,1.2 是基本行距与文字大小之比,\qty{12}{bp} 是小四号字的大小,
+% \qty{20}{pt} 是行距固定值。
+% \begin{macrocode}
+\fp_const:Nn \c_@@_line_spread_fp
+ { \dim_ratio:nn { 20 pt } { 12 bp } / 1.2 }
+% \end{macrocode}
+% \end{variable}
+%
+% \subsubsection{声明页}
+%
+% \begin{variable}{\c_@@_orig_decl_text_tl}
+% 论文独创性声明。
+% \begin{macrocode}
+\tl_const:Nn \c_@@_orig_decl_text_tl
+ {
+ 本人郑重声明:所呈交的学位论文,是本人在导师的指导下,独立进行研究
+ 工作所取得的成果。论文中除特别标注的内容外,不包含任何其他个人或机
+ 构已经发表或撰写过的研究成果。对本研究做出重要贡献的个人和集体,均
+ 已在论文中作了明确的声明并表示了谢意。本声明的法律结果由本人承担。
+ }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_auth_decl_text_tl}
+% 论文使用授权声明。
+% \begin{macrocode}
+\tl_const:Nn \c_@@_auth_decl_text_tl
+ {
+ 本人完全了解复旦大学有关收藏和利用博士、硕士学位论文的规定,即:学
+ 校有权收藏、使用并向国家有关部门或机构送交论文的印刷本和电子版本;
+ 允许论文被查阅和借阅;学校可以公布论文的全部或部分内容,可以采用影
+ 印、缩印或其它复制手段保存论文。涉密学位论文在解密后遵守此规定。
+ }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_orig_decl_sign_clist,
+% \c_@@_auth_decl_sign_clist}
+% 声明页签名项目。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_orig_decl_sign_clist
+ { 作者签名, 日期 }
+\clist_const:Nn \c_@@_auth_decl_sign_clist
+ { 作者签名, 导师签名, 日期 }
+% \end{macrocode}
+% \end{variable}
+%
+% \subsubsection{杂项}
+%
+% \begin{variable}{\c_@@_thesis_type_clist,
+% \c_@@_degree_type_clist}
+% 论文类型与学位类型。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_thesis_type_clist
+ { 博士学位论文, 硕士学位论文, 本科毕业论文 }
+\clist_const:Nn \c_@@_degree_type_clist
+ { 学术学位, 专业学位 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_secret_clist}
+% 三种密级。
+% \begin{macrocode}
+\clist_const:Nn \c_@@_secret_clist { 秘密, 机密, 绝密 }
+% \end{macrocode}
+% \end{variable}
+%
+% 默认名称。注意空格是忽略掉的。
+% \begin{macrocode}
+\clist_map_inline:nn
+ {
+ { secret_level } { 密 \qquad 级 },
+ { secret_star } { \textrm { \bigstar } },
+ { school_id } { 学校代码 },
+ { student_id } { 学 \qquad 号 },
+ { department } { 院系 },
+ { major } { 专业 },
+ { major_professional } { 专业学位类别(领域) },
+ { author } { 姓名 },
+ { supervisor } { 指导教师 },
+ { date } { 完成日期 },
+ { instructors } { 指导小组成员 },
+ { author_sign } { 作者签名 },
+ { supervisor_sign } { 导师签名 },
+ { sign_date } { 日期 },
+ { toc } { 目 \quad 录 },
+ { lof } { 插图目录 },
+ { lot } { 表格目录 },
+ { bib_en } { Bibliography },
+ { pdf_creator } { LaTeX~ with~ fduthesis~ class },
+ { orig_decl }
+ { \c_@@_name_simp_tl \\ 学位论文独创性声明 },
+ { auth_decl }
+ { \c_@@_name_simp_tl \\ 学位论文使用授权声明 },
+ }
+ { \@@_define_name:nn #1 }
+\clist_map_inline:nn
+ {
+ { abstract } { 摘 \quad 要 } { Abstract },
+ { keywords } { 关键字 } { Keywords: },
+ { clc } { 中图分类号 } { CLC~ code: },
+ { jel } { JEL 分类号 } { JEL~ code: },
+ { notation } { 符号表 } { List~ of~ Symbols },
+ { acknowledgements } { 致 \quad 谢 } { Acknowledgements }
+ }
+ { \@@_define_name:nnn #1 }
+% \end{macrocode}
+%
+% 默认定理头名称。
+% \begin{macrocode}
+\clist_map_inline:nn
+ {
+ { proof } { 证明 } { Proof },
+ { axiom } { 公理 } { Axiom },
+ { corollary } { 推论 } { Corollary },
+ { definition } { 定义 } { Definition },
+ { example } { 例 } { Example },
+ { lemma } { 引理 } { Lemma },
+ { theorem } { 定理 } { Theorem }
+ }
+ { \@@_define_name:nnn #1 }
+% \end{macrocode}
+%
+% \begin{variable}{\c_@@_name_major_professional_tl}
+% \changes{v0.9}{2023/02/05}{处理右括号带来的间距。}
+% 处理右括号带来的间距。
+% \begin{macrocode}
+\tl_put_right:Nn \c_@@_name_major_professional_tl
+ { { \skip_horizontal:n { -0.5 em } } }
+%</definition>
+%<@@=>
+% \end{macrocode}
+% \end{variable}
+%
+% \clearpage
+%
+% \end{implementation}
+%
diff --git a/macros/latex/contrib/fduthesis/fduthesis-code.pdf b/macros/latex/contrib/fduthesis/fduthesis-code.pdf
index 65a33c4825..91dd190d1c 100644
--- a/macros/latex/contrib/fduthesis/fduthesis-code.pdf
+++ b/macros/latex/contrib/fduthesis/fduthesis-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/fduthesis/fduthesis-doc.dtx b/macros/latex/contrib/fduthesis/fduthesis-doc.dtx
index 15bc16d666..c39e192e7a 100644
--- a/macros/latex/contrib/fduthesis/fduthesis-doc.dtx
+++ b/macros/latex/contrib/fduthesis/fduthesis-doc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2017--2022 by Xiangdong Zeng <xdzeng96@gmail.com>
+% Copyright (C) 2017--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -83,8 +83,7 @@
\@namedef{ver@thumbpdf.sty}{9999/99/99}
% \end{macrocode}
%
-% \changes{v0.8}{2021/10/21}{[\pkg{fdudoc}] 使用 \pkg{gbt7714} 宏包
-% 处理参考文献。}
+% \changes{v0.8}{2021/10/21}{[\pkg{fdudoc}] 使用 \pkg{gbt7714} 宏包处理参考文献。}
%
% 载入宏包和文档类。
% \begin{macrocode}
@@ -528,7 +527,7 @@
\cs_new_protected:Npn \@@_module_star:w #1 > #2 \q_stop
{
% \end{macrocode}
-% 临时变量 \cs{l_@@_tmp_tl} 保存 |<*|\meta{module}|>| 之后的部分,即真实代码。
+% 临时变量 \cs{l_@@_tmpa_tl} 保存 |<*|\meta{module}|>| 之后的部分,即真实代码。
% \begin{macrocode}
\tl_set:Nn \l_@@_tmpa_tl {#2}
% \end{macrocode}
@@ -1049,7 +1048,7 @@
% \end{macro}
%
% \begin{macro}[int]{\changes@}
-% \changes{v0.4}{2017/07/30}{调整索引排序方式。}
+% \changes{v0.4}{2017/07/30}{[\pkg{fdudoc}] 调整索引排序方式。}
% 重定义 \tn{changes@},在版本号一行显示修改日期。
% \begin{macrocode}
\cs_set_protected:Npn \changes@ #1#2
@@ -1082,7 +1081,7 @@
{#1} \l_@@_tmpa_tl
{
% \end{macrocode}
-% \cs{l_@@_tmp_tl} 相当于两个参数(开始日期、结束日期),因此需要提前展开。
+% \cs{l_@@_tmpa_tl} 相当于两个参数(开始日期、结束日期),因此需要提前展开。
% \begin{macrocode}
\exp_after:wN
\@@_save_version_date_aux:nnnn \l_@@_tmpa_tl
@@ -1330,25 +1329,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\SpecialMainEnvIndex}
-% 索引汉化。
-% \begin{macrocode}
-\ctex_patch_cmd:Nnn \SpecialMainEnvIndex
- { (environment) } { ~ 环境 }
-\ctex_patch_cmd:Nnn \SpecialMainEnvIndex
- { environments: } { 环境: }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\HDorg@SpecialEnvIndex}
-% \pkg{hypdoc} 宏包重新定义了 \tn{SpecialEnvIndex} 命令,因此需要修改内部定义。
-% \begin{macrocode}
-\ctex_patch_cmd:Nnn \HDorg@SpecialEnvIndex
- { (environment) } { ~ 环境 }
-\ctex_patch_cmd:Nnn \HDorg@SpecialEnvIndex
- { environments: } { 环境: }
-% \end{macrocode}
-% \end{macro}
+% \changes{v0.9}{2023/02/17}{[\pkg{fdudoc}] 使用 \pkg{makeindex} 处理索引和修订记录。}
+% \changes{v0.9}{2023/02/17}{[\pkg{fdudoc}] 不再对索引进行汉化。}
%
% \begin{macro}[int]{\NAT@citexnum}
% 将参考文献引用中的 hyphen 改为 en-dash。
@@ -1405,6 +1387,14 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@@_typeset_functions:}
+% 减少展开标记(用来表明中英文模板中的不同用法)前的空格。
+% \begin{macrocode}
+\__fdudoc_patch_cmd:Nnn \@@_typeset_expandability:
+ { & } { & \skip_horizontal:n { -0.5em } }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_typeset_functions:,\@@_macro_init:,
% \@@_macro_dump:}
% 左侧边注的函数列表采用单倍行距。
@@ -1519,33 +1509,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_special_index_module:nnnnN}
-% 索引汉化。
-% \begin{macrocode}
-\cs_set_protected:Npn \@@_special_index_module:nnnnN #1#2#3#4#5
- {
- \use:x
- {
- \exp_not:n { \@@_special_index_aux:nnnnnnn {#1} {#2} }
- \tl_if_empty:nTF {#3}
- { { } { } { } { } }
- {
- \str_if_eq:eeTF {#3} { TeX }
- {
- { TeX~ and~ LaTeX2e }
- { \string \TeX{}~ 和~ \string \LaTeXe{} }
- }
- { {#3} { \string \pkg {#3} } }
- \bool_if:NTF #5
- { { commands~ internal } { ~ 内部命令: } }
- { { commands } { ~ 命令: } }
- }
- }
- {#4}
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_special_index_aux:nnnnnnn}
% 该函数在 \cls{l3doc} 中本来只有 6 个参数。这里增加了一个,用来辅助排序。
% \begin{arguments}
@@ -1705,7 +1668,8 @@
\bibliographystyle{gbt7714-numerical}
% \end{macrocode}
%
-% \changes{v0.7c}{2019/02/08}{修改宏包手册主要字体。}
+% \changes{v0.7c}{2019/02/08}{[\pkg{fdudoc}] 修改宏包手册主要字体。}
+% \changes{v0.9}{2023/02/18}{[\pkg{fdudoc}] 更新宏包手册字体。}
%
% 西文字体。为兼容 macOS,系统字体需使用字体名,而 \TeXLive{}
% 中的字体需使用文件名。
@@ -1723,29 +1687,36 @@
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic]
-\setmonofont{Iosevka Slab}[
- UprightFont = * Light,
- BoldFont = * Semibold,
- ItalicFont = * Light Oblique,
- BoldItalicFont = * Semibold Oblique,
- Scale = MatchLowercase]
+\setmonofont{lmmonolt10}[
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique]
\setmathfont{LibertinusMath-Regular.otf}
% \end{macrocode}
%
% 中文字体。
% \begin{macrocode}
-\setCJKmainfont{Source Han Serif SC}[
- ItalicFont = FZKai-Z03,
- CharacterWidth = Full]
-\setCJKsansfont{Source Han Sans SC}[
- ItalicFont = *,
- CharacterWidth = Full]
-\setCJKmonofont{Source Han Sans SC}[
- UprightFont = * Normal,
- BoldFont = * Bold,
- AutoFakeSlant = 0.1763, % = tan(10 deg)
- Scale = 0.8903,
- CharacterWidth = Full]
+\setCJKmainfont{SourceHanSerifSC}[
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = FandolKai-Regular,
+ UprightFeatures = { CharacterWidth = Full },
+ BoldFeatures = { CharacterWidth = Full }]
+\setCJKsansfont{SourceHanSansSC}[
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ CharacterWidth = Full]
+\setCJKmonofont{SourceHanSansSC}[
+ Extension = .otf,
+ UprightFont = *-Normal,
+ BoldFont = *-Bold,
+ AutoFakeSlant = 0.1763, % = tan(10 deg)
+ Scale = 0.9,
+ CharacterWidth = Full]
% \end{macrocode}
%
% 版式排版格式。
@@ -1887,15 +1858,19 @@
%
% \subsubsection{文档层命令}
%
+% \changes{v0.9}{2023/02/18}{[\pkg{fdudoc}] 调整中英文标记。}
+%
% \begin{macro}{\exptarget,\rexptarget,\expstar,\rexpstar,
% \__codedoc_typeset_exp:,\__codedoc_typeset_rexp:}
-% 部分命令之后的特殊符号($^^^^263a$ 或 $^^^^263b$),表明其不同用法。这里的
-% “exp”和“rexp”分别源自 \LaTeX3 中的“expandable”和“restricted-expandable”。
+% 部分命令之后的标记,表明中英文模板中的不同用法。这里的“exp”和“rexp”
+% 分别源自 \LaTeX3 中的“expandable”和“restricted-expandable”。
% \begin{macrocode}
\newcommand*\exptarget{\Hy@raisedlink{\hypertarget{expstar}{}}}
\newcommand*\rexptarget{\Hy@raisedlink{\hypertarget{rexpstar}{}}}
-\newcommand*\expstar{\hyperlink{expstar}{$^^^^263b$}}
-\newcommand*\rexpstar{\hyperlink{rexpstar}{$^^^^263a$}}
+\newcommand*\expstar{%
+ \hyperlink{expstar}{\textsuperscript{\rmfamily\scshape en}}}
+\newcommand*\rexpstar{%
+ \hyperlink{rexpstar}{\textsuperscript{\rmfamily\scshape zh}}}
\ExplSyntaxOn
\cs_set_eq:NN \__codedoc_typeset_exp: \expstar
\cs_set_eq:NN \__codedoc_typeset_rexp: \rexpstar
@@ -1999,38 +1974,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\cs,\tn}
-% \begin{macro}[int]{\codedoc@cs,\codedoc@tn}
-% 控制序列。
-%^^A Colors are used for debug.
-% \begin{macrocode}
-% \let\codedoc@cs=\cs
-% \let\codedoc@tn=\tn
-% \renewcommand*\cs[2][]{%
-% \textcolor{MaterialIndigo}{\codedoc@cs[#1]{#2}}}
-% \renewcommand*\tn[2][]{%
-% \textcolor{MaterialPink}{\codedoc@tn[#1]{#2}}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\file,\env,\pkg,\cls}
-% 文件、环境、宏包、文档类。
-% \begin{macrocode}
-% \renewcommand*\file[1]{%
-% \textcolor{MaterialGrey900}{\texttt{#1}}}
-\renewcommand*\env[1]{\textbf{\texttt{#1}}}
-% \renewcommand*\pkg[1]{\textsf{#1}}
-% \renewcommand*\cls[1]{\textit{\textsf{#1}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\bashcmd}
-% Bash 中的命令。
-% \begin{macrocode}
-\newcommand*\bashcmd[1]{\texttt{#1}}
-% \end{macrocode}
-% \end{macro}
+% \changes{v0.9}{2023/02/17}{[\pkg{fdudoc}] 移除多余的文档层定义。}
%
% \paragraph{示例代码环境}
%
@@ -2041,14 +1985,13 @@
\@empty\z@\@empty
% \end{macrocode}
%
-% \changes{v0.5}{2017/09/05}{[\pkg{fdudoc}] 移除 \pkg{listings}
-% 关键字定义文件。}
+% \changes{v0.5}{2017/09/05}{[\pkg{fdudoc}] 移除 \pkg{listings} 关键字定义文件。}
%
% 定义几种代码样式。
% \begin{macro}[int]{style@base}
% \begin{macrocode}
\lstdefinestyle{style@base}{
- basewidth = 0.5 em,
+ basewidth = 0.525 em,
gobble = 3,
lineskip = 2 pt,
frame = l,
@@ -2093,17 +2036,17 @@
% \begin{macro}[int]{style@syntax}
% \begin{macrocode}
\lstdefinestyle{style@syntax}{
- basewidth = 0.5 em,
- gobble = 6,
- escapeinside = {(*}{*)},
- language = [LaTeX]TeX,
- alsoletter = {*, -},
- basicstyle = \footnotesize\ttfamily\color{MaterialGrey900},
- keywordstyle = \bfseries\color{MaterialIndigo},
- commentstyle = \itshape\color{MaterialGrey600},
- texcsstyle = *\color{MaterialDeepOrange},
- emphstyle = [1]\color{MaterialGreen800},
- emphstyle = [2]\color{MaterialTeal}
+ basewidth = 0.525 em,
+ gobble = 6,
+ escapeinside = {(*}{*)},
+ language = [LaTeX]TeX,
+ alsoletter = {*, -},
+ basicstyle = \footnotesize\ttfamily\color{MaterialGrey900},
+ keywordstyle = \bfseries\color{MaterialIndigo},
+ commentstyle = \itshape\color{MaterialGrey600},
+ texcsstyle = *\color{MaterialDeepOrange},
+ emphstyle = [1]\color{MaterialGreen800},
+ emphstyle = [2]\color{MaterialTeal}
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex/contrib/fduthesis/fduthesis-en.pdf b/macros/latex/contrib/fduthesis/fduthesis-en.pdf
index 72fa0e8381..8a62785309 100644
--- a/macros/latex/contrib/fduthesis/fduthesis-en.pdf
+++ b/macros/latex/contrib/fduthesis/fduthesis-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/fduthesis/fduthesis-logo.dtx b/macros/latex/contrib/fduthesis/fduthesis-logo.dtx
index 67bfae521e..80e7145811 100644
--- a/macros/latex/contrib/fduthesis/fduthesis-logo.dtx
+++ b/macros/latex/contrib/fduthesis/fduthesis-logo.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2017--2022 by Xiangdong Zeng <xdzeng96@gmail.com>
+% Copyright (C) 2017, 2018, 2020, 2023 by Xiangdong Zeng <xdzeng96@gmail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -52,8 +52,6 @@
% 复旦大学校名(復旦大學),由毛泽东题写。原始图片来源:
% \url{http://www.fudan.edu.cn/2016/channels/view/74/}。
% \begin{macrocode}
-%\NewDocumentCommand \fduname { O { } }
-% { \@@_tikz:nx { \fdulogo@name } { \c_@@_default_arg_tl, #1 } }
% + new
% - original
\NewDocumentCommand \fduname { t+ t- O { } }
@@ -105,7 +103,10 @@
% \url{http://www.fudan.edu.cn/2016/channels/view/74/}。
% \begin{macrocode}
\NewDocumentCommand \fdumotto { O { } }
- { \@@_tikz:nx { \fdulogo@motto } { \c_@@_default_arg_tl, #1 } }
+ {
+ \@@_tikz:nx
+ { \fdulogo@motto } { \c_@@_default_arg_tl, #1 }
+ }
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/fduthesis/fduthesis.dtx b/macros/latex/contrib/fduthesis/fduthesis.dtx
index c6439e661b..2b001b151c 100644
--- a/macros/latex/contrib/fduthesis/fduthesis.dtx
+++ b/macros/latex/contrib/fduthesis/fduthesis.dtx
@@ -2,7 +2,7 @@
% !TeX program = XeLaTeX
% !TeX encoding = UTF-8
%
-% Copyright (C) 2017--2022 by Xiangdong Zeng <xdzeng96@gmail.com>
+% Copyright (C) 2017--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -46,7 +46,7 @@
The `fduthesis` Class
=====================
-*LaTeX thesis template for Fudan University, v0.8*
+*LaTeX thesis template for Fudan University, v0.9*
Overview
--------
@@ -86,7 +86,7 @@ To install `fduthesis`, you can use one of the following methods:
git clone https://github.com/stone-zeng/fduthesis.git
- Run `install-win.bat` (on Windows) or `install-linux.sh` (on Linux)
+ Run `install-win.bat` (Windows) or `install-unix.sh` (Linux or macOS)
to generate the templates and configuration files. These files would
be found in a new-created `thesis` folder. You can enjoy `fduthesis`
here at once.
@@ -123,7 +123,7 @@ version.
-----
-Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
+Copyright (C) 2017&ndash;2023 by Xiangdong Zeng <xdzeng96@gmail.com>.
%</readme>
%
%<*internal>
@@ -141,7 +141,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\preamble
- Copyright (C) 2017--2022 by Xiangdong Zeng <xdzeng96@gmail.com>
+ Copyright (C) 2017--2023 by Xiangdong Zeng <xdzeng96@gmail.com>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -231,7 +231,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
%<class|class-en|doc|logo>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<*!(driver|install|ex-logo|cover)>
-%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.8 2022-09-04 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $
+%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.9 2023-02-26 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $
%<class> {Thesis template for Fudan University}
%<class>\ProvidesExplClass{\ExplFileName}
%<class-en> {Thesis template for Fudan University (English version)}
@@ -271,13 +271,13 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\title{\textcolor{MaterialIndigo800}{\textbf{fduthesis: 复旦大学论文模板}}}
\author{曾祥东}
-\date{2022/09/04\quad v0.8%
+\date{2023/02/26\quad v0.9%
\thanks{\url{https://github.com/stone-zeng/fduthesis}.}}
%^^A! \title{\textcolor{MaterialIndigo800}{%
%^^A! \textbf{The \textsf{fduthesis} Class \\
%^^A! \LaTeX{} Thesis Template for Fudan University}}}
%^^A! \author{Xiangdong Zeng}
-%^^A! \date{2022/09/04\quad v0.8%
+%^^A! \date{2023/02/26\quad v0.9%
%^^A! \thanks{\url{https://github.com/stone-zeng/fduthesis}.}}
%^^A!
@@ -433,7 +433,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{itemize}
% \item 名字后面带有 \rexptarget\rexpstar{} 的,表示只能在\emph{中文模板}中使用;
% \item 名字后面带有 \exptarget\expstar{} 的,表示只能在\emph{英文模板}中使用;
-% \item 名字后面不带有特殊符号的,表示既可以在中文模板中使用,也可以在英文模板中使用。
+% \item 名字后面不带有特殊标记的,表示既可以在中文模板中使用,也可以在英文模板中使用。
% \end{itemize}
%^^A! The options, commands and environments in \cls{fduthesis} can be
%^^A! divided into the following three types:
@@ -442,8 +442,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! indicated by \rexptarget\rexpstar{}.
%^^A! \item Those can be only used in \emph{English templates} are
%^^A! indicated by \rexptarget\expstar{}.
-%^^A! \item If they do not have special characters afterwards, then
-%^^A! you can use them in both Chinese and English templates.
+%^^A! \item If they do not have marks afterwards, then you can use
+%^^A! them in both Chinese and English templates.
%^^A! \end{itemize}
%^^A!
%
@@ -494,7 +494,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \item 从 CTAN 上下载 \cls{fduthesis} 的
% \href{https://mirror.ctan.org/install/macros/latex/contrib/fduthesis.tds.zip}{TDS 安装包};
% \item 按目录结构将 \file{fduthesis.tds.zip} 中的文件复制到 \TeX{} 发行版的本地 TDS 根目录;
-% \item 执行 \bashcmd{mktexlsr} 命令刷新文件名数据库以完成安装。
+% \item 执行 \texttt{mktexlsr} 命令刷新文件名数据库以完成安装。
% \end{itemize}
%^^A! If you want to download the template from CTAN and install it
%^^A! manually, the recommended way is to use the TDS ZIP file:
@@ -503,7 +503,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! {TDS ZIP file} for \cls{fduthesis};
%^^A! \item Copy all the files in \file{fduthesis.tds.zip} into the
%^^A! local TDS directory of \TeX{} distribution.
-%^^A! \item Run \bashcmd{mktexlsr} to update the ls-R database.
+%^^A! \item Run \texttt{mktexlsr} to update the ls-R database.
%^^A! \end{itemize}
%^^A
%
@@ -520,7 +520,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{shellexample}[gobble=7,alsoletter={.},morekeywords={git,clone}]
% git clone https://github.com/stone-zeng/fduthesis.git
% \end{shellexample}
-% \item 执行 \file{install-win.bat}(Windows 系统)或 \file{install-linux.sh}(Linux 或 macOS
+% \item 执行 \file{install-win.bat}(Windows 系统)或 \file{install-unix.sh}(Linux 或 macOS
% 系统),所有需要的文件便会在 \file{thesis} 文件夹中生成。
% \end{itemize}
%^^A! On CTAN, only the stable version of \cls{fduthesis} is provided, where new features and
@@ -533,8 +533,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! \begin{shellexample}[gobble=5,alsoletter={.},morekeywords={git,clone}]
%^^A! git clone https://github.com/stone-zeng/fduthesis.git
%^^A! \end{shellexample}
-%^^A! \item Run \file{install-win.bat} (on Windows) or \file{install-linux.sh} (on Linux),
-%^^A! then all the necessary files will be found in the \file{thesis} folder.
+%^^A! \item Run \file{install-win.bat} (Windows) or \file{install-unix.sh} (Linux or macOS),
+%^^A! all the necessary files will be found in the \file{thesis} folder then.
%^^A! \end{itemize}
%^^A!
%
@@ -1744,7 +1744,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% 曰\CJKunderdot{鳳頭、豬肚、豹尾}六字是也。」大概起要美麗,中要浩蕩,
% 結要響亮。尤貴在首尾貫穿,意思清新。苟能若是,斯可以言樂府矣。
% \end{quotation}
-% \hfill ——陶宗儀《南村輟耕錄·作今樂府法》
+% \hfill ^^^^2e3a陶宗儀《南村輟耕錄·作今樂府法》 ^^A ^^^^2e3a = 破折号
%
% \subsubsection{凤头}
%^^A! \subsubsection{Front matter}
@@ -1937,7 +1937,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \paragraph{参考文献引用}
%^^A! \paragraph{Citations}
%
-% \begin{function}{\cite}
+% \begin{function}[updated=2021-09-20]{\cite}
% \begin{fdusyntax}[deletetexcs={\cite},morekeywords={\cite}]
% \cite(*\marg{文献标签}*)
% \cite(*\oarg{页码}\marg{文献标签}*)
@@ -1947,7 +1947,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% 用来标记引用。顺序编码制和著者—出版年制下的各种引用方式见
% 表~\ref{tab:citation-numerical} 和表~\ref{tab:citation-author-year}。
% \end{function}
-%^^A! \begin{function}{\cite}
+%^^A! \begin{function}[updated=2021-09-20]{\cite}
%^^A! \begin{fdusyntax}[deletetexcs={\cite},morekeywords={\cite}]
%^^A! \cite(*\marg{bib key}*)
%^^A! \cite(*\oarg{page number}\marg{bib key}*)
@@ -2175,7 +2175,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! the position of QED symbol correct.
%^^A!
%
-% \begin{function}[updated=2017-12-12]{\newtheorem}
+% \begin{function}[updated=2023-02-08]{\newtheorem}
% \begin{fdusyntax}[deletetexcs={\newtheorem},
% morekeywords={\newtheorem,\newtheorem*}]
% \newtheorem(*\oarg{选项}\marg{环境名}\marg{标题}*)
@@ -2360,6 +2360,24 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! \end{function}
%^^A!
%
+% \begin{function}[added=2023-02-06]{acknowledgements}
+% \begin{fdusyntax}[emph={[2]acknowledgements}]
+% \begin{acknowledgements}
+% (*\meta{致谢内容}*)
+% \end{acknowledgements}
+% \end{fdusyntax}
+% 致谢。
+% \end{function}
+%^^A! \begin{function}[added=2023-02-06]{acknowledgements}
+%^^A! \begin{fdusyntax}[emph={[2]acknowledgements}]
+%^^A! \begin{acknowledgements}
+%^^A! (*\meta{acknowledgements}*)
+%^^A! \end{acknowledgements}
+%^^A! \end{fdusyntax}
+%^^A! Acknowledgements.
+%^^A! \end{function}
+%^^A!
+%
% \section{宏包依赖情况}
%^^A! \section{Packages dependencies}
%^^A!
@@ -2754,17 +2772,15 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \subsubsection{内部变量声明}
%
% \begin{variable}{\l_@@_tmpa_box,
-% \l_@@_tmpa_clist,\l_@@_tmpb_clist,
-% \l_@@_tmpa_dim,\l_@@_tmpb_dim,
+% \l_@@_tmpa_clist,
+% \l_@@_tmpa_dim,
% \l_@@_tmpa_skip,
% \l_@@_tmpa_tl,\l_@@_tmpb_tl}
% 临时变量。
% \begin{macrocode}
\box_new:N \l_@@_tmpa_box
\clist_new:N \l_@@_tmpa_clist
-\clist_new:N \l_@@_tmpb_clist
\dim_new:N \l_@@_tmpa_dim
-\dim_new:N \l_@@_tmpb_dim
\skip_new:N \l_@@_tmpa_skip
\tl_new:N \l_@@_tmpa_tl
\tl_new:N \l_@@_tmpb_tl
@@ -2812,17 +2828,14 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
% \subsubsection{内部函数}
%
-% \begin{macro}{\file_input:V,
-% \int_to_arabic:v,
-% \keys_define:nx,
-% \tl_map_inline:xn}
+% \begin{macro}{\file_input:V,\int_to_arabic:v,\keys_define:nx,\regex_replace_all:nnc}
% \begin{macro}[TF]{\tl_if_eq:Vn}
% \LaTeX3{} 函数变体。
% \begin{macrocode}
-\cs_generate_variant:Nn \file_input:n { V }
-\cs_generate_variant:Nn \int_to_arabic:n { v }
-\cs_generate_variant:Nn \keys_define:nn { nx }
-\cs_generate_variant:Nn \tl_map_inline:nn { xn }
+\cs_generate_variant:Nn \file_input:n { V }
+\cs_generate_variant:Nn \int_to_arabic:n { v }
+\cs_generate_variant:Nn \keys_define:nn { nx }
+\cs_generate_variant:Nn \regex_replace_all:nnN { nnc }
\prg_generate_conditional_variant:Nnn \tl_if_eq:nn { Vn } { T, TF }
% \end{macrocode}
% \end{macro}
@@ -2876,7 +2889,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
% \begin{macro}{\@@_gadd_ltxhook:nn}
% 封装 \LaTeX{} 的钩子管理机制。本模板中的字体加载命令位于
-% |begindocument/before| 钩子中,需确保在 \pkg{xeCJK} 之前执行。
+% \texttt{begindocument/\allowbreak before} 钩子中,需确保在 \pkg{xeCJK} 之前执行。
% \begin{macrocode}
\cs_new_protected:Npn \@@_gadd_ltxhook:nn #1#2
{ \hook_gput_code:nnn {#1} { . } {#2} }
@@ -2902,8 +2915,6 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
% \begin{macro}{\@@_define_fn_style:nn,
% \@@_define_punct:nn,
-% \@@_define_sep:nn,
-% \@@_define_format:nn,
% \@@_define_name:nn,
% \@@_define_name:nnn}
% 用来定义脚注样式、标点、默认名称的辅助函数。
@@ -2912,10 +2923,6 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
{ \tl_const:cn { c_@@_fn_style_ #1 _tl } {#2} }
\cs_new_protected:Npn \@@_define_punct:nn #1#2
{ \tl_const:cn { c_@@_ #1 _tl } {#2} }
-% \cs_new_protected:Npn \@@_define_sep:nn #1#2
-% { \tl_const:cn { c_@@_ #1 _sep_tl } {#2} }
-% \cs_new_protected:Npn \@@_define_format:nn #1#2
-% { \tl_const:cn { c_@@_ #1 _format_tl } {#2} }
\cs_new_protected:Npn \@@_define_name:nn #1#2
{ \tl_const:cn { c_@@_name_ #1 _tl } {#2} }
\cs_new_protected:Npn \@@_define_name:nnn #1#2#3
@@ -2927,7 +2934,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macro}
%
% \begin{macro}{\@@_msg_new:nn,
-% \@@_error:n,\@@_error:nn,\@@_error:nx,\@@_error:nnn,\@@_error:nnnn
+% \@@_error:n,\@@_error:nn,\@@_error:nx,\@@_error:nnn,\@@_error:nnnn,
% \@@_warning:n,\@@_warning:nn,\@@_warning:nxx,
% \@@_info:nx}
% 各种信息函数的缩略形式。
@@ -3288,8 +3295,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \setmathfont,
% \setCJKmainfont,
% \setCJKsansfont,
-% \setCJKmonofont,
-% \@@_set_font:n}
+% \setCJKmonofont}
% 重新定义以上宏包提供的字体选择命令。我们把它放在导言区末尾,使得用户配置不被
% 模板配置覆盖。
% \begin{macrocode}
@@ -3301,108 +3307,16 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
{ \use:c { @@_set #1 font:nn } {##2} { ##1, ##3 } }
}
}
-\clist_map_inline:nn { main, sans, mono, math } { \@@_set_font_helper:n {#1} }
-%<class>\clist_map_inline:nn { CJKmain, CJKsans, CJKmono } { \@@_set_font_helper:n {#1} }
+\clist_map_inline:nn { main, sans, mono, math }
+ { \@@_set_font_helper:n {#1} }
+%<class>\clist_map_inline:nn { CJKmain, CJKsans, CJKmono }
+%<class> { \@@_set_font_helper:n {#1} }
% \end{macrocode}
% \end{macro}
%
% \changes{v0.7e}{2019/04/10}{兼容 Libertinus 和 XITS 字体的文件名变动。}
% \changes{v0.8}{2021/09/15}{判断 Libertinus Sans Bold Oblique 字体是否存在。}
-%
-% \begin{macro}{
-% \g_@@_font_family_libertinus_serif_tl,
-% \g_@@_font_family_libertinus_sans_tl,
-% \g_@@_font_style_libertinus_rm_tl,
-% \g_@@_font_style_libertinus_bf_tl,
-% \g_@@_font_style_libertinus_it_tl,
-% \g_@@_font_style_libertinus_bfit_tl,
-% \g_@@_font_style_libertinus_bfsl_tl,
-% \g_@@_font_family_xits_tl,
-% \g_@@_font_style_xits_rm_tl,
-% \g_@@_font_style_xits_bf_tl,
-% \g_@@_font_style_xits_it_tl,
-% \g_@@_font_style_xits_bfit_tl,
-% \g_@@_font_name_libertinus_serif_tl,
-% \g_@@_font_name_libertinus_sans_tl,
-% \g_@@_font_name_libertinus_math_tl,
-% \g_@@_font_name_xits_tl,
-% \g_@@_font_name_xits_math_rm_tl,
-% \g_@@_font_name_xits_math_bf_tl}
-% Libertinus 和 XITS 字体的文件名做过变动,需要特殊处理。
-% \begin{macrocode}
-\tl_new:N \g_@@_font_family_libertinus_serif_tl
-\tl_new:N \g_@@_font_family_libertinus_sans_tl
-\tl_new:N \g_@@_font_style_libertinus_rm_tl
-\tl_new:N \g_@@_font_style_libertinus_bf_tl
-\tl_new:N \g_@@_font_style_libertinus_it_tl
-\tl_new:N \g_@@_font_style_libertinus_bfit_tl
-\tl_new:N \g_@@_font_style_libertinus_bfsl_tl
-\tl_new:N \g_@@_font_family_xits_tl
-\tl_new:N \g_@@_font_style_xits_rm_tl
-\tl_new:N \g_@@_font_style_xits_bf_tl
-\tl_new:N \g_@@_font_style_xits_it_tl
-\tl_new:N \g_@@_font_style_xits_bfit_tl
-\tl_new:N \g_@@_font_name_libertinus_serif_tl
-\tl_new:N \g_@@_font_name_libertinus_sans_tl
-\tl_new:N \g_@@_font_name_libertinus_math_tl
-\tl_new:N \g_@@_font_name_xits_tl
-\tl_new:N \g_@@_font_name_xits_math_rm_tl
-\tl_new:N \g_@@_font_name_xits_math_bf_tl
-\fontspec_font_if_exist:nTF { LibertinusSerif-Regular.otf }
- {
- \tl_set:Nn \g_@@_font_family_libertinus_serif_tl { LibertinusSerif }
- \tl_set:Nn \g_@@_font_family_libertinus_sans_tl { LibertinusSans }
- \tl_set:Nn \g_@@_font_family_libertinus_math_tl { LibertinusMath }
- \tl_set:Nn \g_@@_font_style_libertinus_rm_tl { Regular }
- \tl_set:Nn \g_@@_font_style_libertinus_bf_tl { Bold }
- \tl_set:Nn \g_@@_font_style_libertinus_it_tl { Italic }
- \tl_set:Nn \g_@@_font_style_libertinus_bfit_tl { BoldItalic }
-% \end{macrocode}
-% 较新版本中 Libertinus Sans Bold Oblique 字体被移除,需进行额外判断。
-% \begin{macrocode}
- \fontspec_font_if_exist:nTF { LibertinusSans-BoldOblique.otf }
- { \tl_set:Nn \g_@@_font_style_libertinus_bfsl_tl { BoldOblique } }
- { \tl_set:Nn \g_@@_font_style_libertinus_bfsl_tl { Bold } }
- }
- {
- \tl_set:Nn \g_@@_font_family_libertinus_serif_tl { libertinusserif }
- \tl_set:Nn \g_@@_font_family_libertinus_sans_tl { libertinussans }
- \tl_set:Nn \g_@@_font_family_libertinus_math_tl { libertinusmath }
- \tl_set:Nn \g_@@_font_style_libertinus_rm_tl { regular }
- \tl_set:Nn \g_@@_font_style_libertinus_bf_tl { bold }
- \tl_set:Nn \g_@@_font_style_libertinus_it_tl { italic }
- \tl_set:Nn \g_@@_font_style_libertinus_bfit_tl { bolditalic }
- \tl_set:Nn \g_@@_font_style_libertinus_bfsl_tl { bolditalic }
- }
-\fontspec_font_if_exist:nTF { XITS-Regular.otf }
- {
- \tl_set:Nn \g_@@_font_family_xits_tl { XITS }
- \tl_set:Nn \g_@@_font_style_xits_rm_tl { Regular }
- \tl_set:Nn \g_@@_font_style_xits_bf_tl { Bold }
- \tl_set:Nn \g_@@_font_style_xits_it_tl { Italic }
- \tl_set:Nn \g_@@_font_style_xits_bfit_tl { BoldItalic }
- \tl_set:Nn \g_@@_font_name_xits_math_rm_tl { XITSMath-Regular }
- \tl_set:Nn \g_@@_font_name_xits_math_bf_tl { XITSMath-Bold }
- }
- {
- \tl_set:Nn \g_@@_font_family_xits_tl { xits }
- \tl_set:Nn \g_@@_font_style_xits_rm_tl { regular }
- \tl_set:Nn \g_@@_font_style_xits_bf_tl { bold }
- \tl_set:Nn \g_@@_font_style_xits_it_tl { italic }
- \tl_set:Nn \g_@@_font_style_xits_bfit_tl { bolditalic }
- \tl_set:Nn \g_@@_font_name_xits_math_rm_tl { xits-math }
- \tl_set:Nn \g_@@_font_name_xits_math_bf_tl { xits-mathbold }
- }
-\tl_set:Nx \g_@@_font_name_libertinus_serif_tl
- { \g_@@_font_family_libertinus_serif_tl - \g_@@_font_style_libertinus_rm_tl }
-\tl_set:Nx \g_@@_font_name_libertinus_sans_tl
- { \g_@@_font_family_libertinus_sans_tl - \g_@@_font_style_libertinus_rm_tl }
-\tl_set:Nx \g_@@_font_name_libertinus_math_tl
- { \g_@@_font_family_libertinus_math_tl - \g_@@_font_style_libertinus_rm_tl }
-\tl_set:Nx \g_@@_font_name_xits_tl
- { \g_@@_font_family_xits_tl - \g_@@_font_style_xits_rm_tl }
-% \end{macrocode}
-% \end{macro}
+% \changes{v0.9}{2023/02/18}{不再检查 Libertinus 和 XITS 字体的文件名。}
%
% \begin{macro}{\@@_load_font_garamond:}
% EB Garamond 系列。
@@ -3417,13 +3331,12 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic
}
- \@@_setsansfont:nn { \g_@@_font_family_libertinus_sans_tl }
+ \@@_setsansfont:nn { LibertinusSans }
{
Extension = .otf,
- UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
- BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
- ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
- BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
}
\@@_setmonofont:nn { lmmonolt10 }
{
@@ -3443,21 +3356,20 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_font_libertinus:
{
- \@@_setmainfont:nn { \g_@@_font_family_libertinus_serif_tl }
+ \@@_setmainfont:nn { LibertinusSerif }
{
Extension = .otf,
- UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
- BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
- ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
- BoldItalicFont = *-\g_@@_font_style_libertinus_bfit_tl
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
}
- \@@_setsansfont:nn { \g_@@_font_family_libertinus_sans_tl }
+ \@@_setsansfont:nn { LibertinusSans }
{
Extension = .otf,
- UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
- BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
- ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
- BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
}
\@@_setmonofont:nn { lmmonolt10 }
{
@@ -3467,7 +3379,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
ItalicFont = *-oblique,
BoldItalicFont = *-boldoblique
}
- \@@_setmathfont:nn { \g_@@_font_name_libertinus_math_tl .otf } { }
+ \@@_setmathfont:nn { LibertinusMath-Regular.otf } { }
}
% \end{macrocode}
% \end{macro}
@@ -3494,14 +3406,13 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic
}
- \@@_setsansfont:nn { \g_@@_font_family_libertinus_sans_tl }
+ \@@_setsansfont:nn { LibertinusSans }
{
Extension = .otf,
- UprightFont = *-\g_@@_font_style_libertinus_rm_tl,
- BoldFont = *-\g_@@_font_style_libertinus_bf_tl,
- ItalicFont = *-\g_@@_font_style_libertinus_it_tl,
- BoldItalicFont = *-\g_@@_font_style_libertinus_bfsl_tl,
- Scale = MatchUppercase
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ Scale = MatchUppercase,
}
\@@_setmonofont:nn { lmmonolt10 }
{
@@ -3521,13 +3432,13 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macrocode}
\cs_new_protected:Npn \@@_load_font_times:
{
- \@@_setmainfont:nn { \g_@@_font_family_xits_tl }
+ \@@_setmainfont:nn { XITS }
{
- Extension = .otf,
- UprightFont = *-\g_@@_font_style_xits_rm_tl,
- BoldFont = *-\g_@@_font_style_xits_bf_tl,
- ItalicFont = *-\g_@@_font_style_xits_it_tl,
- BoldItalicFont = *-\g_@@_font_style_xits_bfit_tl
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic,
}
\@@_setsansfont:nn { texgyreheros }
{
@@ -3546,8 +3457,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
BoldItalicFont = *-bolditalic,
Ligatures = CommonOff
}
- \@@_setmathfont:nn { \g_@@_font_name_xits_math_rm_tl .otf }
- { BoldFont = \g_@@_font_name_xits_math_bf_tl .otf }
+ \@@_setmathfont:nn { XITSMath-Regular.otf }
+ { BoldFont = XITSMath-Bold.otf }
}
% \end{macrocode}
% \end{macro}
@@ -3560,8 +3471,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\@@_setmainfont:nn { Times~ New~ Roman } { }
\@@_setsansfont:nn { Arial } { }
\@@_setmonofont:nn { Courier~ New } { }
- \@@_setmathfont:nn { \g_@@_font_name_xits_math_rm_tl .otf }
- { BoldFont = \g_@@_font_name_xits_math_bf_tl .otf }
+ \@@_setmathfont:nn { XITSMath-Regular.otf }
+ { BoldFont = XITSMath-Bold.otf }
}
% \end{macrocode}
% \end{macro}
@@ -3754,41 +3665,18 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
% \subsubsection{字号}
%
-% \begin{macrocode}
-\keys_define:nn { fdu / style }
- {
-% \end{macrocode}
-%
% \begin{macro}{style/font-size}
+% \changes{v0.9}{2023/02/08}{通过引入 \file{ctex-c5size.clo} 来修改字号。}
% |font-size| 不是文档类选项,不能传给 \cls{ctexbook} 文档类,因此
-% 只能手动重定义字号命令。
+% 需要手动引入 |.clo| 文件。
% \begin{macrocode}
+\keys_define:nn { fdu / style }
+ {
font-size .choice:,
font-size .value_required:n = true,
font-size / -4 .code:n = { },
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\tiny,\scriptsize,\footnotesize,\small,
-% \normalsize,\large,\Large,\LARGE,\huge,\Huge}
-% 默认使用小四号字,所以只有五号字需要重新设置。
-% \begin{macrocode}
- font-size / 5 .code:n =
- {
- \RenewDocumentCommand \tiny { } { \zihao { 7 } }
- \RenewDocumentCommand \scriptsize { } { \zihao { -6 } }
- \RenewDocumentCommand \footnotesize { } { \zihao { 6 } }
- \RenewDocumentCommand \small { } { \zihao { -5 } }
- \RenewDocumentCommand \normalsize { } { \zihao { 5 } }
- \RenewDocumentCommand \large { } { \zihao { -4 } }
- \RenewDocumentCommand \Large { } { \zihao { -3 } }
- \RenewDocumentCommand \LARGE { } { \zihao { -2 } }
- \RenewDocumentCommand \huge { } { \zihao { 2 } }
- \RenewDocumentCommand \Huge { } { \zihao { 1 } }
-%<class-en> }
+ font-size / 5 .code:n = { \ctex_file_input:n { ctex-c5size.clo } },
%<class-en> }
-%<*class>
- },
% \end{macrocode}
% \end{macro}
%
@@ -3798,6 +3686,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \changes{v0.6}{2017/10/14}{支持类别码和 TECKit 映射两种机制。}
% 设置句号形状(圆圈或是圆点)。
% \begin{macrocode}
+%<*class>
fullwidth-stop .choice:,
fullwidth-stop .value_required:n = true,
% \end{macrocode}
@@ -3985,17 +3874,31 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
%
% \changes{v0.7d}{2019/03/24}{优化目录、摘要、参考文献等的标题实现。}
+% \changes{v0.9}{2023/02/05}{在目录和书签中删除章标题中的 \tn{quad}。}
+%
+% \begin{macro}{\@@_sanitize_chapter_title:n}
+% 删除章标题中的 \tn{quad}。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_sanitize_chapter_title:n #1
+ {
+ \tl_clear:N \l_@@_tmpa_tl
+ \tl_set:No \l_@@_tmpa_tl {#1}
+ \tl_remove_all:Nn \l_@@_tmpa_tl { \quad }
+ }
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\@@_chapter:n,\@@_chapter:V}
% 手动生成章的标题,用于摘要、参考文献等。
% \begin{macrocode}
\cs_new_protected:Npn \@@_chapter:n #1
{
+ \@@_sanitize_chapter_title:n {#1}
\group_begin:
\ctexset { chapter / numbering = false }
- \chapter {#1}
- \@@_chapter_header:n {#1}
+ \chapter [ \l_@@_tmpa_tl ] {#1}
\group_end:
+ \@@_chapter_header:n {#1}
}
\cs_generate_variant:Nn \@@_chapter:n { V }
% \end{macrocode}
@@ -4007,9 +3910,10 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macrocode}
\cs_new_protected:Npn \@@_chapter_no_toc:n #1
{
- \chapter * {#1}
+ \chapter * {#1}
+ \@@_sanitize_chapter_title:n {#1}
+ \pdfbookmark [0] { \l_@@_tmpa_tl } { toc }
\@@_chapter_header:n {#1}
- \pdfbookmark [0] {#1} { toc }
}
\cs_generate_variant:Nn \@@_chapter_no_toc:n { V }
% \end{macrocode}
@@ -4128,13 +4032,6 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_fn_symbol_libertinus_sans:n}
-% \opt{libertinus} 阳文无衬线版。符号排列与普通版相同。
-% \begin{macrocode}
-\cs_new_eq:NN \@@_fn_symbol_libertinus_sans:n \@@_fn_symbol_libertinus:n
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_fn_symbol_pifont:n}
% \opt{pifont} 普通版。以下四种都只包含 \numrange{1}{10}。
% \begin{macrocode}
@@ -4226,18 +4123,18 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macrocode}
\c_@@_fn_style_libertinus_tl
{
- \fontspec { \g_@@_font_name_libertinus_serif_tl .otf }
+ \fontspec { LibertinusSerif-Regular.otf }
\@@_fn_symbol_libertinus:n {#1}
}
\c_@@_fn_style_libertinus_neg_tl
{
- \fontspec { \g_@@_font_name_libertinus_serif_tl .otf }
+ \fontspec { LibertinusSerif-Regular.otf }
\@@_fn_symbol_libertinus_neg:n {#1}
}
\c_@@_fn_style_libertinus_sans_tl
{
- \fontspec { \g_@@_font_name_libertinus_sans_tl .otf }
- \@@_fn_symbol_libertinus_sans:n {#1}
+ \fontspec { LibertinusSans-Regular.otf }
+ \@@_fn_symbol_libertinus:n {#1}
}
% \end{macrocode}
% \opt{pifont} 类型无需进行额外的操作。
@@ -4255,17 +4152,17 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macrocode}
\c_@@_fn_style_xits_tl
{
- \fontspec { \g_@@_font_name_xits_tl .otf }
+ \fontspec { XITS-Regular.otf }
\@@_fn_symbol_xits:n {#1}
}
\c_@@_fn_style_xits_sans_tl
{
- \fontspec { \g_@@_font_name_xits_tl .otf }
+ \fontspec { XITS-Regular.otf }
\@@_fn_symbol_xits_sans:n {#1}
}
\c_@@_fn_style_xits_sans_neg_tl
{
- \fontspec { \g_@@_font_name_xits_tl .otf }
+ \fontspec { XITS-Regular.otf }
\@@_fn_symbol_xits_sans_neg:n {#1}
}
}
@@ -4356,9 +4253,10 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \cs{new\-the\-orem}。}
%
% \begin{macro}{\newtheorem}
+% \changes{v0.9}{2023/02/08}{改用 \cs{DeclareDocumentCommand} 定义。}
% 定义新的定理环境。
% \begin{macrocode}
-\RenewDocumentCommand \newtheorem { s o m m }
+\DeclareDocumentCommand \newtheorem { s o m m }
{
% \end{macrocode}
% 默认情况下,由 \cs{newtheorem*} 创建的定理其证毕符号为 \cs{QED},
@@ -4587,6 +4485,35 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
% \end{variable}
%
+% \changes{v0.9}{2023/02/12}{删除论文标题中的 \tn{\textbackslash} 和汉字间的空格。}
+%
+% \begin{variable}{\l_@@_info_title_sanitized_tl,
+% \l_@@_info_title_en_sanitized_tl}
+% 处理后的论文标题。
+% \begin{macrocode}
+\tl_new:N \l_@@_info_title_sanitized_tl
+\tl_new:N \l_@@_info_title_en_sanitized_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_set_title:nn}
+% 设置论文标题,并删除其中的 |\\| 和汉字间的空格。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_set_title:nn #1#2
+ {
+ \tl_set:cn { l_@@_info_ #1 _tl } {#2}
+ \tl_set:cn { l_@@_info_ #1 _sanitized_tl } {#2}
+ \tl_replace_all:cnn { l_@@_info_ #1 _sanitized_tl } { \\ } { ~ }
+ \regex_replace_all:nnc
+ { \s+ } { \ }
+ { l_@@_info_ #1 _sanitized_tl }
+ \regex_replace_all:nnc
+ { ([\x{4e00}-\x{9fff}]) \s+ ([\x{4e00}-\x{9fff}]) } { \1 \2 }
+ { l_@@_info_ #1 _sanitized_tl }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% 定义 |fdu/info| 键值类。
% \begin{macrocode}
\keys_define:nn { fdu / info }
@@ -4607,8 +4534,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macro}{info/title,info/title*}
% 论文题目。以下带星号的项目均表示相应的英文字段。
% \begin{macrocode}
- title .tl_set:N = \l_@@_info_title_tl,
- title* .tl_set:N = \l_@@_info_title_en_tl,
+ title .code:n = { \@@_set_title:nn { title } {#1} },
+ title* .code:n = { \@@_set_title:nn { title_en } {#1} },
% \end{macrocode}
% \end{macro}
%
@@ -4769,7 +4696,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
% \subsubsection{定义内部函数}
%
-% \begin{macro}{\@@_spread_box:nn}
+% \begin{macro}{\@@_spread_box:nn,\@@_spread_box:no}
% 分散对齐的水平盒子。
% \begin{arguments}
% \item 宽度
@@ -4777,14 +4704,13 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{arguments}
% 利用 \cs{tl_map_inline:nn} 在字符间插入 \tn{hfil};紧随其后的 \tn{unskip}
% 将会去掉最后一个 \tn{hfil}。见 \url{https://tex.stackexchange.com/q/169689}。
-% |#2| 需要完全展开以避免 underfull 警告。
% \begin{macrocode}
\cs_new_protected:Npn \@@_spread_box:nn #1#2
{
\mode_leave_vertical:
- \hbox_to_wd:nn {#1}
- { \tl_map_inline:xn {#2} { ##1 \hfil } \unskip }
+ \hbox_to_wd:nn {#1} { \tl_map_inline:nn {#2} { ##1 \hfil } \unskip }
}
+\cs_generate_variant:Nn \@@_spread_box:nn { no }
% \end{macrocode}
% \end{macro}
%
@@ -4796,7 +4722,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\mode_leave_vertical:
\hbox_to_wd:nn {#1} { \hfil #2 \hfil }
}
-\cs_generate_variant:Nn \@@_center_box:nn { Vn }
+\cs_generate_variant:Nn \@@_center_box:nn { Vn }
% \end{macrocode}
% \end{macro}
%
@@ -4832,36 +4758,6 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_get_max_text_width:NN}
-% \changes{v0.6}{2017/11/24}{移除不必要的字号设置。}
-% 获取多个文本中的最大宽度,并存入 |dim| 型变量。
-% \begin{arguments}
-% \item |dim| 型变量
-% \item 文本 |clist|
-% \end{arguments}
-% 当 \cs{l_@@_tmpa_clist} 非空时,弹出最后一个元素
-% 赋给 \cs{l_@@_tmpa_tl},获取其长度后与 |#1| 进行比较,
-% 二者中较大的那一个将成为 |#1| 的新值。
-% 不断循环,直至 \cs{l_@@_tmpa_clist} 为空。
-% \begin{macrocode}
-\cs_new:Npn \@@_get_max_text_width:NN #1#2
- {
-% \end{macrocode}
-% 这里用 |group| 确保局部变量不会被污染。
-% \begin{macrocode}
- \group_begin:
- \clist_set_eq:NN \l_@@_tmpa_clist #2
- \bool_until_do:nn { \clist_if_empty_p:N \l_@@_tmpa_clist }
- {
- \clist_pop:NN \l_@@_tmpa_clist \l_@@_tmpa_tl
- \@@_get_text_width:NV \l_@@_tmpa_dim \l_@@_tmpa_tl
- \dim_gset:Nn #1 { \dim_max:nn {#1} { \l_@@_tmpa_dim } }
- }
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_blank_underline:n}
% \changes{v0.4}{2017/08/14}{改用 \tn{rule} 绘制下划线,不再依赖
% \pkg{ulem} 宏包。}
@@ -4953,7 +4849,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\clist_item:Nn \c_@@_thesis_type_clist
{ \g_@@_thesis_type_int }
}
- \@@_spread_box:nn { 0.45 \textwidth } { \l_@@_tmpa_tl }
+ \@@_spread_box:no { 0.45 \textwidth } { \l_@@_tmpa_tl }
}
% \end{macrocode}
% \end{macro}
@@ -4975,68 +4871,67 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_cover_info:,\l_@@_cover_info_left_width_tl}
+% \begin{macro}{\@@_cover_info_left:n}
+% 信息栏左侧字段。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cover_info_left:n #1
+ {
+ \int_case:nn { \l_@@_info_degree_type_int }
+ {
+ { 1 } { \_@@_spread_box:nn { 6 em } {#1} }
+ { 2 } { \_@@_spread_box:nn { 9 em } {#1} }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{variable}{\c_@@_cover_info_align_tl}
+% 信息栏对齐格式:左右两栏均居中,中间以冒号分隔。
+% \begin{macrocode}
+\tl_const:Nn \c_@@_cover_info_align_tl
+ { c @ { \c_@@_fwid_colon_tl } c }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_cover_info:}
% \changes{v0.8}{2021/09/21}{调整专业学位的封面信息栏。}
+% \changes{v0.9}{2023/02/05}{封面信息栏改用表格实现。}
% 信息栏。
% \begin{macrocode}
\cs_new_protected:Npn \@@_cover_info:
{
- \tl_set:Nx \l_@@_cover_info_left_width_tl
- {
- \int_case:nn { \l_@@_info_degree_type_int }
- {
- { 1 } { 6 em }
- { 2 } { 9 em }
- }
- }
- \begin{minipage} [ c ] { \textwidth }
- \centering \zihao { 4 }
+ \group_begin:
+ \zihao { 4 }
% \end{macrocode}
-% 读取左侧名称字段。
+% 专业学位与学术学位对应的左侧字段有所不同,这里统一存入 \cs{c_@@_name_major_tl}。
% \begin{macrocode}
- \clist_set:Nx \l_@@_tmpa_clist
+ \int_compare:nNnT { \l_@@_info_degree_type_int } = { 2 }
{
- \c_@@_name_department_tl,
- \int_case:nn { \l_@@_info_degree_type_int }
- {
- { 1 } { \c_@@_name_major_tl }
- { 2 } { \c_@@_name_major_professional_tl }
- },
- \c_@@_name_author_tl,
- \c_@@_name_supervisor_tl,
- \c_@@_name_date_tl,
+ \tl_set_eq:NN
+ \c_@@_name_major_tl \c_@@_name_major_professional_tl
}
% \end{macrocode}
-% 设置信息栏右侧宽度。读取各字段,并将最宽者的宽度赋给
-% \cs{l_@@_tmpb_dim}。
+% 将信息栏的每一行存入 |clist| 变量中。
% \begin{macrocode}
- \clist_set:Nx \l_@@_tmpb_clist
+ \clist_clear:N \l_@@_tmpa_clist
+ \clist_map_inline:nn { department, major, author, supervisor, date }
{
- { \l_@@_info_department_tl },
- { \l_@@_info_major_tl },
- { \l_@@_info_author_tl },
- { \l_@@_info_supervisor_tl },
- { \l_@@_info_date_tl }
+ \clist_gput_right:Nn \l_@@_tmpa_clist
+ {
+ \exp_args:Nx \@@_cover_info_left:n
+ { \tl_use:c { c_@@_name_ ##1 _tl } }
+ &
+ \tl_use:c { l_@@_info_ ##1 _tl }
+ }
}
- \@@_get_max_text_width:NN \l_@@_tmpb_dim \l_@@_tmpb_clist
% \end{macrocode}
-% 用循环输出各字段。
+% 通过 \env{tabular} 环境输出。
% \begin{macrocode}
- \bool_until_do:nn
- { \clist_if_empty_p:N \l_@@_tmpa_clist }
- {
- \clist_pop:NN \l_@@_tmpa_clist \l_@@_tmpa_tl
- \clist_pop:NN \l_@@_tmpb_clist \l_@@_tmpb_tl
- \@@_spread_box:nn
- { \l_@@_cover_info_left_width_tl }
- { \l_@@_tmpa_tl }
- \c_@@_fwid_colon_tl
- \@@_center_box:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl }
- \skip_vertical:n { 1 ex }
- }
- \end{minipage}
+ \begin{tabular} { \c_@@_cover_info_align_tl }
+ \clist_use:Nn \l_@@_tmpa_clist { \\ [ 1 ex ] }
+ \end{tabular}
+ \group_end:
}
-\tl_new:N \l_@@_cover_info_left_width_tl
% \end{macrocode}
% \end{macro}
%
@@ -5227,12 +5122,15 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
%
% \subsubsection{绘制封面}
%
+% \changes{v0.9}{2023/02/18}{为封面添加 PDF 页码。}
+%
% \begin{macro}{\makecoveri}
% 论文封面(封一)。
% \begin{macrocode}
\NewDocumentCommand \makecoveri { }
{
\thispagestyle { empty }
+ \tl_set:Nn \thepage { A }
\UseInstance { fdu / cover } { cover-i-default }
}
% \end{macrocode}
@@ -5246,7 +5144,9 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\NewDocumentCommand \makecoverii { }
{
\thispagestyle { empty }
- \clist_if_empty:NF \l_@@_info_instructors_clist
+ \tl_set:Nn \thepage { B }
+ \clist_if_empty:NTF \l_@@_info_instructors_clist
+ { \hbox:n { } }
{ \UseInstance { fdu / cover } { cover-ii-default } }
}
% \end{macrocode}
@@ -5258,11 +5158,10 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\NewDocumentCommand \makecoveriii { }
{
\cleardoublepage
+ \thispagestyle { empty }
+ \tl_set:Nn \thepage { C }
\tl_if_empty:NTF \l_@@_declaration_page_tl
- {
- \thispagestyle { empty }
- \UseInstance { fdu / cover } { cover-iii-default }
- }
+ { \UseInstance { fdu / cover } { cover-iii-default } }
{ \includepdf { \l_@@_declaration_page_tl } }
}
% \end{macrocode}
@@ -5307,7 +5206,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
type / format = \zihao { 2 },
degree / format = \zihao { 4 },
title / format = \zihao { -2 } \bfseries,
- title-en / format = \@@_line_spread:n { 1.2 } \zihao { 4 } \bfseries,
+ title-en / format =
+ \@@_line_spread:n { 1.2 } \zihao { 4 } \bfseries,
id / bottom-skip = 0 pt plus 1.6 fill,
logo / bottom-skip = 0 pt plus 0.3 fill,
type / bottom-skip = -18 pt,
@@ -5325,7 +5225,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
{
%<class-en> format = \@@_line_spread:N \c_@@_line_spread_fp,
title / content =
- \@@_spread_box:nn { 7 em } { \c_@@_name_instructors_tl },
+ \@@_spread_box:no { 7 em } { \c_@@_name_instructors_tl },
name-list / content =
\clist_use:Nn \l_@@_info_instructors_clist { \par },
title / format = \zihao { 2 } \sffamily,
@@ -5451,7 +5351,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \begin{macro}{\tableofcontents,\listoffigures,\listoftables}
% 修改 \cs{tableofcontents}、\cs{listoffigures} 和 \cs{listoftables} 的定义,
% 使得页眉正确显示,并出现在目录及 PDF 书签中。来自于 \LaTeXe{} 标准文档类
-% \file{book.cls}
+% \file{book.cls}^^A
% \footnote{原代码中只有 \cs{tableofcontents} 的 \cs{@mkboth} 出现在
% \cs{chapter*} 内部,这是出于兼容性的考虑而非 typo。}。
% \begin{macrocode}
@@ -5573,7 +5473,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macro}
%
% \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:,\@@_clc_jel:nn}
-% 关键字列表前要空一行,使用悬挂缩进;分类号不缩进。|\parbox| 之后的间距
+% 关键字列表前要空一行,使用悬挂缩进;分类号不缩进。\tn{parbox} 之后的间距
% 需要调整,见 \url{https://tex.stackexchange.com/a/34982}。
% \begin{macrocode}
\cs_new_protected:Npn \@@_keywords:nNn #1#2#3
@@ -5584,7 +5484,8 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\parbox [t] { \dim_eval:n { \textwidth - \l_@@_tmpa_dim } }
{
\clist_use:Nn #2 {#3} \par
- \cs_gset:Npx \@@_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D }
+ \cs_gset:Npx \@@_keywords_prevdepth:
+ { \dim_use:N \tex_prevdepth:D }
}
}
\cs_new_protected:Npn \@@_clc_jel:nn #1#2
@@ -5641,6 +5542,29 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
% \end{macro}
%
+% \subsection{致谢}
+%
+% \changes{v0.9}{2023/02/06}{新增致谢环境。}
+%
+% \begin{environment}{acknowledgements}
+% 致谢环境。
+% \begin{macrocode}
+\NewDocumentEnvironment { acknowledgements } { }
+ { \@@_acknowledgements_begin: } { }
+% \end{macrocode}
+% \end{environment}
+%
+% \begin{macro}{\@@_acknowledgements_begin:}
+% 致谢页标题。
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_acknowledgements_begin:
+ {
+%<class> \@@_chapter:V \c_@@_name_acknowledgements_tl
+%<class-en> \@@_chapter:V \c_@@_name_acknowledgements_en_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{参考文献著录与引用}
%
% \changes{v0.6}{2017/10/27}{支持 \BibTeX{},以实现参考文献的著录与引用。}
@@ -5742,19 +5666,21 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
\tl_if_empty:NTF \l_@@_bib_style_tl
{
\RequirePackage [ sort & compress ] { gbt7714 }
- \exp_args:No \bibliographystyle { gbt7714- \l_@@_bib_gb_style_tl }
+ \exp_args:No \bibliographystyle
+ { gbt7714- \l_@@_bib_gb_style_tl }
}
{
\RequirePackage [ sort & compress ] { natbib }
- \exp_args:NV \bibliographystyle \l_@@_bib_style_tl
+ \exp_args:No \bibliographystyle
+ { \l_@@_bib_style_tl }
}
\@@_bibtex_setup:
}
}
% \end{macrocode}
% \pkg{biblatex} 会写入 |begindocument/before| 钩子,因此需在其之前通过
-% \texttt{env/document/\-begin} 钩子载入 \pkg{biblatex} 宏包。注意这个钩子仅
-% 适用于 |\begin{document}| 的写法,对于 |\document| 命令本身无效。
+% \texttt{env/doc\-u\-ment/begin} 钩子载入 \pkg{biblatex} 宏包。注意这个
+% 钩子仅适用于 |\begin{document}| 的写法,对于 |\document| 命令本身无效。
% \begin{macrocode}
\@@_gadd_ltxhook:nn { env/document/begin }
{
@@ -5915,8 +5841,7 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \end{macrocode}
% \end{macro}
%
-% \changes{v0.7}{2018/01/25}{同步 \pkg{gbt7714} v1.0,移除有关超链接
-% 的额外设置。}
+% \changes{v0.7}{2018/01/25}{同步 \pkg{gbt7714} v1.0,移除有关超链接的额外设置。}
% \changes{v0.8}{2021/09/20}{不再将著录用符号修改为中文标点符号。}
%
% \subsection{\pkg{hyperref} 相关配置}
@@ -5927,16 +5852,19 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \changes{v0.7}{2018/01/23}{将 \pkg{hyperref} 相关配置移至模板末尾,
% 以减少冲突。}
%
-% \begin{macro}{\hypersetup,\fdu_hyperref_setup:n}
+% \begin{macro}{\hypersetup}
+% \changes{v0.9}{2023/02/08}{改用 \cs{DeclareDocumentCommand} 定义。}
+% \begin{macro}{\fdu_hyperref_setup:n}
% \pkg{hyperref} 宏包是在导言区之后才引入的。若要在导言区中使用
% \tn{hypersetup} 命令,必须另行定义。
% \begin{macrocode}
-\NewDocumentCommand \hypersetup { m }
+\DeclareDocumentCommand \hypersetup { m }
{ \fdu_hyperref_setup:n {#1} }
\cs_new_protected:Npn \fdu_hyperref_setup:n #1
{ \clist_gput_right:Nn \g_@@_to_hyperref_clist {#1} }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_set_hyperlink_color_key:n}
% 设置超链接颜色选项。最后的逗号用于确保 \pkg{l3keys} 可以正确解析,不能省去。
@@ -6060,12 +5988,12 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
% 填写 PDF 元信息。
% \begin{macrocode}
%<*class>
- pdftitle = \l_@@_info_title_tl,
+ pdftitle = \l_@@_info_title_sanitized_tl,
pdfauthor = \l_@@_info_author_tl,
pdfkeywords = \l_@@_info_keywords_clist,
%</class>
%<*class-en>
- pdftitle = \l_@@_info_title_en_tl,
+ pdftitle = \l_@@_info_title_en_sanitized_tl,
pdfauthor = \l_@@_info_author_en_tl,
pdfkeywords = \l_@@_info_keywords_en_clist,
%</class-en>
@@ -6338,17 +6266,20 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
{ lot } { 表格目录 },
{ bib_en } { Bibliography },
{ pdf_creator } { LaTeX~ with~ fduthesis~ class },
- { orig_decl } { \c_@@_name_simp_tl \\ 学位论文独创性声明 },
- { auth_decl } { \c_@@_name_simp_tl \\ 学位论文使用授权声明 }
+ { orig_decl }
+ { \c_@@_name_simp_tl \\ 学位论文独创性声明 },
+ { auth_decl }
+ { \c_@@_name_simp_tl \\ 学位论文使用授权声明 },
}
{ \@@_define_name:nn #1 }
\clist_map_inline:nn
{
- { abstract } { 摘 \quad 要 } { Abstract },
- { keywords } { 关键字 } { Keywords: },
- { clc } { 中图分类号 } { CLC~ code: },
- { jel } { JEL 分类号 } { JEL~ code: },
- { notation } { 符号表 } { List~ of~ Symbols }
+ { abstract } { 摘 \quad 要 } { Abstract },
+ { keywords } { 关键字 } { Keywords: },
+ { clc } { 中图分类号 } { CLC~ code: },
+ { jel } { JEL 分类号 } { JEL~ code: },
+ { notation } { 符号表 } { List~ of~ Symbols },
+ { acknowledgements } { 致 \quad 谢 } { Acknowledgements }
}
{ \@@_define_name:nnn #1 }
% \end{macrocode}
@@ -6366,9 +6297,18 @@ Copyright (C) 2017&ndash;2022 by Xiangdong Zeng <xdzeng96@gmail.com>.
{ theorem } { 定理 } { Theorem }
}
{ \@@_define_name:nnn #1 }
+% \end{macrocode}
+%
+% \begin{variable}{\c_@@_name_major_professional_tl}
+% \changes{v0.9}{2023/02/05}{处理右括号带来的间距。}
+% 处理右括号带来的间距。
+% \begin{macrocode}
+\tl_put_right:Nn \c_@@_name_major_professional_tl
+ { { \skip_horizontal:n { -0.5 em } } }
%</definition>
%<@@=>
% \end{macrocode}
+% \end{variable}
%
% \clearpage
%
diff --git a/macros/latex/contrib/fduthesis/fduthesis.pdf b/macros/latex/contrib/fduthesis/fduthesis.pdf
index 5d982b15aa..f3489a1812 100644
--- a/macros/latex/contrib/fduthesis/fduthesis.pdf
+++ b/macros/latex/contrib/fduthesis/fduthesis.pdf
Binary files differ
diff --git a/macros/latex/contrib/hrefhide/README b/macros/latex/contrib/hrefhide/README
index 79b2538d5a..bd65799b5d 100644
--- a/macros/latex/contrib/hrefhide/README
+++ b/macros/latex/contrib/hrefhide/README
@@ -1,4 +1,4 @@
-README for hrefhide package, 2011/04/29, v1.0f
+README for hrefhide package, 2023-02-26, v1.1a
TABLE OF CONTENTS
@@ -8,45 +8,52 @@ TABLE OF CONTENTS
2 Download
3 Installation
4 Additional Packages
-5 New Features
-6 Package Compatibility
-7 Authors/Maintainers
-8 Bug Reports
-9 Known Problems
+5 Package Compatibility
+6 Author/Maintainer
+7 Bug Reports
+8 Known Problems
1 INTRODUCTION
==============
-This package provides the command \hrefdisplayonly (additionally to \href of
-the hyperref package by Heiko Oberdiek). While the (hyperlinked) text appears
-like an ordinary nhref in the compiled pdf-file, the same text will be "hidden"
-when printing the text. It is not really invisible, but just has the same colour
-as the background (default: white). Therefore the layout is not changed when
-printing the document.
+This LaTeX package provides the command \hrefdisplayonly (additionally to
+\href of the hyperref package). While the (hyperlinked) text appears like an
+ordinary \href in the compiled pdf-file, the same text will be "hidden" when
+printing the text. It is not really invisible, but just has the same color as the
+background (default: white). Therefore the layout is not changed when printing
+the document.
+
Further the commands \hycon and \hycoff (hyper-colour-on/off) can be used
-to simulate switching option ocgcolorlinks of hyperref package on and off.
+to simulate switching option ocgcolorlinks of the hyperref package on and off.
+This package is possibly obsolete, see section 3: "Alternatives"
+in the documentation.
+
+This material is published under the LPPL 1.3c: This work may be
+distributed and/or modified under the conditions of the LaTeX Project
+Public License, either version 1.3c of this license or (at your option)
+any later version. This version of this license is in
+https://www.latex-project.org/lppl/lppl-1-3c.txt
+and the latest version of this license is in
+https://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of
+LaTeX version 2005-12-01 or later.
2 DOWNLOAD
==========
-`hrefhide' is available on CTAN:
- CTAN:macros/latex/contrib/hrefhide/
-
-Also a ZIP file is provided that contains the files, already
-sorted in a TDS tree (should become available on CTAN soon):
- CTAN:install/macros/latex/contrib/hrefhide.tds.zip
-
-`CTAN:' means one of the `Comprehensive TeX Archive Network'
-nodes or one of its mirrors. This is explained in
- http://www.tex.ac.uk/cgi-bin/texfaq2html?label=archives
+"hrefhide" is available on CTAN:
+https://www.ctan.org/pkg/pagecolor
-The CTAN stuff will be mirrored automatically from the
-ftp server, so
- ftp://ftp.tug.org/pub/tex/pagesLTS/
-corresponds to
- CTAN:macros/latex/contrib/pagesLTS/
+Also a ZIP file is provided that contains the files:
+the manual (hrefhide.pdf), the example (hrefhide-example.tex),
+the compiled example (hrefhide-example.pdf),
+driver (hrefhide.drv), hrefhide.dtx,
+installation file (hrefhide.ins),
+the style file (hrefhide.sty),
+and this README, already sorted in a TDS tree:
+https://mirror.ctan.org/install/macros/latex/contrib/pagecolor.tds.zip
3 INSTALLATION
@@ -54,10 +61,11 @@ corresponds to
Installation with ZIP file in TDS format
----------------------------------------
-The ZIP file `hrefhide.tds.zip' contains the files sorted
-in a TDS tree. Thus you can directly unpack the ZIP file
-inside a TDS tree.
-(See CTAN:tds.zip for an explanation of TDS.)
+The ZIP file "hrefhide.tds.zip" contains the files
+sorted in a TDS tree. Thus you can directly unpack the
+ZIP file inside a TDS tree.
+See https://www.ctan.org/TDS-guidelines for an explanation
+of TDS.
Example:
cd /...somewhere.../texmf
unzip /...downloadpath.../hrefhide.tds.zip
@@ -68,33 +76,39 @@ Example:
Manual installation
-------------------
-a) Download the hrefhide files from CTAN or the TUG server.
+a) Download the hrefhide files from CTAN.
If necessary, unpack them.
b) Generate the package and driver files:
- tex hrefhide.ins
-c) Install the files `*.sty', and `*.cfg' in your TDS tree:
- cp *.sty *.cfg TDS:tex/latex/hrefhide/
- Replace `TDS:' by the prefix of your TDS tree
+ tex hrefhide.dtx
+c) Install the file "*.sty" in your TDS tree:
+ cp hrefhide.sty TDS:tex/latex/hrefhide/
+ Replace "TDS:" by the prefix of your TDS tree
(texmf directory).
-d) Copy the documentation files to
+d) Create the documentation, if necessary, e.g.
+ pdflatex hrefhide.dtx
+ makeindex -s gind.ist hrefhide.idx
+ pdflatex hrefhide.dtx
+ makeindex -s gind.ist hrefhide.idx
+ pdflatex hrefhide.dtx
+e) Update the databases if necessary, e.g. for TeXLive
+ texhash or mktexlsr.
+f) Create the hrefhide-example.pdf, if necessary, e.g.
+ pdflatex hrefhide-example.tex
+ pdflatex hrefhide-example.tex
+ pdflatex hrefhide-example.tex
+g) Copy the documentation files to
"TDS:doc/latex/hrefhide/":
README, hrefhide.pdf, hrefhide-example.tex,
hrefhide-example.pdf.
-e) Update the databases if necessary, e.g. for teTeX:
- mktexlsr .../texmf
4 ADDITIONAL PACKAGES
=====================
-Depending on the driver and option settings, hrefhide loads
-other packages:
-* hyperref.sty:
- CTAN:macros/latex/contrib/hyperref/hyperref.dtx
-* kvoptions.sty:
- CTAN:macros/latex/contrib/oberdiek/kvoptions.dtx
-* xcolor.sty:
- CTAN:/macros/latex/contrib/xcolor/xcolor.dtx
+hrefhide loads other packages:
+- xcolor
+- hyperref
+- kvoptions
which again load other packages
(see the result of the \listfiles command in the log-file
of the example).
@@ -112,26 +126,26 @@ hrefhide must be loaded AFTER package hyperref:
6 AUTHOR/MAINTAINER
-=====================
+===================
-* Hans-Martin Mnch
+H.-Martin Münch
7 BUG REPORTS
-==============
+=============
A bug report should contain:
* Comprehensive problem description. This includes error or
warning messages.
- * \errorcontextlines=\maxdimen can be added in the
- TeX code to get more informations in TeX error messages.
-* Minimal test file that shows the problem, but does not
- contain any unnecessary packages and code.
+* \errorcontextlines=\maxdimen can be added in the
+ TeX code to get more information in TeX error messages.
+* Minimal test file that shows the problem,
+ but does not contain any unnecessary packages and code.
* Used drivers/programs.
* Version information about used packages and programs.
- * If you are using LaTeX, then add "\listfiles". Then
- a list of version informations is printed at the end
- of the LaTeX run.
+* If you are using LaTeX, then add "\listfiles" to the document.
+ Then a list of version information is printed at the end
+ of the LaTeX run.
* Please no other files than the minimal test file.
The other files .log, .dvi, .ps, .pdf are seldom
necessary, so send them only on request.
@@ -140,13 +154,13 @@ A bug report should contain:
Bug address
-----------
Bug reports can be send to the maintainer:
- Hans-Martin Mnch
+ H.-Martin Münch
<Martin [dot] Muench [at] Uni-Bonn [dot] de>
8 KNOWN PROBLEMS
-=================
+================
* as yet: none... - Well, of course there are all issues
of the hyperref package with ocgcolorlinks option,
- e.g. no linebreaks inside links.
+ e.g. no linebreaks inside links. \ No newline at end of file
diff --git a/macros/latex/contrib/hrefhide/hrefhide-example.pdf b/macros/latex/contrib/hrefhide/hrefhide-example.pdf
index 76a4f9e3ec..0748c23e6c 100644
--- a/macros/latex/contrib/hrefhide/hrefhide-example.pdf
+++ b/macros/latex/contrib/hrefhide/hrefhide-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/hrefhide/hrefhide.dtx b/macros/latex/contrib/hrefhide/hrefhide.dtx
index df52387a21..1fdc1e6757 100644
--- a/macros/latex/contrib/hrefhide/hrefhide.dtx
+++ b/macros/latex/contrib/hrefhide/hrefhide.dtx
@@ -1,71 +1,38 @@
% \iffalse meta-comment
%
% File: hrefhide.dtx
-% Version: 2011/04/29 v1.0f
+% Version: 2023-02-26 v1.1a
+% Info: Hiding hyperrefs when printing pdf files
%
-% Copyright (C) 2010, 2011 by
-% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+% Copyright © 2010 - 2023 by
+% H.-Martin Münch <Martin dot Muench at Uni-Bonn dot de>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any later
% version. This version of this license is in
-% http://www.latex-project.org/lppl/lppl-1-3c.txt
+% https://www.latex-project.org/lppl/lppl-1-3c.txt
% and the latest version of this license is in
-% http://www.latex-project.org/lppl.txt
+% https://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of
-% LaTeX version 2005/12/01 or later.
+% LaTeX version 2005-12-01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
-% The Current Maintainer of this work is H.-Martin Muench.
-%
-% This work consists of the main source file hrefhide.dtx
-% and the derived files
-% hrefhide.sty, hrefhide.pdf, hrefhide.ins, hrefhide.drv,
-% hrefhide-example.tex.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/hrefhide/hrefhide.dtx
-% CTAN:macros/latex/contrib/hrefhide/hrefhide.pdf
-% CTAN:install/macros/latex/contrib/hrefhide.tds.zip
-%
-% Unpacking:
-% (a) If hrefhide.ins is present:
-% tex hrefhide.ins
-% (b) Without hrefhide.ins:
-% tex hrefhide.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{hrefhide.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If hrefhide.drv is present:
-% (pdf)latex hrefhide.drv
-% makeindex -s gind.ist hrefhide.idx
-% (pdf)latex hrefhide.drv
-% makeindex -s gind.ist hrefhide.idx
-% (pdf)latex hrefhide.drv
-% (b) Without hrefhide.drv:
-% (pdf)latex hrefhide.dtx
-% makeindex -s gind.ist hrefhide.idx
-% (pdf)latex hrefhide.dtx
-% makeindex -s gind.ist hrefhide.idx
-% (pdf)latex hrefhide.dtx
-%
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use DIN A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Installation:
-% ! When manually installing, please first make sure !
-% ! that there is no old version of hrefhide at !
-% ! some obsolete place in your system. !
-% TDS:tex/latex/hrefhide/hrefhide.sty
-% TDS:doc/latex/hrefhide/hrefhide.pdf
-% TDS:doc/latex/hrefhide/hrefhide-example.tex
-% TDS:source/latex/hrefhide/hrefhide.dtx
+% The Current Maintainer of this work is H.-Martin Münch.
+%
+% This work consists of the main source file hrefhide.dtx,
+% the README, and the derived files
+% hrefhide.sty, hrefhide.pdf,
+% hrefhide.ins, hrefhide.drv,
+% hrefhide-example.tex, hrefhide-example.pdf.
+%
+% "hrefhide" is available on CTAN:
+% https://ctan.org/pkg/hrefhide
+%
+% Also a TDS.ZIP file is provided that contains all the files
+% already sorted in a TDS tree:
+% https://mirror.ctan.org/install/macros/latex/contrib/hrefhide.tds.zip
%
%<*ignore>
\begingroup
@@ -80,10 +47,10 @@
%</ignore>
%<*install>
\input docstrip.tex
-\Msg{***********************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: hrefhide 2011/04/29 v1.0f Hiding hyperrefs when printing pdf files (HMM)}
-\Msg{***********************************************************************************}
+\Msg{************************************************************************************}
+\Msg{* Installation *}
+\Msg{* Package: hrefhide 2023-02-26 v1.1a Hiding hyperrefs when printing pdf files (HMM)*}
+\Msg{************************************************************************************}
\keepsilent
\askforoverwritefalse
@@ -94,34 +61,36 @@
This is a generated file.
Project: hrefhide
-Version: 2011/04/29 v1.0f
-
-Copyright (C) 2010, 2011 by
- H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
+Version: 2023-02-26 v1.1a
+Info: Hiding hyperrefs when printing pdf files
-The usual disclaimer applys:
-If it doesn't work right that's your problem.
-(Nevertheless, send an e-mail to the maintainer
- when you find an error in this package.)
+Copyright (C) 2010 - 2023 by
+ H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in
- http://www.latex-project.org/lppl/lppl-1-3c.txt
+ https://www.latex-project.org/lppl/lppl-1-3c.txt
and the latest version of this license is in
- http://www.latex-project.org/lppl.txt
+ https://www.latex-project.org/lppl.txt
and version 1.3c or later is part of all distributions of
-LaTeX version 2005/12/01 or later.
+LaTeX version 2005-12-01 or later.
This work has the LPPL maintenance status "maintained".
The Current Maintainer of this work is H.-Martin Muench.
-This work consists of the main source file hrefhide.dtx
-and the derived files
- hrefhide.sty, hrefhide.pdf, hrefhide.ins, hrefhide.drv,
- hrefhide-example.tex.
+This work consists of the main source file hrefhide.dtx,
+the README, and the derived files
+ hrefhide.sty, hrefhide.pdf,
+ hrefhide.ins, hrefhide.drv,
+ hrefhide-example.tex, hrefhide-example.pdf.
+
+In memoriam
+ Claudia Simone Barth + 1996-01-30
+ Tommy Muench + 2014-01-02
+ Hans-Klaus Muench + 2014-08-24
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -142,7 +111,7 @@ and the derived files
\Msg{* To finish the installation you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
-\Msg{* hrefhide.sty*}
+\Msg{* hrefhide.sty}
\Msg{*}
\Msg{* To produce the documentation run the file `hrefhide.drv'}
\Msg{* through (pdf)LaTeX, e.g.}
@@ -168,27 +137,22 @@ and the derived files
% \section{The documentation driver file}
%
% The next bit of code contains the documentation driver file for
-% \TeX{}, i.\,e., the file that will produce the documentation you
+% \TeX , i.\,e., the file that will produce the documentation you
% are currently reading. It will be extracted from this file by the
-% \texttt{docstrip} programme. That is, run \LaTeX\ on \texttt{docstrip}
+% \texttt{docstrip} programme. That is, run \LaTeX{} on \texttt{docstrip}
% and specify the \texttt{driver} option when \texttt{docstrip}
% asks for options.
%
% \begin{macrocode}
%<*driver>
-\NeedsTeXFormat{LaTeX2e}[2009/09/24]
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
\ProvidesFile{hrefhide.drv}%
- [2011/04/29 v1.0f Hiding hyperrefs when printing pdf files (HMM)]%
-\documentclass{ltxdoc}[2007/11/11]% v2.0u
-\usepackage{holtxdoc}[2011/02/04]% v0.21
-%% hrefhide may work with earlier versions of LaTeX2e and those
-%% class and package, but this was not tested.
-%% Please consider updating your LaTeX, class, and package
-%% to the most recent version (if they are not already the most
-%% recent version).
+ [2023-02-26 v1.1a Hiding hyperrefs when printing pdf files (HMM)]
+\documentclass{ltxdoc}[2022/06/22]% v2.1i Standard LaTeX documentation class
+\usepackage{holtxdoc}[2019/12/09]% v0.30 Private additional ltxdoc support (HO)
\hypersetup{%
pdfsubject={Hiding hyperrefs when printing pdf files (HMM)},%
- pdfkeywords={LaTeX, hrefhide, hyperref, href, pdf, hide, print, Hans-Martin Muench},%
+ pdfkeywords={LaTeX, hrefhide, hyperref, href, pdf, hide, print},%
pdfencoding=auto,%
pdflang={en},%
breaklinks=true,%
@@ -204,34 +168,14 @@ and the derived files
pdfnewwindow=true%
}
\CodelineIndex
-\hyphenation{printing docu-ment}
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
+\hyphenation{docu-ment}
\begin{document}
\DocInput{hrefhide.dtx}%
\end{document}
%</driver>
% \end{macrocode}
-%
% \fi
%
-% \CheckSum{144}
-%
-% \CharacterTable
-% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-% Digits \0\1\2\3\4\5\6\7\8\9
-% Exclamation \! Double quote \" Hash (number) \#
-% Dollar \$ Percent \% Ampersand \&
-% Acute accent \' Left paren \( Right paren \)
-% Asterisk \* Plus \+ Comma \,
-% Minus \- Point \. Solidus \/
-% Colon \: Semicolon \; Less than \<
-% Equals \= Greater than \> Question mark \?
-% Commercial at \@ Left bracket \[ Backslash \\
-% Right bracket \] Circumflex \^ Underscore \_
-% Grave accent \` Left brace \{ Vertical bar \|
-% Right brace \} Tilde \~}
-%
% \GetFileInfo{hrefhide.drv}
%
% \begingroup
@@ -249,86 +193,69 @@ and the derived files
% }%^^A
% \expandafter\endgroup\x
%
-% \DoNotIndex{\\}
-% \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage,\begin,\end}
-% \DoNotIndex{\NeedsTeXFormat,\DoNotIndex,\verb}
-% \DoNotIndex{\def,\edef,\gdef,\global}
-% \DoNotIndex{\ifx,\kvoptions,\listfiles,\mathord,\mathrm,\ProcessKeyvalOptions}
-% \DoNotIndex{\SetupKeyvalOptions}
-% \DoNotIndex{\bigskip,\space,\thinspace,\Large,\linebreak,\lipsum,\MessageBreak}
-% \DoNotIndex{\ldots,\indent,\noindent,\newline,\pagebreak,\pagenumbering}
-% \DoNotIndex{\textbf,\textit,\textsf,\texttt,\textquotedblleft,\textquotedblright}
-% \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX}
-% \DoNotIndex{\chapter,\section}
+% \DoNotIndex{\@anchorbordercolor,\@anchorcolor,\@citebordercolor,\@citecolor,\@filebordercolor}
+% \DoNotIndex{\@filecolor,\@ifl@t@r,\@ifundefined,\@linkbordercolor,\@linkcolor,\@menubordercolor}
+% \DoNotIndex{\@menucolor,\@runbordercolor,\@runcolor,\@urlbordercolor,\@urlcolor,\\}
+% \DoNotIndex{\AddToHook,\begin,\bigskip,\color}
+% \DoNotIndex{\DeclareRobustCommand,\DeclareStringOption,\definecolor,\documentclass,\end}
+% \DoNotIndex{\href,\hrefhide@anchorbordercolor,\hrefhide@backgroundcolour}
+% \DoNotIndex{\hrefhide@driver,\hrefhide@linktextcolour,\hrefhide@pdfborder}
+% \DoNotIndex{\hrefhidefalse,\hrefhidetrue,\Hy@driver,\hypersetup,\hypertarget}
+% \DoNotIndex{\IfPackageLoadedWithOptionsTF,\ifx,\Large,\linebreak}
+% \DoNotIndex{\lipsum,\listfiles,\markboth,\MessageBreak,\NeedsTeXFormat,\newif,\newline,\noindent}
+% \DoNotIndex{\ocgx,\PackageError,\PackageInfo,\PackageWarning,\pagebreak}
+% \DoNotIndex{\pagenumbering,\ProcessKeyvalOptions,\ProvidesPackage}
+% \DoNotIndex{\RequirePackage,\section,\SetupKeyvalOptions,\space,\textbf,\textit,\textsf,\texttt}
+% \DoNotIndex{\usepackage,\verb}
%
% \title{The \xpackage{hrefhide} package}
-% \date{2011/04/29 v1.0f}
-% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}}
+% \date{2023-02-26 v1.1a}
+% \author{H.-Martin Münch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
%
% \begin{abstract}
-% This \LaTeX\ package allows to \textquotedblleft hide\textquotedblright\ some
-% (hyperlinked) text when printing the document while keeping the layout and
-% to simulate switching \texttt{ocgcolor} of \xpackage{hyperref} package on and off.
+% \noindent This \LaTeX{} package allows to \textquotedblleft hide\textquotedblright{} some
+% (hyperlinked) text when printing the document while keeping the layout and
+% to simulate switching \texttt{ocgcolor} of \xpackage{hyperref} package on and off.~--\\
+% This package is possibly obsolete, see section~\ref{s:Alternatives}: Alternatives.
% \end{abstract}
-%
% \bigskip
%
% \noindent Disclaimer for web links: The author is not responsible for any contents
-% referred to in this work unless he has full knowledge of illegal contents.
-% If any damage occurs by the use of information presented there, only the
-% author of the respective pages might be liable, not the one who has referred
-% to these pages.
-%
-% \bigskip
-%
-% \noindent {\color{green} Save per page about $200\unit{ml}$ water,
-% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\\
-% Therefore please print only if this is really necessary.}
-%
-% \newpage
+% referred to in this work unless having full knowledge of illegal contents.
+% If any damage occurs by the use of information presented there,
+% only the author of the respective pages might be liable,
+% not the one who has referred to those pages.
%
% \tableofcontents
-%
-% \newpage
+% \bigskip
%
% \section{Introduction}
-%
-% \indent This package provides the command
-% |\hrefdisplayonly| (additionally to |\href| of the \xpackage{hyperref}
-% package by \textsc{Heiko Oberdiek}). While the (hyperlinked) text
-% appears like an ordinary \texttt{\textbackslash href} in the
-% compiled \xext{pdf}-file, the same text will be
-% \textquotedblleft hidden\textquotedblright\ when printing the text.
-% It is not really invisible, but just has the same colour as the background
+% \indent This \LaTeX{} package provides the command |\hrefdisplayonly|
+% (additionally to |\href| of the \xpackage{hyperref} package). While the
+% (hyperlinked) text appears like an ordinary \texttt{\textbackslash href}
+% in the compiled \xext{pdf}-file, the same text will be
+% \textquotedblleft hidden\textquotedblright{} when printing the text.
+% It is not really invisible, but just has the same color as the background
% (default: |white|). Therefore the layout is not changed when printing
% the document.\\
% Further the commands |\hycon| and |\hycoff| (|hy|per-|c|olour-|on|/|off|)
-% can be used to \emph{simulate} switching option |ocgcolorlinks| of
-% \xpackage{hyperref} package on and off.
-%
-% \bigskip
-% \noindent \textbf{Trademarks} appear throughout this
-% documentation without any trademark symbol; they are the
-% property of their respective trademark owner. There is no
-% intention of infringement; the usage is to the benefit of
-% the trademark owner.
-%
-% \bigskip
+% can be used to \emph{simulate} switching option |ocgcolorlinks| of the
+% \xpackage{hyperref} package on and off.\\
+% This package is possibly obsolete, see section~\ref{s:Alternatives}: Alternatives.
%
% \section{Usage}
-%
% \indent Just load the package placing
% \begin{quote}
% |\usepackage[<|\textit{options}|>]{hrefhide}|
% \end{quote}
-% \noindent in the preamble of your \LaTeXe\ source file \textbf{after}
+% \noindent in the preamble of your \LaTeXe{} source file \textbf{after}
% the \xpackage{hyperref} package. For a link, which shall not be printed,
% use |\hrefdisplayonly| instead of |\href|. This might be practical
% for example for internal links, which make no sense in a printed
-% version (\textquotedblleft Klick here\textquotedblright\ does
-% not work with real paper).\\
+% version (\textquotedblleft Click here\textquotedblright{} does
+% not work with physical paper).\\
% |\hypersetup{ocgcolorlinks=true}| and |\hypersetup{ocgcolorlinks=false}|
% may work - or they may not. (|ocgcolorlinks| is a decision to be made
% in the preamble and performes changes which cannot easily be reverted.)
@@ -337,60 +264,77 @@ and the derived files
% package provides the command |\hycoff| (and |\hycon| to switch back to
% default |ocgcolorlinks=true| behaviour). Note that |ocgcolorlinks=true|
% really is enabled, therefore all limitation of this apply
-% (e.\,g. no breaks in links).
+% (e.\,g.~no breaks in links).
%
% \subsection{Options}
% \DescribeMacro{options}
% \indent The \xpackage{hrefhide} package takes the following options:
%
-% \subsubsection{linktextcolour\label{sss:linktextcolour}}
+% \subsubsection{linktextcolour}
% \DescribeMacro{linktextcolour}
-% \indent The option \texttt{linktextcolour} takes the colour of
+% \indent The option \texttt{linktextcolour} takes the color of
% the text of the links. The default is \texttt{black}.
%
-% \subsubsection{backgroundcolour\label{sss:backgroundcolour}}
+% \subsubsection{backgroundcolour}
% \DescribeMacro{backgroundcolour}
-% \indent The option \texttt{backgroundcolour} takes the colour of
+% \indent The option \texttt{backgroundcolour} takes the color of
% the background of the links. The default is \texttt{white}.
%
-% \subsubsection{pdfborder\label{sss:pdfborder}}
+% \subsubsection{pdfborder}
% \DescribeMacro{pdfborder}
% \indent The option \texttt{pdfborder} takes the configuration of
% the pdfborder around the link. The default is \texttt{\{0~0~1\}},
-% i.\,e.~a~1\,pt rectangular line. \texttt{\{0~0~0\}} means no line.
-%
-% \section{Alternatives\label{sec:Alternatives}}
+% \hbox{i.\,e. a 1\,pt} rectangular line. \texttt{\{0~0~0\}} means no line.
+% \pagebreak
%
+% \section{Alternatives\label{s:Alternatives}}
% \DescribeMacro{ocgcolorlinks}
% If option \texttt{ocgcolorlinks} (of the \xpackage{hyperref} package)
-% is already used in your document (i.\,e. you \emph{want} coloured links),
+% is already used in your document (i.\,e. you \emph{want} colored links),
% do \textbf{NOT} use this \xpackage{hrefhide} package to hide links!
-% For a link to be \textquotedblleft hidden\textquotedblright , just say
+% For a link to be \textquotedblleft hidden\textquotedblright, just say
% \begin{verbatim}
% {\color{white} \href{...}{...}}
% \end{verbatim}
-% (and replace \texttt{white} with the background colour).\\
-%
-% For hiding text, which does not contain links, the \xpackage{pdfcomment}
-% package by \textsc{Josef Kleber} should be noted.
-%
-% \bigskip
-%
-% \noindent (You programmed or found some alternative,
-% which is available at \CTAN{}?\\
-% OK, send an e-mail to me with the name, location at \CTAN{},
-% and a short notice, and I will probably include it here.)\\
-%
-% \bigskip
+% \vspace{-\baselineskip}
+% (and replace \texttt{white} with the background color;
+% when the \href{https://ctan.org/pkg/pagecolor}{\pkg{pagecolor}}
+% package is used, |\thepagecolor| instead of |white| should be used).\\
+%
+% \DescribeMacro{pdfcomment}
+% For hiding text, which does not contain links, the
+% \href{https://ctan.org/pkg/pdfcomment}{\xpackage{pdfcomment}}
+% package by \textsc{Josef Kleber} should be noted.\\
+%
+% \DescribeMacro{ocgx2}
+% This |hrefhide| package is possibly obsolete. Using the
+% \href{https://ctan.org/pkg/ocgx2}{\xpackage{ocgx2}} package
+% \begin{verbatim}
+% \usepackage[<options>]{ocgx2}
+% \begin{ocg}[<options>]{<layer name>}{<OCG id>}{<initial visibility>}
+% ... material to be put on a PDF layer ...
+% \end{ocg}
+% \end{verbatim}
+% \vspace{-\baselineskip}
+% one can say
+% \begin{verbatim}
+% \begin{ocg}[printocg=never, exportocg=never, listintoolbar=never%
+% ]{MyLayer}{example}{1}%
+% \hyperref[RefB]{B} \url{https://ctan.org/} simple text etc.%
+% \end{ocg}%
+% \end{verbatim}
+% \vspace{-\baselineskip}
+% and the links will be visible in the pdf document
+% but will turn into blank space when printed.
%
% \section{Example}
-%
% \begin{macrocode}
%<*example>
-\documentclass[british]{article}[2007/10/19]% v1.4h
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{lipsum}[2011/04/14]% v1.2
-\usepackage[ocgcolorlinks,bookmarks=false,bookmarksopen=false]{hyperref}[2011/04/17]% v6.82g
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\documentclass[british]{article}[2022/07/02]% v1.4n Standard LaTeX document class
+\usepackage{lipsum}[2021-09-20]% v2.7 150 paragraphs of Lorem Ipsum dummy text
+\usepackage[ocgcolorlinks,bookmarks=false,bookmarksopen=false%
+ ]{hyperref}[2023-02-07]% v7.00v Hypertext links for LaTeX
% Bookmarks are not needed here, but are possible, of course.
\hypersetup{extension=pdf,%
plainpages=false,%
@@ -398,34 +342,32 @@ and the derived files
hyperindex=false,%
pdflang={en},%
pdftitle={hrefhide package example},%
- pdfauthor={Hans-Martin Muench},%
+ pdfauthor={H.-Martin Muench},%
pdfsubject={Example for the hrefhide package},%
- pdfkeywords={LaTeX, hrefhide, Hans-Martin Muench},%
+ pdfkeywords={LaTeX, hrefhide},%
pdfview=Fit,pdfstartview=Fit,%
pdfpagelayout=SinglePage%
}
-\usepackage[linktextcolour=black,backgroundcolour=white,pdfborder={0 0 1}]{hrefhide}[2011/04/29]% v1.0f
-\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
+\usepackage[linktextcolour=black,backgroundcolour=white,pdfborder={0 0 1}%
+ ]{hrefhide}[2023-02-26]% v1.1a Hiding hyperrefs when printing pdf files (HMM)
\listfiles
\begin{document}
\pagenumbering{arabic}
\section*{Example for hrefhide}
+\markboth{Example for hrefhide}{Example for hrefhide}
This example demonstrates the use of package\newline
-\textsf{hrefhide}, v1.0f as of 2011/04/29 (HMM).\newline
+\textsf{hrefhide}, v1.1a as of 2023-02-26 (HMM).\newline
+% \end{macrocode}
+% \pagebreak
+% \begin{macrocode}
The used options were \texttt{linktextcolour=black},
\texttt{backgroundcolour=white}, and \texttt{pdfborder={0 0 1}}
(the default ones).\newline
For more details please see the documentation!\newline
\textit{Print-\textbf{preview} the first page of this document
-and compare it with the page as displayed in your pdf reader.}\newline
-
-\noindent {\color{green} Save per page about $200\unit{ml}$ water,
-$2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\newline
-Therefore please print only if this is really necessary.\newline
-Maybe already the print-preview or just printing
-the first page are sufficient?}\newline
+and compare it with the page as displayed in your pdf reader.}
\bigskip
Lorem ipsum dolor sit amet \href{\#target}{link to target} consectetuer
@@ -441,7 +383,7 @@ Duis autem vel eum iriure dolor \href{\#target}{link to target} in
hendrerit in vulputate velit esse molestie consequat, vel illum dolore
eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue
-duis dolore te feugait nulla facilisi.\newline
+duis dolore te feugait nulla facilisi.
\noindent \textbf{\textsf{%
\hrefdisplayonly{\#RefA}{A}
@@ -469,24 +411,22 @@ duis dolore te feugait nulla facilisi.\newline
\hrefdisplayonly{\#RefW}{W}
\hrefdisplayonly{\#RefX}{X}
\hrefdisplayonly{\#RefY}{Y}
-\hrefdisplayonly{\#RefZ}{Z}}} \linebreak
+\hrefdisplayonly{\#RefZ}{Z}}}\linebreak
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a,
-magna.\newline
-
-Switching to coloured links with \verb|\hycon|:\newline
-\hycon
-\href{\#RefX}{X} and also
-\href{http://www.ctan.org/pkg/hrefhide}{http://www.ctan.org/pkg/hrefhide}.
+magna.
-Switching off the coloured links with \verb|\hycoff| again:\newline
-\hycoff
-\href{\#RefY}{Y} and also
-\href{http://www.ctan.org/tex-archive/macros/latex/contrib/hrefhide}{%
-http://www.ctan.org/tex-archive/macros/latex/contrib/hrefhide}.
+Switching to colored links with \verb|\hycon|:\newline
+\hycon%
+\href{\#RefX}{section X} and also
+\href{https://ctan.org/pkg/hrefhide}{https://ctan.org/pkg/hrefhide}.
+Switching off the colored links with \verb|\hycoff| again:\newline
+\hycoff%
+\href{\#RefX}{section X} and also
+\href{https://ctan.org/pkg/hrefhide}{https://ctan.org/pkg/hrefhide}.
\pagebreak
{\Large \textbf{Targets}}\\
@@ -522,86 +462,68 @@ nisl ut aliquip ex ea commodo consequat.
\section[X]{\hypertarget{RefX}{X}} \lipsum[1]
\section[Y]{\hypertarget{RefY}{Y}} \lipsum[1]
\section[Z]{\hypertarget{RefZ}{Z}} \lipsum[1]
-
\end{document}
%</example>
% \end{macrocode}
%
-% \newpage
-%
% \StopEventually{}
+% \newpage
%
% \section{The implementation}
-%
-% We start off by checking that we are loading into \LaTeXe\ and
+% We start off by checking that we are loading into \LaTeXe{} and
% announcing the name and version of this package.
%
% \begin{macrocode}
%<*package>
-% \end{macrocode}
-%
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\ProvidesPackage{hrefhide}[2011/04/29 v1.0f
- Hiding hyperrefs when printing pdf files (HMM)]%
-
-% \end{macrocode}
-%
-% A short description of the \xpackage{hrefhide} package:
-%
-% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[2022-11-01]
+\ProvidesPackage{hrefhide}[2023-02-26 v1.1a
+ Hiding hyperrefs when printing pdf files (HMM)]
%% Allows to "hide" hyperlinked text in a pdf file when printing
-%% ("Klick here" does not work on real paper)
+%% ("Click here" does not work on physical paper)
%% by providing the command \hrefdisplayonly
%% and allows simulating to switch on/off ocgcolourlinks
-%% of the hyperref package by Heiko Oberdiek.
+%% of the hyperref package.
+
+\@ifl@t@r\fmtversion{2022/11/01}{% would have understood
+ % \IfFormatAtLeastTF{2022-11-01}{<true code>}{<false code>}
+ }{\PackageError{hrefhide}{%
+ Newer LaTeX format needed or older hrefhide package%
+ }{Needed LaTeX format version: 2022-11-01 or newer.\MessageBreak%
+ Found\space\space LaTeX format version: \fmtversion.\MessageBreak%
+ Either update your TeX distribution\MessageBreak%
+ or use an archived version of hrefhide\MessageBreak%
+ (see section History in the documentation).\MessageBreak%
+ }
+ }
% \end{macrocode}
%
% We need the \xpackage{xcolor} package by \textsc{Dr.~Uwe Kern}
-% (see subsection~\ref{ss:Downloads}):
-%
-% \begin{macrocode}
-\RequirePackage{xcolor}[2007/01/21]% v2.11
-% \end{macrocode}
-%
-% the \xpackage{hyperref} package by \textsc{Heiko Oberdiek}
-% (see subsection~\ref{ss:Downloads}):
-%
% \begin{macrocode}
-\RequirePackage[ocgcolorlinks]{hyperref}[2011/04/17]% v6.82g
+\RequirePackage{xcolor}[2022/06/12]% v2.14 LaTeX color extensions (UK)
% \end{macrocode}
-%
-% and the \xpackage{kvoptions} package, also by \textsc{Heiko Oberdiek}
-% (see subsection~\ref{ss:Downloads}):
-%
+% the \xpackage{hyperref} package
% \begin{macrocode}
-\RequirePackage{kvoptions}[2010/12/23]% v3.10
+\RequirePackage[ocgcolorlinks]{hyperref}[2023-02-07]% v7.00v Hypertext links for LaTeX
% \end{macrocode}
-%
-% A last information for the user:
-%
+% and the \xpackage{kvoptions} package by \textsc{Heiko Oberdiek}
% \begin{macrocode}
-%% hrefhide may work with earlier versions of LaTeX and those
-%% packages, but this was not tested. Please consider updating
-%% your LaTeX and packages to the most recent version
-%% (if they are not already the most recent version).
-
+\RequirePackage{kvoptions}[2022-06-15]% v3.15 Key value format for package options (HO)
% \end{macrocode}
% \indent See subsection~\ref{ss:Downloads} about how to get them.\\
%
% The options are introduced:
%
% \begin{macrocode}
-\SetupKeyvalOptions{family = hrefhide, prefix = hrefhide@}
+
+\SetupKeyvalOptions{family=hrefhide,prefix=hrefhide@}
\DeclareStringOption[black]{linktextcolour}[black]
\DeclareStringOption[white]{backgroundcolour}[white]
\DeclareStringOption[{0 0 1}]{pdfborder}[{0 0 1}]
\ProcessKeyvalOptions*
-\gdef\hrefhide@status@ON{ON}
-\gdef\hrefhide@status@OFF{OFF}
+\newif\ifhrefhide
% \end{macrocode}
%
@@ -609,8 +531,12 @@ nisl ut aliquip ex ea commodo consequat.
%
% \begin{macro}{\hycon}
% \begin{macrocode}
-\newcommand{\hycon}{%
-\ifx\hrefhide@status\hrefhide@status@OFF%
+\DeclareRobustCommand{\hycon}{%
+\ifhrefhide%
+\PackageWarning{hrefhide}{\string\hycon\space called when OCG-link %
+ coloring was not OFF\MessageBreak%
+ - nothing done}%
+\else%
\@ifundefined{@anchorbordercolor}{%
\hypersetup{anchorcolor=\hrefhide@anchorbordercolor}%
}{%
@@ -618,10 +544,7 @@ nisl ut aliquip ex ea commodo consequat.
\hypersetup{anchorcolor=hyanchorbordercolor}%
}%
% \end{macrocode}
-%
-% because there is no \texttt{anchorborder(color)} in \xpackage{hyperref} as of
-% 2011/04/17, v6.82g.
-%
+% because there is no \texttt{anchorborder(color)} in \xpackage{hyperref}.
% \begin{macrocode}
\definecolor{hycitebordercolor}{rgb}{\@citebordercolor}%
\hypersetup{citecolor=hycitebordercolor}%
@@ -636,40 +559,33 @@ nisl ut aliquip ex ea commodo consequat.
\definecolor{hyurlbordercolor}{rgb}{\@urlbordercolor}%
\hypersetup{urlcolor=hyurlbordercolor}%
\hypersetup{pdfborder=0 0 0}%
-\gdef\hrefhide@status{ON}%
-\PackageInfo{hrefhide}{OCG-link colouring ON\MessageBreak}%
-\else%
-\PackageWarning{hrefhide}{\string\hycon\space called when OCG-link colouring was not OFF \MessageBreak%
-- nothing done}%
+\hrefhidetrue%
+\PackageInfo{hrefhide}{OCG-link coloring ON\MessageBreak}%
\fi%
}
% \end{macrocode}
%
-% If link colouring is already |ON|, nothing is done. Otherwise
-% |\hycon| looks for the colour of the border of a link type and
-% sets the colour of the text of that lik type to that colour.\\
+% If link coloring is already |ON|, nothing is done. Otherwise
+% |\hycon| looks for the color of the border of a link type and
+% sets the color of the text of that lik type to that color.
% \end{macro}
%
% \begin{macro}{\hycoff}
% \indent This package on the one hand uses the \texttt{ocgcolor} option
% of the \xpackage{hyperref} package, but on the other hand
-% does not really want coloured links (see \ref{sec:Alternatives}).
+% does not really want colored links (see \ref{s:Alternatives}).
% Thus we simulate to turn it off:
%
% \begin{macrocode}
-\newcommand{\hycoff}{%
-\ifx\hrefhide@status\hrefhide@status@ON%
+\DeclareRobustCommand{\hycoff}{%
+\ifhrefhide%
\@ifundefined{@anchorbordercolor}{%
-\global\edef\hrefhide@anchorbordercolor{\@anchorcolor}%
-}{%
-\hypersetup{anchorbordercolor=\@anchorcolor}%
+\xdef\hrefhide@anchorbordercolor{\@anchorcolor}%
+}{\hypersetup{anchorbordercolor=\@anchorcolor}%
}%
% \end{macrocode}
-%
-% because there is no \texttt{anchorborder(color)} in \xpackage{hyperref} as of
-% 2011/04/17, v6.82g.
-%
+% because there is no \texttt{anchorborder(color)} in \xpackage{hyperref}.
% \begin{macrocode}
\hypersetup{anchorcolor=\hrefhide@linktextcolour}%
\hypersetup{citebordercolor=\@citecolor}%
@@ -685,53 +601,49 @@ nisl ut aliquip ex ea commodo consequat.
\hypersetup{urlbordercolor=\@urlcolor}%
\hypersetup{urlcolor=\hrefhide@linktextcolour}%
\hypersetup{pdfborder=\hrefhide@pdfborder}%
-\gdef\hrefhide@status{OFF}%
+\hrefhidefalse%
% \end{macrocode}
%
-% If link colouring is already |OFF|, nothing is done. Otherwise
-% the colour of the respective border is set to the colour of the text
-% of the link type, setting the colour of the text of the link type to
+% If link coloring is already |OFF|, nothing is done. Otherwise
+% the color of the respective border is set to the color of the text
+% of the link type, setting the color of the text of the link type to
% |\hrefhide@linktextcolour| (default: black) and the link border again to
-% |\hrefhide@pdfborder| (default: rectangle with $1\unit{pt}$ line
+% |\hrefhide@pdfborder| (default: rectangle with \hbox{1\,pt line}
% thickness).\\
-% While link colouring is really ON, we thus emulate the behaviour
-% of link colouring OFF, therefore we give this message:
+% While link coloring is really ON, we thus emulate the behaviour
+% of link coloring OFF, therefore we give this message:
%
% \begin{macrocode}
-\PackageInfo{hrefhide}{OCG-link colouring OFF (sort of; hrefhide package)\MessageBreak}%
+\PackageInfo{hrefhide}{OCG-link coloring OFF (sort of; hrefhide package)%
+ \MessageBreak}%
\else%
-\PackageWarning{hrefhide}{\string\hycoff\space called when OCG-link colouring was not ON \MessageBreak%
-- nothing done}%
+\PackageWarning{hrefhide}{\string\hycoff\space called when OCG-link %
+ coloring was not ON\MessageBreak%
+ - nothing done}%
\fi%
}
% \end{macrocode}
-%
-% Nevertheless, all restrictions of |ocgcolorlinks|, e.\,g. no links breaking
+% Nevertheless, all restrictions of |ocgcolorlinks|, e.\,g.~no links breaking
% over lines, still prevail!
-%
% \end{macro}
%
% \begin{macro}{\hrefdisplayonly}
% The command |\hrefdisplayonly| is defined:
-%
% \begin{macrocode}
-\newcommand{\hrefdisplayonly}[2]{%
-{\color{\hrefhide@backgroundcolour}\href{#1}{#2}}%
-}
+\DeclareRobustCommand{\hrefdisplayonly}[2]{%
+{\color{\hrefhide@backgroundcolour}\href{#1}{#2}}}
% \end{macrocode}
-%
-% \noindent which just sets the colour of the link to |\hrefhide@backgroundcolour|
+% \noindent which just sets the color of the link to |\hrefhide@backgroundcolour|
% for printing, thereby turning it \textquotedblleft invisible\textquotedblright.
% \end{macro}
%
-% \begin{macro}{\AtBeginDocument}
+% \DescribeMacro{\AddToHook\{begindocument\}}
% \begin{macrocode}
-\AtBeginDocument{%
+\AddToHook{begindocument}{%
% \end{macrocode}
-%
-% \indent |\AtBeginDocument| it is checked whether the \xpackage{hyperref} package
+% \indent Here it is checked whether the \xpackage{hyperref} package
% was loaded with option \texttt{ocgcolorlinks}. (\xpackage{hrefhide} calls it
% with option |ocgcolorlinks| (i.\,e. |=true|), but in the preamble it would
% be possible to really turn it off again by |\hypersetup{ocgcolorlinks=false}|.
@@ -740,17 +652,15 @@ nisl ut aliquip ex ea commodo consequat.
% error message is given.
%
% \begin{macrocode}
- \ifHy@ocgcolorlinks%
- \gdef\hrefhide@status{ON}%
- \else%
- \gdef\hrefhide@status{OFF}%
+ \IfPackageLoadedWithOptionsTF{hyperref}{ocgcolorlinks}{\hrefhidetrue}{%
+ \hrefhidefalse%
\PackageError{hrefhide}{hyperref package missing option ocgcolorlinks}{%
The package hrefhide needs the hyperref package\MessageBreak%
with option ocgcolorlinks.\MessageBreak%
That option is missing!\MessageBreak%
Now the link(s) will be ''hidden'' in pdf view also.\MessageBreak%
}%
- \fi%
+ }%
% \end{macrocode}
%
% \noindent We check whether |\Hy@driver| is |hpdftex|, i.\,e.~a~\xext{pdf}-file
@@ -758,7 +668,7 @@ nisl ut aliquip ex ea commodo consequat.
%
% \begin{macrocode}
\def\hrefhide@driver{hpdftex}%
- \ifx\Hy@driver\hrefhide@driver% \relax
+ \ifx\Hy@driver\hrefhide@driver\relax%
\else%
% \end{macrocode}
%
@@ -768,7 +678,8 @@ nisl ut aliquip ex ea commodo consequat.
% \begin{macrocode}
\PackageError{hrefhide}{Producing not a pdf file}{%
The package hrefhide only works for a pdf file,\MessageBreak%
- but driver \Hy@driver\space instead of \hrefhide@driver\space was found.\MessageBreak%
+ but driver \Hy@driver\space instead of \hrefhide@driver\space%
+ was found.\MessageBreak%
Use pdfLaTeX to compile your document.\MessageBreak%
(Probably no large harm was done, but the respective\MessageBreak%
link text will neither be hidden when printing.)\MessageBreak%
@@ -776,123 +687,124 @@ nisl ut aliquip ex ea commodo consequat.
\fi%
% \end{macrocode}
%
-% Because we need link colouring, we use option \texttt{ocgcolorlinks},
-% but because we do not want coloured links, we emulate the behaviour
-% of link colouring OFF, therefore |\hycoff| is used |\AtBeginDocument|:
-%
+% Because we need link coloring, we use option \texttt{ocgcolorlinks},
+% but because we do not want colored links, we emulate the behaviour
+% of link coloring OFF, therefore |\hycoff| is used at the beginning:
% \begin{macrocode}
\hycoff%
}
% \end{macrocode}
-% \end{macro}
%
% \begin{macrocode}
%</package>
% \end{macrocode}
-%
-% \bigskip
+% \newpage
%
% \section{Installation}
-%
-% \begin{center}
-% {\large \textbf{When manually installing, please first make sure\\}}
-% {\large \textbf{that there is no old version of \xpackage{hrefhide}\\}}
-% {\large \textbf{at some obsolete place in your system!}}
-% \end{center}
-%
% \subsection{Downloads\label{ss:Downloads}}
-%
-% Everything is available at \CTAN{}, \url{http://www.ctan.org/tex-archive/},
+% Everything is available at \url{https://www.ctan.org},
% but may need additional packages themselves.\\
%
% \DescribeMacro{hrefhide.dtx}
-% For unpacking the |hrefhide.dtx| file and constructing the documentation it is required:
+% For unpacking the |hrefhide.dtx| file and constructing the documentation
+% it is required:
% \begin{description}
-% \item[-] \TeX Format \LaTeXe: \url{http://www.CTAN.org/}
-%
-% \item[-] document class \xpackage{ltxdoc}, 2007/11/11, v2.0u,\\
-% \CTAN{macros/latex/base/ltxdoc.dtx}
+% \item[-] \TeX Format \LaTeXe{} 2022-11-01 or newer: \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{holtxdoc}, 2011/02/04, v0.21,\\
-% \CTAN{macros/latex/contrib/oberdiek/holtxdoc.dtx}
+% \item[-] document class \xclass{ltxdoc}, 2022/06/22, v2.1i,
+% \url{https://www.ctan.org/pkg/ltxdoc}
%
-% \item[-] package \xpackage{hypdoc}, 2010/03/26, v1.9,\\
-% \CTAN{macros/latex/contrib/oberdiek/hypdoc.dtx}
+% \item[-] package \xpackage{holtxdoc}, 2019/12/09, v0.30,
+% \url{https://www.ctan.org/pkg/holtxdoc}
% \end{description}
%
% \DescribeMacro{hrefhide.sty}
-% The \texttt{hrefhide.sty} for \LaTeXe\ (i.\,e. all documents using
+% The |hrefhide.sty| for \LaTeXe{} (i.\,e. each document using
% the \xpackage{hrefhide} package) requires:
% \begin{description}
-% \item[-] \TeX Format \LaTeXe, \url{http://www.CTAN.org/}
+% \item[-] \TeX{} Format \LaTeXe{} 2022-11-01 or newer, \url{https://www.CTAN.org}
%
-% \item[-] package \xpackage{xcolor}, 2007/01/21, v2.11,\\
-% \CTAN{/macros/latex/contrib/xcolor/xcolor.dtx}
+% \item[-] package \xpackage{xcolor}, 2022/06/12, v2.14,
+% \url{https://www.ctan.org/pkg/xcolor}
%
-% \item[-] package \xpackage{hyperref}, 2011/04/17, v6.82g,\\
-% \CTAN{macros/latex/contrib/hyperref/hyperref.dtx}
+% \item[-] package \xpackage{hyperref}, 2023-02-07, v7.00v,
+% \url{https://www.ctan.org/pkg/hyperref}
%
-% \item[-] package \xpackage{kvoptions}, 2010/12/23, v3.10,\\
-% \CTAN{macros/latex/contrib/oberdiek/kvoptions.dtx}
+% \item[-] package \xpackage{kvoptions}, 2022-06-15, v3.15,
+% \url{https://www.ctan.org/pkg/kvoptions}
+%
+% \item[-] package \xpackage{hrefhide}, 2023-02-26, v1.1a,
+% \url{https://www.ctan.org/pkg/hrefhide}
+% (Because you are reading the documentation for the
+% \xpackage{hrefhide} package, it can be assumed that you already
+% have some version of it~-- is it the current one?)
% \end{description}
%
% \DescribeMacro{hrefhide-example.tex}
-% The \texttt{hrefhide-example.tex} requires the same files as all
-% documents using the \xpackage{hrefhide} package, and additionally:
+% The |hrefhide-example.tex| requires the same files as all
+% documents using the \xpackage{hrefhide} package
+% (see preceding paragraph |hrefhide.sty|) and additionally:
% \begin{description}
-% \item[-] class \xpackage{article}, 2007/10/19, v1.4h, from \xpackage{classes.dtx}:\\
-% \CTAN{macros/latex/base/classes.dtx}
-%
-% \item[-] package \xpackage{lipsum}, 2011/04/14, v1.2,\\
-% \CTAN{macros/latex/contrib/lipsum/lipsum.dtx}
+% \item[-] class \xpackage{article}, 2022/07/02, v1.4n, from \xpackage{classes}:
+% \url{https://ctan.org/pkg/classes}
%
-% \item[-] package \xpackage{hrefhide}, 2011/04/29, v1.0f,\\
-% \CTAN{macros/latex/contrib/hrefhide/hrefhide.dtx}\\
-% (Well, it is the example file for this package, and because you are reading the
-% documentation for the \xpackage{hrefhide} package, it can be assumed that you already
-% have some version of it -- is it the current one?)
+% \item[-] package \xpackage{lipsum}, 2021-09-20, v2.7,
+% \url{https://www.ctan.org/pkg/lipsum}\\
+% This package is only needed for some blind text.
% \end{description}
%
-% \DescribeMacro{hyperref}
-% As possible alternative in section \ref{sec:Alternatives} there is listed
+% \DescribeMacro{Alternatives}
+% As possible alternatives in section~\ref{s:Alternatives}, Alternatives,
+% there are listed (newer versions might be available):
% \begin{description}
-% \item[-] package \xpackage{hyperref}, 2011/04/17, v6.82g,\\
-% \CTAN{macros/latex/contrib/hyperref/}
-% with option \texttt{ocgcolorlinks} and\\
-% |{\color{white} \href{...}{...}}|.
-%
-% \item[-] package \xpackage{pdfcomment}, 2010/12/11, v2.1,\\
-% \CTAN{macros/latex/contrib/pdfcomment/}\\
-% for text \textbf{outside} of links
+% \item[-] package \xpackage{hyperref}, 2023-02-07, v7.00v,
+% \url{https://www.ctan.org/pkg/hyperref}
+% with option |ocgcolorlinks| and |{\color{white}\href{...}{...}}|.
+%
+% \item[-] package \xpackage{pdfcomment}, 2018/11/01, v2.4a,
+% \url{https://www.ctan.org/pkg/pdfcomment}
+% for text \textbf{outside} of links
+%
+% \item[-] package \xpackage{ocgx2}, 2022/12/16, v0.56,
+% \url{https://www.ctan.org/pkg/ocgx2}
% \end{description}
%
% \DescribeMacro{Oberdiek}
% \DescribeMacro{holtxdoc}
-% \DescribeMacro{hyperref}
% \DescribeMacro{kvoptions}
-% All packages of \textsc{Heiko Oberdiek's} bundle `oberdiek'
+% All packages of the `oberdiek' bundle
% (especially \xpackage{holtxdoc} and \xpackage{kvoptions})
% are also available in a TDS compliant ZIP archive:\\
-% \CTAN{install/macros/latex/contrib/oberdiek.tds.zip}.\\
+% \url{https://mirror.ctan.org/install/macros/latex/contrib/oberdiek.tds.zip}.\\
% It is probably best to download and use this, because the packages in there
% are quite probably both recent and compatible among themselves.\\
%
-% \DescribeMacro{M\"{u}nch}
-% A hyperlinked list of my (other) packages can be found at
-% \url{http://www.Uni-Bonn.de/~uzs5pv/LaTeX.html}.\\
+% \DescribeMacro{hyperref}
+% \noindent \xpackage{hyperref} is not included in that bundle and needs to be
+% downloaded separately,\\
+% \url{https://mirror.ctan.org/install/macros/latex/contrib/hyperref.tds.zip}.\\
%
-% \subsection{Package, unpacking TDS}
+% \DescribeMacro{Münch}
+% A hyperlinked list of my (other) packages can be found at\\
+% \url{https://www.ctan.org/author/muench-hm}.\\
%
-% \paragraph{Package.} This package is available on \CTAN{}:
+% \subsection{Package, unpacking TDS}
+% \paragraph{Package.} This package is available on \url{https://www.CTAN.org}.
% \begin{description}
-% \item[\CTAN{macros/latex/contrib/hrefhide/hrefhide.dtx}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/hrefhide/hrefhide.dtx}]\hspace*{0.1cm}\\
% The source file.
-% \item[\CTAN{macros/latex/contrib/hrefhide/hrefhide.pdf}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/hrefhide/hrefhide.pdf}]\hspace*{0.1cm}\\
% The documentation.
-% \item[\CTAN{macros/latex/contrib/hrefhide/hrefhide-example.pdf}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/hrefhide/hrefhide-example.pdf}]\hspace*{0cm}%
% The compiled example file, as it should look like.
-% \item[\CTAN{install/macros/latex/contrib/hrefhide.tds.zip}]\hspace*{0.1cm} \\
+% \item[\url{https://mirror.ctan.org/macros/latex/contrib/hrefhide/README}]\hspace*{0.1cm}\\
+% The README file.
+% \end{description}
+%
+% There is also a |hrefhide.tds.zip| available:
+% \begin{description}
+% \item[\url{https://mirror.ctan.org/install/macros/latex/contrib/hrefhide.tds.zip}]\hspace*{0cm}%
% Everything in TDS compliant, compiled format.
% \end{description}
% which additionally contains\\
@@ -900,16 +812,16 @@ nisl ut aliquip ex ea commodo consequat.
% hrefhide.ins & The installation file.\\
% hrefhide.drv & The driver to generate the documentation.\\
% hrefhide.sty & The \xext{sty}le file.\\
-% hrefhide-example.tex & The example file.%
+% hrefhide-example.tex & The example file.
% \end{tabular}
%
% \bigskip
%
-% \noindent For required other packages, see the preceding subsection.
+% \noindent For required other packages, please see the preceding subsection.
%
% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
-% \docstrip\ archive. The files are extracted by running the
-% \xfile{.dtx} through \plainTeX:
+% \docstrip{} archive. The files are extracted by running the
+% \xext{.dtx} through \plainTeX{}:
% \begin{quote}
% \verb|tex hrefhide.dtx|
% \end{quote}
@@ -990,24 +902,24 @@ nisl ut aliquip ex ea commodo consequat.
% \end{quote}
% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
% TDS installing feature, then some files can already be in the right
-% place, see the documentation of \docstrip.
+% place, see the documentation of \docstrip{}.
%
% \subsection{Refresh file name databases}
%
-% If your \TeX~distribution (\teTeX, \mikTeX,\dots) relies on file name
-% databases, you must refresh these. For example, \teTeX\ users run
-% \verb|texhash| or \verb|mktexlsr|.
+% If your \TeX~distribution (\TeX\,Live, \mikTeX, \dots) relies on
+% file name databases, you must refresh these. For example, \TeX\,Live\ users
+% run \verb|texhash| or \verb|mktexlsr|.
%
% \subsection{Some details for the interested}
%
-% \paragraph{Unpacking with \LaTeX.}
+% \paragraph{Unpacking with \LaTeX{}.}
% The \xfile{.dtx} chooses its action depending on the format:
% \begin{description}
-% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\plainTeX:] Run \docstrip{} and extract the files.
% \item[\LaTeX:] Generate the documentation.
% \end{description}
-% If you insist on using \LaTeX\ for \docstrip\ (really,
-% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% If you insist on using \LaTeX{} for \docstrip{} (really,
+% \docstrip{} does not need \LaTeX ), then inform the autodetect routine
% about your intention:
% \begin{quote}
% \verb|latex \let\install=y\input{hrefhide.dtx}|
@@ -1018,7 +930,7 @@ nisl ut aliquip ex ea commodo consequat.
% \paragraph{Generating the documentation.\label{GenDoc}}
% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
% the documentation. The process can be configured by a
-% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% configuration file \xfile{ltxdoc.cfg}. For instance, put the following
% line into this file, if you want to have A4 as paper format:
% \begin{quote}
% \verb|\PassOptionsToClass{a4paper}{article}|
@@ -1042,25 +954,22 @@ nisl ut aliquip ex ea commodo consequat.
% The example file, \textsf{hrefhide-example.tex}, can be compiled via\\
% \indent |pdflatex hrefhide-example.tex|\\
% (but \textbf{not} |latex hrefhide-example.tex|!)\\
-% and will need two compiler runs to get all references right.
+% and will need at least two compiler runs to get all references right.
%
% \section{Acknowledgements}
%
-% I would like to thank \textsc{Heiko Oberdiek}
-% (heiko dot oberdiek at googlemail dot com) for providing
-% the \xpackage{hyperref} as well as a~lot~(!) of other useful packages
-% (from which I also got everything I know about creating a file in
-% \xext{dtx} format, ok, say it: copying),
-% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex}
-% newsgroups for their help in all things \TeX.
+% I would like to thank \textsc{Heiko Oberdiek} for providing a lot of
+% useful packages (from which I also got everything I know about creating
+% a file in \xext{dtx} format, ok, say it: copying), and the
+% \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex} newsgroups
+% for their help in all things \TeX{}.
%
-% \bigskip
% \phantomsection
% \begin{History}\label{History}
% \begin{Version}{2010/02/18 v0.1}
% \item First idea about this as a reply of mine to a question on
% \Newsgroup{comp.text.tex} (Subject: "Hiding" interactive parts of pdf when printing), see e.\,g.
-% \url{http://groups.google.com/group/comp.text.tex/msg/80d9eebf2837d7a3?dmode=source}.
+% \url{https://groups.google.com/g/comp.text.tex/c/JGXs0n2UUhw/m/o9c3KL_u2YAJ}.
% \end{Version}
% \begin{Version}{2010/06/01 v1.0(a)}
% \item First version of the \xpackage{hrefhide} package.
@@ -1083,31 +992,23 @@ nisl ut aliquip ex ea commodo consequat.
% \begin{Version}{2010/07/29 v1.0d}
% \item Corrected given url of \texttt{hrefhide.tds.zip} and other urls.
% \item Included a url for the newsgroup post (in History).
-% \item Changed the \xpackage{undolabl} package description.
-% \item New version of the used \xpackage{hyperref} package: 2010/06/18,~v6.81g.
% \item Included a |\CheckSum|.
% \item Minor details.
% \end{Version}
% \begin{Version}{2011/02/01 v1.0e}
-% \item Changed the |\unit| definition (got rid of an old |\rm|).
+% \item Changed the |\unit| definition (got rid of an old |\rm|).\\
+% {}[Removed in version 1.1a.]
% \item Moved the package from \texttt{.../latex/muench/hrefhide/...} to\\
-% \texttt{.../latex/hrefhide/...}.\\
-% (Please make sure that any old versions of the \xpackage{hrefhide} package
-% are porperly uninstalled from your system.)
+% \texttt{.../latex/hrefhide/...}.
% \item Replaced the list of my packages with a link to a web page list of those,
% which has the advantage of showing the recent versions of all those packages.
-% \item Updated to version 2010/12/16 v6.81z of the \xpackage{hyperref} package.
-% \item A new version (2010/12/11 v2.1) of the \xpackage{pdfcomment} package is available.
% \item Minor details.
% \end{Version}
% \begin{Version}{2011/04/29 v1.0f}
-% \item There is a new version of the used \xpackage{lipsum} package: 2011/04/14,~v1.2.
-% \item The \xpackage{holtxdoc} package was fixed (recent: 2011/02/04, v0.21), therefore
-% the warning in \xfile{drv} could be removed. -- Adapted the style of this
+% \item The \xpackage{holtxdoc} package was fixed (then: 2011/02/04, v0.21), therefore
+% the warning in \xfile{drv} could be removed.~-- Adapted the style of this
% documentation to new \textsc{Oberdiek} \xfile{dtx} style.
% \item Removed the \textsf{ltxdoc.cfg} file for the documentation.
-% \item There is a new version of the used \xpackage{hyperref} package: 2011/04/17,~v6.82g.
-% \item There is a new version of the used \xpackage{kvoptions} package: 2010/12/23,~v3.10.
% \item Bug fix: The previouse versions only hide links of type
% \textquotedblleft link\textquotedblright. Now the types citation, page reference,
% URL, local file reference, and \textquotedblleft other links\textquotedblright-type
@@ -1116,6 +1017,15 @@ nisl ut aliquip ex ea commodo consequat.
% on/off of~|ocgcolorlinks| in the document.
% \item Instead of \xpackage{color} now the \xpackage{xcolor} package is used.
% \item A lot of details.
+% \item This version has been archived at\\
+% \url{https://web.archive.org/web/20190417081010/https://mirror.ctan.org/install/macros/latex/contrib/hrefhide.tds.zip}
+% \end{Version}
+% \begin{Version}{2023-02-26 v1.1a}
+% \item Made the |\newcommand|s robust.
+% \item Removed |\unit|.
+% \item Converted to UTF-8.
+% \item Updated to \LaTeX{} format 2022-11-01.
+% \item Extensive updates of the Documentation and README.
% \end{Version}
% \end{History}
%
@@ -1124,8 +1034,6 @@ nisl ut aliquip ex ea commodo consequat.
% When you find a mistake or have a suggestion for an improvement of this package,
% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.)
%
-% \pagebreak
-%
% \PrintIndex
%
% \Finale
diff --git a/macros/latex/contrib/hrefhide/hrefhide.pdf b/macros/latex/contrib/hrefhide/hrefhide.pdf
index d6badad206..4f0169a76d 100644
--- a/macros/latex/contrib/hrefhide/hrefhide.pdf
+++ b/macros/latex/contrib/hrefhide/hrefhide.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/README.md b/macros/latex/contrib/jeuxcartes/README.md
index 3593df51cc..f7d63ad098 100644
--- a/macros/latex/contrib/jeuxcartes/README.md
+++ b/macros/latex/contrib/jeuxcartes/README.md
@@ -6,8 +6,9 @@ Author : Cédric Pierquet
email : cpierquet@outlook.fr
Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
Poker v1 cards Image's Licence : LGPL-2.1 license https://github.com/htdebeer/SVG-cards
-Poker v2 cards Image's Licence : Public Domain https://tekeye.uk/playing_cards/svg-playing-cards
-Poker v3 cards Image's Licence : Public Domain https://www.me.uk/cards/
-Poker v4 cards Image's Licence : CC BY-SA 4.0 https://commons.wikimedia.org/wiki/File:Computer_screen_playing_cards_deck.svg
-Tarot v1 cards Image's Licence : Public Domain https://freesvg.org/deck-of-french-tarot-playing-cards
-Uno v1 cards Image's Licence : MIT License https://eperezcosano.github.io/uno-part1/ \ No newline at end of file
+Poker v2 cards Image's Licence : Public Domain https://tekeye.uk/playing_cards/svg-playing-cards
+Poker v3 cards Image's Licence : Public Domain https://www.me.uk/cards/
+Poker v4 cards Image's Licence : CC BY-SA 4.0 https://commons.wikimedia.org/wiki/File:Computer_screen_playing_cards_deck.svg
+Poker v5 cards Image's Licence : Public Domain https://www.me.uk/cards/
+Tarot v1 cards Image's Licence : Public Domain https://freesvg.org/deck-of-french-tarot-playing-cards
+Uno v1 cards Image's Licence : MIT License https://eperezcosano.github.io/uno-part1/ \ No newline at end of file
diff --git a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf
index dc600f8bb1..c67a9202b5 100644
--- a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf
+++ b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex
index 6273a6bbee..3ac8a72802 100644
--- a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex
+++ b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex
@@ -69,8 +69,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.2.2a}
-\def\TPdate{22 Février 2023}
+\def\TPversion{0.2.3}
+\def\TPdate{25 Février 2023}
\usepackage[most]{tcolorbox}
\usepackage[outputdir=build]{minted}
@@ -195,21 +195,23 @@ Une commande pour des cartes en version \og miniatures \fg{} (individuelle, main
\part{Historique}
+{\small \bverb|v0.2.3 |~:~~~~Ajout d'une clé \textsf{inverse} + dos Uno + style v5 pour le Poker
+
{\small \bverb|v0.2.2a|~:~~~~Ajout d'un style v4 pour le Poker
-{\small \bverb|v0.2.1|~:~~~~Correction du nom d'une carte pokerv1...
+{\small \bverb|v0.2.1 |~:~~~~Correction du nom d'une carte Poker (v1)...
-{\small \bverb|v0.2.0|~:~~~~Modification du design des cartes (pdf pour Poker/Uno + png pour Tarot) + alternatives pour le Poker
+{\small \bverb|v0.2.0 |~:~~~~Modification du design des cartes (pdf pour Poker/Uno + png pour Tarot) + alternatives pour le Poker
-{\small \bverb|v0.1.4|~:~~~~Réduction de la taille des images \texttt{png}
+{\small \bverb|v0.1.4 |~:~~~~Réduction de la taille des images \texttt{png}
-{\small \bverb|v0.1.3|~:~~~~Ajout de cartes Uno (CC1.0 par AlexDer) + modification des commandes + rami
+{\small \bverb|v0.1.3 |~:~~~~Ajout de cartes Uno (CC1.0 par AlexDer) + modification des commandes + rami
-{\small \bverb|v0.1.2|~:~~~~Modification du nom (et de la source) des images de Tarot (CC0)
+{\small \bverb|v0.1.2 |~:~~~~Modification du nom (et de la source) des images de Tarot (CC0)
-{\small \bverb|v0.1.1|~:~~~~Ajout de commandes pour des mini-cartes
+{\small \bverb|v0.1.1 |~:~~~~Ajout de commandes pour des mini-cartes
-{\small \bverb|v0.1 |~:~~~~Version initiale
+{\small \bverb|v0.1 |~:~~~~Version initiale
\vfill~
@@ -222,21 +224,18 @@ Une commande pour des cartes en version \og miniatures \fg{} (individuelle, main
\subsection{\og Philosophie \fg{} du package}
\begin{codeidee}
-L'idée de ce package est de proposer, comme le fait \ctex{pst-poker}, des commandes pour intégrer des cartes de poker dans un document \LaTeX.
+L'idée de ce package est de proposer, comme le fait \ctex{pst-poker}, des commandes pour intégrer des cartes à jouer dans un document \LaTeX.
Les cartes disponibles sont : :
%
\begin{itemize}
-% \item les cartes type \textsf{Poker} sont sous licence LGPL, \copyright{}2005, de David Bellot, via \url{https://github.com/htdebeer/SVG-cards} ;
-% \item les cartes type \textsf{Tarot} sous licence CC0, du site \url{https://freesvg.org} ;
-% \item les cartes type \textsf{Uno} (édité par Mattel\texttrademark) sous licence CC0, du site \url{https://alexder.itch.io/uno-card-game-asset-pack}.
\item les cartes type \textsf{Poker v1} (Licence : LGPL-2.1 license) \url{https://github.com/htdebeer/SVG-cards}
\item les cartes type \textsf{Poker v2} (Licence : Public Domain) \url{https://tekeye.uk/playing_cards/svg-playing-cards}
\item les cartes type \textsf{Poker v3} (Licence : Public Domain) \url{https://www.me.uk/cards/}
\item les cartes type \textsf{Poker v4} (Licence : CC BY-SA 4.0) \url{https://commons.wikimedia.org/wiki/File:Computer_screen_playing_cards_deck.svg}
+ \item les cartes type \textsf{Poker v5} (Licence : Public Domain) \url{https://www.me.uk/cards/}
\item les cartes type \textsf{Tarot} (Licence : Public Domain) \url{https://freesvg.org/deck-of-french-tarot-playing-cards}
\item les cartes type \textsf{Uno} (Licence : MIT License) \url{https://eperezcosano.github.io/uno-part1/}
- % Uno v2 cards Image's Licence : CC1.0 https://alexder.itch.io/uno-card-game-asset-pack
\end{itemize}
\end{codeidee}
@@ -266,7 +265,7 @@ Les images utiles sont proposées en format \textsf{pdf} pour les cartes type \t
\smallskip
-Les fichiers \textsf{eps} ne sont pas intégrées dans le package, mais elles sont disponible sur le dépôt \textsf{github} \url{https://github.com/cpierquet/JeuxCartes}.
+Les fichiers \textsf{eps} ne sont pas intégrés dans le package, mais elles sont disponibles sur le dépôt \textsf{github} \url{https://github.com/cpierquet/JeuxCartes}.
\smallskip
@@ -324,8 +323,8 @@ Les \textsf{codes} seront présentés dans des \textsf{boîtes} \textcolor{red!7
Les \textit{Jeux} disponibles sont :
\begin{itemize}
- \item \Cle{Poker}, \Cle{Pokerv2}, \Cle{Pokerv3}, \Cle{Pokerv4}, \Cle{Tarot} et \Cle{Uno} pour l'affichage des cartes ;
- \item \Cle{Poker}, \Cle{Pokerv2}, \Cle{Pokerv3}, \Cle{Pokerv4}, \Cle{Tarot}, \Cle{Bataille}, \Cle{Rami}, \Cle{Belote} et \Cle{Uno} pour les mains aléatoires ;
+ \item \Cle{Poker(vX)}, \Cle{Tarot} et \Cle{Uno} pour l'affichage des cartes ;
+ \item \Cle{Poker(vX)}, \Cle{Bataille(vX)}, \Cle{Rami(vX)}, \Cle{Belote(vX)}, \Cle{Tarot} et \Cle{Uno} pour les mains aléatoires ;
\item \Cle{Poker} et \Cle{Tarot} pour les \textit{mini-}cartes.
\end{itemize}
\end{codeinfo}
@@ -364,7 +363,7 @@ Les \textit{Jeux} disponibles sont :
\begin{codeinfo}
La commande \ctex{AffCarteJeu} affiche une carte, avec un système de clés/options.
-La commande \ctex{AffCartesJeu} affiche une liste de cartes ne mode \textit{côte à côte}, avec un système de clés/options.
+La commande \ctex{AffCartesJeu} affiche une liste de cartes en mode \textit{côte à côte}, avec un système de clés/options.
\end{codeinfo}
\begin{codetex}[]
@@ -372,7 +371,7 @@ La commande \ctex{AffCartesJeu} affiche une liste de cartes ne mode \textit{côt
\AffCarteJeu[TypeJeu=Tarot]{VP}\AffCarteJeu[TypeJeu=Tarot]{Dos}%
\AffCarteJeu[TypeJeu=Tarot]{Exc}\AffCarteJeu[TypeJeu=Tarot]{1AT}%
\AffCarteJeu[TypeJeu=Tarot]{10K}\AffCarteJeu[TypeJeu=Tarot]{18AT}\\ \\
-\AffCartesJeu[TypeJeu=Uno]{P4 § PTR § Coul § 7B § 8V}
+\AffCartesJeu[TypeJeu=Uno]{P4 § PTR § Dos § Coul § 7B § 8V}
\end{codetex}
\subsection{Noms de cartes}
@@ -411,7 +410,7 @@ est fixé suivant le modèle suivant (typiquement \texttt{<hauteur>.<couleur>} )
\item \texttt{CSB}, \texttt{CSR}, \texttt{CSB}, \texttt{CSJ}, \texttt{CSV}\dotfill\Cle{ChangeSens}
\item \texttt{P4}\dotfill\Cle{+4}
\item \texttt{Coul}\dotfill\Cle{JokerCouleur}
- %\item \texttt{Dos}\dotfill\Cle{Dos}
+ \item \texttt{Dos}\dotfill\Cle{Dos}
\end{itemize}
\end{itemize}
\end{codeinfo}
@@ -428,7 +427,7 @@ Concernant les \Cle{options} :
\begin{itemize}
\item la clé \Cle{Hauteur} correspond à la hauteur voulue, en cm, de la carte ; \hfill{}défaut \Cle{4.25}
- \item la clé \Cle{TypeJeu} (parmi \Cle{PokerXXX} ou \Cle{Tarot} ou \Cle{Uno}) pour spécifier les cartes à utiliser ; \hfill{}défaut \Cle{Poker}
+ \item la clé \Cle{TypeJeu} (parmi \Cle{Poker(vX)} ou \Cle{Tarot} ou \Cle{Uno}) pour spécifier les cartes à utiliser ; \hfill{}défaut \Cle{Poker}
\item la clé \Cle{Rotation} pour une éventuelle rotation de la carte ; \hfill{}défaut \Cle{0}
\item la clé \Cle{AlignementV} pour l'alignement vertical (lié à \ctex{raisebox} ou à \TikZ) ; \hfill{}défaut \Cle{0.5}
\item le booléen \Cle{Tikz} pour préciser que la carte est \textit{autonome}, dans un environnement \ctex{tikzpicture} ; \hfill{}défaut \Cle{false}
@@ -467,16 +466,17 @@ On obtient la main \AffCartesJeu[Hauteur=2,TypeJeu=Uno]{9B § 8R § P2J § P4 §
\pagebreak
-\subsection{Designs disponibles pour les cartes classiques}
+\subsection{Designs disponibles pour les cartes classiques (Poker)}
\begin{codeinfo}
-Il existe 4 versions de designs des cartes \textit{classiques}, accessibles via les clés :
+Il existe 5 versions de design des cartes \textit{classiques}, accessibles via les clés :
\begin{itemize}
\item \Cle{Poker} ;
\item \Cle{Pokerv2} ;
\item \Cle{Pokerv3} ;
- \item \Cle{Pokerv4}.
+ \item \Cle{Pokerv4} ;
+ \item \Cle{Pokerv5}.
\end{itemize}
\end{codeinfo}
@@ -489,6 +489,8 @@ Il existe 4 versions de designs des cartes \textit{classiques}, accessibles via
\AffCartesJeu[Hauteur=2,TypeJeu=Pokerv3]{DK § AP § 10T § VP § 8T § RT § 9C} \\ \\
\textbf{Design v4} :\\
\AffCartesJeu[Hauteur=2,TypeJeu=Pokerv4]{DK § AP § 10T § VP § 8T § RT § 9C} \\ \\
+\textbf{Design v5} :\\
+\AffCartesJeu[Hauteur=2,TypeJeu=Pokerv5]{DK § AP § 10T § VP § 8T § RT § 9C} \\
\end{codetex}
\pagebreak
@@ -522,12 +524,13 @@ Les \Cle{options} sont les suivantes :
\begin{itemize}
\item la clé \Cle{Hauteur} correspond à la hauteur voulue, en cm, des cartes ; \hfill{}défaut \Cle{4.25}
- \item la clé \Cle{TypeJeu} (parmi \Cle{PokerXXX} ou \Cle{Tarot} ou \Cle{Uno}) pour spécifier les cartes à utiliser ; \hfill{}défaut \Cle{Poker}
+ \item la clé \Cle{TypeJeu} (parmi \Cle{Poker(vX)} ou \Cle{Tarot} ou \Cle{Uno}) pour spécifier les cartes à utiliser ; \hfill{}défaut \Cle{Poker}
\item la clé \Cle{EspH} correspond à coefficient d'espacement horizontal (\textit{proche} du cm en taille réelle) entre les cartes ; \hfill{}défaut \Cle{1}
\item la clé \Cle{EspH} correspond à coefficient d'espacement vertical (\textit{proche} du cm en taille réelle) entre les cartes ; \hfill{}défaut \Cle{0}
\item le booléen \Cle{Eventail} pour une présentation en éventail ; \hfill{}défaut \Cle{false}
\item la clé \Cle{Rotation} pour l'angle entre les cartes en mode \Cle{Eventail} ; \hfill{}défaut \Cle{10}
- \item la clé \Cle{AlignementV} pour l'alignement vertical lié à \TikZ{}\hfill{}défaut \Cle{0.5}
+ \item la clé \Cle{AlignementV} pour l'alignement vertical lié à \TikZ{} ;\hfill{}défaut \Cle{0.5}
+ \item le booléen \Cle{Inverse} pour une présentation de \frquote{droite à gauche}.\hfill{}défaut \Cle{false}
\end{itemize}
\end{codecles}
@@ -560,7 +563,7 @@ Les exemples proposés dans cette documentation permettent de se rendre compte d
\smallskip
-Ça c'est une belle poignée ! \MainCartesJeu[Eventail,Hauteur=3,TypeJeu=Tarot,EspH=0,EspV=0.1]%
+Ça c'est une belle poignée ! \MainCartesJeu[Inverse,Eventail,Hauteur=3,TypeJeu=Tarot,EspH=0,EspV=0.1]%
{Exc § 1AT § 2AT § 3AT § 4AT § 5AT § 6AT § %
10AT § 11AT § 15AT § 16AT § 19AT § 20AT § 21AT}
@@ -597,12 +600,13 @@ Les \Cle{options} sont les suivantes :
\begin{itemize}
\item la clé \Cle{Hauteur} correspond à la hauteur voulue, en cm, des cartes ; \hfill{}défaut \Cle{4.25}
- \item la clé \Cle{TypeJeu} (parmi \Cle{PokerXXX} ou \Cle{Tarot} ou \Cle{Belote} ou \Cle{Bataille} ou \Cle{Rami} ou \Cle{Uno}) ; \hfill{}défaut \Cle{Poker}
+ \item la clé \Cle{TypeJeu} (parmi \Cle{Poker(vX)} ou \Cle{Belote(vX)} ou \Cle{Bataille(vX)} ou \Cle{Rami(vX)} ou \Cle{Uno} ou \Cle{Tarot}) ; \hfill{}défaut \Cle{Poker}
\item la clé \Cle{EspH} correspond à coefficient d'espacement horizontal (\textit{proche} du cm en taille réelle) entre les cartes ; \hfill{}défaut \Cle{1}
\item la clé \Cle{EspH} correspond à coefficient d'espacement vertical (\textit{proche} du cm en taille réelle) entre les cartes ; \hfill{}défaut \Cle{0}
\item le booléen \Cle{Eventail} pour une présentation en éventail ; \hfill{}défaut \Cle{false}
\item la clé \Cle{Rotation} pour l'angle entre les cartes en mode \Cle{Eventail} ; \hfill{}défaut \Cle{10}
- \item la clé \Cle{AlignementV} pour l'alignement vertical lié à \TikZ{}\hfill{}défaut \Cle{0.5}
+ \item la clé \Cle{AlignementV} pour l'alignement vertical lié à \TikZ{} ;\hfill{}défaut \Cle{0.5}
+ \item le booléen \Cle{Inverse} pour une présentation de \frquote{droite à gauche}.\hfill{}défaut \Cle{false}
\end{itemize}
\end{codecles}
@@ -610,10 +614,10 @@ Les \Cle{options} sont les suivantes :
En ce qui concerne les \textit{jeux} disponibles (non modifiables) :
\begin{itemize}
- \item \Cle{Poker} ou \Cle{Pokerv2} ou \Cle{Pokerv3} ou \Cle{Pokerv4} : 52 cartes (sans Joker) ;
- \item \Cle{Belote} ou \Cle{Belotev2} ou \Cle{Belotev3} ou \Cle{Belotev4} : 32 cartes (sans Joker) ;
- \item \Cle{Bataille} ou \Cle{Bataillev2} ou \Cle{Bataillev3} ou \Cle{Bataillev4} : 54 cartes (avec Jokers) ;
- \item \Cle{Rami} ou \Cle{Ramiv2} ou \Cle{Ramiv3} ou \Cle{Ramiv4} : 108 cartes (avec Jokers) ;
+ \item \Cle{Poker(vX)} : 52 cartes (sans Joker) ;
+ \item \Cle{Belote(vX)} : 32 cartes (sans Joker) ;
+ \item \Cle{Bataille(vX)} : 54 cartes (avec Jokers) ;
+ \item \Cle{Rami(vX)} : 108 cartes (avec Jokers) ;
\item \Cle{Tarot} : 78 cartes ;
\item \Cle{Uno}.
\end{itemize}
@@ -622,12 +626,12 @@ En ce qui concerne les \textit{jeux} disponibles (non modifiables) :
\pagebreak
\begin{codetex}[]
-\textbf{\large Belote v1 \& Belote v2 :} \\ \\
-\MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Belote]{8} ou \MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Belotev2]{8}.\\ \\
+\textbf{\large Belote v1 \& Belote v4 \& Belote v5 :} \\ \\
+\MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Belote]{8} ou \MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Belotev4]{8} ou \MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Belotev5]{8}.\\ \\
\textbf{\large Poker v1 \& Poker v3 :} \\ \\
\MainCartesJeuAleatoire[Hauteur=2.5,Eventail,EspH=0,EspV=0.1]{5} ou \MainCartesJeuAleatoire[Hauteur=2.5,Eventail,EspH=0,EspV=0.1,TypeJeu=Pokerv3]{5}.\\ \\
-\textbf{\large Bataille v1 :} \\ \\
-\MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Bataille]{27}\\ \\
+\textbf{\large Bataille v2 :} \\ \\
+\MainCartesJeuAleatoire[Hauteur=2.5,TypeJeu=Bataillev2]{27}\\ \\
\textbf{\large Tarot :} \\
\MainCartesJeuAleatoire[Hauteur=3.25,TypeJeu=Tarot]{10} ou~
\MainCartesJeuAleatoire[Hauteur=3.25,Eventail,TypeJeu=Tarot,EspH=0,EspV=0.1]{10}.
@@ -747,7 +751,7 @@ Les \Cle{Clés} sont les mêmes que pour la commande individuelle, avec en plus
\section{Cartes disponibles}
-\subsection{Poker/Bataille/Belote (v1)}
+\subsection{Poker/Bataille/Belote/Rami (v1)}
Dos disponibles : \texttt{Dos}
@@ -764,7 +768,7 @@ Dos disponibles : \texttt{Dos}
\AffCarteJeu[Hauteur=1.85]{JN}\AffCarteJeu[Hauteur=1.85]{JR}\AffCarteJeu[Hauteur=1.85]{Dos}%
%\xintFor #1 in {Bleu,BleuVert,Fuchsia,Gris,Jaune,Marron,Navy,Noir,Olive,Vert,Violet}\do{\AffCarteJeu[Hauteur=1.75]{Dos#1}}
-\subsection{Poker/Bataille/Belote (v2)}
+\subsection{Poker/Bataille/Belote/Rami (v2)}
Dos disponibles : \texttt{DosBleu} ou \texttt{DosRouge} ou \texttt{DosBleu2} ou \texttt{DosRouge2}
@@ -783,7 +787,7 @@ Dos disponibles : \texttt{DosBleu} ou \texttt{DosRouge} ou \texttt{DosBleu2} ou
\pagebreak
-\subsection{Poker/Bataille/Belote (v3)}
+\subsection{Poker/Bataille/Belote/Rami (v3)}
Dos disponibles : \texttt{DosNoir} ou \texttt{DosRouge}
@@ -799,7 +803,7 @@ Dos disponibles : \texttt{DosNoir} ou \texttt{DosRouge}
\AffCarteJeu[TypeJeu=Pokerv3,Hauteur=1.85]{JN}\AffCarteJeu[TypeJeu=Pokerv3,Hauteur=1.85]{JR}\AffCarteJeu[TypeJeu=Pokerv3,Hauteur=1.85]{DosNoir}\AffCarteJeu[TypeJeu=Pokerv3,Hauteur=1.85]{DosRouge}%
-\subsection{Poker/Bataille/Belote (v4)}
+\subsection{Poker/Bataille/Belote/Rami (v4)}
Dos disponibles : \texttt{DosBleu} ou \texttt{DosRouge}
@@ -813,10 +817,26 @@ Dos disponibles : \texttt{DosBleu} ou \texttt{DosRouge}
\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,D,R,A}\do{\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{#1T}}
-\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{JN}\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{JR}\AffCarteJeu[TypeJeu=Pokerv3,Hauteur=1.85]{DosRouge}\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{DosBleu}%
+\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{JN}\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{JR}\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{DosRouge}\AffCarteJeu[TypeJeu=Pokerv4,Hauteur=1.85]{DosBleu}%
\pagebreak
+\subsection{Poker/Bataille/Belote/Rami (v5)}
+
+Dos disponibles : \texttt{DosNoir} ou \texttt{DosRouge}
+
+\medskip
+
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,D,R,A}\do{\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{#1P}}
+
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,D,R,A}\do{\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{#1C}}
+
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,D,R,A}\do{\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{#1K}}
+
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,D,R,A}\do{\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{#1T}}
+
+\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{JN}\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{JR}\AffCarteJeu[TypeJeu=Pokerv3,Hauteur=1.85]{DosRouge}\AffCarteJeu[TypeJeu=Pokerv5,Hauteur=1.85]{DosNoir}%
+
\subsection{Cartes Tarot}
\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffCarteJeu[TypeJeu=Tarot,Hauteur=1.85]{#1P}}
@@ -846,7 +866,7 @@ Dos disponibles : \texttt{DosBleu} ou \texttt{DosRouge}
\AffCartesJeu[TypeJeu=Uno,Hauteur=1.85]{0V § 1V § 2V § 3V § 4V § 5V § 6V § 7V § 8V § 9V § P2V § PTV § CSV}
-\AffCartesJeu[TypeJeu=Uno,Hauteur=1.85]{P4 § Coul}
+\AffCartesJeu[TypeJeu=Uno,Hauteur=1.85]{P4 § Coul § Dos}
\subsection{MiniCartes}
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv3-JS.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv3-JS.pdf
new file mode 100644
index 0000000000..e84827104b
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv3-JS.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv4-AP.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv4-AP.pdf
index a74874dca9..efa9aa6166 100644
--- a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv4-AP.pdf
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv4-AP.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10C.pdf
new file mode 100644
index 0000000000..a0347f6fb5
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10K.pdf
new file mode 100644
index 0000000000..35dcbf6111
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10P.pdf
new file mode 100644
index 0000000000..76b5d17bb4
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10T.pdf
new file mode 100644
index 0000000000..0b074e15fc
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-10T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2C.pdf
new file mode 100644
index 0000000000..0f71e8ee84
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2K.pdf
new file mode 100644
index 0000000000..170a854dcb
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2P.pdf
new file mode 100644
index 0000000000..4a8d917893
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2T.pdf
new file mode 100644
index 0000000000..5366b5b410
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-2T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3C.pdf
new file mode 100644
index 0000000000..e0d00557e4
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3K.pdf
new file mode 100644
index 0000000000..313540ba6f
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3P.pdf
new file mode 100644
index 0000000000..af5f6c258f
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3T.pdf
new file mode 100644
index 0000000000..41d6b83112
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-3T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4C.pdf
new file mode 100644
index 0000000000..d3e297c9f4
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4K.pdf
new file mode 100644
index 0000000000..7b88d6c5e8
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4P.pdf
new file mode 100644
index 0000000000..792192fff5
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4T.pdf
new file mode 100644
index 0000000000..701e1f14f0
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-4T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5C.pdf
new file mode 100644
index 0000000000..3c8df722e5
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5K.pdf
new file mode 100644
index 0000000000..87cdbba7ba
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5P.pdf
new file mode 100644
index 0000000000..a513aa2cd0
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5T.pdf
new file mode 100644
index 0000000000..4c6ade1139
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-5T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6C.pdf
new file mode 100644
index 0000000000..695656849a
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6K.pdf
new file mode 100644
index 0000000000..cb201ad180
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6P.pdf
new file mode 100644
index 0000000000..c4cf985700
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6T.pdf
new file mode 100644
index 0000000000..7fb7fc09d1
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-6T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7C.pdf
new file mode 100644
index 0000000000..22ffc8c8ba
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7K.pdf
new file mode 100644
index 0000000000..c361e355ed
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7P.pdf
new file mode 100644
index 0000000000..746c432533
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7T.pdf
new file mode 100644
index 0000000000..3cbcea25be
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-7T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8C.pdf
new file mode 100644
index 0000000000..dc49fa462c
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8K.pdf
new file mode 100644
index 0000000000..ec06542f08
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8P.pdf
new file mode 100644
index 0000000000..4f6211f499
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8T.pdf
new file mode 100644
index 0000000000..bcd36f1d1c
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-8T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9C.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9C.pdf
new file mode 100644
index 0000000000..241f7a440a
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9C.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9K.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9K.pdf
new file mode 100644
index 0000000000..019a2d4284
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9K.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9P.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9P.pdf
new file mode 100644
index 0000000000..4b7b3e8c22
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9P.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9T.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9T.pdf
new file mode 100644
index 0000000000..7f531471ce
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-9T.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AC.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AC.pdf
new file mode 100644
index 0000000000..e9603ba477
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AC.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AK.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AK.pdf
new file mode 100644
index 0000000000..9df4072a66
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AK.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AP.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AP.pdf
new file mode 100644
index 0000000000..92a1b30aa6
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AP.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AT.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AT.pdf
new file mode 100644
index 0000000000..8305277919
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-AT.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DC.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DC.pdf
new file mode 100644
index 0000000000..c975209459
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DC.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DK.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DK.pdf
new file mode 100644
index 0000000000..88392e7f93
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DK.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DP.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DP.pdf
new file mode 100644
index 0000000000..416c9d5e93
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DP.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DT.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DT.pdf
new file mode 100644
index 0000000000..ba4005f1e8
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DT.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosNoir.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosNoir.pdf
new file mode 100644
index 0000000000..2df23fd957
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosNoir.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosRouge.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosRouge.pdf
new file mode 100644
index 0000000000..5a1f0360ae
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-DosRouge.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JN.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JN.pdf
new file mode 100644
index 0000000000..a13fe505ef
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JN.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JR.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JR.pdf
new file mode 100644
index 0000000000..ea863df147
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-JR.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RC.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RC.pdf
new file mode 100644
index 0000000000..7486ce3201
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RC.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RK.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RK.pdf
new file mode 100644
index 0000000000..14abe2aaf8
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RK.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RP.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RP.pdf
new file mode 100644
index 0000000000..0caa875985
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RP.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RT.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RT.pdf
new file mode 100644
index 0000000000..efd36545c5
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-RT.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VC.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VC.pdf
new file mode 100644
index 0000000000..a6472e97e1
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VC.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VK.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VK.pdf
new file mode 100644
index 0000000000..967de478d2
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VK.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VP.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VP.pdf
new file mode 100644
index 0000000000..55673d335d
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VP.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VT.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VT.pdf
new file mode 100644
index 0000000000..7bc88eb1df
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-PokeRv5-VT.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/CaJ-UnOv1-Dos.pdf b/macros/latex/contrib/jeuxcartes/tex/CaJ-UnOv1-Dos.pdf
new file mode 100644
index 0000000000..96b92b253e
--- /dev/null
+++ b/macros/latex/contrib/jeuxcartes/tex/CaJ-UnOv1-Dos.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty b/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty
index a94f30eefb..b5f2b94ac5 100644
--- a/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty
+++ b/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty
@@ -4,11 +4,13 @@
% Poker v2 cards Image's Licence : Public Domain https://tekeye.uk/playing_cards/svg-playing-cards
% Poker v3 cards Image's Licence : Public Domain https://www.me.uk/cards/
% Poker v4 cards Image's Licence : CC BY-SA 4.0) https://commons.wikimedia.org/wiki/File:Computer_screen_playing_cards_deck.svg
+% Poker v5 cards Image's Licence : Public Domain https://www.me.uk/cards/
% Tarot v1 cards Image's Licence : Public Domain https://freesvg.org/deck-of-french-tarot-playing-cards
% Uno v1 cards Image's Licence : MIT License https://eperezcosano.github.io/uno-part1/
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{JeuxCartes}[2023/02/22 v0.2.2a Jeux de cartes]
+\ProvidesPackage{JeuxCartes}[2023/02/25 v0.2.3 Jeux de cartes]
+% 0.2.3 Ajout d'une option pour présenter une main "inversée" + style v5
% 0.2.2a Correction de 2 cartes de pokerv4
% 0.2.2 Ajout d'un style v4 pour le poker
% 0.2.1a Correction d'un bug avec une carte de poker...
@@ -73,15 +75,15 @@
%cas pokerv4
\IfStrEq{\AffCarteJeuType}{Pokerv4}%poker4
{\def\CartePrefixe{CaJ-PokeRv4-}}{}%
+ %cas pokerv5
+ \IfStrEq{\AffCarteJeuType}{Pokerv5}%poker5
+ {\def\CartePrefixe{CaJ-PokeRv5-}}{}%
%cas tarot
\IfStrEq{\AffCarteJeuType}{Tarot}%tarot
{\def\CartePrefixe{CaJ-TaroTv1-}}{}%
%cas uno
\IfStrEq{\AffCarteJeuType}{Uno}%uno
{\def\CartePrefixe{CaJ-UnOv1-}}{}%
- %cas unov2
-% \IfStrEq{\AffCarteJeuType}{Unov2}%uno
-% {\def\CartePrefixe{CaJ-Unov2-}}{}%
%transformation valign en tikz
\def\OptionTikzCBB{current bounding box.center}%
\IfStrEq{\AffCarteJeuAlignementV}{0}%
@@ -139,6 +141,7 @@
TypeJeu=\def\MainJeuType{#1},%
AlignementV=\def\MainAlignementV{#1}
}
+
\setKVdefault[AffMainCartes]{%
Hauteur=4.25,%
EspH=1,%
@@ -146,7 +149,8 @@
Rotation=10,%
Eventail=false,%
TypeJeu=Poker,%
- AlignementV=0.5
+ AlignementV=0.5,%
+ Inverse=false
}
\NewDocumentCommand\MainCartesJeu{ O{} m }{%1=options,2=listecartes
@@ -165,12 +169,12 @@
{\def\HauteurGenerique{8.5}\def\CarteMainPrefixe{CaJ-PokeRv3-}}{}%
\IfStrEq{\MainJeuType}{Pokerv4}%poker4
{\def\HauteurGenerique{8.5}\def\CarteMainPrefixe{CaJ-PokeRv4-}}{}%
+ \IfStrEq{\MainJeuType}{Pokerv5}%poker5
+ {\def\HauteurGenerique{8.5}\def\CarteMainPrefixe{CaJ-PokeRv5-}}{}%
\IfStrEq{\MainJeuType}{Tarot}%tarot
{\def\HauteurGenerique{5.5}\def\CarteMainPrefixe{CaJ-TaroTv1-}}{}%
\IfStrEq{\MainJeuType}{Uno}%uno
{\def\HauteurGenerique{8.5}\def\CarteMainPrefixe{CaJ-UnOv1-}}{}%
-% \IfStrEq{\MainJeuType}{Unov2}%unov2
-% {\def\HauteurGenerique{8.5}\def\CarteMainPrefixe{CaJ-Unov2-}}{}%
%echelle globale
\def\EchelleCarteDecalage{\fpeval{\MainHauteur/\HauteurGenerique}}%
%transformation valign en tikz
@@ -181,7 +185,14 @@
{\def\OptionTikzCBB{current bounding box.north}}{}%
%environnement tikzpicture
\begin{tikzpicture}[baseline=(\OptionTikzCBB)]%
- \foreach \i in {1,2,...,\ListeCartesMainlen}{%
+ \ifboolKV[AffMainCartes]{Inverse}%
+ {%
+ \foreach \i in {\ListeCartesMainlen,\inteval{\ListeCartesMainlen-1},...,1}
+ }%
+ {%
+ \foreach \i in {1,2,...,\ListeCartesMainlen}
+ }%
+ {%
\itemtomacro\ListeCartesMain[\i]\CarteMain%
\ifboolKV[AffMainCartes]{Eventail}%
{%
@@ -215,7 +226,8 @@
Rotation=10,%
Eventail=false,%
TypeJeu=Poker,%
- AlignementV=0.5
+ AlignementV=0.5,%
+ Inverse=false
}
\xdef\CartesJeuPoker{2P,3P,4P,5P,6P,7P,8P,9P,10P,VP,DP,RP,AP,2T,3T,4T,5T,6T,7T,8T,9T,10T,VT,DT,RT,AT,2C,3C,4C,5C,6C,7C,8C,9C,10C,VC,DC,RC,AC,2K,3K,4K,5K,6K,7K,8K,9K,10K,VK,DK,RK,AK}%
@@ -238,10 +250,10 @@
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv3}\xdef\CarteDebutRand{\fpeval{randint(0,52-#2)}}}{}%
\IfStrEq{\MainJeuType}{Pokerv4}%pokerv4
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv4}\xdef\CarteDebutRand{\fpeval{randint(0,52-#2)}}}{}%
+ \IfStrEq{\MainJeuType}{Pokerv5}%pokerv5
+ {\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv5}\xdef\CarteDebutRand{\fpeval{randint(0,52-#2)}}}{}%
\IfStrEq{\MainJeuType}{Uno}%uno
{\def\HauteurGenerique{8.5}\def\CarteMainType{Uno}\xdef\CarteDebutRand{\fpeval{randint(0,108-#2)}}}{}%
-% \IfStrEq{\MainJeuType}{Unov2}%unov2
-% {\def\HauteurGenerique{8.5}\def\CarteMainType{Unov2}\xdef\CarteDebutRand{\fpeval{randint(0,108-#2)}}}{}%
\IfStrEq{\MainJeuType}{Bataille}%bataille
{\def\HauteurGenerique{8.5}\def\CarteMainType{Poker}\xdef\CarteDebutRand{\fpeval{randint(0,54-#2)}}}{}%
\IfStrEq{\MainJeuType}{Bataillev2}%bataillev2
@@ -250,6 +262,8 @@
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv3}\xdef\CarteDebutRand{\fpeval{randint(0,54-#2)}}}{}%
\IfStrEq{\MainJeuType}{Bataillev4}%bataillev4
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv4}\xdef\CarteDebutRand{\fpeval{randint(0,54-#2)}}}{}%
+ \IfStrEq{\MainJeuType}{Bataillev5}%bataillev5
+ {\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv5}\xdef\CarteDebutRand{\fpeval{randint(0,54-#2)}}}{}%
\IfStrEq{\MainJeuType}{Belote}%belote
{\def\HauteurGenerique{8.5}\def\CarteMainType{Poker}\xdef\CarteDebutRand{\fpeval{randint(0,32-#2)}}}{}%
\IfStrEq{\MainJeuType}{Belotev2}%belotev2
@@ -258,6 +272,8 @@
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv3}\xdef\CarteDebutRand{\fpeval{randint(0,32-#2)}}}{}%
\IfStrEq{\MainJeuType}{Belotev4}%belotev4
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv4}\xdef\CarteDebutRand{\fpeval{randint(0,32-#2)}}}{}%
+ \IfStrEq{\MainJeuType}{Belotev5}%belotev5
+ {\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv5}\xdef\CarteDebutRand{\fpeval{randint(0,32-#2)}}}{}%
\IfStrEq{\MainJeuType}{Rami}%rami
{\def\HauteurGenerique{8.5}\def\CarteMainType{Poker}\xdef\CarteDebutRand{\fpeval{randint(0,108-#2)}}}{}%
\IfStrEq{\MainJeuType}{Ramiv2}%ramiv2
@@ -266,6 +282,8 @@
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv3}\xdef\CarteDebutRand{\fpeval{randint(0,108-#2)}}}{}%
\IfStrEq{\MainJeuType}{Ramiv4}%ramiv4
{\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv4}\xdef\CarteDebutRand{\fpeval{randint(0,108-#2)}}}{}%
+ \IfStrEq{\MainJeuType}{Ramiv5}%ramiv5
+ {\def\HauteurGenerique{8.5}\def\CarteMainType{Pokerv5}\xdef\CarteDebutRand{\fpeval{randint(0,108-#2)}}}{}%
\IfStrEq{\MainJeuType}{Tarot}%tarot
{\def\HauteurGenerique{6.375}\def\CarteMainType{Tarot}\xdef\CarteDebutRand{\fpeval{randint(0,78-#2)}}}{}%
%échelle relative des cartes
@@ -302,6 +320,12 @@
\do{\InsertRandomItem{CartesJeuMelange}{##1}}%
}%
{}%
+ \IfStrEq{\MainJeuType}{Pokerv5}%si c'est le pokerv5
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\CartesJeuPoker}}%
+ \do{\InsertRandomItem{CartesJeuMelange}{##1}}%
+ }%
+ {}%
\IfStrEq{\MainJeuType}{Bataille}%si c'est la bataille
{%
\xintFor* ##1 in {\xintCSVtoList{\CartesJeuBataille}}%
@@ -326,6 +350,12 @@
\do{\InsertRandomItem{CartesJeuMelange}{##1}}%
}%
{}%
+ \IfStrEq{\MainJeuType}{Bataillev5}%si c'est la bataillev5
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\CartesJeuBataille}}%
+ \do{\InsertRandomItem{CartesJeuMelange}{##1}}%
+ }%
+ {}%
\IfStrEq{\MainJeuType}{Rami}%si c'est le rami
{%
\xintFor* ##1 in {\xintCSVtoList{\CartesJeuRami}}%
@@ -350,18 +380,18 @@
\do{\InsertRandomItem{CartesJeuMelange}{##1}}%
}%
{}%
+ \IfStrEq{\MainJeuType}{Ramiv5}%si c'est le ramiv5
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\CartesJeuRami}}%
+ \do{\InsertRandomItem{CartesJeuMelange}{##1}}%
+ }%
+ {}%
\IfStrEq{\MainJeuType}{Uno}%si c'est le uno
{%
\xintFor* ##1 in {\xintCSVtoList{\CartesJeuUno}}%
\do{\InsertRandomItem{CartesJeuMelange}{##1}}%
}%
{}%
-% \IfStrEq{\MainJeuType}{Unov2}%si c'est le unov2
-% {%
-% \xintFor* ##1 in {\xintCSVtoList{\CartesJeuUno}}%
-% \do{\InsertRandomItem{CartesJeuMelange}{##1}}%
-% }%
-% {}%
\IfStrEq{\MainJeuType}{Belote}%si c'est la belote
{%
\xintFor* ##1 in {\xintCSVtoList{\CartesJeuBelote}}%
@@ -386,6 +416,12 @@
\do{\InsertRandomItem{CartesJeuMelange}{##1}}%
}%
{}%
+ \IfStrEq{\MainJeuType}{Belotev5}%si c'est la belotev5
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\CartesJeuBelote}}%
+ \do{\InsertRandomItem{CartesJeuMelange}{##1}}%
+ }%
+ {}%
\IfStrEq{\MainJeuType}{Tarot}%si c'est le tarot
{%
\xintFor* ##1 in {\xintCSVtoList{\CartesJeuTarot}}%
@@ -394,9 +430,16 @@
{}%
%environnement tikzpicture
\begin{tikzpicture}[baseline=(\OptionTikzCBB)]%
- \foreach \i in {1,2,...,#2}{%
+ \ifboolKV[AffMainAleaCartes]{Inverse}%
+ {%
+ \foreach \i in {#2,\inteval{#2-1},...,1}
+ }%
+ {%
+ \foreach \i in {1,2,...,#2}
+ }%
+ {%
+ %\foreach \i in {1,2,...,#2}{%
\GetItem{CartesJeuMelange}{\inteval{\CarteDebutRand+\i-1}}{CarteMainChoisie}%
- %\itemtomacro\ListeCartesMain[\i]\CarteMain%
\ifboolKV[AffMainAleaCartes]{Eventail}%
{%
\def\MainOffset{\fpeval{\EchelleCarteDecalage*\MainDecalV*(\i-1)}}%
diff --git a/macros/latex/contrib/l3build/CHANGELOG.md b/macros/latex/contrib/l3build/CHANGELOG.md
index eda72d0a20..d65bbfc7d0 100644
--- a/macros/latex/contrib/l3build/CHANGELOG.md
+++ b/macros/latex/contrib/l3build/CHANGELOG.md
@@ -7,6 +7,17 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2023-02-26]
+
+### Changed
+- Run engine sanity check per config
+
+### Fixed
+- Restore epoch settings for `dvitopdf()`
+- Use plural form of variable `ps2pdfopts` consistently in code and doc, and
+ retain compatibility with singular form `ps2pdfopt` (issue #275)
+- Remove the last trace of dropped variable `stdconfig`
+
## [2023-02-20]
### Changed
@@ -629,7 +640,8 @@ this project uses date-based 'snapshot' version identifiers.
- Rationalise short option names: removed `-d`, `-E`, `-r`
- Target `cmdcheck`: specific to LaTeX kernel work
-[Unreleased]: https://github.com/latex3/l3build/compare/2023-02-20...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2023-02-26...HEAD
+[2023-02-26]: https://github.com/latex3/l3build/compare/2023-02-20...2023-02-26
[2023-02-20]: https://github.com/latex3/l3build/compare/2023-02-16...2023-02-20
[2023-02-16]: https://github.com/latex3/l3build/compare/2022-11-10...2023-02-16
[2022-11-10]: https://github.com/latex3/l3build/compare/2022-09-15...2022-11-10
diff --git a/macros/latex/contrib/l3build/CONTRIBUTING.md b/macros/latex/contrib/l3build/CONTRIBUTING.md
deleted file mode 100644
index e85fa762d3..0000000000
--- a/macros/latex/contrib/l3build/CONTRIBUTING.md
+++ /dev/null
@@ -1,52 +0,0 @@
-Thanks for considering contributing to `l3build`: feedback, fixes and ideas are
-all useful. Here, we ([The LaTeX Project](https://www.latex-project.org)) have
-collected together a few pointers to help things along.
-
-## Bugs
-
-Please log bugs using the [issues](https://github.com/latex3/l3build/issues)
-system on GitHub, and choose the 'bug' label. Handy information that you might
-include, depending on the nature of the issue, includes
-
-- Your version of `l3build` (`texlua l3build.lua version`)
-- Your TeX system details (for example 'TeX Live 2017')
-- Your operating system
-- The contents of your `build.lua` file
-- An 'ASCII art' explanation of your directory layout
-
-## Feature requests
-
-Feature requests are welcome: log them in the same way as bugs and pick
-the 'Enhancement' label. We welcome feature requests for the test set up,
-the build process, _etc._
-
-## Code contributions
-
-If you want to discuss a possible contribution before (or instead of)
-making a pull request, drop a line to
-[the team](mailto:latex-team@latex-project.org).
-
-There are a few things that might look non-standard to most Lua programmers,
-which come about as `l3build`'s focus is testing and building LaTeX packages:
-
-- Our target Lua set up is `texlua` (part of LuaTeX), not standalone `lua`
-- The main `l3build.lua` file is self-contained as this helps with
- bootstrapping LaTeX: we are aiming to maintain a single file with no
- `.lua` dependencies
-- The primary documentation is aimed at the TeX world, so is in PDF format
- and generated from `l3build.dtx`; documentation in the `.lua` file is
- also welcome, but anything for general use does need to be in the `.dtx`
-- As far as possible, everything is done within `l3build` itself or tools
- directly available in a TeX system or as standard in the supported
- systems (Windows, MacOS, Linux)
-- The `l3build` interfaces should be platform-agnostic (though it may be
- necessary of course to branch inside particular functions)
-
-If you are submitting a pull request, notice that
-
-- We use Travis-CI for (light) testing so add `[ci skip]` to documentation-only
- commit messages
-- We favour a single linear history so will rebase agreed pull requests on to
- the `master` branch
-- Where a commit fixes or closes an issue, please include this information
- in the first line of the commit message
diff --git a/macros/latex/contrib/l3build/README.md b/macros/latex/contrib/l3build/README.md
index 40741a74ed..d66bf91b0f 100644
--- a/macros/latex/contrib/l3build/README.md
+++ b/macros/latex/contrib/l3build/README.md
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX
=================================================
-Release 2023-02-20
+Release 2023-02-26
Overview
--------
@@ -31,6 +31,6 @@ The LaTeX kernel is developed by [The LaTeX Project](https://latex-project.org).
-----
-<p>Copyright (C) 2014-2022 The LaTeX Project <br />
+<p>Copyright (C) 2014-2023 The LaTeX Project <br />
<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
All rights reserved.</p>
diff --git a/macros/latex/contrib/l3build/l3build-arguments.lua b/macros/latex/contrib/l3build/l3build-arguments.lua
index 49c80a7596..76b661e26c 100644
--- a/macros/latex/contrib/l3build/l3build-arguments.lua
+++ b/macros/latex/contrib/l3build/l3build-arguments.lua
@@ -291,16 +291,16 @@ end
options = argparse()
-- Sanity check
-function check_engines()
+function check_engines(config)
if options["engine"] and not options["force"] then
- -- Make a lookup table
- local t = { }
+ -- Make a lookup table
+ local t = { }
for _, engine in pairs(checkengines) do
t[engine] = true
end
for _, engine in pairs(options["engine"]) do
if not t[engine] then
- print("\n! Error: Engine \"" .. engine .. "\" not set up for testing!")
+ print("\n! Error: Engine \"" .. engine .. "\" not set up for testing with configuration " .. config .. "!")
print("\n Valid values are:")
for _, engine in ipairs(checkengines) do
print(" - " .. engine)
diff --git a/macros/latex/contrib/l3build/l3build-check.lua b/macros/latex/contrib/l3build/l3build-check.lua
index b77a7e26cc..8c3afa4a7e 100644
--- a/macros/latex/contrib/l3build/l3build-check.lua
+++ b/macros/latex/contrib/l3build/l3build-check.lua
@@ -791,7 +791,7 @@ function runtest(name, engine, hide, ext, test_type, breakout)
.. (checksearch and os_pathsep or "")
.. os_concat ..
-- ensure epoch settings
- set_epoch_cmd(epoch, forcecheckepoch) ..
+ set_epoch_cmd(epoch, forcecheckepoch) ..
-- Ensure lines are of a known length
os_setenv .. " max_print_line=" .. maxprintline
.. os_concat ..
diff --git a/macros/latex/contrib/l3build/l3build-typesetting.lua b/macros/latex/contrib/l3build/l3build-typesetting.lua
index 7f5327b5a2..2a7dbad510 100644
--- a/macros/latex/contrib/l3build/l3build-typesetting.lua
+++ b/macros/latex/contrib/l3build/l3build-typesetting.lua
@@ -57,10 +57,11 @@ end
function dvitopdf(name, dir, engine, hide)
runcmd(
+ set_epoch_cmd(epoch, forcecheckepoch) ..
"dvips " .. name .. dviext
.. (hide and (" > " .. os_null) or "")
.. os_concat ..
- "ps2pdf " .. ps2pdfopt .. name .. psext
+ "ps2pdf " .. ps2pdfopts .. name .. psext
.. (hide and (" > " .. os_null) or ""),
dir
)
diff --git a/macros/latex/contrib/l3build/l3build-variables.lua b/macros/latex/contrib/l3build/l3build-variables.lua
index 51f927019a..ce07d1f815 100644
--- a/macros/latex/contrib/l3build/l3build-variables.lua
+++ b/macros/latex/contrib/l3build/l3build-variables.lua
@@ -193,7 +193,8 @@ if flattentds == nil then
end
maxprintline = maxprintline or 79
packtdszip = packtdszip or false
-ps2pdfopt = ps2pdfopt or ""
+-- support "ps2pdfopt" for backward compatibility, gh issue #275
+ps2pdfopts = ps2pdfopts or ps2pdfopt or ""
typesetcmds = typesetcmds or ""
typesetruns = typesetruns or 3
recordstatus = recordstatus or false
diff --git a/macros/latex/contrib/l3build/l3build.1 b/macros/latex/contrib/l3build/l3build.1
index f9738ed8d9..2044b290a6 100644
--- a/macros/latex/contrib/l3build/l3build.1
+++ b/macros/latex/contrib/l3build/l3build.1
@@ -1,4 +1,4 @@
-.TH l3build 1 "2023-02-20"
+.TH l3build 1 "2023-02-26"
.SH NAME
l3build \- Checking and building packages
.SH SYNOPSIS
diff --git a/macros/latex/contrib/l3build/l3build.dtx b/macros/latex/contrib/l3build/l3build.dtx
index 085ac1d022..6df655fb98 100644
--- a/macros/latex/contrib/l3build/l3build.dtx
+++ b/macros/latex/contrib/l3build/l3build.dtx
@@ -236,7 +236,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-20}
+% \date{Released 2023-02-26}
%
% \maketitle
% \tableofcontents
diff --git a/macros/latex/contrib/l3build/l3build.lua b/macros/latex/contrib/l3build/l3build.lua
index ff80523b17..0aead12f95 100755
--- a/macros/latex/contrib/l3build/l3build.lua
+++ b/macros/latex/contrib/l3build/l3build.lua
@@ -25,7 +25,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2023-02-20"
+release_date = "2023-02-26"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
@@ -118,17 +118,14 @@ if options["epoch"] then
end
epoch = normalise_epoch(epoch)
--- Sanity check
-check_engines()
-
--
-- Deal with multiple configs for tests
--
-- When we have specific files to deal with, only use explicit configs
--- (or just the std one)
+-- (or just the default one)
if options["names"] then
- checkconfigs = options["config"] or {stdconfig}
+ checkconfigs = options["config"] or {"build"}
else
checkconfigs = options["config"] or checkconfigs
end
@@ -205,22 +202,28 @@ if #checkconfigs > 1 then
end
end
if #checkconfigs == 1 and
- checkconfigs[1] ~= "build" and
(options["target"] == "check" or options["target"] == "save" or options["target"] == "clean") then
- local configname = gsub(checkconfigs[1], "%.lua$", "")
- local config = "./" .. configname .. ".lua"
- if fileexists(config) then
- local savedtestfiledir = testfiledir
- dofile(config)
- testdir = testdir .. "-" .. configname
- -- Reset testsuppdir if required
- if savedtestfiledir ~= testfiledir and
- testsuppdir == savedtestfiledir .. "/support" then
- testsuppdir = testfiledir .. "/support"
- end
+ if checkconfigs[1] == "build" then
+ -- Sanity check for default config
+ check_engines("build.lua")
else
- print("Error: Cannot find configuration " .. checkconfigs[1])
- exit(1)
+ local configname = gsub(checkconfigs[1], "%.lua$", "")
+ local config = "./" .. configname .. ".lua"
+ if fileexists(config) then
+ local savedtestfiledir = testfiledir
+ dofile(config)
+ -- Sanity check for non-default config
+ check_engines(configname .. ".lua")
+ testdir = testdir .. "-" .. configname
+ -- Reset testsuppdir if required
+ if savedtestfiledir ~= testfiledir and
+ testsuppdir == savedtestfiledir .. "/support" then
+ testsuppdir = testfiledir .. "/support"
+ end
+ else
+ print("Error: Cannot find configuration " .. configname .. ".lua")
+ exit(1)
+ end
end
end
diff --git a/macros/latex/contrib/l3build/l3build.pdf b/macros/latex/contrib/l3build/l3build.pdf
index 4afb71bd9b..617ba9b69a 100644
--- a/macros/latex/contrib/l3build/l3build.pdf
+++ b/macros/latex/contrib/l3build/l3build.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/README.md b/macros/latex/contrib/resolsysteme/README.md
index d5227b9250..c2d8fdc4dd 100644
--- a/macros/latex/contrib/resolsysteme/README.md
+++ b/macros/latex/contrib/resolsysteme/README.md
@@ -1,7 +1,7 @@
ResolSysteme is a package to work with Linear Systems and matrix.
--------------------------------------------------------------------------
-ResolSysteme est un package pour travailler avec des systèmes linéaires.
--------------------------------------------------------------------------
+----------------------------------------------------------------------------------------
+ResolSysteme est un package pour travailler avec des systèmes linéaires et des matrices.
+----------------------------------------------------------------------------------------
Author : Cédric Pierquet
email : cpierquet@outlook.fr
Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf
index 5b7aad26e7..317157a051 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex
index a90b7486a9..b54741a518 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-doc.tex
@@ -3,8 +3,8 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[french,a4paper,11pt]{article}
-\def\TPversion{0.1.4}
-\def\TPdate{12 Février 2023}
+\def\TPversion{0.1.5}
+\def\TPdate{25 Février 2023}
\usepackage[executable=python.exe]{pyluatex}
\usepackage[table,svgnames]{xcolor}
\usepackage{amsmath,amssymb}
@@ -319,9 +319,15 @@ L'idée est ici de proposer une version, adaptée à des dimensions classiques,
\part{Historique}
-\verb|v0.1.4|~:~~~~Ajout de commandes pour du calcul matriciel sans pyton (de taille raisonnable) + commandes pour des graphes probabilistes.
+\verb|v0.1.5|~:~~~~Inverse d'une matrice 4x4 et système 4x4 (même en normal).
-\verb|v0.1.3|~:~~~~Ajout de commandes pour du calcul matriciel (de taille raisonnable) + inversion comportement des commandes étoilées.
+\verb|v0.1.4|~:~~~~Ajout de commandes pour du calcul matriciel sans python (de taille raisonnable) ;
+
+\verb| |~~~~~~commandes pour des graphes probabilistes.
+
+\verb|v0.1.3|~:~~~~Ajout de commandes pour du calcul matriciel (de taille raisonnable) ;
+
+\verb| |~~~~~~inversion du comportement des commandes étoilées.
\verb|v0.1.2|~:~~~~Ajout d'une commande d'affichage (formaté) d'une matrice 2x2, 3x3 ou 4x4.
@@ -655,8 +661,8 @@ est $\det(A)=\DetMatricePY(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
Une commande (matricielle) disponible est pour calculer l'éventuelle inverse d'une matrice :
\begin{itemize}
- \item \textbf{2x2} ou \textbf{3x3} pour le package \textit{classique} ;
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} pour la version \textsf{python}.
+ \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} (\cmaj{0.1.5}) pour le package \textit{classique} ;
+ \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} également pour la version \textsf{python}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -710,6 +716,13 @@ $A^{-1}=\MatriceInversePY[d]<cell-space-limits=2pt>(1,2 § 3,4)[Aff]$.
\end{PresentationCode}
\begin{PresentationCode}{}
+%version normale
+L'inv. de $A=\AffMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)$ est
+$A^{-1}=
+\MatriceInverse[n]<cell-space-limits=2pt>(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)$.
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
%version python
L'inv. de $A=\AffMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)$ est
$A^{-1}=
@@ -830,8 +843,8 @@ $P_4 \approx \EtatProbPY[dec=3]
Il existe une commande (matricielle) pour déterminer l'éventuelle solution d'un système linéaire qui s'écrit matriciellement $A\times X=B$:
\begin{itemize}
- \item \textbf{2x2} ou \textbf{3x3} pour le package \textit{classique} ;
- \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} pour le package en version \textsf{python}.
+ \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} (\cmaj{0.1.5}) pour le package \textit{classique} ;
+ \item \textbf{2x2} ou \textbf{3x3} ou \textbf{4x4} également pour le package en version \textsf{python}.
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{cautionblock}
@@ -880,6 +893,17 @@ La solution de $\systeme{x+y+z=-1,3x+2y-z=6,-x-y+2z=-5}$ est $\mathcal{S}=%
\end{PresentationCode}
\begin{PresentationCode}{}
+%version normal
+La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=7}$
+est $\mathcal{S}=%
+ \left\lbrace
+ \SolutionSysteme%
+ [dec]<cell-space-limits=2pt>%
+ (1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)(-10,0,4,7)%
+\right\rbrace$.
+\end{PresentationCode}
+
+\begin{PresentationCode}{}
%version python
La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=7}$
est $\mathcal{S}=%
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf
index fd06438fbf..a07a5766a1 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
index 4eddcd7b49..7f92c1e701 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples-pyluatex.tex
@@ -2,7 +2,7 @@
% !TeX TXS-program:compile = txs:///lualatex/[--shell-escape]
\documentclass[french,a4paper,10pt]{article}
-\def\RSver{0.1.4}
+\def\RSver{0.1.5}
\usepackage[margin=1.5cm]{geometry}
\usepackage[executable=python.exe]{pyluatex}
\usepackage[pyluatex]{ResolSysteme}
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf
index a7ce9a2562..7189d713dc 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.pdf
Binary files differ
diff --git a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex
index 228ca89b5b..9d785b294f 100644
--- a/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex
+++ b/macros/latex/contrib/resolsysteme/doc/ResolSysteme-exemples.tex
@@ -2,14 +2,14 @@
% !TeX TXS-program:compile = txs:///pdflatex
\documentclass[french,a4paper,10pt]{article}
-\def\RSver{0.1.4}
+\def\RSver{0.1.5}
\usepackage[margin=1.5cm]{geometry}
\usepackage{ResolSysteme}
\usepackage{systeme}
\usepackage{babel}
\usepackage[most]{tcolorbox}
\sisetup{locale=FR,output-decimal-marker={,}}
-\newtcblisting{ShowCodeTeX}[1][]{colback=white,colframe=red!75!black,listing options={style=tcblatex},#1}
+\newtcblisting{ShowCodeTeX}[1][]{colback=white,colframe=red!75!black,listing options={style=tcblatex,texcsstyle=*\color{red!70!black}},#1}
\begin{document}
@@ -81,7 +81,7 @@ Le dét. de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{pN
est $\det(A)=\DetMatrice(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
\end{ShowCodeTeX}
-\section{Inverse d'une matrice, 2x2 ou 3x3}
+\section{Inverse d'une matrice, 2x2 ou 3x3 ou 4x4}
\begin{ShowCodeTeX}
L'inverse de $A=\begin{pNiceMatrix} 1&2 \\ 3&4 \end{pNiceMatrix}$ est
@@ -108,7 +108,12 @@ L'inverse de $A=\begin{pNiceMatrix} 1&2&3\\4&5&6\\7&8&8 \end{pNiceMatrix}$ est
$A^{-1}=\MatriceInverse[n]<cell-space-limits=2pt>(1,2,3 § 4,5,6 § 7,8,8)$.
\end{ShowCodeTeX}
-\section*{Résolution d'un système, 2x2 ou 3x3}
+\begin{ShowCodeTeX}
+L'inverse de $A=\begin{pNiceMatrix} 1&2&3&4\\5&6&7&0\\1&1&1&1\\2&-3&-5&-6 \end{pNiceMatrix}$
+est $A^{-1}=\MatriceInverse[n]<cell-space-limits=2pt>(1,2,3,4 § 5,6,7,0 § 1,1,1,1 § 2,-3,-5,-6)$.
+\end{ShowCodeTeX}
+
+\section*{Résolution d'un système, 2x2 ou 3x3 ou 4x4}
\begin{ShowCodeTeX}
La solution de $\systeme{-9x-8y=-8,3x-6y=-7}$ est $\mathcal{S}=%
@@ -140,6 +145,19 @@ La solution de $\systeme{3x+y-2z=-1,2x-y+z=4,x-y-2z=5}$ est $\mathcal{S}=%
\left\lbrace \SolutionSysteme[d](3,1,-2 § 2,-1,1 § 1,-1,-2)(-1,4,5) \right\rbrace$.
\end{ShowCodeTeX}
+\begin{ShowCodeTeX}
+La solution de $\systeme[xyzt]{y+z+t=1,x+z+t=-1,x+y+t=1,x+y+z=0}$ est $\mathcal{S}=%
+\left\lbrace\SolutionSysteme[d](0,1,1,1 § 1,0,1,1 § 1,1,0,1 § 1,1,1,0)(1,-1,1,0)\right\rbrace$.
+\end{ShowCodeTeX}
+
+\begin{ShowCodeTeX}
+La solution de $\systeme[xyzt]{x+2y+3z+4t=-10,5x+6y+7z=0,x+y+z+t=4,-2x-3y-5z-6t=7}$ est $X=
+\SolutionSysteme
+ [dec]<cell-space-limits=2pt>
+ (1,2,3,4 § 5,6,7,0 § 1,1,1,1 § -2,-3,-5,-6)(-10,0,4,7)
+ [Matrice]$
+\end{ShowCodeTeX}
+
\section{État stable d'une graphe probabiliste, 2x2}
\begin{ShowCodeTeX}
diff --git a/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty b/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty
index dce5dfb6e5..847d00ebe7 100644
--- a/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty
+++ b/macros/latex/contrib/resolsysteme/tex/ResolSysteme.sty
@@ -2,7 +2,8 @@
% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ResolSysteme}[2023/02/12 v0.1.4 Quelques commandes pour travailler avec des matrices et des sytemes lineaires]
+\ProvidesPackage{ResolSysteme}[2023/02/25 v0.1.5 Quelques commandes pour travailler avec des matrices et des sytemes lineaires]
+% 0.1.5 Inverse d'une matrice en 4x4 (même en normal !) + Système 4x4 (en normal !)
% 0.1.4 Travail sur graphe probabiliste (2x2/3x3/4x4 en python, ou 2x2 en normal...) + Calculs 4x4 en normal
% 0.1.3 Produit matriciel + Puissance matricielle (2x2/3x3 carré en normal, 2x2/3x3/4x4 avec python) + Inversion comportement commandes étoilées
% 0.1.2 Ajout pour afficher une matrice, à l'aide d'une syntaxe similaire aux autres commandes
@@ -585,6 +586,94 @@ def etat_prob_DD(AA,BB,a,b,c,d,puiss) :
\readlist*\MAMATRICEA{#4}%
\def\MatDim{\MAMATRICEAlen}%
%les coeffs de A et le déterminant et les coeff de l'inverse
+ \ifnum \MAMATRICEAlen=4
+ \itemtomacro\MAMATRICEA[1,1]\MatA
+ \itemtomacro\MAMATRICEA[1,2]\MatB
+ \itemtomacro\MAMATRICEA[1,3]\MatC
+ \itemtomacro\MAMATRICEA[1,4]\MatD
+ \itemtomacro\MAMATRICEA[2,1]\MatE
+ \itemtomacro\MAMATRICEA[2,2]\MatF
+ \itemtomacro\MAMATRICEA[2,3]\MatG
+ \itemtomacro\MAMATRICEA[2,4]\MatH
+ \itemtomacro\MAMATRICEA[3,1]\MatI
+ \itemtomacro\MAMATRICEA[3,2]\MatJ
+ \itemtomacro\MAMATRICEA[3,3]\MatK
+ \itemtomacro\MAMATRICEA[3,4]\MatL
+ \itemtomacro\MAMATRICEA[4,1]\MatM
+ \itemtomacro\MAMATRICEA[4,2]\MatN
+ \itemtomacro\MAMATRICEA[4,3]\MatO
+ \itemtomacro\MAMATRICEA[4,4]\MatP
+ %le déterminant
+ \def\DETMATRICE{\xinteval{\MatA*\MatF*\MatK*\MatP-\MatA*\MatF*\MatL*\MatO-\MatA*\MatG*\MatJ*\MatP+\MatA*\MatG*\MatL*\MatN+\MatA*\MatH*\MatJ*\MatO-\MatA*\MatH*\MatK*\MatN-\MatB*\MatE*\MatK*\MatP+\MatB*\MatE*\MatL*\MatO+\MatB*\MatG*\MatI*\MatP-\MatB*\MatG*\MatL*\MatM-\MatB*\MatH*\MatI*\MatO+\MatB*\MatH*\MatK*\MatM+\MatC*\MatE*\MatJ*\MatP-\MatC*\MatE*\MatL*\MatN-\MatC*\MatF*\MatI*\MatP+\MatC*\MatF*\MatL*\MatM+\MatC*\MatH*\MatI*\MatN-\MatC*\MatH*\MatJ*\MatM-\MatD*\MatE*\MatJ*\MatO+\MatD*\MatE*\MatK*\MatN+\MatD*\MatF*\MatI*\MatO-\MatD*\MatF*\MatK*\MatM-\MatD*\MatG*\MatI*\MatN+\MatD*\MatG*\MatJ*\MatM}}%
+ %matrice inverse, si elle existe...
+ \xintifboolexpr{\DETMATRICE == 0}%
+ {\text{Matrice non inversible}}%
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \def\MatInvA{\ConvVersFrac*[#2]{(\MatF*\MatK*\MatP+\MatG*\MatL*\MatN+\MatH*\MatJ*\MatO-\MatF*\MatL*\MatO-\MatG*\MatJ*\MatP-\MatH*\MatK*\MatN)/\DETMATRICE}}%
+ \def\MatInvB{\ConvVersFrac*[#2]{(\MatB*\MatL*\MatO+\MatC*\MatJ*\MatP+\MatD*\MatK*\MatN-\MatB*\MatK*\MatP-\MatC*\MatL*\MatN-\MatD*\MatJ*\MatO)/\DETMATRICE}}%
+ \def\MatInvC{\ConvVersFrac*[#2]{(\MatB*\MatG*\MatP+\MatC*\MatH*\MatN+\MatD*\MatF*\MatO-\MatB*\MatH*\MatO-\MatC*\MatF*\MatP-\MatD*\MatG*\MatN)/\DETMATRICE}}%
+ \def\MatInvD{\ConvVersFrac*[#2]{(\MatB*\MatH*\MatK+\MatC*\MatF*\MatL+\MatD*\MatG*\MatJ-\MatB*\MatG*\MatL-\MatC*\MatH*\MatJ-\MatD*\MatF*\MatK)/\DETMATRICE}}%
+ \def\MatInvE{\ConvVersFrac*[#2]{(\MatE*\MatL*\MatO+\MatG*\MatI*\MatP+\MatH*\MatK*\MatM-\MatE*\MatK*\MatP-\MatG*\MatL*\MatM-\MatH*\MatI*\MatO)/\DETMATRICE}}%
+ \def\MatInvF{\ConvVersFrac*[#2]{(\MatA*\MatK*\MatP+\MatC*\MatL*\MatM+\MatD*\MatI*\MatO-\MatA*\MatL*\MatO-\MatC*\MatI*\MatP-\MatD*\MatK*\MatM)/\DETMATRICE}}%
+ \def\MatInvG{\ConvVersFrac*[#2]{(\MatA*\MatH*\MatO+\MatC*\MatE*\MatP+\MatD*\MatG*\MatM-\MatA*\MatG*\MatP-\MatC*\MatH*\MatM-\MatD*\MatE*\MatO)/\DETMATRICE}}%
+ \def\MatInvH{\ConvVersFrac*[#2]{(\MatA*\MatG*\MatL+\MatC*\MatH*\MatI+\MatD*\MatE*\MatK-\MatA*\MatH*\MatK-\MatC*\MatE*\MatL-\MatD*\MatG*\MatI)/\DETMATRICE}}%
+ \def\MatInvI{\ConvVersFrac*[#2]{(\MatE*\MatJ*\MatP+\MatF*\MatL*\MatM+\MatH*\MatI*\MatN-\MatE*\MatL*\MatN-\MatF*\MatI*\MatP-\MatH*\MatJ*\MatM)/\DETMATRICE}}%
+ \def\MatInvJ{\ConvVersFrac*[#2]{(\MatA*\MatL*\MatN+\MatB*\MatI*\MatP+\MatD*\MatJ*\MatM-\MatA*\MatJ*\MatP-\MatB*\MatL*\MatM-\MatD*\MatI*\MatN)/\DETMATRICE}}%
+ \def\MatInvK{\ConvVersFrac*[#2]{(\MatA*\MatF*\MatP+\MatB*\MatH*\MatM+\MatD*\MatE*\MatN-\MatA*\MatH*\MatN-\MatB*\MatE*\MatP-\MatD*\MatF*\MatM)/\DETMATRICE}}%
+ \def\MatInvL{\ConvVersFrac*[#2]{(\MatA*\MatH*\MatJ+\MatB*\MatE*\MatL+\MatD*\MatF*\MatI-\MatA*\MatF*\MatL-\MatB*\MatH*\MatI-\MatD*\MatE*\MatJ)/\DETMATRICE}}%
+ \def\MatInvM{\ConvVersFrac*[#2]{(\MatE*\MatK*\MatN+\MatF*\MatI*\MatO+\MatG*\MatJ*\MatM-\MatE*\MatJ*\MatO-\MatF*\MatK*\MatM-\MatG*\MatI*\MatN)/\DETMATRICE}}%
+ \def\MatInvN{\ConvVersFrac*[#2]{(\MatA*\MatJ*\MatO+\MatB*\MatK*\MatM+\MatC*\MatI*\MatN-\MatA*\MatK*\MatN-\MatB*\MatI*\MatO-\MatC*\MatJ*\MatM)/\DETMATRICE}}%
+ \def\MatInvO{\ConvVersFrac*[#2]{(\MatA*\MatG*\MatN+\MatB*\MatE*\MatO+\MatC*\MatF*\MatM-\MatA*\MatF*\MatO-\MatB*\MatG*\MatM-\MatC*\MatE*\MatN)/\DETMATRICE}}%
+ \def\MatInvP{\ConvVersFrac*[#2]{(\MatA*\MatF*\MatK+\MatB*\MatG*\MatI+\MatC*\MatE*\MatJ-\MatA*\MatG*\MatJ-\MatB*\MatE*\MatK-\MatC*\MatF*\MatI)/\DETMATRICE}}%
+ }%
+ {%
+ \def\MatInvA{\ConvVersFrac[#2]{(\MatF*\MatK*\MatP+\MatG*\MatL*\MatN+\MatH*\MatJ*\MatO-\MatF*\MatL*\MatO-\MatG*\MatJ*\MatP-\MatH*\MatK*\MatN)/\DETMATRICE}}%
+ \def\MatInvB{\ConvVersFrac[#2]{(\MatB*\MatL*\MatO+\MatC*\MatJ*\MatP+\MatD*\MatK*\MatN-\MatB*\MatK*\MatP-\MatC*\MatL*\MatN-\MatD*\MatJ*\MatO)/\DETMATRICE}}%
+ \def\MatInvC{\ConvVersFrac[#2]{(\MatB*\MatG*\MatP+\MatC*\MatH*\MatN+\MatD*\MatF*\MatO-\MatB*\MatH*\MatO-\MatC*\MatF*\MatP-\MatD*\MatG*\MatN)/\DETMATRICE}}%
+ \def\MatInvD{\ConvVersFrac[#2]{(\MatB*\MatH*\MatK+\MatC*\MatF*\MatL+\MatD*\MatG*\MatJ-\MatB*\MatG*\MatL-\MatC*\MatH*\MatJ-\MatD*\MatF*\MatK)/\DETMATRICE}}%
+ \def\MatInvE{\ConvVersFrac[#2]{(\MatE*\MatL*\MatO+\MatG*\MatI*\MatP+\MatH*\MatK*\MatM-\MatE*\MatK*\MatP-\MatG*\MatL*\MatM-\MatH*\MatI*\MatO)/\DETMATRICE}}%
+ \def\MatInvF{\ConvVersFrac[#2]{(\MatA*\MatK*\MatP+\MatC*\MatL*\MatM+\MatD*\MatI*\MatO-\MatA*\MatL*\MatO-\MatC*\MatI*\MatP-\MatD*\MatK*\MatM)/\DETMATRICE}}%
+ \def\MatInvG{\ConvVersFrac[#2]{(\MatA*\MatH*\MatO+\MatC*\MatE*\MatP+\MatD*\MatG*\MatM-\MatA*\MatG*\MatP-\MatC*\MatH*\MatM-\MatD*\MatE*\MatO)/\DETMATRICE}}%
+ \def\MatInvH{\ConvVersFrac[#2]{(\MatA*\MatG*\MatL+\MatC*\MatH*\MatI+\MatD*\MatE*\MatK-\MatA*\MatH*\MatK-\MatC*\MatE*\MatL-\MatD*\MatG*\MatI)/\DETMATRICE}}%
+ \def\MatInvI{\ConvVersFrac[#2]{(\MatE*\MatJ*\MatP+\MatF*\MatL*\MatM+\MatH*\MatI*\MatN-\MatE*\MatL*\MatN-\MatF*\MatI*\MatP-\MatH*\MatJ*\MatM)/\DETMATRICE}}%
+ \def\MatInvJ{\ConvVersFrac[#2]{(\MatA*\MatL*\MatN+\MatB*\MatI*\MatP+\MatD*\MatJ*\MatM-\MatA*\MatJ*\MatP-\MatB*\MatL*\MatM-\MatD*\MatI*\MatN)/\DETMATRICE}}%
+ \def\MatInvK{\ConvVersFrac[#2]{(\MatA*\MatF*\MatP+\MatB*\MatH*\MatM+\MatD*\MatE*\MatN-\MatA*\MatH*\MatN-\MatB*\MatE*\MatP-\MatD*\MatF*\MatM)/\DETMATRICE}}%
+ \def\MatInvL{\ConvVersFrac[#2]{(\MatA*\MatH*\MatJ+\MatB*\MatE*\MatL+\MatD*\MatF*\MatI-\MatA*\MatF*\MatL-\MatB*\MatH*\MatI-\MatD*\MatE*\MatJ)/\DETMATRICE}}%
+ \def\MatInvM{\ConvVersFrac[#2]{(\MatE*\MatK*\MatN+\MatF*\MatI*\MatO+\MatG*\MatJ*\MatM-\MatE*\MatJ*\MatO-\MatF*\MatK*\MatM-\MatG*\MatI*\MatN)/\DETMATRICE}}%
+ \def\MatInvN{\ConvVersFrac[#2]{(\MatA*\MatJ*\MatO+\MatB*\MatK*\MatM+\MatC*\MatI*\MatN-\MatA*\MatK*\MatN-\MatB*\MatI*\MatO-\MatC*\MatJ*\MatM)/\DETMATRICE}}%
+ \def\MatInvO{\ConvVersFrac[#2]{(\MatA*\MatG*\MatN+\MatB*\MatE*\MatO+\MatC*\MatF*\MatM-\MatA*\MatF*\MatO-\MatB*\MatG*\MatM-\MatC*\MatE*\MatN)/\DETMATRICE}}%
+ \def\MatInvP{\ConvVersFrac[#2]{(\MatA*\MatF*\MatK+\MatB*\MatG*\MatI+\MatC*\MatE*\MatJ-\MatA*\MatG*\MatJ-\MatB*\MatE*\MatK-\MatC*\MatF*\MatI)/\DETMATRICE}}%
+ }%
+ \IfStrEq{#5}{Aff}%si matrice
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ {\begin{pNiceMatrix}[#3]
+ \ConvVersFrac*[#2]{\MatA} & \ConvVersFrac*[#2]{\MatB} & \ConvVersFrac*[#2]{\MatC} & \ConvVersFrac*[#2]{\MatD} \\
+ \ConvVersFrac*[#2]{\MatE} & \ConvVersFrac*[#2]{\MatF} & \ConvVersFrac*[#2]{\MatG} & \ConvVersFrac*[#2]{\MatH} \\
+ \ConvVersFrac*[#2]{\MatI} & \ConvVersFrac*[#2]{\MatJ} & \ConvVersFrac*[#2]{\MatK} & \ConvVersFrac*[#2]{\MatL} \\
+ \ConvVersFrac*[#2]{\MatM} & \ConvVersFrac*[#2]{\MatN} & \ConvVersFrac*[#2]{\MatO} & \ConvVersFrac*[#2]{\MatP}
+ \end{pNiceMatrix}}^{-1}=
+ }%
+ {%
+ {\begin{pNiceMatrix}[#3]
+ \ConvVersFrac[#2]{\MatA} & \ConvVersFrac[#2]{\MatB} & \ConvVersFrac[#2]{\MatC} & \ConvVersFrac[#2]{\MatD} \\
+ \ConvVersFrac[#2]{\MatE} & \ConvVersFrac[#2]{\MatF} & \ConvVersFrac[#2]{\MatG} & \ConvVersFrac[#2]{\MatH} \\
+ \ConvVersFrac[#2]{\MatI} & \ConvVersFrac[#2]{\MatJ} & \ConvVersFrac[#2]{\MatK} & \ConvVersFrac[#2]{\MatL} \\
+ \ConvVersFrac[#2]{\MatM} & \ConvVersFrac[#2]{\MatN} & \ConvVersFrac[#2]{\MatO} & \ConvVersFrac[#2]{\MatP}
+ \end{pNiceMatrix}}^{-1}=
+ }%
+ }{}%
+ \begin{pNiceMatrix}[#3]
+ {\MatInvA}&{\MatInvB}&{\MatInvC}&{\MatInvD}\\
+ {\MatInvE}&{\MatInvF}&{\MatInvG}&{\MatInvH}\\
+ {\MatInvI}&{\MatInvJ}&{\MatInvK}&{\MatInvL}\\
+ {\MatInvM}&{\MatInvN}&{\MatInvO}&{\MatInvP}
+ \end{pNiceMatrix}%
+ }%
+ \fi
\ifnum \MAMATRICEAlen=3
\itemtomacro\MAMATRICEA[1,1]\MatA
\itemtomacro\MAMATRICEA[1,2]\MatB
@@ -771,6 +860,78 @@ def etat_prob_DD(AA,BB,a,b,c,d,puiss) :
\readlist*\MAMATRICEB{#5}%
\def\MatDim{\MAMATRICEAlen}%
%les coeffs de A et le déterminant et les coeff de l'inverse
+ \ifnum \MAMATRICEAlen=4
+ \itemtomacro\MAMATRICEA[1,1]\MatA
+ \itemtomacro\MAMATRICEA[1,2]\MatB
+ \itemtomacro\MAMATRICEA[1,3]\MatC
+ \itemtomacro\MAMATRICEA[1,4]\MatD
+ \itemtomacro\MAMATRICEA[2,1]\MatE
+ \itemtomacro\MAMATRICEA[2,2]\MatF
+ \itemtomacro\MAMATRICEA[2,3]\MatG
+ \itemtomacro\MAMATRICEA[2,4]\MatH
+ \itemtomacro\MAMATRICEA[3,1]\MatI
+ \itemtomacro\MAMATRICEA[3,2]\MatJ
+ \itemtomacro\MAMATRICEA[3,3]\MatK
+ \itemtomacro\MAMATRICEA[3,4]\MatL
+ \itemtomacro\MAMATRICEA[4,1]\MatM
+ \itemtomacro\MAMATRICEA[4,2]\MatN
+ \itemtomacro\MAMATRICEA[4,3]\MatO
+ \itemtomacro\MAMATRICEA[4,4]\MatP
+ %le déterminant
+ \def\DETMATRICE{\xinteval{\MatA*\MatF*\MatK*\MatP-\MatA*\MatF*\MatL*\MatO-\MatA*\MatG*\MatJ*\MatP+\MatA*\MatG*\MatL*\MatN+\MatA*\MatH*\MatJ*\MatO-\MatA*\MatH*\MatK*\MatN-\MatB*\MatE*\MatK*\MatP+\MatB*\MatE*\MatL*\MatO+\MatB*\MatG*\MatI*\MatP-\MatB*\MatG*\MatL*\MatM-\MatB*\MatH*\MatI*\MatO+\MatB*\MatH*\MatK*\MatM+\MatC*\MatE*\MatJ*\MatP-\MatC*\MatE*\MatL*\MatN-\MatC*\MatF*\MatI*\MatP+\MatC*\MatF*\MatL*\MatM+\MatC*\MatH*\MatI*\MatN-\MatC*\MatH*\MatJ*\MatM-\MatD*\MatE*\MatJ*\MatO+\MatD*\MatE*\MatK*\MatN+\MatD*\MatF*\MatI*\MatO-\MatD*\MatF*\MatK*\MatM-\MatD*\MatG*\MatI*\MatN+\MatD*\MatG*\MatJ*\MatM}}%
+ %les coeffs de B
+ \itemtomacro\MAMATRICEB[1]\MatBA
+ \itemtomacro\MAMATRICEB[2]\MatBB
+ \itemtomacro\MAMATRICEB[3]\MatBC
+ \itemtomacro\MAMATRICEB[4]\MatBD
+ %matrice inverse, si elle existe...
+ \xintifboolexpr{\DETMATRICE == 0}%
+ {\text{Matrice non inversible}}%
+ {%
+ \def\MatInvA{(\MatF*\MatK*\MatP+\MatG*\MatL*\MatN+\MatH*\MatJ*\MatO-\MatF*\MatL*\MatO-\MatG*\MatJ*\MatP-\MatH*\MatK*\MatN)/\DETMATRICE}%
+ \def\MatInvB{(\MatB*\MatL*\MatO+\MatC*\MatJ*\MatP+\MatD*\MatK*\MatN-\MatB*\MatK*\MatP-\MatC*\MatL*\MatN-\MatD*\MatJ*\MatO)/\DETMATRICE}%
+ \def\MatInvC{(\MatB*\MatG*\MatP+\MatC*\MatH*\MatN+\MatD*\MatF*\MatO-\MatB*\MatH*\MatO-\MatC*\MatF*\MatP-\MatD*\MatG*\MatN)/\DETMATRICE}%
+ \def\MatInvD{(\MatB*\MatH*\MatK+\MatC*\MatF*\MatL+\MatD*\MatG*\MatJ-\MatB*\MatG*\MatL-\MatC*\MatH*\MatJ-\MatD*\MatF*\MatK)/\DETMATRICE}%
+ \def\MatInvE{(\MatE*\MatL*\MatO+\MatG*\MatI*\MatP+\MatH*\MatK*\MatM-\MatE*\MatK*\MatP-\MatG*\MatL*\MatM-\MatH*\MatI*\MatO)/\DETMATRICE}%
+ \def\MatInvF{(\MatA*\MatK*\MatP+\MatC*\MatL*\MatM+\MatD*\MatI*\MatO-\MatA*\MatL*\MatO-\MatC*\MatI*\MatP-\MatD*\MatK*\MatM)/\DETMATRICE}%
+ \def\MatInvG{(\MatA*\MatH*\MatO+\MatC*\MatE*\MatP+\MatD*\MatG*\MatM-\MatA*\MatG*\MatP-\MatC*\MatH*\MatM-\MatD*\MatE*\MatO)/\DETMATRICE}%
+ \def\MatInvH{(\MatA*\MatG*\MatL+\MatC*\MatH*\MatI+\MatD*\MatE*\MatK-\MatA*\MatH*\MatK-\MatC*\MatE*\MatL-\MatD*\MatG*\MatI)/\DETMATRICE}%
+ \def\MatInvI{(\MatE*\MatJ*\MatP+\MatF*\MatL*\MatM+\MatH*\MatI*\MatN-\MatE*\MatL*\MatN-\MatF*\MatI*\MatP-\MatH*\MatJ*\MatM)/\DETMATRICE}%
+ \def\MatInvJ{(\MatA*\MatL*\MatN+\MatB*\MatI*\MatP+\MatD*\MatJ*\MatM-\MatA*\MatJ*\MatP-\MatB*\MatL*\MatM-\MatD*\MatI*\MatN)/\DETMATRICE}%
+ \def\MatInvK{(\MatA*\MatF*\MatP+\MatB*\MatH*\MatM+\MatD*\MatE*\MatN-\MatA*\MatH*\MatN-\MatB*\MatE*\MatP-\MatD*\MatF*\MatM)/\DETMATRICE}%
+ \def\MatInvL{(\MatA*\MatH*\MatJ+\MatB*\MatE*\MatL+\MatD*\MatF*\MatI-\MatA*\MatF*\MatL-\MatB*\MatH*\MatI-\MatD*\MatE*\MatJ)/\DETMATRICE}%
+ \def\MatInvM{(\MatE*\MatK*\MatN+\MatF*\MatI*\MatO+\MatG*\MatJ*\MatM-\MatE*\MatJ*\MatO-\MatF*\MatK*\MatM-\MatG*\MatI*\MatN)/\DETMATRICE}%
+ \def\MatInvN{(\MatA*\MatJ*\MatO+\MatB*\MatK*\MatM+\MatC*\MatI*\MatN-\MatA*\MatK*\MatN-\MatB*\MatI*\MatO-\MatC*\MatJ*\MatM)/\DETMATRICE}%
+ \def\MatInvO{(\MatA*\MatG*\MatN+\MatB*\MatE*\MatO+\MatC*\MatF*\MatM-\MatA*\MatF*\MatO-\MatB*\MatG*\MatM-\MatC*\MatE*\MatN)/\DETMATRICE}%
+ \def\MatInvP{(\MatA*\MatF*\MatK+\MatB*\MatG*\MatI+\MatC*\MatE*\MatJ-\MatA*\MatG*\MatJ-\MatB*\MatE*\MatK-\MatC*\MatF*\MatI)/\DETMATRICE}%
+ %
+ \IfBooleanTF{#1}%version étoilée := moinsdevant
+ {%
+ \def\MatResA{\ConvVersFrac*[#2]{\MatInvA*\MatBA+\MatInvB*\MatBB+\MatInvC*\MatBC+\MatInvD*\MatBD}}%
+ \def\MatResB{\ConvVersFrac*[#2]{\MatInvE*\MatBA+\MatInvF*\MatBB+\MatInvG*\MatBC+\MatInvH*\MatBD}}%
+ \def\MatResC{\ConvVersFrac*[#2]{\MatInvI*\MatBA+\MatInvJ*\MatBB+\MatInvK*\MatBC+\MatInvL*\MatBD}}%
+ \def\MatResD{\ConvVersFrac*[#2]{\MatInvM*\MatBA+\MatInvN*\MatBB+\MatInvO*\MatBC+\MatInvP*\MatBD}}%
+ }%
+ {%
+ \def\MatResA{\ConvVersFrac[#2]{\MatInvA*\MatBA+\MatInvB*\MatBB+\MatInvC*\MatBC+\MatInvD*\MatBD}}%
+ \def\MatResB{\ConvVersFrac[#2]{\MatInvE*\MatBA+\MatInvF*\MatBB+\MatInvG*\MatBC+\MatInvH*\MatBD}}%
+ \def\MatResC{\ConvVersFrac[#2]{\MatInvI*\MatBA+\MatInvJ*\MatBB+\MatInvK*\MatBC+\MatInvL*\MatBD}}%
+ \def\MatResD{\ConvVersFrac[#2]{\MatInvM*\MatBA+\MatInvN*\MatBB+\MatInvO*\MatBC+\MatInvP*\MatBD}}%
+ }%
+ \IfStrEq{#6}{Matrice}%si matrice
+ {%
+ \begin{pNiceMatrix}[#3]
+ {\MatResA} \\
+ {\MatResB} \\
+ {\MatResC} \\
+ {\MatResD}
+ \end{pNiceMatrix}%
+ }%
+ {%
+ \left( {\MatResA} ; {\MatResB} ; {\MatResC} ; {\MatResD} \right)%
+ }%
+ }%
+ \fi
\ifnum \MAMATRICEAlen=3
\itemtomacro\MAMATRICEA[1,1]\MatA
\itemtomacro\MAMATRICEA[1,2]\MatB