diff options
author | Norbert Preining <norbert@preining.info> | 2020-07-01 03:03:30 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-07-01 03:03:30 +0000 |
commit | d79a721c345c9a2ced6c0640e88c10cc3378c1f0 (patch) | |
tree | 400d84326bfe896b980146734c9650006b72e550 /macros/latex | |
parent | 70c32b2936f7dac3a0898faafe7c554c3bedeae9 (diff) |
CTAN sync 202007010303
Diffstat (limited to 'macros/latex')
25 files changed, 747 insertions, 317 deletions
diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf Binary files differindex bf2992cf94..e17f576a21 100644 --- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf +++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.pdf diff --git a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex index 8fd5aa56d5..d8c59aeb65 100644 --- a/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex +++ b/macros/latex/contrib/babel-contrib/french/frenchb-doc.tex @@ -410,8 +410,8 @@ document (ou maquette) est modifiée de la façon suivante% fichier \file{.log}. Certaines classes ou extensions modifient la présentation des légendes; - parmi elles, les classes (\cls{memoir}, koma-script et AMS et les - extensions(\ext{caption} et \ext{floatrow} sont compatibles avec + parmi elles, les classes (\cls{memoir}, \cls{beamer}, koma-script et AMS + et les extensions(\ext{caption} et \ext{floatrow} sont compatibles avec \ext{babel-french}. Un avertissement est inséré dans le fichier \file{.log} lorsqu’il y a risque @@ -1531,6 +1531,11 @@ La version 3.5g corrige une bogue ancienne affectant l’usage des polices type~1 avec Lua\-(La)TeX : tout crénage était supprimé pour ces polices depuis la version~3.1f (2015) ; les polices OpenType elles, n’ont jamais été affectées. +La version 3.5i corrige aussi une bogue ancienne affectant les classes +koma-script, \cls{memoir} et \cls{beamer} : les redéfinitions du séparateur +des légendes de figures et tables (commandes |\captionformat|, |\captiondelim|, +etc.) sont maintenant prises en compte correctement. + \subsection{Changements entre les versions 3.4d et 3.3d} \label{ssec:changes-3.4} diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.dtx b/macros/latex/contrib/babel-contrib/french/frenchb.dtx index 4941b1cea7..d253c3b90b 100644 --- a/macros/latex/contrib/babel-contrib/french/frenchb.dtx +++ b/macros/latex/contrib/babel-contrib/french/frenchb.dtx @@ -1,4 +1,4 @@ -%\CheckSum{3802} +%\CheckSum{3835} % %\iffalse % Tell the LaTeX system who we are and write an entry on the @@ -13,7 +13,7 @@ %<frenchb>\ProvidesLanguage{frenchb} %<lua>--[[ %<lua> File `frenchb.lua’ generated from frenchb.dtx - [2020/04/18 v3.5h French support from the babel system] + [2020/06/30 v3.5i French support from the babel system] %<*internal> \iffalse %</internal> @@ -47,21 +47,16 @@ \usepackage[dvipsnames]{xcolor} \usepackage[no-math]{fontspec} \usepackage{realscripts} -\setmainfont{FiraSans}[ - Extension = .otf , - UprightFont = *-Book, - ItalicFont = *-BookItalic, - BoldFont = *-Medium, - BoldItalicFont = *-MediumItalic, - SmallCapsFont = FiraSans-Book, - SmallCapsFeatures = {Letters=SmallCaps}, +\setmainfont{Vera.ttf}[ + ItalicFont = VeraIt.ttf, + BoldFont = VeraBd.ttf, + BoldItalicFont = VeraBI.ttf, + Scale = 0.92 ] -\setmonofont{FiraMono}[ - Extension = .otf , - UprightFont = *-Regular, - ItalicFont = *-Oblique, - BoldFont = *-Medium, - BoldItalicFont = *-MediumOblique, +\setmonofont{VeraMono.ttf}[ + ItalicFont = VeraMoIt.ttf, + BoldFont = VeraMoBd.ttf, + BoldItalicFont = VeraMoBI.ttf, Scale = MatchLowercase, ] % @@ -659,10 +654,10 @@ % a proper space before it and warns if it fails to do so. % % \item [OldFigTabCaptions=true (false)] is to be used \emph{only} -% when -% figures’ and tables’ captions must be typeset as with pre~3.0 -% versions of \frenchb{} (with |\CaptionSeparator| in French and -% colon otherwise). Intended for standard LaTeX classes only. +% when figures’ and tables’ captions must be typeset as with +% pre~3.0 versions of \frenchb{} (with |\CaptionSeparator| in +% French and colon otherwise). +% Intended for standard LaTeX classes only. % % \item [FrenchSuperscripts=false (true)]; then % |\up=\textsuperscript|. % (option added in version 2.1). @@ -718,7 +713,7 @@ % which defaults to ` -- ’ and can be redefined in the preamble with % |\renewcommand*{\CaptionSeparator}{...}|. % This works for the standard LaTeX2e classes, for the \cls{memoir} -% and koma-script classes. +% koma-script and beamer classes. % In case this procedure fails a warning is issued. % % When French is not the main language, the colon is preserved for @@ -727,9 +722,11 @@ % % Three options are provided to customise figure and table captions: % \begin{itemize} -% \item if \fbo{CustomiseFigTabCaptions} is set to \fbo{false} the -% colon will be used as separator in all languages, with a proper -% space before the colon in French (if possible); +% \item \fbo{CustomiseFigTabCaptions} is set to \fbo{true} when +% French is the main language (hence separator = ` -- ’) and to +% \fbo{false} otherwise (hence separator = `: ’ with a proper +% space before the colon in French if possible); toogle this option +% if needed; % \item the second option, \fbo{OldFigTabCaptions}, can be set to % \fbo{true} to print figures’ and tables’ captions as they were % with versions pre~3.0 of \frenchb{} (using |\CaptionSeparator| @@ -1447,7 +1444,7 @@ \else \FB@dialect=1 \relax \fi % \end{macrocode} -% When first entering French, we have to set the LuaTeX +% When first entering French, we must set the LuaTeX % tables for French (|\FB@dialect=0|) \emph{before} any dialect % redefines any |\FB...space| command. Doing this `AtBeginDocument’ % would be too late: if French or a French dialect is the main @@ -1687,7 +1684,7 @@ local FB_punct_thick = % Managing spacing after `«’ (U+00AB) and before `»’ (U+00BB) can be % done by the way; we define two flags, |FB_punct_left| for % characters requiring some space before them and |FB_punct_right| -% for `\guillemotleft’ which must be followed by some space. +% for `«’ which must be followed by some space. % In case LuaTeX is used to output T1-encoded fonts instead of % OpenType fonts, codes \texttt{0x13} and \texttt{0x14} have to be % added for `«’ and `»’. @@ -3110,9 +3107,10 @@ return french_punctuation % dialects defines \emph{both} |\datefrench| and |\dateacadian|; % this is required as \file{french.ldf} is read only once even if % both language options \opt{french} and \opt{acadian} are supplied -% to \babel. Note that coding |\StartBabelCommands*{french,acadian}| -% would \emph{only} define |\csname date\CurrentOption\endcsname|, +% to \babel. Coding |\StartBabelCommands*{french,acadian}| +% would \emph{only} define |\date\CurrentOption|, % leaving the second language undefined in \babel’s sens. +% % \begin{macrocode} \def\BabelLanguages{french,acadian} \StartBabelCommands*{\BabelLanguages}{date} @@ -4969,38 +4967,52 @@ return french_punctuation % figure and table captions are now consistent with babel-french’s % documentation. Pointed out by Denis Bitouzé.} % -% Unless \fbo{CustomiseFigTabCaptions} has been set to \fbo{false}, -% use |\CaptionSeparator| for koma-script, \cls{memoir} and -% \cls{beamer} classes. -% \begin{macrocode} - \ifFBCustomiseFigTabCaptions - \ifFB@koma - \renewcommand*{\captionformat}{\CaptionSeparator}% - \fi - \@ifclassloaded{memoir}% - {\captiondelim{\CaptionSeparator}}{}% - \@ifclassloaded{beamer}% - {\defbeamertemplate{caption label separator}{FBcustom}{% - \CaptionSeparator}% - \setbeamertemplate{caption label separator}[FBcustom]}{}% - \else -% \end{macrocode} -% When \fbo{CustomiseFigTabCaptions} is \fbo{false}, have the colon -% behave properly in French: locally force |\autospace@beforeFDP| in -% case of \fbo{AutoSpacePunctuation=false}. -% \begin{macrocode} - \ifFB@koma - \renewcommand*{\captionformat}{{\autospace@beforeFDP : }}% - \fi - \@ifclassloaded{memoir}% - {\captiondelim{{\autospace@beforeFDP : }}% - }{}% - \@ifclassloaded{beamer}% - {\defbeamertemplate{caption label separator}{FBcolon}{% - {\autospace@beforeFDP : }}% - \setbeamertemplate{caption label separator}[FBcolon]% - }{}% +% \changes{v3.5i}{2020/06/29}{For memoir, koma-script and beamer +% classes, leave caption delimiter unchanged if it has been user +% customised.} +% +% This is for koma-script, \cls{memoir} and \cls{beamer} classes. +% If the caption delimiter has been user customised, leave it +% unchanged. Otherwise, force the colon to behave properly in French +% (add locally |\autospace@beforeFDP| in case of +% \fbo{AutoSpacePunctuation=false}) and change the caption delimiter +% to |\CaptionSeparator| if \fbo{CustomiseFigTabCaptions} has been +% set to \fbo{true}. +% \begin{macrocode} + \ifFB@koma + \edef\FB@capsep{\captionformat}\edef\FB@std@capsep{:\ }% + \ifx\FB@capsep\FB@std@capsep + \ifFBCustomiseFigTabCaptions + \renewcommand*{\captionformat}{\CaptionSeparator}% + \else + \renewcommand*{\captionformat}{{\autospace@beforeFDP :\ }}% + \fi + \fi \fi + \@ifclassloaded{memoir}% + {\edef\FB@capsep{\@contdelim}\edef\FB@std@capsep{: }% + \ifx\FB@capsep\FB@std@capsep + \ifFBCustomiseFigTabCaptions + \captiondelim{\CaptionSeparator}% + \else + \captiondelim{{\autospace@beforeFDP : }}% + \fi + \fi}{}% + \@ifclassloaded{beamer}% + {\edef\FB@std@capsep{:\ }% + \edef\FB@capsep{% + \csname beamer@@tmpl@caption label separator\endcsname}% + \ifx\FB@capsep\FB@std@capsep + \ifFBCustomiseFigTabCaptions + \defbeamertemplate{caption label separator}{FBcustom}{% + \CaptionSeparator}% + \setbeamertemplate{caption label separator}[FBcustom]% + \else + \defbeamertemplate{caption label separator}{FBcolon}{% + {\autospace@beforeFDP : }}% + \setbeamertemplate{caption label separator}[FBcolon]% + \fi + \fi}{}% % \end{macrocode} % \fbo{ShowOptions}: if \fbo{true}, print the list of all options % to the \file{.log} file. @@ -5829,9 +5841,9 @@ return french_punctuation \localleftbox{\FBeveryline@quote}}% \else % \end{macrocode} -% Special add-on for the \cls{memoir} class: |\maketitle| redefines -% |\@makefntext| as |\makethanksmark| which is customised as follows -% to match the other notes’ vertical alignment. +% Special add-on for the \cls{memoir} class: |\@makefntext| is +% redefined as |\makethanksmark| by |\maketitle|, hence these +% settings to match the other notes’ vertical alignment. % \begin{macrocode} \@ifclassloaded{memoir}% {\ifFBFrenchFootnotes diff --git a/macros/latex/contrib/babel-contrib/french/frenchb.pdf b/macros/latex/contrib/babel-contrib/french/frenchb.pdf Binary files differindex f6b1da437c..e2fdf7b604 100644 --- a/macros/latex/contrib/babel-contrib/french/frenchb.pdf +++ b/macros/latex/contrib/babel-contrib/french/frenchb.pdf diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md index 27a96c4fb1..bc09045c8f 100644 --- a/macros/latex/contrib/l3backend/CHANGELOG.md +++ b/macros/latex/contrib/l3backend/CHANGELOG.md @@ -6,6 +6,11 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2020-06-29] + +### Fixed +- Loading with `dvisvgm` + ## [2020-06-23] ### Changed @@ -91,7 +96,8 @@ this project uses date-based 'snapshot' version identifiers. - Include `l3backend` in file names - Moved backend code to internal for each 'parent' module -[Unreleased]: https://github.com/latex3/latex3/compare/2020-06-23...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2020-06-29...HEAD +[2020-06-29]: https://github.com/latex3/latex3/compare/2020-06-23...2020-06-29 [2020-06-23]: https://github.com/latex3/latex3/compare/2020-06-18...2020-06-23 [2020-06-18]: https://github.com/latex3/latex3/compare/2020-06-03...2020-06-18 [2020-06-03]: https://github.com/latex3/latex3/compare/2020-05-05...2020-06-03 diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md index edf3db7883..1d298fabdf 100644 --- a/macros/latex/contrib/l3backend/README.md +++ b/macros/latex/contrib/l3backend/README.md @@ -1,7 +1,7 @@ LaTeX3 Backend Drivers ====================== -Release 2020-06-23 +Release 2020-06-29 This package forms parts of `expl3`, and contains the code used to interface with backends (drivers) across the `expl3` codebase. The functions here are diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx index a28db733ab..00367dea5f 100644 --- a/macros/latex/contrib/l3backend/l3backend-basics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % @@ -71,23 +71,23 @@ %<*package> \ProvidesExplFile %<*dvipdfmx> - {l3backend-dvipdfmx.def}{2020-06-23}{} + {l3backend-dvipdfmx.def}{2020-06-29}{} {L3 backend support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-dvips.def}{2020-06-23}{} + {l3backend-dvips.def}{2020-06-29}{} {L3 backend support: dvips} %</dvips> %<*dvisvgm> - {l3backend-dvisvgm.def}{2020-06-23}{} + {l3backend-dvisvgm.def}{2020-06-29}{} {L3 backend support: dvisvgm} %</dvisvgm> %<*pdfmode> - {l3backend-pdfmode.def}{2020-06-23}{} + {l3backend-pdfmode.def}{2020-06-29}{} {L3 backend support: PDF mode} %</pdfmode> %<*xdvipdfmx> - {l3backend-xdvipdfmx.def}{2020-06-23}{} + {l3backend-xdvipdfmx.def}{2020-06-29}{} {L3 backend support: xdvipdfmx} %</xdvipdfmx> %</package> diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx index d07a08a4b4..8a63b8db15 100644 --- a/macros/latex/contrib/l3backend/l3backend-box.dtx +++ b/macros/latex/contrib/l3backend/l3backend-box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx index 4aef1ed938..6875ce7579 100644 --- a/macros/latex/contrib/l3backend/l3backend-color.dtx +++ b/macros/latex/contrib/l3backend/l3backend-color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx index 3b886359ab..1b7d444ae6 100644 --- a/macros/latex/contrib/l3backend/l3backend-draw.dtx +++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % @@ -1212,9 +1212,9 @@ } \cs_new_protected:Npn \@@_backend_color_gray_aux:nn #1#2 { \@@_backend_color:nnn {#1} {#2} {#2} {#2} } -\cs_new_protected:Npn \@@_backend_color_rgb_cmyk:n #1 +\cs_new_protected:Npn \@@_backend_color_fill_rgb:n #1 { \@@_backend_color_rgb:nw { fill } #1 \s_@@_stop } -\cs_new_protected:Npn \@@_backend_color_rgb_cmyk:n #1 +\cs_new_protected:Npn \@@_backend_color_stroke_rgb:n #1 { \@@_backend_color_rgb:nw { stroke } #1 \s_@@_stop } \cs_new_protected:Npn \@@_backend_color_rgb:nw #1#2 ~ #3 ~ #4\s_@@_stop diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx index ae3eb47111..d9ed9f8495 100644 --- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx index e2336f5f34..77303f1733 100644 --- a/macros/latex/contrib/l3backend/l3backend-header.dtx +++ b/macros/latex/contrib/l3backend/l3backend-header.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index 13926e0779..7fbc94a550 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-06-23} +% \date{Released 2020-06-29} % % \maketitle % diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf Binary files differindex 24432563ff..fa9a6f9a40 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex index a8c0fdd435..fe29f84779 100644 --- a/macros/latex/contrib/nicematrix/nicematrix-french.tex +++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex @@ -639,8 +639,9 @@ a & b & c & d \\ \label{hvlines} La clé |hvlines| demande le tracé de tous les filets horizontaux et verticaux \emph{sauf dans les - blocs}.\footnote{En fait, quand la clé |hvlines| est utilisée, les filets ne sont pas non plus tracés dans les blocs virtuels - délimités par des cases reliées par des lignes pointillées (cf. p. \pageref{dotted-and-hvlines}).} + blocs}.\footnote{En fait, quand la clé |hvlines| (ou la clé |hvlines-except-corners| décrite juste après) est + utilisée, les filets ne sont pas non plus tracés dans les blocs virtuels délimités par des cases reliées par des + lignes pointillées (cf. p. \pageref{dotted-and-hvlines}).} \medskip \begin{Verbatim} @@ -662,6 +663,66 @@ arum & iris & jacinthe & muguet \end{center} +\subsection{La clé hvlines-except-corners} + +La clé |hvlines-except-corners| demande le tracé de tous les filets horizontaux et verticaux \emph{sauf dans les + blocs} et sauf dans les coins vides. + +\medskip +\begin{Verbatim} +\begin{NiceTabular}{*{6}{C}}[~emphase#hvlines-except-corners@,cell-space-top-limit=3pt] + & & & & A \\ + & & A & A & A \\ + & & & A \\ + & & A & A & A & A \\ +A & A & A & A & A & A \\ +A & A & A & A & A & A \\ + & \Block{2-2}{B} & & A \\ + & & & A \\ + & A & A & A \\ +\end{NiceTabular} +\end{Verbatim} +% +\begin{center} +\begin{NiceTabular}{*{6}{C}}[hvlines-except-corners,cell-space-top-limit=3pt] + & & & & A \\ + & & A & A & A \\ + & & & A \\ + & & A & A & A & A \\ +A & A & A & A & A & A \\ +A & A & A & A & A & A \\ + & \Block{2-2}{B} & & A \\ + & & & A \\ + & A & A & A \\ +\end{NiceTabular} +\end{center} + +Comme on le voit, un «coin vide» est constitué de la réunion de tous les rectangles vides partant de la case située +exactement dans le coin. + +\bigskip +\begin{BVerbatim}[boxwidth=11cm,baseline=c] +\begin{NiceTabular}{*{6}{C}}% + [~emphase#hvlines-except-corners@,cell-space-top-limit=3pt] +1\\ +1&1\\ +1&2&1\\ +1&3&3&1\\ +1&4&6&4&1\\ +1&5&10&10&5&1 +\end{NiceTabular} +\end{BVerbatim} +\begin{NiceTabular}{*{6}{C}}% + [c,hvlines-except-corners,cell-space-top-limit=3pt] +1\\ +1&1\\ +1&2&1\\ +1&3&3&1\\ +1&4&6&4&1\\ +1&5&10&10&5&1 +\end{NiceTabular} + + \subsection{La commande \textbackslash diagbox} diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx index a3e658e757..f4228206e9 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.dtx +++ b/macros/latex/contrib/nicematrix/nicematrix.dtx @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{4.3} -\def\myfiledate{2020/06/12} +\def\myfileversion{4.4} +\def\myfiledate{2020/06/30} % % %<*batchfile> @@ -703,7 +703,8 @@ version 2005/12/01 or later. % \label{hvlines} % % The key |hvlines| draws all the vertical and horizontal rules \emph{excepted -% in the blocks}.\footnote{In fact, when the key |hvlines| is in force, the +% in the blocks}.\footnote{In fact, when the key |hvlines| (or the key +% |hvlines-except-corners| described just after) is in force, the % rules are also not drawn in the virtual blocks delimited by cells relied par % dotted lines (cf. p. \pageref{dotted-and-hvlines}).} % @@ -729,8 +730,66 @@ version 2005/12/01 or later. % \end{center} % % +% \subsection{The key hvlines-except-corners} +% +% The key |hvlines-except-corners| draws all the horizontal and vertical rules, +% \emph{excepted in the blocks} and excepted in the empty corners. +% +% \medskip +% \begin{Verbatim} +% \begin{NiceTabular}{*{6}{C}}[~emphase#hvlines-except-corners@,cell-space-top-limit=3pt] +% & & & & A \\ +% & & A & A & A \\ +% & & & A \\ +% & & A & A & A & A \\ +% A & A & A & A & A & A \\ +% A & A & A & A & A & A \\ +% & \Block{2-2}{B} & & A \\ +% & & & A \\ +% & A & A & A \\ +% \end{NiceTabular} +% \end{Verbatim} +% % +% \begin{center} +% \begin{NiceTabular}{*{6}{C}}[hvlines-except-corners,cell-space-top-limit=3pt] +% & & & & A \\ +% & & A & A & A \\ +% & & & A \\ +% & & A & A & A & A \\ +% A & A & A & A & A & A \\ +% A & A & A & A & A & A \\ +% & \Block{2-2}{B} & & A \\ +% & & & A \\ +% & A & A & A \\ +% \end{NiceTabular} +% \end{center} +% +% As we can see, an ``empty corner'' is composed by the reunion of all the empty +% rectangles starting from the cell actually in the corner of the array. +% +% \bigskip +% \begin{BVerbatim}[boxwidth=11cm,baseline=c] +% \begin{NiceTabular}{*{6}{C}}% +% [~emphase#hvlines-except-corners@,cell-space-top-limit=3pt] +% 1\\ +% 1&1\\ +% 1&2&1\\ +% 1&3&3&1\\ +% 1&4&6&4&1\\ +% 1&5&10&10&5&1 +% \end{NiceTabular} +% \end{BVerbatim} +% \begin{NiceTabular}{*{6}{C}}[c,hvlines-except-corners,cell-space-top-limit=3pt] +% 1\\ +% 1&1\\ +% 1&2&1\\ +% 1&3&3&1\\ +% 1&4&6&4&1\\ +% 1&5&10&10&5&1 +% \end{NiceTabular} +% % -% \subsection{La commande \textbackslash diagbox} +% \subsection{The command \textbackslash diagbox} % % The command |\diagbox| (inspired by the package \pkg{diagbox}), allows, when % it is used in a cell, to slash that cell diagonally downwards.\footnote{The @@ -1005,7 +1064,7 @@ version 2005/12/01 or later. % % % \bigskip -% One should remark that these commands are compatible with the commands de +% One should remark that these commands are compatible with the commands of % \pkg{booktabs} (|\toprule|, |\midrule|, |\bottomrule|, etc). % % \medskip @@ -3412,7 +3471,7 @@ version 2005/12/01 or later. % % % -% \section{Implementation} +%\section{Implementation} % % By default, the package \pkg{nicematrix} doesn't patch any existing code. % @@ -3668,7 +3727,7 @@ version 2005/12/01 or later. \cs_set:Npn \@@_cline % \end{macrocode} % We have to act in a fully expandable way since there may be |\noalign| (in the -% |\multispan|) to detect. That's why we use |\@@_cline_i:en|. +% |\multispan|) to detect. That's why we use |\@@_cline_i:en|. % \begin{macrocode} { \@@_cline_i:en \l_@@_first_col_int } % \end{macrocode} @@ -4089,8 +4148,8 @@ version 2005/12/01 or later. % \begin{macrocode} \seq_new:N \g_@@_pos_of_blocks_seq % \end{macrocode} -% The sequence |\g_@@_pos_of_blocks_seq| when we will draw the rules required by -% the key |hvlines| (these rules won't be drawn within the blocks). +% The sequence |\g_@@_pos_of_blocks_seq| will be used when we will draw the +% rules required by the keys |hvlines| or |hvlines-except-corners|. % % \bigskip % We will also manage a sequence for the positions of the dotted lines. These @@ -4370,6 +4429,12 @@ version 2005/12/01 or later. \bool_new:N \l_@@_vlines_bool \bool_new:N \l_@@_hvlines_bool % \end{macrocode} +% +% \bigskip +% The flag |\l_@@_hlines_except_corners_bool| corresponds to the key |hlines-except-corners|. +% \begin{macrocode} +\bool_new:N \l_@@_hvlines_except_corners_bool +% \end{macrocode} % % \bigskip % The flag |\l_@@_nullify_dots_bool| corresponds to the option |nullify-dots|. @@ -4573,6 +4638,8 @@ version 2005/12/01 or later. % \begin{macrocode} \keys_define:nn { NiceMatrix / Env } { + hvlines-except-corners .bool_set:N = \l_@@_hvlines_except_corners_bool , + hvlines-except-corners .default:n = true , code-before .code:n = { \tl_if_empty:nF { #1 } @@ -7049,6 +7116,8 @@ version 2005/12/01 or later. { \bool_if:NT \l_@@_hlines_bool \@@_draw_hlines: \bool_if:NT \l_@@_vlines_bool \@@_draw_vlines: + \bool_if:NT \l_@@_hvlines_except_corners_bool + \@@_draw_hvlines_except_corners: } % \end{macrocode} % @@ -9064,6 +9133,7 @@ version 2005/12/01 or later. % % \subsection*{The key hvlines} % +% \subsubsection*{The key hvlines} % % \begin{macrocode} \cs_new_protected:Npn \@@_draw_hlines: @@ -9125,35 +9195,13 @@ version 2005/12/01 or later. \group_begin: \CT@arc@ % \end{macrocode} -% -% First, the exterior rectangle of the array (only in |{NiceArray}| and -% |{NiceTabular}|). -% \begin{macrocode} - \bool_if:NT \l_@@_NiceArray_bool - { - \pgfpicture - \pgfrememberpicturepositiononpagetrue - \pgf@relevantforpicturesizefalse - \pgfsetlinewidth \arrayrulewidth - \pgfsetrectcap - \@@_qpoint:n { col - 1 } - \dim_set_eq:NN \l_tmpa_dim \pgf@x - \@@_qpoint:n { row -1 } - \dim_set_eq:NN \l_tmpb_dim \pgf@y - \@@_qpoint:n { col - \@@_succ:n \c@jCol } - \dim_set_eq:NN \l_tmpc_dim \pgf@x - \@@_qpoint:n { row - \@@_succ:n \c@iRow } - \pgfpathrectanglecorners - { \pgfpoint \l_tmpa_dim \l_tmpb_dim } - { \pgfpoint \l_tmpc_dim \pgf@y } - \pgfusepathqstroke - \endpgfpicture - } -% \end{macrocode} % -% Now, the horizontal rules in the interior of the array. +% The horizontal rules. % \begin{macrocode} - \int_step_variable:nnNn 2 \c@iRow \l_tmpa_tl + \int_step_variable:nnNn + { \bool_if:NTF \l_@@_NiceArray_bool 1 2 } + { \bool_if:NTF \l_@@_NiceArray_bool { \@@_succ:n \c@iRow } \c@iRow } + \l_tmpa_tl { \int_step_variable:nNn \c@jCol \l_tmpb_tl { @@ -9169,6 +9217,35 @@ version 2005/12/01 or later. { \@@_test_if_hline_in_block:nnnn ##1 } \seq_map_inline:Nn \g_@@_pos_of_xdots_seq { \@@_test_if_hline_in_block:nnnn ##1 } +% \end{macrocode} +% \begin{macrocode} + \bool_if:NT \l_@@_hvlines_except_corners_bool + { + \int_compare:nNnTF \l_tmpa_tl = { \c@iRow + 1 } + { + \seq_if_in:NxT + \l_@@_empty_corner_cells_seq + { \@@_pred:n \l_tmpa_tl - \l_tmpb_tl } + { \bool_set_false:N \g_tmpa_bool } + } + { + \seq_if_in:NxT + \l_@@_empty_corner_cells_seq + { \l_tmpa_tl - \l_tmpb_tl } + { + \int_compare:nNnTF \l_tmpa_tl = 1 + { \bool_set_false:N \g_tmpa_bool } + { + \seq_if_in:NxT + \l_@@_empty_corner_cells_seq + { \@@_pred:n \l_tmpa_tl - \l_tmpb_tl } + { \bool_set_false:N \g_tmpa_bool } + } + } + } + } +% \end{macrocode} +% \begin{macrocode} \bool_if:NT \g_tmpa_bool { \pgfpicture @@ -9190,17 +9267,20 @@ version 2005/12/01 or later. } } % \end{macrocode} -% Now, the vertical rules in the interior of the array. +% Now, the vertical rules. % \begin{macrocode} \int_step_variable:nNn \c@iRow \l_tmpa_tl { - \int_step_variable:nnNn 2 \c@jCol \l_tmpb_tl + \int_step_variable:nnNn + { \bool_if:NTF \l_@@_NiceArray_bool 1 2 } + { \bool_if:NTF \l_@@_NiceArray_bool { \@@_succ:n \c@jCol } \c@jCol } + \l_tmpb_tl { % \end{macrocode} -% The boolean |\g_tmpa_bool| indicates whether the small vertial rule will be +% The boolean |\g_tmpa_bool| indicates whether the small vertical rule will be % drawn. If we find that it is in a block (a real block, created by |\Block| or % a virtual block corresponding to a dotted line, created by |\Cdots|, |\Vdots|, -% etc.), we will set |\g_tmpa_bool| to |false| and the small vertial rule won't +% etc.), we will set |\g_tmpa_bool| to |false| and the small vertical rule won't % be drawn. % \begin{macrocode} \bool_gset_true:N \g_tmpa_bool @@ -9208,6 +9288,37 @@ version 2005/12/01 or later. { \@@_test_if_vline_in_block:nnnn ##1 } \seq_map_inline:Nn \g_@@_pos_of_xdots_seq { \@@_test_if_vline_in_block:nnnn ##1 } +% \end{macrocode} +% +% \begin{macrocode} + \bool_if:NT \l_@@_hvlines_except_corners_bool + { + \int_compare:nNnTF \l_tmpb_tl = { \@@_succ:n \c@jCol } + { + \seq_if_in:NxT + \l_@@_empty_corner_cells_seq + { \l_tmpa_tl - \@@_pred:n \l_tmpb_tl } + { \bool_set_false:N \g_tmpa_bool } + } + { + \seq_if_in:NxT + \l_@@_empty_corner_cells_seq + { \l_tmpa_tl - \l_tmpb_tl } + { + \int_compare:nNnTF \l_tmpb_tl = 1 + { \bool_set_false:N \g_tmpa_bool } + { + \seq_if_in:NxT + \l_@@_empty_corner_cells_seq + { \l_tmpa_tl - \@@_pred:n \l_tmpb_tl } + { \bool_set_false:N \g_tmpa_bool } + } + } + } + } +% \end{macrocode} +% +% \begin{macrocode} \bool_if:NT \g_tmpa_bool { \pgfpicture @@ -9242,7 +9353,7 @@ version 2005/12/01 or later. % |#1|, |#2|, |#3| and |#4|. If this rule would be in the block (it must not be % drawn), the boolean |\l_tmpa_bool| is set to |false|. % \begin{macrocode} -\cs_set_protected:Npn \@@_test_if_hline_in_block:nnnn #1 #2 #3 #4 +\cs_new_protected:Npn \@@_test_if_hline_in_block:nnnn #1 #2 #3 #4 { \int_compare:nNnT \l_tmpa_tl > { #1 } { @@ -9260,7 +9371,7 @@ version 2005/12/01 or later. % % The same for vertical rules. % \begin{macrocode} -\cs_set_protected:Npn \@@_test_if_vline_in_block:nnnn #1 #2 #3 #4 +\cs_new_protected:Npn \@@_test_if_vline_in_block:nnnn #1 #2 #3 #4 { \int_compare:nNnT \l_tmpa_tl > { #1 - 1 } { @@ -9277,8 +9388,158 @@ version 2005/12/01 or later. % \end{macrocode} % % +% \bigskip +% \subsubsection*{The key hvlines-except-corners} % +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_draw_hvlines_except_corners: + { +% \end{macrocode} +% The sequence |\l_@@_empty_corner_cells_seq| will be the sequence of all the +% cells empty (and not in a block) considered in the corners of the array. +% \begin{macrocode} + \seq_clear_new:N \l_@@_empty_corner_cells_seq + \@@_compute_a_corner:nnnnnn 1 1 1 1 \c@iRow \c@jCol + \@@_compute_a_corner:nnnnnn 1 \c@jCol 1 { -1 } \c@iRow 1 + \@@_compute_a_corner:nnnnnn \c@iRow 1 { -1 } 1 1 \c@jCol + \@@_compute_a_corner:nnnnnn \c@iRow \c@jCol { -1 } { -1 } 1 1 + \@@_draw_hvlines_ii: + } +% \end{macrocode} +% +% \bigskip +% ``Computing a corner'' is determining all the empty cells (which are not in a +% block) that belong to that corner. These cells will be added to the sequence +% |\l_@@_empty_corner_cells_seq|. +% +% \medskip +% The six arguments of |\@@_compute_a_corner:nnnnnn| are as follow: +% \begin{itemize} +% \item |#1| and |#2| are the number of row and column of the cell which is +% actually in the corner ; +% \item |#3| and |#4| are the step in rows and the step in columns when moving +% from the corner ; +% \item |#5| is the number of the final row when scanning the rows from the +% corner ; +% \item |#6| is the number of the final column when scanning the columns from +% the corner. +% \end{itemize} +% \begin{macrocode} +\cs_new_protected:Npn \@@_compute_a_corner:nnnnnn #1 #2 #3 #4 #5 #6 + { +% \end{macrocode} +% For the explanations and the name of the variables, we consider that we are +% computing the left-upper corner. +% +% First, we try to determine which is the last empty cell (and not in a block: +% we won't add that precision any longer) in the column of number~$1$. The flag +% |\l_tmpa_bool| will be raised when a non-empty cell is found. +% \begin{macrocode} + \bool_set_false:N \l_tmpa_bool + \int_zero_new:N \l_@@_last_empty_row_int + \int_step_inline:nnnn { #1 } { #3 } { #5 } + { + \@@_test_if_cell_in_a_block:nx { ##1 } { \int_eval:n { #2 } } + \bool_if:nTF + { + \cs_if_exist_p:c + { pgf @ sh @ ns @ \@@_env: - ##1 - \int_eval:n { #2 } } + || + \l_tmpb_bool + } + { \bool_set_true:N \l_tmpa_bool } + { + \bool_if:NF \l_tmpa_bool + { \int_set:Nn \l_@@_last_empty_row_int { ##1 } } + } + } +% \end{macrocode} +% Now, you determine the last empty cell in the row of number~$1$. +% \begin{macrocode} + \bool_set_false:N \l_tmpa_bool + \int_zero_new:N \l_@@_last_empty_column_int + \int_step_inline:nnnn { #2 } { #4 } { #6 } + { + \@@_test_if_cell_in_a_block:xn { \int_eval:n { #1 } } { ##1 } + \bool_if:nTF + { + \cs_if_exist_p:c + { pgf @ sh @ ns @ \@@_env: - \int_eval:n { #1 } - ##1 } + || \l_tmpb_bool + } + { \bool_set_true:N \l_tmpa_bool } + { + \bool_if:NF \l_tmpa_bool + { \int_set:Nn \l_@@_last_empty_column_int { ##1 } } + } + } +% \end{macrocode} +% Now, we loop over the rows. +% \begin{macrocode} + \int_step_inline:nnnn { #1 } { #3 } \l_@@_last_empty_row_int + { +% \end{macrocode} +% We treat the row number |##1| with another loop. +% \begin{macrocode} + \bool_set_false:N \l_tmpa_bool + \int_step_inline:nnnn { #2 } { #4 } \l_@@_last_empty_column_int + { + \@@_test_if_cell_in_a_block:nn { ##1 } { ####1 } + \bool_if:nTF + { + \cs_if_exist_p:c + { pgf @ sh @ ns @ \@@_env: - ##1 - ####1 } + || \l_tmpb_bool + } + { \bool_set_true:N \l_tmpa_bool } + { + \bool_if:NF \l_tmpa_bool + { + \int_set:Nn \l_@@_last_empty_column_int { ####1 } + \seq_put_right:Nn + \l_@@_empty_corner_cells_seq + { ##1 - ####1 } + } + } + } + } + } +% \end{macrocode} +% +% \bigskip +% The following macro tests whether if a cell is in (at least) one of the blocks +% of the array. +% +% The flag |\l_tmpb_bool| will be raised if the cell |#1|-|#2| is in a block. +% \begin{macrocode} +\cs_new_protected:Npn \@@_test_if_cell_in_a_block:nn #1 #2 + { + \bool_set_false:N \l_tmpb_bool + \seq_map_inline:Nn \g_@@_pos_of_blocks_seq + { \@@_test_if_cell_in_block:nnnnnnn { #1 } { #2 } ##1 } + } +% \end{macrocode} +% +% \begin{macrocode} +\cs_generate_variant:Nn \@@_test_if_cell_in_a_block:nn { nx , xn } +% \end{macrocode} +% +% \begin{macrocode} +\cs_new_protected:Npn \@@_test_if_cell_in_block:nnnnnnn #1 #2 #3 #4 #5 #6 + { + \bool_if:nT + { + \int_compare_p:n { #3 <= #1 } + && \int_compare_p:n { #1 <= #5 } + && \int_compare_p:n { #4 <= #2 } + && \int_compare_p:n { #2 <= #6 } + } + { \bool_set_true:N \l_tmpb_bool } + } +% \end{macrocode} % +% % \bigskip % \subsection*{The commands to draw dotted lines to separate columns and rows} % @@ -10008,7 +10269,7 @@ version 2005/12/01 or later. \cs_new_protected:Npn \@@_Block_iii:nnnnnn #1 #2 #3 #4 #5 #6 { % \end{macrocode} -% The group is for the keys (even if, as for new, there is only one key, called +% The group is for the keys (even if, as for now, there is only one key, called % |tikz| and not documented). % \begin{macrocode} \group_begin: @@ -10785,6 +11046,7 @@ version 2005/12/01 or later. first-row,~ hlines,~ hvlines,~ + hvlines-except-corners,~ last-col,~ last-row,~ left-margin,~ @@ -11309,6 +11571,10 @@ version 2005/12/01 or later. % % It's now possible to use the command |\Block| in the ``last row''. % +% \subsection*{Changes between versions 4.3 and 4.4} +% +% New key |hvlines-except-corners|. +% % % \PrintIndex % diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf Binary files differindex 31fb149271..2c72de6ae1 100644 --- a/macros/latex/contrib/nicematrix/nicematrix.pdf +++ b/macros/latex/contrib/nicematrix/nicematrix.pdf diff --git a/macros/latex/contrib/pm-isomath/README.txt b/macros/latex/contrib/pm-isomath/README.txt index 2b1f69bd14..0d1a39f96e 100644 --- a/macros/latex/contrib/pm-isomath/README.txt +++ b/macros/latex/contrib/pm-isomath/README.txt @@ -1,31 +1,15 @@ -%% -%% This is file `README.txt', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% pm-isomath.dtx (with options: `txt') -%% ______________________________________________________ -%% The PM-ISOmath bundle -%% Copyright (C) 2017-2020 Claudio Beccari -%% All rights reserved -%% -%% License information appended -%% \ProvidesFile{README.txt}[% + 2020/04/18 v.1.0.06 + README file for pm-isomath.sty] - -%% -%% -%% Distributable under the LaTeX Project Public License, -%% version 1.3c or higher (your choice). The latest version of -%% this license is at: http://www.latex-project.org/lppl.txt -%% -%% This work is "maintained" -%% -%% This work consists of this file pm-isomath.dtx, a README.txt file -%% and the derived files: -%% pm-isomath.sty, pm-isomath.pdf. -%% -%% -%% End of file `README.txt'. + + Distributable under the LaTeX Project Public License, + version 1.3c or higher (your choice). The latest version of + this license is at: http://www.latex-project.org/lppl.txt + + This work is "maintained" + + This work consists of this file pm-isomath.dtx, a README.txt file + and the derived files: + pm-isomath.sty, pm-isomath.pdf. + diff --git a/macros/latex/contrib/pm-isomath/pm-isomath.dtx b/macros/latex/contrib/pm-isomath/pm-isomath.dtx index e72d09d24b..9e456241ff 100644 --- a/macros/latex/contrib/pm-isomath/pm-isomath.dtx +++ b/macros/latex/contrib/pm-isomath/pm-isomath.dtx @@ -32,7 +32,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file \askforoverwritefalse \generate{\file{pm-isomath.sty}{\from{pm-isomath.dtx}{style}} - \file{README.txt}{\from{pm-isomath.dtx}{txt}} +% \file{README.txt}{\from{pm-isomath.dtx}{txt}} } \def\tmpa{plain} @@ -56,11 +56,11 @@ This work consists of this file pm-isomath.dtx, a README.txt file %</driver> %<style>\ProvidesPackage{pm-isomath}[% %<txt>\ProvidesFile{README.txt}[% -%<*driver,style> -2020/04/18 v.1.0.05 -%<txt>Readme file for pm-isomath.sty] +%<*driver,style,txt> + 2020/06/30 v.1.0.06 +%<txt> README file for pm-isomath.sty] %<style>Poor man package for typesetting ISO compliant math when using pdfLaTeX] -%</driver,style> +%</driver,style,txt> %<*driver> ] %</driver> @@ -479,6 +479,11 @@ This work consists of this file pm-isomath.dtx, a README.txt file % optional, including the first one in spite of being surrounded % by curly braces. In both cases the default values for each % argument are respectively |lmr|, |m|, and |n| (normal, upright). +% Notice the codes: |lmr|, |m|, and|n| are the codes that appear in +% the |.fd| file to declare the possible family, series, and shape +% combinations available for a given family. Se bellow further +% information in table~\ref{tab:lmr-series-shapes} on +% page~\pageref{tab:lmr-series-shapes}, and how to discover these codes. % % Such default values, after loading |pm-isomath|, may be globally % redefined by using in the preamble: @@ -586,7 +591,7 @@ This work consists of this file pm-isomath.dtx, a README.txt file % The resistivity of copper is $1.68\,\micro\ohm\,\mathrm{cm}$ (in text mode: 1.68\unit{\micro\ohm\,cm}) % is typeset with the following code %\begin{verbatim} -%$i.68\,\micro\ohm\,\mathrm{cm}$ (in text mode: 1.68\unit{\micro\ohm\,cm}) +%$1.68\,\micro\ohm\,\mathrm{cm}$ (in text mode: 1.68\unit{\micro\ohm\,cm}) %\end{verbatim} %\subparagraph{A tensor} %\[ \vectorsymbol{D} =\epsilon_0\tensorsymbol{\epsilon}\ped{r}\vectorsymbol{E}\] @@ -788,10 +793,10 @@ This work consists of this file pm-isomath.dtx, a README.txt file % the default family is the Latin Modern regular (or roman); % the series is medium and the shape is normal (or upright). % The codes used are the same used in the font description -% files with extension |.fd|. Their name is obtained by merging -% the encoding name with the family name; Therefore the default -% font description file for Latin characters is |t1lmr.fd|, -% while the one for Greek characters is |lgrlmr.fd|; these +% files with extension |.fd|. The name of these |.fd| files +% is obtained by merging the encoding name with the family name; +% therefore the default font description file for Latin characters +% is |t1lmr.fd| while the one for Greek characters is |lgrlmr.fd|; these % files define the series they contain and that are identified % with codes such as |m| (medium); |bx| (bold extended); % |b| (bold). Other fonts, with different series may have diff --git a/macros/latex/contrib/pm-isomath/pm-isomath.pdf b/macros/latex/contrib/pm-isomath/pm-isomath.pdf Binary files differindex 64c03f00b7..c5c3a867ef 100644 --- a/macros/latex/contrib/pm-isomath/pm-isomath.pdf +++ b/macros/latex/contrib/pm-isomath/pm-isomath.pdf diff --git a/macros/latex/contrib/shtthesis/CHANGELOG.md b/macros/latex/contrib/shtthesis/CHANGELOG.md index 135a61987a..9dd9f07ef4 100644 --- a/macros/latex/contrib/shtthesis/CHANGELOG.md +++ b/macros/latex/contrib/shtthesis/CHANGELOG.md @@ -2,6 +2,14 @@ `sht-thesis` 项目派生于 `ucasthesis`,一个在 GPLv3 License 下分发的项目。根据该许可证条款,`sht-thesis` 项目列出基于 `ucasthesis` (commit `faad94b` 之后) 的所有修改条目: +## 2020-06-30 +> Release: v0.3.1 + +1. 改进 Linux/UNIX 环境下 XeLaTeX 和 LuaLaTeX 引擎的中文字体回退机制; +2. unicode-math 仅对 `\mathbf` 强制使用 `\symbf` 覆盖,其他命令保持原有语义; +3. 确保 hyperref 宏包在导言区最后被导入; +4. 从该版本开始,所有 release 同步发布至 Overleaf (真香)。 + ## 2020-06-23 > Release: v0.3.0 diff --git a/macros/latex/contrib/shtthesis/README.md b/macros/latex/contrib/shtthesis/README.md index 582318cdbf..794511d3f2 100644 --- a/macros/latex/contrib/shtthesis/README.md +++ b/macros/latex/contrib/shtthesis/README.md @@ -1,8 +1,8 @@ # ShangHaiTech university THESIS (shtthesis) -[![Action status](https://github.com/lirundong/sht-thesis/workflows/Build/badge.svg)](https://github.com/lirundong/shtthesis/actions) -[![CTAN version](https://img.shields.io/ctan/v/shtthesis)](https://ctan.org/pkg/shtthesis) -[![GitHub release](https://img.shields.io/github/v/release/lirundong/shtthesis)](https://github.com/lirundong/shtthesis/releases/latest) -[![GitHub downloads](https://img.shields.io/github/downloads/lirundong/shtthesis/total)](https://github.com/lirundong/shtthesis/releases) +[![Action status](https://github.com/lirundong/sht-thesis/workflows/build/badge.svg)](https://github.com/lirundong/shtthesis/actions) +[![GitHub release](https://img.shields.io/github/v/release/lirundong/shtthesis?style=flat&logo=GitHub)](https://github.com/lirundong/shtthesis/releases/latest) +[![CTAN version](https://img.shields.io/ctan/v/shtthesis?style=flat&logo=LaTeX)](https://ctan.org/pkg/shtthesis) +[![Overleaf](https://img.shields.io/badge/overleaf-shtthesis-green?style=flat&logo=Overleaf&color=1C890F)](https://www.overleaf.com/latex/templates/shanghaitech-university-thesis-template/mskbxkmfxqpt) `shtthesis` project, forked from [`ucasthesis`](https://github.com/mohuangrui/ucasthesis), is an **unofficial** LaTeX thesis template for ShanghaiTech University and satisfies all format requirements of graduate/undergraduate thesis. The user just need to set `\documentclass{shtthesis}` and to setup mandatory information via `\shtsetup`, then his or her thesis document will be typeset properly: ```latex @@ -21,17 +21,22 @@ ``` ## Get the Template -- Stable version: +- Stable version: Install or download with any of following methods - CTAN (**strongly recommended**): [`shtthesis`](https://ctan.org/pkg/shtthesis) package on CTAN can be installed via `tlmgr` for TeX Live and MacTeX users: ```bash tlmgr install shtthesis ``` + If your distribution has already installed `shtthesis`, please update it to the latest version: + ```bash + tlmgr update shtthesis + ``` **Note**: `shtthesis` package on CTAN does not include the university logo file. Please download [`shanghaitech-logo.pdf`](https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf) from this repository and put it in the root of your project directory. - - GitHub Release: please refer to [release](https://github.com/lirundong/sht-thesis/releases) page, and download required files based on release information -- Develop version: directly clone the GitHub repo + - [Overleaf](https://www.overleaf.com/latex/templates/shanghaitech-university-thesis-template/mskbxkmfxqpt): Please compile with XeLaTeX. Since compilation time for Overleaf free-plan is limited to *1 minute*, you might encounter with timeout issue if compiling with LuaLaTeX + - GitHub Release: Please refer to the [release](https://github.com/lirundong/sht-thesis/releases) page and download required files based on release information +- Develop version: Directly clone the GitHub repo ```bash - git clone https://github.com/lirundong/sht-thesis.git + git clone https://github.com/lirundong/shtthesis.git ``` Please, read through [the user's guide](shtthesis-user-guide.pdf) before continuing. diff --git a/macros/latex/contrib/shtthesis/shtthesis-user-guide.pdf b/macros/latex/contrib/shtthesis/shtthesis-user-guide.pdf Binary files differindex 7ad2b160ca..3badd9ad13 100644 --- a/macros/latex/contrib/shtthesis/shtthesis-user-guide.pdf +++ b/macros/latex/contrib/shtthesis/shtthesis-user-guide.pdf diff --git a/macros/latex/contrib/shtthesis/shtthesis-user-guide.tex b/macros/latex/contrib/shtthesis/shtthesis-user-guide.tex index bacc45a16f..16e951a3ff 100644 --- a/macros/latex/contrib/shtthesis/shtthesis-user-guide.tex +++ b/macros/latex/contrib/shtthesis/shtthesis-user-guide.tex @@ -206,6 +206,13 @@ url = {http://oaa.shanghaitech.edu.cn/2019/0321/c4666a41070/page.htm}, urldate = {2020-06-17} } +@online{clerkma2013unicode, + author = {Clerk Ma}, + title = {如何在{XeTeX}中单独设置数学字体,为什么{STIX}的数学字体很牛?}, + year = 2013, + url = {https://www.zhihu.com/question/20592491/answer/15577847}, + urldate = {2020-06-30} +} \end{filecontents} \begin{document} @@ -230,14 +237,14 @@ \ifgraduate \begin{nomenclatures} \header[单位]{符号}{说明} - \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$R$}{the gas constant} - \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$C_v$}{specific heat capacity at constant volume} - \item[${m^{2} \cdot s^{-2} \cdot K^{-1}}$]{$C_p$}{specific heat capacity at constant pressure} - \item[${m^{2} \cdot s^{-2}}$]{$E$}{specific total energy} - \item[${kg \cdot m \cdot s^{-3} \cdot K^{-1}}$]{$k$}{thermal conductivity} - \item[${kg \cdot m^{-1} \cdot s^{-2}}$]{$S_{ij}$}{deviatoric stress tensor} - \item[${kg \cdot m^{-1} \cdot s^{-2}}$]{$\tau_{ij}$}{viscous stress tensor} - \item[${1}$]{$\delta_{ij}$}{Kronecker tensor} + \item[$\symup{{m^{2} \cdot s^{-2} \cdot K^{-1}}}$]{$R$}{the gas constant} + \item[$\symup{{m^{2} \cdot s^{-2} \cdot K^{-1}}}$]{$C_v$}{specific heat capacity at constant volume} + \item[$\symup{{m^{2} \cdot s^{-2} \cdot K^{-1}}}$]{$C_p$}{specific heat capacity at constant pressure} + \item[$\symup{{m^{2} \cdot s^{-2}}}$]{$E$}{specific total energy} + \item[$\symup{{kg \cdot m \cdot s^{-3} \cdot K^{-1}}}$]{$k$}{thermal conductivity} + \item[$\symup{{kg \cdot m^{-1} \cdot s^{-2}}}$]{$S_{ij}$}{deviatoric stress tensor} + \item[$\symup{{kg \cdot m^{-1} \cdot s^{-2}}}$]{$\tau_{ij}$}{viscous stress tensor} + \item[$\symup{{1}}$]{$\delta_{ij}$}{Kronecker tensor} \end{nomenclatures} \begin{nomenclatures}[缩写] @@ -597,6 +604,16 @@ P(A|B) &= \frac{P(A)P(B|A)}{P(B)} \label{eq::bayesian} \end{align} 同时重载了 \verb|\eqref|,使得公式编号格式修改后,其引用格式仍与 \textsf{amsmath} 无异:贝叶斯定理~\eqref{eq::bayesian}。排版本科生论文时不修改公式编号格式。 +\shtthesis{} 使用 \textsf{unicode-math} 宏包进行公式排版,因此在数学环境内既可以用标准 \LaTeX{} 宏,也可以直接输入 Unicode 符号。例如 $\oiint$ 符号可以通过 \verb|\oiint| 宏录入,也可以通过 Unicode 符号 $∯$ (对应 \verb|U+0222F| 码点) 录入。以下测试公式来自 \citet{clerkma2013unicode},其中所有字符均直接使用对应 Unicode 符号录入。 +\begin{align} +& ⊢ ∀x[(Fx ∨ Gx) → \mathord{∼}Hx] \\ +& ⊨ ¬∃y∀x[x∈y ↔ x∉x] \\ +& ⊭ x ∩ (y ∪ z) ≠ (x ∩ y) ∪ (x ∩ z) \\ +& ⊢ ⟦α⟧ = ℵ₀ → α ≇ ℘(α) \\ +& ⌜ψ[(℩x)φx]⌝ ≝ ⌜(∃x)[φx ∧ (∀z)(φz ⊃ x=z) ∧ ψx]⌝ \\ +& ⊢ (P ⥽ Q) ⥽ (□P ⥽ ◇Q) +\end{align} + \subsection{数学环境} \shtthesis 通过 \textsf{amsthm} 宏包定义了常用的数学环境和证明环境,如表~\ref{tab::math_envs} 所列。其中,英文表示 tex 文档内调用的环境名称,中文表示排版后论文中显示的环境名称。 @@ -779,8 +796,8 @@ P(A|B) &= \frac{P(A)P(B|A)}{P(B)} \label{eq::bayesian} 本章中的测试材料,数学公式部分来自 \textsf{ucasthesis} 附录 B\footnote{\url{https://github.com/mohuangrui/ucasthesis/blob/master/Tex/Appendix.tex}},生僻字部分来自《生僻字大全(按部首分类)》\footnote{\url{http://xh.5156edu.com/page/z4745m2559j18770.html}}。 \section{排版数学公式} -\providecommand{\Vector}[1]{\ensuremath{\mathbf{ #1 }}} -\providecommand{\Tensor}[1]{\ensuremath{\mathbf{\mathsf{ #1 }}}} +\providecommand{\Vector}[1]{\ensuremath{\symbf{ #1 }}} +\providecommand{\Tensor}[1]{\ensuremath{\symbfsf{ #1 }}} \begin{equation} \begin{cases} \frac{\partial \rho}{\partial t} + \nabla\cdot(\rho\Vector{V}) = 0 \\ @@ -789,26 +806,28 @@ P(A|B) &= \frac{P(A)P(B|A)}{P(B)} \label{eq::bayesian} \end{cases} \end{equation} \begin{equation} - \frac{\partial }{\partial t}\int\limits_{\Omega} u \, \mathrm{d}\Omega + \int\limits_{S} \Vector{n}\cdot(u\Vector{V}) \, \mathrm{d}S = \dot{\phi} + \frac{\partial }{\partial t}\int\limits_{\Omega} u \, \symup{d}\Omega + \int\limits_{S} \Vector{n}\cdot(u\Vector{V}) \, \symup{d}S = \dot{\phi} \end{equation} -\[ +\begin{equation*} \begin{split} - \mathcal{L} \{f\}(s) &= \int _{0^{-}}^{\infty} f(t) e^{-st} \, \mathrm{d}t, \ - \mathscr{L} \{f\}(s) = \int _{0^{-}}^{\infty} f(t) e^{-st} \, \mathrm{d}t\\ - \mathcal{F} {\bigl (} f(x+x_{0}) {\bigr )} &= \mathcal{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}}, \ - \mathscr{F} {\bigl (} f(x+x_{0}) {\bigr )} = \mathscr{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}} + \symcal{L} \{f\}(s) &= \int _{0^{-}}^{\infty} f(t) e^{-st} \, \symup{d}t, \ + \symscr{L} \{f\}(s) = \int _{0^{-}}^{\infty} f(t) e^{-st} \, \symup{d}t\\ + \symcal{F} {\bigl (} f(x+x_{0}) {\bigr )} &= \symcal{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}}, \ + \symscr{F} {\bigl (} f(x+x_{0}) {\bigr )} = \symscr{F} {\bigl (} f(x) {\bigr )} e^{2\pi i\xi x_{0}} \end{split} -\] - -Ordinary math: $A,F,L,2,3,5,\sigma$. \verb|\mathrm|: $\mathrm{A,F,L,2,3,5,\sigma}$. - -\verb|\mathbf|: $\mathbf{A,F,L,2,3,5,\sigma}$. \verb|\mathit|: $\mathit{A,F,L,2,3,5,\sigma}$. - -\verb|\mathsf|: $\mathsf{A,F,L,2,3,5,\sigma}$. \verb|\mathtt|: $\mathtt{A,F,L,2,3,5,\sigma}$. +\end{equation*} -\verb|\mathfrak|: $\mathfrak{A,F,L,2,3,5,\sigma}$. \verb|\mathbb|: $\mathbb{A,F,L,2,3,5,\sigma}$. - -\verb|\mathcal|: $\mathcal{A,F,L,2,3,5,\sigma}$. \verb|\mathscr|: $\mathscr{A,F,L,2,3,5,\sigma}$. +\begin{center} +\begin{tabular}{*{4}{l}} + \toprule + Ordinary math& $A,F,L,2,3,5,\sigma$& \verb|\symup|& $\symup{A,F,L,2,3,5,\sigma}$ \\ + \verb|\symbf|& $\symbf{A,F,L,2,3,5,\sigma}$& \verb|\symit|& $\symit{A,F,L,2,3,5,\sigma}$ \\ + \verb|\symsf|& $\symsf{A,F,L,2,3,5,\sigma}$& \verb|\symtt|& $\symtt{A,F,L,2,3,5,\sigma}$ \\ + \verb|\symfrak|& $\symfrak{A,F,L,2,3,5,\sigma}$& \verb|\symbb|& $\symbb{A,F,L,2,3,5,\sigma}$ \\ + \verb|\symcal|& $\symcal{A,F,L,2,3,5,\sigma}$& \verb|\symscr|& $\symscr{A,F,L,2,3,5,\sigma}$ \\ + \bottomrule +\end{tabular} +\end{center} \section{排版生僻字} \label{sec::chs_rare} {\songti 叧叨叭叱叴叵叺叻叼叽叾卟叿吀吁吂吅吆吇吋吒吔吖吘吙吚吜吡吢吣吤吥吧吩吪吭吮吰吱吲呐吷吺吽呁呃呄呅呇呉呋呋呌呍呎呏呐呒呓呔呕呗呙呚呛呜呝呞呟呠呡呢呣呤呥呦呧周呩呪呫呬呭呮呯呰呱呲呴呶呵呷呸呹呺呻呾呿咀咁咂咃咄咅咇咈咉咊咋咍咎咐咑咓咔咕咖咗咘咙咚咛咜咝咞咟咠咡咢咣咤咥咦咧咨咩咪咫咬咭咮咯咰咲咳咴咵咶啕咹咺咻呙咽咾咿哂哃哅哆哇哈哊哋哌哎哏哐哑哒哓哔哕哖哗哘哙哚哛哜哝哞哟哠咔哣哤哦哧哩哪哫哬哯哰唝哵哶哷哸哹哻哼哽哾哿唀唁唂唃呗唅唆唈唉唊唋唌唍唎唏唑唒唓唔唣唖唗唘唙吣唛唜唝唞唟唠唡唢唣唤唥唦唧唨唩唪唫唬唭唯唰唲唳唴唵唶唷念唹唺唻唼唽唾唿啀啁啃啄啅啇啈啉啋啌啍啎问啐啑啒启啔啕啖啖啘啙啚啛啜啝哑启啠啡唡衔啥啦啧啨啩啪啫啬啭啮啯啰啱啲啳啴啵啶啷啹啺啻啼啽啾啿喀喁喂喃善喅喆喇喈喉喊喋喌喍喎喏喐喑喒喓喔喕喖喗喙喛喞喟喠喡喢喣喤喥喦喨喩喯喭喯喰喱哟喳喴喵営喷喸喹喺喼喽喾喿嗀嗁嗂嗃嗄嗅呛啬嗈嗉唝嗋嗌嗍吗嗏嗐嗑嗒嗓嗕嗖嗗嗘嗙呜嗛嗜嗝嗞嗟嗠嗡嗢嗧嗨唢嗪嗫嗬嗭嗮嗰嗱嗲嗳嗴嗵哔嗷嗸嗹嗺嗻嗼嗽嗾嗿嘀嘁嘂嘃嘄嘅嘅嘇嘈嘉嘊嘋嘌喽嘎嘏嘐嘑嘒嘓呕嘕啧嘘嘙嘚嘛唛嘝嘞嘞嘟嘠嘡嘢嘣嘤嘥嘦嘧嘨哗嘪嘫嘬嘭唠啸囍嘴哓嘶嘷呒嘹嘺嘻嘼啴嘾嘿噀噂噃噄咴噆噇噈噉噊噋噌噍噎噏噐噑噒嘘噔噕噖噗噘噙噚噛噜咝噞噟哒噡噢噣噤哝哕噧噩噪噫噬噭噮嗳噰噱哙噳喷噵噶噷吨噺噻噼噽噾噿咛嚁嚂嚃嚄嚅嚆吓嚈嚉嚊嚋哜嚍嚎嚏尝嚑嚒嚓嚔噜嚖嚗嚘啮嚚嚛嚜嚝嚞嚟嚠嚡嚢嚣嚤呖嚧咙嚩咙嚧嚪嚫嚬嚭嚯嚰嚱亸喾嚵嘤嚷嚸嚹嚺嚻嚼嚽嚾嚿啭嗫嚣囃囄冁囆囇呓囊囋囍囎囏囐嘱囒啮囔囕囖} diff --git a/macros/latex/contrib/shtthesis/shtthesis.cls b/macros/latex/contrib/shtthesis/shtthesis.cls index da48bb990b..1d616c240c 100644 --- a/macros/latex/contrib/shtthesis/shtthesis.cls +++ b/macros/latex/contrib/shtthesis/shtthesis.cls @@ -17,8 +17,8 @@ % Identification % ============================================================================== \NeedsTeXFormat{LaTeX2e} -\newcommand\version{0.3.0} -\newcommand\versiondate{2020/06/23} +\newcommand\version{0.3.1} +\newcommand\versiondate{2020/06/30} \ProvidesClass{shtthesis}[% \versiondate\space% v\version\space% @@ -295,6 +295,7 @@ }{ctexbook} \PassOptionsToPackage{ natbib = true, + hyperref = manual, backend = biber, gbpub = false, gbcitelocal = chinese, @@ -320,15 +321,12 @@ \RequirePackage[shortlabels, inline]{enumitem} \RequirePackage{mathtools} \RequirePackage{amsthm} -\RequirePackage[ - mathrm = sym, - mathit = sym, - mathbf = sym, - mathtt = sym, -]{unicode-math} -\RequirePackage{hyperref} +\RequirePackage[mathbf=sym]{unicode-math} \RequirePackage{biblatex} \AtEndPreamble{ + \RequirePackage{hyperref} + \addbibresource{\sht@bib@resource} + \BiblatexManualHyperrefOn \hypersetup{ pdfencoding = auto, psdextra = true, @@ -346,14 +344,6 @@ \definecolor{fdu@link}{HTML}{990000} \definecolor{fdu@url}{HTML}{0000B2} \definecolor{fdu@cite}{HTML}{007F00} - % `classic' color scheme from `fduthesis' - \definecolor{classic@link}{HTML}{FF0000} - \definecolor{classic@url}{HTML}{0000FF} - \definecolor{classic@cite}{HTML}{00FF00} - % `science' color scheme from `fduthesis' - \definecolor{science@link}{HTML}{CA0619} - \definecolor{science@url}{HTML}{389F9D} - \definecolor{science@cite}{HTML}{FF8920} \hypersetup{ colorlinks = true, linkcolor = fdu@link, @@ -362,7 +352,6 @@ } \fi \urlstyle{tt} - \addbibresource{\sht@bib@resource} } % ============================================================================== % Format Specifications @@ -382,7 +371,10 @@ \def\tablename{表} \def\figurename{图} \definecolor{ShtRed}{RGB}{146,46,23} -\def\school@logo@missing{校徽文件缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/shanghaitech-logo.pdf}{项目主页}下载!} +\def\school@logo@missing{% + 校徽文件缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/% + shanghaitech-logo.pdf}{项目主页}下载!% +} % ------------------------------------------------------------------------------ % Geometry and layouts % ------------------------------------------------------------------------------ @@ -550,61 +542,61 @@ % ------------------------------------------------------------------------------ \ifthenelse{\equal{\sht@fontset}{windows}}{ \def\fake@bold@factor{2.5} - \setCJKmainfont[ - AutoFakeBold = \fake@bold@factor, - ItalicFont = KaiTi, - ]{SimSun} - \setCJKsansfont[ - AutoFakeBold = \fake@bold@factor, - ]{SimHei} - \setCJKfamilyfont{zhsong}[ - AutoFakeBold = \fake@bold@factor, - ]{SimSun} - \setCJKfamilyfont{zhhei}[ - AutoFakeBold = \fake@bold@factor, - ]{SimHei} - \setCJKfamilyfont{zhkai}[ - AutoFakeBold = \fake@bold@factor, - ]{KaiTi} + \setCJKmainfont{SimSun}[ + AutoFakeBold = \fake@bold@factor, + ItalicFont = KaiTi, + ] + \setCJKsansfont{SimHei}[ + AutoFakeBold = \fake@bold@factor, + ] + \setCJKfamilyfont{zhsong}{SimSun}[ + AutoFakeBold = \fake@bold@factor, + ] + \setCJKfamilyfont{zhhei}{SimHei}[ + AutoFakeBold = \fake@bold@factor, + ] + \setCJKfamilyfont{zhkai}{KaiTi}[ + AutoFakeBold = \fake@bold@factor, + ] }{ \ifthenelse{\equal{\sht@fontset}{mac}}{ - \setCJKmainfont[ - UprightFont = * Regular, - BoldFont = * Bold, - ItalicFont = Kaiti SC Regular, - BoldItalicFont = Kaiti SC Bold, - ]{Songti SC} - \setCJKsansfont[ - UprightFont = * Light, - BoldFont = * Medium, - ]{Heiti SC} - \setCJKfamilyfont{zhsong}[ - UprightFont = * Regular, - BoldFont = * Bold, - ]{Songti SC} - \setCJKfamilyfont{zhhei}[ - UprightFont = * Light, - BoldFont = * Medium, - ]{Heiti SC} - \setCJKfamilyfont{zhkai}[ - UprightFont = * Regular, - BoldFont = * Bold, - ]{Kaiti SC} + \setCJKmainfont{Songti SC}[ + UprightFont = * Regular, + BoldFont = * Bold, + ItalicFont = Kaiti SC Regular, + BoldItalicFont = Kaiti SC Bold, + ] + \setCJKsansfont{Heiti SC}[ + UprightFont = * Light, + BoldFont = * Medium, + ] + \setCJKfamilyfont{zhsong}{Songti SC}[ + UprightFont = * Regular, + BoldFont = * Bold, + ] + \setCJKfamilyfont{zhhei}{Heiti SC}[ + UprightFont = * Light, + BoldFont = * Medium, + ] + \setCJKfamilyfont{zhkai}{Kaiti SC}[ + UprightFont = * Regular, + BoldFont = * Bold, + ] }{ - \IfFontExistsTF{Source Han Serif SC}{ - \def\unix@songti{Source Han Serif SC} + \IfFontExistsTF{Noto Serif CJK SC}{ + \def\unix@songti{Noto Serif CJK SC} }{ - \IfFontExistsTF{Noto Serif CJK SC}{ - \def\unix@songti{Noto Serif CJK SC} + \IfFontExistsTF{Source Han Serif SC}{ + \def\unix@songti{Source Han Serif SC} }{ \def\unix@songti{FandolSong} } } - \IfFontExistsTF{Source Han Sans SC}{ - \def\unix@heiti{Source Han Sans SC} + \IfFontExistsTF{Noto Sans CJK SC}{ + \def\unix@heiti{Noto Sans CJK SC} }{ - \IfFontExistsTF{Noto Sans CJK SC}{ - \def\unix@heiti{Noto Sans CJK SC} + \IfFontExistsTF{Source Han Sans SC}{ + \def\unix@heiti{Source Han Sans SC} }{ \def\unix@heiti{FandolHei} } @@ -626,13 +618,75 @@ }{ \def\unix@fangsong{FandolFang} } - \setCJKmainfont[ItalicFont=\unix@kaiti]{\unix@songti} - \setCJKsansfont[BoldFont=\unix@heiti@bold]{\unix@heiti} - \setCJKmonofont{\unix@fangsong} - \setCJKfamilyfont{zhsong}{\unix@songti} - \setCJKfamilyfont{zhhei}{\unix@heiti} - \setCJKfamilyfont{zhkai}{\unix@kaiti} - \setCJKfamilyfont{zhfs}{\unix@fangsong} + \ifluatex + \setCJKmainfont{\unix@songti}[ItalicFont=\unix@kaiti] + \setCJKsansfont{\unix@heiti}[BoldFont=\unix@heiti@bold] + \setCJKmonofont{\unix@fangsong} + \setCJKfamilyfont{zhsong}{\unix@songti} + \setCJKfamilyfont{zhhei}{\unix@heiti}[BoldFont=\unix@heiti@bold] + \setCJKfamilyfont{zhkai}{\unix@kaiti} + \setCJKfamilyfont{zhfs}{\unix@fangsong} + \else + \ifthenelse{\equal{\unix@songti}{FandolSong}}{ + \setCJKmainfont{FandolSong}[ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = FandolKai-Regular, + ] + \setCJKfamilyfont{zhsong}{FandolSong}[ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ] + }{ + \ifthenelse{\equal{\unix@kaiti}{FandolKai}}{ + \setCJKmainfont{\unix@songti}[ + ItalicFont = FandolKai-Regular, + ItalicFeatures = {Extension = .otf}, + ] + }{ + \setCJKmainfont{\unix@songti}[ItalicFont=\unix@kaiti] + } + \setCJKfamilyfont{zhsong}{\unix@songti} + } + \ifthenelse{\equal{\unix@heiti}{FandolHei}}{ + \setCJKsansfont{FandolHei}[ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ] + \setCJKfamilyfont{zhhei}{FandolHei}[ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ] + }{ + \setCJKsansfont{\unix@heiti}[BoldFont=\unix@heiti@bold] + \setCJKfamilyfont{zhhei}{\unix@heiti}[BoldFont=\unix@heiti@bold] + } + \ifthenelse{\equal{\unix@kaiti}{FandolKai}}{ + \setCJKfamilyfont{zhkai}{FandolKai}[ + Extension = .otf, + UprightFont = *-Regular, + ] + }{ + \setCJKfamilyfont{zhkai}{\unix@kaiti} + } + \ifthenelse{\equal{\unix@fangsong}{FandolFang}}{ + \setCJKfamilyfont{zhfs}{FandolFang}[ + Extension = .otf, + UprightFont = *-Regular, + ] + \setCJKmonofont{FandolFang}[ + Extension = .otf, + UprightFont = *-Regular, + ] + }{ + \setCJKmonofont{\unix@fangsong} + \setCJKfamilyfont{zhfs}{\unix@fangsong} + } + \fi \providecommand{\songti}{\CJKfamily{zhsong}} \providecommand{\heiti}{\CJKfamily{zhhei}} \providecommand{\kaishu}{\CJKfamily{zhkai}} @@ -683,37 +737,22 @@ % Math fonts % ------------------------------------------------------------------------------ \IfFontExistsTF{XITSMath-Regular.otf}{ - \setmathfont{XITSMath-Regular} [ - Extension = .otf, - BoldFont = XITSMath-Bold, - StylisticSet = 8, - ] - \setmathfont{XITSMath-Regular.otf} [ - range = {cal, bfcal}, - StylisticSet = 1, - ] - \setmathfont{XITSMath-Regular.otf} [ - range = {scr, bfscr}, - StylisticSet = 2, - ] + \def\sht@math@font{XITSMath-Regular.otf} }{ - \setmathfont{xits-math} [ - Extension = .otf, - BoldFont = *bold, - StylisticSet = 8, - ] - \setmathfont{xits-math.otf} [ - range = {cal, bfcal}, - StylisticSet = 1, - ] - \setmathfont{xits-math.otf} [ - range = {scr, bfscr}, - StylisticSet = 2, - ] + \def\sht@math@font{xits-math.otf} } -\IfFontExistsTF{FiraMath-Regular.otf}{ - \setmathfontface\mathsf{FiraMath-Regular.otf} -}{} +\setmathfont{\sht@math@font}[ + StylisticSet = 8, % upright integral variants, please refer to stix2-otf doc +] +% please refer to "Caligraphic vs. Script variants" section of unicode-math doc +\setmathfont{\sht@math@font}[ + range = {cal, bfcal}, + StylisticSet = 1, +] +\setmathfont{\sht@math@font}[ + range = {scr, bfscr}, + StylisticSet = 2, +] % ------------------------------------------------------------------------------ % Math environmrnts % ------------------------------------------------------------------------------ @@ -732,7 +771,8 @@ \theoremstyle{remark} \newtheorem{remark}{注}[chapter] \renewcommand*{\proofname}{证明} -\expandafter\patchcmd\csname\string\proof\endcsname{\@addpunct{.}}{\@addpunct{\emph{:}}}{}{} +\expandafter\patchcmd\csname\string\proof\endcsname{\@addpunct{.}}% + {\@addpunct{\emph{:}}}{}{} % ------------------------------------------------------------------------------ % Utility functions for ToC and bookmarks % ------------------------------------------------------------------------------ @@ -1158,14 +1198,17 @@ \fi% }}} \\ \ifdefempty{\sht@supervisor@institution}{}{ & - \multicolumn{2}{c}{\shifted@uline{\shifted@box{\sht@supervisor@institution}}} \\ + \multicolumn{2}{c}{\shifted@uline{% + \shifted@box{\sht@supervisor@institution}}} \\ } 学位类别:& \multicolumn{2}{c}{\shifted@uline{\shifted@box{\sht@degree@name}}} \\ 一级学科:& - \multicolumn{2}{c}{\shifted@uline{\shifted@box{\sht@discipline@level@i}}} \\ + \multicolumn{2}{c}{\shifted@uline{% + \shifted@box{\sht@discipline@level@i}}} \\ \multicolumn{2}{l}{学校/学院名称:} & - \shifted@uline{\shifted@box[\cover@tab@last@entry@width]{\sht@institution}} \\ + \shifted@uline{\shifted@box[\cover@tab@last@entry@width]{% + \sht@institution}} \\ \end{tabular} } @@ -1263,22 +1306,28 @@ [\cover@tab@entry@width@undergraduate]{\sht@title} \\ 学生姓名:& \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate]{\sht@author}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]{% + \sht@author}} \\ 学\hspace{2\ccwd}号:& \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate]{\sht@author@id}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]{% + \sht@author@id}} \\ 入学年份:& \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate]{\sht@entrance@year}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]{% + \sht@entrance@year}} \\ 所在学院:& \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate]{\sht@institution}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]{% + \sht@institution}} \\ 攻读专业:& \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate]{\sht@discipline}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]{% + \sht@discipline}} \\ 指导教师:& \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate]{\sht@supervisor}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]{% + \sht@supervisor}} \\ \end{tabular} } @@ -1316,25 +1365,32 @@ \begin{tabular}{lc} Subject: & \sht@lines@to@tab[\cover@tab@uline@thick@undergraduate]% - [\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@title@en} \\ + [\cover@tab@entry@width@undergraduate][\content@left@shift@en]{% + \sht@title@en} \\ Student Name: & \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@author@en}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]% + [\content@left@shift@en]{\sht@author@en}} \\ Student ID: & \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@author@id}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]% + [\content@left@shift@en]{\sht@author@id}} \\ Year of Entrance: & \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@entrance@year}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]% + [\content@left@shift@en]{\sht@entrance@year}} \\ School: & \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@institution@en}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]% + [\content@left@shift@en]{\sht@institution@en}} \\ Major: & \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@discipline@en}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]% + [\content@left@shift@en]{\sht@discipline@en}} \\ Advisor: & \shifted@uline[\cover@tab@uline@thick@undergraduate]% - {\shifted@box[\cover@tab@entry@width@undergraduate][\content@left@shift@en]{\sht@supervisor@en}} \\ + {\shifted@box[\cover@tab@entry@width@undergraduate]% + [\content@left@shift@en]{\sht@supervisor@en}} \\ \end{tabular} } @@ -1395,7 +1451,8 @@ {\hfill{}作者签名:\hspace*{10em}导师签名:\hspace*{9em}} - {\hfill{}日\hspace*{2\ccwd}期:\hspace*{10em}日\hspace*{2\ccwd}期:\hspace*{9em}} + \hfill{}日\hspace*{2\ccwd}期:% + \hspace*{10em}日\hspace*{2\ccwd}期:\hspace*{9em}% \vspace{3ex} } @@ -1593,7 +1650,9 @@ \providecommand{\makebiblio}{% \renewcommand{\bibfont}{\zihao{5}}% \intotoc*{\cleardoublepage}{\bibname}% + \urlstyle{same}% \printbibliography% + \urlstyle{tt}% } % ------------------------------------------------------------------------------ % Appendix |