summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/cmpj/README16
-rw-r--r--macros/latex/contrib/cmpj/cmpj.bst16
-rw-r--r--macros/latex/contrib/cmpj/cmpj3.sty89
-rw-r--r--macros/latex/contrib/cmpj/usrguide/cmpjxampl.bib30
-rw-r--r--macros/latex/contrib/cmpj/usrguide/template.pdfbin401141 -> 501685 bytes
-rw-r--r--macros/latex/contrib/cmpj/usrguide/template.tex347
-rw-r--r--macros/latex/contrib/easybook/doc/chapter1.tex1
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin287472 -> 268534 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex7
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin254660 -> 257018 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx1577
-rw-r--r--macros/latex/contrib/fontsize/fontsize.dtx408
-rw-r--r--macros/latex/contrib/fontsize/fontsize.pdfbin393943 -> 399282 bytes
-rw-r--r--macros/latex/contrib/l3backend/CHANGELOG.md8
-rw-r--r--macros/latex/contrib/l3backend/README.md2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-basics.dtx14
-rw-r--r--macros/latex/contrib/l3backend/l3backend-box.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-code.pdfbin836068 -> 837839 bytes
-rw-r--r--macros/latex/contrib/l3backend/l3backend-color.dtx13
-rw-r--r--macros/latex/contrib/l3backend/l3backend-draw.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-graphics.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-header.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-opacity.dtx2
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx2
-rw-r--r--macros/latex/contrib/mathtools/empheq.ins2
-rw-r--r--macros/latex/contrib/mathtools/empheq.pdfbin311417 -> 311677 bytes
-rw-r--r--macros/latex/contrib/mathtools/mathtools.dtx222
-rw-r--r--macros/latex/contrib/mathtools/mathtools.ins5
-rw-r--r--macros/latex/contrib/mathtools/mathtools.pdfbin455418 -> 456864 bytes
-rw-r--r--macros/latex/contrib/mathtools/mhsetup.dtx29
-rw-r--r--macros/latex/contrib/mathtools/mhsetup.ins93
-rw-r--r--macros/latex/contrib/mathtools/mhsetup.pdfbin236395 -> 236759 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md18
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/README.md2
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx418
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdfbin873009 -> 892975 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty3
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx30
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdfbin565792 -> 567916 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx57
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdfbin565696 -> 566379 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdfbin523596 -> 523372 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx45
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdfbin556128 -> 555926 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx6
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdfbin547500 -> 547260 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdfbin649554 -> 649325 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdfbin656456 -> 656637 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx15
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdfbin514001 -> 515149 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdfbin435022 -> 434789 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdfbin550289 -> 550068 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx14
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdfbin419964 -> 419958 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx7
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdfbin444916 -> 444675 bytes
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty4
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty2
-rw-r--r--macros/latex/contrib/srdp-mathematik/README.txt56
-rw-r--r--macros/latex/contrib/srdp-mathematik/srdp-mathematik.pdfbin169051 -> 161583 bytes
-rw-r--r--macros/latex/contrib/srdp-mathematik/srdp-mathematik.sty4
-rw-r--r--macros/latex/contrib/srdp-mathematik/srdp-mathematik.tex2
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-ar.pdfbin130512 -> 146943 bytes
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-ar.tex197
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-en.pdfbin103537 -> 105529 bytes
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-en.tex210
-rw-r--r--macros/luatex/latex/beamer-rl/README.txt6
-rw-r--r--macros/luatex/latex/beamer-rl/beamer-rl.cls950
-rw-r--r--macros/luatex/latex/lua-ul/docstrip-luacode.sty2
-rw-r--r--macros/luatex/latex/lua-ul/lua-ul.dtx23
-rw-r--r--macros/luatex/latex/lua-ul/lua-ul.pdfbin99609 -> 100003 bytes
-rw-r--r--macros/luatex/optex/README7
-rw-r--r--macros/luatex/optex/base/alloc.opm7
-rw-r--r--macros/luatex/optex/base/f-heros.opm16
-rw-r--r--macros/luatex/optex/base/f-librecaslon.opm22
-rw-r--r--macros/luatex/optex/base/fams-ini.opm5
-rw-r--r--macros/luatex/optex/base/fonts-opmac.opm71
-rw-r--r--macros/luatex/optex/base/fonts-select.opm11
-rw-r--r--macros/luatex/optex/base/lists.opm5
-rw-r--r--macros/luatex/optex/base/makeindex.opm5
-rw-r--r--macros/luatex/optex/base/margins.opm6
-rw-r--r--macros/luatex/optex/base/math-macros.opm17
-rw-r--r--macros/luatex/optex/base/math-unicode.opm28
-rw-r--r--macros/luatex/optex/base/optex.ini3
-rw-r--r--macros/luatex/optex/base/optex.lua2
-rw-r--r--macros/luatex/optex/base/outlines.opm8
-rw-r--r--macros/luatex/optex/base/output.opm15
-rw-r--r--macros/luatex/optex/base/prefixed.opm6
-rw-r--r--macros/luatex/optex/base/sections.opm20
-rw-r--r--macros/luatex/optex/base/slides.opm25
-rw-r--r--macros/luatex/optex/base/styles.opm8
-rw-r--r--macros/luatex/optex/base/table.opm15
-rw-r--r--macros/luatex/optex/base/unimath-codes.opm5
-rw-r--r--macros/luatex/optex/base/usebib.opm12
-rw-r--r--macros/luatex/optex/demo/op-slides.tex39
-rw-r--r--macros/luatex/optex/doc/omls.tex4
-rw-r--r--macros/luatex/optex/doc/optex-doc.pdfbin1366580 -> 1380041 bytes
-rw-r--r--macros/luatex/optex/doc/optex-doc.tex2
-rw-r--r--macros/luatex/optex/doc/optex-math.tex6
-rw-r--r--macros/luatex/optex/doc/optex-userdoc.tex2
107 files changed, 3178 insertions, 2184 deletions
diff --git a/macros/latex/contrib/cmpj/README b/macros/latex/contrib/cmpj/README
index 7dcb2effaf..5aef501deb 100644
--- a/macros/latex/contrib/cmpj/README
+++ b/macros/latex/contrib/cmpj/README
@@ -65,7 +65,7 @@ INSTALLATION
ADDITIONAL FILES REQUIRED BY THIS PACKAGE
cmpj?.sty require the 'doi', 'fancyhdr', 'graphicx', 'hyperref',
-'ifthen', 'url', and 'natbib' packages.
+'hyperxmp', 'ifthen', 'tikz', 'url', and 'natbib' packages.
These packages are included in the current LaTeX distributions.
They are also available at CTAN (http://www.ctan.org/).
cmpj2.sty supports the 'droid' fonts for text and 'fourier' and
@@ -85,6 +85,18 @@ the LaTeX Project Public License (lppl).
CHANGES
+RELEASE NOTES FOR VERSION 3.03:
+
+* The license metadata for Creative Commons Attribution 4.0 International
+ License is now embedded into PDF.
+
+* orcidlink.sty code to create the ORCID icon and link is embedded
+ in cmpj3.sty.
+
+* Updated cmpj.bst.
+
+* Updated user guide and template.
+
RELEASE NOTES FOR VERSION 3.02:
* cmpj3.sty and cmpj2.sty use new 'droid' font families names.
@@ -98,7 +110,7 @@ RELEASE NOTES FOR VERSION 3.01:
License (default) and 'no-cc' for author retained copyright (obsolete).
* doi.sty code, modified to follow the CrossRef DOI display guidelines,
- is incorporated in cmpj3.sty.
+ is embedded in cmpj3.sty.
* Updated cmpj.bst.
diff --git a/macros/latex/contrib/cmpj/cmpj.bst b/macros/latex/contrib/cmpj/cmpj.bst
index 64effa1982..0ce2339acc 100644
--- a/macros/latex/contrib/cmpj/cmpj.bst
+++ b/macros/latex/contrib/cmpj/cmpj.bst
@@ -709,12 +709,18 @@ FUNCTION {format.names}
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
- "{vv~}{ll}{ jj}{ f{.}.}"
+ "{vv~}{ll}{ jj}{~f.}"
format.name$
bibinfo bibinfo.check
't :=
nameptr #1 >
{
+ nameptr #11 =
+ numnames #20 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
namesleft #1 >
{ ", " * t * }
{
@@ -751,12 +757,18 @@ FUNCTION {format.names.ed}
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr
- "{vv~}{ll}{ jj}{ f{.}.}"
+ "{vv~}{ll}{ jj}{~f.}"
format.name$
bibinfo bibinfo.check
't :=
nameptr #1 >
{
+ nameptr #11 =
+ numnames #20 > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
namesleft #1 >
{ ", " * t * }
{
diff --git a/macros/latex/contrib/cmpj/cmpj3.sty b/macros/latex/contrib/cmpj/cmpj3.sty
index 551f1e0f6f..fe6895a969 100644
--- a/macros/latex/contrib/cmpj/cmpj3.sty
+++ b/macros/latex/contrib/cmpj/cmpj3.sty
@@ -7,9 +7,9 @@
%%% http://www.icmp.lviv.ua/journal/ %%%
%%% using LaTeX2e %%%
%%% %%%
-%%% Last time modified: July 17, 2019 %%%
+%%% Last time modified: March 17, 2021 %%%
%%% %%%
-%%% Copyright (C) 2019 by the Institute for Condensed Matter Physics %%%
+%%% Copyright (C) 2021 by the Institute for Condensed Matter Physics %%%
%%% of the National Academy of Sciences of Ukraine %%%
%%% all rights reserved. %%%
%%% %%%
@@ -22,11 +22,11 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cmpj3}
- [2019/07/17 v3.02
+ [2021/03/17 v3.03
The Condensed Matter Physics journal package]
\def\filename{cmpj3.sty}
-\def\fileversion{3.02}
-\def\filedate{2019/07/17}
+\def\fileversion{3.03}
+\def\filedate{2021/03/17}
\immediate\write32{This is '\filename' v\fileversion \space <\filedate> ^^J%
the Condensed Matter Physics journal package}
@@ -40,9 +40,33 @@
\RequirePackage{graphicx}
\RequirePackage[square,comma,numbers,sort&compress]{natbib}
\RequirePackage{ifthen}
-\RequirePackage[pdfstartview=FitH]{hyperref}
+\RequirePackage[unicode,pdfstartview=FitH]{hyperref}
+\RequirePackage{scalerel}
+\RequirePackage{tikz}
%\def\href#1#2{}
\RequirePackage{url}
+%%\RequirePackage{orcidlink}
+%%%%%%%%% orcidlink.sty %%%%%%%%%%%%%%%%%%%%%%%%
+%% orcidlink package was created and is maintained by
+%% [Leo C. Stein](http://duetosymmetry.com/), (c) 2019.
+%% The original TikZ icon code was created by user [Milo on
+%% TeX.SE](https://tex.stackexchange.com/users/128068/milo).
+\usetikzlibrary{svg.path}
+\definecolor{orcidlogocol}{HTML}{A6CE39}
+\tikzset{
+ orcidlogo/.pic={
+ \fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z};
+ \fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z}
+ svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z}
+ svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z};
+ }
+}
+\newcommand\orcidlink[1]{\texorpdfstring{\href{https://orcid.org/#1}{\mbox{\scalerel*{
+ \begin{tikzpicture}[yscale=-1,transform shape]
+ \pic{orcidlogo};
+ \end{tikzpicture}
+ }{|}}}}{}}
+%%%%%%% end orcidlink.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%\RequirePackage{doi}
%%%%%%%%% doi.sty modified to follow CrossRef rules %%%%%%%%%%%%%%%%%%%%%%%%
%% To change the default prefix, redefine this command within your own code.
@@ -302,10 +326,15 @@
\def\Pr@scale{0.889}
\def\cmpj@sf{}
\def\cyr@rm{cmr}
+\def\cc@by@copyright@pdf{}
+\providecommand{\pdfkeywords}{}
+
\def\cmpj@sf@cm{
\RequirePackage{textcomp}
\RequirePackage{amsmath,amssymb}
+ \def\uppi{\pi}
+ \def\piup{\pi}
}
\def\cmpj@sf@helvet{
@@ -384,7 +413,7 @@
\def\@@copyright{\textcopyright}
\def\copyright@size{\small}
-\def\copyright@author{\@author\cp@issue@year}
+\def\copyright@author{\fancy@author\cp@issue@year}
\def\authorcopyright{\@ifnextchar[
\iauthorcopyright{\iauthorcopyright[\small]}}
\def\iauthorcopyright[#1]#2{\gdef\copyright@size{#1}
@@ -398,23 +427,41 @@
\authorcopyright{\raisebox{-2pt}{\includegraphics[width=16mm]{cmpj-cc-by-small}\space}\footnotesize\sf@phv This work is licensed under a \href{https://creativecommons.org/licenses/by/4.0/}{\textsl{Creative Commons Attribution 4.0 International License}}. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.}
}
-\DeclareOption{nocopyright}{\let\print@copyright\no@copyright}
-
-\DeclareOption{cc-by}{\let\print@copyright\cc@by@copyright}
+\DeclareOption{nocopyright}{\let\print@copyright\no@copyright\def\cc@by@copyright@pdf{}}
+
+\DeclareOption{cc-by}{
+ \let\print@copyright\cc@by@copyright
+\def\cc@by@copyright@pdf{%
+ \IfFileExists{hyperxmp.sty}{
+ \@ifpackageloaded{hyperxmp}{}{\RequirePackage{hyperxmp}}
+ \hypersetup{
+ pdfcopyright = {This work is licensed under a Creative Commons "Attribution 4.0 International" license. Further distribution of this work must maintain attribution to the author(s) and the published article's title, journal citation, and DOI.},
+ pdflicenseurl = {https://creativecommons.org/licenses/by/4.0/},
+ pdfkeywords={\pdfkeywords},
+ }
+ }{
+ \PackageWarning{cmpj3}{%
+ The hyperxmp package is missing so no license metadata can be embedded
+ into the PDF. Consider installing hyperxmp.
+ }
+ }
+}
+}
-\DeclareOption{no-cc}{\def\print@copyright{}}
+\DeclareOption{no-cc}{\def\print@copyright{}\def\cc@by@copyright@pdf{}}
\ExecuteOptions{newtx,cc-by}
\ProcessOptions
+\def\hv@sf{\sffamily\upshape}
\def\textcyrrm#1{{\fontencoding{T2A}\fontfamily{\cyr@rm}\selectfont #1}}
\def\textcyrsf#1{{\fontencoding{T2A}\fontfamily{\cyr@sf}\selectfont #1}}
\def\textcyrtt#1{{\fontencoding{T2A}\fontfamily{\cyr@tt}\selectfont #1}}
\urlstyle{same}
\cmpj@sf
-
-\def\hv@sf{\sffamily\upshape}
+\cc@by@copyright@pdf
+\def\Keywords#1{\def\pdfkeywords{#1}\cc@by@copyright@pdf}
%% Sectioning %%
@@ -521,11 +568,11 @@
\noindent\parbox[t]{11cm}{%
\ifthenelse{\equal{1}{\pageref{last@page}}}{%
\small\hv@sf Condensed Matter Physics,~\issue@year,\space%
- Vol.~\issue@volume, No~\issue@number,\space%
+ Vol.~\issue@volume, No.~\issue@number,\space%
\article@number:\space\pageref{last@page}%
}{%
\small\hv@sf Condensed Matter Physics,~\issue@year,\space%
- Vol.~\issue@volume, No~\issue@number,\space%
+ Vol.~\issue@volume, No.~\issue@number,\space%
\article@number:\space1--\pageref{last@page}%
}%
% \article@number\space[\pageref{last@page}\space page(s)]
@@ -577,11 +624,13 @@
\newcommand\keywords{\par\vskip 1ex
\noindent\raggedright\upshape{\hv@sf\bfseries Key words:}\slshape\space}
+\newcommand{\printkeywords}{\keywords\space\pdfkeywords}
+
\newcommand\pacs{\par\vskip 1ex
\noindent\raggedright\upshape{\hv@sf\bfseries PACS:}\slshape\space}
\def\author{\@dblarg{\make@author}}
-\long\def\make@author[#1]#2{\gdef\fancy@author{#1}\gdef\@author{#2}\gdef\@copyright{\@@copyright}}
+\long\def\make@author[#1]#2{\gdef\@author{#2}\gdef\fancy@author{#1}\gdef\@copyright{\@@copyright}}
\def\title{\@dblarg{\make@title}}
\long\def\make@title[#1]#2{\gdef\fancy@title{#1}\gdef\@title{#2}}
@@ -602,6 +651,9 @@
\newcommand{\addr}[1]{\item\label{#1}}
\newcommand{\refaddr}[1]{$^{\textsf{\footnotesize\@refad{#1}}}$}
+%\newcommand{\orcid}[1]{\href{https://orcid.org/#1}{\raisebox{-1pt}{\includegraphics[width=10pt]{orcid-ID}}}}
+\newcommand{\orcid}[1]{\,\orcidlink{#1}\,}
+
\DeclareRobustCommand\@refad{\@@refadx}
\def\@@refadx#1{%
@@ -811,11 +863,11 @@
\lhead[\fancyplain{}{}]{\fancyplain{}{\small\sf@phv\fancy@title}}
\chead[\fancyplain{}{}]{\fancyplain{}{}}
-\rhead[\fancyplain{}{\small\sf@phv\def\refaddr##1{}\fancy@author}]
+\rhead[\fancyplain{}{\small\sf@phv\def\refaddr##1{}\def\orcid##1{}\fancy@author}]
{\fancyplain{}{}}
\lfoot[\fancyplain{}{\issue@page@even\normalsize\sf@phv\article@page}]
{\fancyplain{\copyright@size\@copyright\space\parbox[t]{0.88\textwidth}
- {\copyright@size\sf@phv\def\refaddr##1{}\copyright@author}}{}}
+ {\copyright@size\sf@phv\def\refaddr##1{}\def\orcid##1{}\copyright@author}}{}}
\cfoot[\fancyplain{}{}]{\fancyplain{}{}}
\rfoot[\fancyplain{}{}]
{\fancyplain{\normalsize\sf@phv\article@page\issue@page@odd}{\normalsize\sf@phv\article@page\issue@page@odd}}
@@ -834,6 +886,7 @@
\newcommand{\Img}{\mathop{\mathgroup\symoperators Im}\nolimits}
\renewcommand{\Re}{\Real}
\renewcommand{\Im}{\Img}
+\newcommand{\email}[1]{\href{mailto:#1}{#1}}
\newcommand\lastpage{\label{last@page}}
\lefthyphenmin=2
\righthyphenmin=3
diff --git a/macros/latex/contrib/cmpj/usrguide/cmpjxampl.bib b/macros/latex/contrib/cmpj/usrguide/cmpjxampl.bib
index 87d533779e..20b0745bed 100644
--- a/macros/latex/contrib/cmpj/usrguide/cmpjxampl.bib
+++ b/macros/latex/contrib/cmpj/usrguide/cmpjxampl.bib
@@ -23,8 +23,7 @@ numpages = {489},
}
@Article{Mel00,
- author="Melnyk, R. S.
- and Patsahan, O. V.",
+ author={Melnyk, R. S. and Patsahan, O. V.},
title="Vapor-liquid critical-point properties of a symmetric binary fluid mixture",
journal="Theor. Math. Phys.",
year="2000",
@@ -34,7 +33,7 @@ numpages = {489},
abstract="We propose a microscopic approach for investigating the behavior of a symmetric binary fluid mixture in the vicinity of the vapor-liquid critical point. The problem can be reduced to calculating the partition function of a 3D Ising model in an external field. For a square-well symmetric binary mixture, we express the parameters of the critical point as functions of the microscopic parameter r measuring the relative strength of interactions between the particles of dissimilar and similar species. The calculations are performed at intermediate ($\lambda$=1.5) and moderately long ($\lambda$=2) intermolecular potential ranges. The obtained results agree well with the results of computer simulations.",
issn="1573-9333",
doi="10.1007/BF02551084",
- OPTurl="https://doi.org/10.1007/BF02551084",
+ OPTurl="http://dx.doi.org/10.1007/BF02551084",
note = {[Teor. Mat. Fiz., 2000, \textbf{124}, No.~2, 339--352 (in Russian), \bibdoi{10.4213/tmf643}]},
}
@@ -86,7 +85,7 @@ doi = {10.5488/CMP.14.13004},
abstract="A desirable goal of scientific management is to introduce, if it exists, a simple and reliable way to measure the scientific excellence of publicly funded research institutions and universities to serve as a basis for their ranking and financing. While citation-based indicators and metrics are easily accessible, they are far from being universally accepted as way to automate or inform evaluation processes or to replace evaluations based on peer review. Here we consider absolute measurements of research excellence at an amalgamated, institutional level and specific measures of research excellence as performance per head. Using biology research institutions in the UK as a test case, we examine the correlations between peer review-based and citation-based measures of research excellence on these two scales. We find that citation-based indicators are very highly correlated with peer-evaluated measures of group strength, but are poorly correlated with group quality. Thus, and almost paradoxically, our analysis indicates that citation counts could possibly form a basis for deciding on, how to fund research institutions, but they should not be used as a basis for ranking them in terms of quality.",
issn="1588-2861",
doi="10.1007/s11192-012-0874-7",
- OPTurl="https://doi.org/10.1007/s11192-012-0874-7",
+ OPTurl="http://dx.doi.org/10.1007/s11192-012-0874-7",
note="(in press)",
}
@@ -142,10 +141,31 @@ pages = {355-434},
OPTyear = {year},
OPTnote = {note},
OPTannote = {annote},
- url={https://earthdata.nasa.gov/labs/worldview/?map=-24.484375,14.05078125,50.75,62.14453125&products=baselayers.VIIRS_CityLights_2012~overlays.sedac_bound&switch=geographic},
+ url={http://earthdata.nasa.gov/labs/worldview/?map=-24.484375,14.05078125,50.75,62.14453125&products=baselayers.VIIRS_CityLights_2012~overlays.sedac_bound&switch=geographic},
}
@misc{han12,
author = {Han, Y. and Kida, T. and Ikeda, M. and Hagiwara, M. and Stre\v{c}ka, J. and Honda, Z.},
note = {(unpublished)},
}
+
+@misc{wiki:xxx,
+ author = "Wikipedia",
+ title = "Ellipsoidal coordinates --- {W}ikipedia{,} The Free Encyclopedia",
+ year = "2016",
+ url = "https://en.wikipedia.org/w/index.php?title=Ellipsoidal_coordinates&oldid=722351999",
+ note = "[Online; accessed 10-Jan-2017]"
+}
+
+@article{Padova2010,
+ author = {De Padova, Paola and Quaresima, Claudio and Ottaviani, Carlo and Sheverdyaeva, Polina M. and Moras, Paolo and Carbone, Carlo and Topwal, Dinesh and Olivieri, Bruno and Kara, Abdelkader and Oughaddou, Hamid and Aufray, Bernard and Le Lay, Guy},
+ title = {Evidence of graphene-like electronic signature in silicene nanoribbons},
+ journal = {Appl. Phys. Lett.},
+ volume = {96},
+ number = {26},
+ pages = {261905},
+ year = {2010},
+ doi = {10.1063/1.3459143},
+ OPTURL = {http://dx.doi.org/10.1063/1.3459143},
+ OPTeprint = {http://dx.doi.org/10.1063/1.3459143},
+}
diff --git a/macros/latex/contrib/cmpj/usrguide/template.pdf b/macros/latex/contrib/cmpj/usrguide/template.pdf
index 99d01ba9c5..64198823cc 100644
--- a/macros/latex/contrib/cmpj/usrguide/template.pdf
+++ b/macros/latex/contrib/cmpj/usrguide/template.pdf
Binary files differ
diff --git a/macros/latex/contrib/cmpj/usrguide/template.tex b/macros/latex/contrib/cmpj/usrguide/template.tex
index 41eba09b43..c570a4fcfa 100644
--- a/macros/latex/contrib/cmpj/usrguide/template.tex
+++ b/macros/latex/contrib/cmpj/usrguide/template.tex
@@ -6,9 +6,9 @@
%%% in the Condensed Matter Physics journal <cmp@icmp.lviv.ua> %%%
%%% using LaTeX2e %%%
%%% %%%
-%%% Last time modified: July 17, 2019 %%%
+%%% Last time modified: March 17, 2021 %%%
%%% %%%
-%%% Copyright (C) 2019 by the Institute for Condensed Matter Physics %%%
+%%% Copyright (C) 2021 by the Institute for Condensed Matter Physics %%%
%%% of the National Academy of Sciences of Ukraine %%%
%%% %%%
%%% This file can be redistributed and/or modified under the terms %%%
@@ -22,6 +22,8 @@
%%%% \usepackage{amsmath,amssymb} %%%% already in cmpj3.sty
%%%% \usepackage{graphicx} %%%% already in cmpj3.sty
+%%%% \usepackage{scalerel} %%%% already in cmpj3.sty
+%%%% \usepackage{tikz} %%%% already in cmpj3.sty
%%%% \usepackage{bm} %%%% place it below \usepackage{cmpj3}
@@ -32,7 +34,6 @@
%% not use Ukrainian. In the main body, use commands \textcyrrm, \textcyrsf and \textcyrtt
%% to typeset in cyrillic script.
-
\usepackage[eqsecnum]{cmpj3}
%% Fields in square brackets are optional.
%% Use 'eqsecnum' for equation numbering by sections;
@@ -40,16 +41,19 @@
%% font size and interline spacing.
%%
%% Other options control font schema (not required for regular usage):
+%% 'cm' for standard TeX Computer Modern fonts (USE IT IN THE CASE OF PROBLEMS),
%% 'newtx' for newtx fonts (default);
%% 'droid' for droid fonts as in 'cmpj2.sty';
%% 'helvet' for Helvetica fonts as in old 'cmpj.sty';
-%% 'cm' for standard TeX Computer Modern fonts,
%% and copyright/licensing status:
%% 'cc-by' for Creative Commons Attribution 4.0 International License (default);
%% 'no-cc' for author retained copyright (obsolete);
%% 'nocopyright' for Editorials, etc.
-\usepackage{bm}
+% uncomment lines below for "bold math"
+%\newcommand\hmmax{0} % default 3
+%\newcommand\bmmax{0} % default 4
+%\usepackage{bm}
\articletype{Regular article}
@@ -57,18 +61,16 @@
%% indicate its short form (optional argument) which goes into the
%% running head.
-
%
\title[Short title: Template and instructions]%
{Long title: Template and instructions to the authors%
\thanks{``\ldots{}I wouldn't stand
-by and see the rules broken -- because right is right, and wrong
+by and see the rules broken --- because right is right, and wrong
is wrong, and a body ain't got no business doing wrong when he
-ain't ignorant and knows better.'' \protect\\ [0.9ex] \strut\qquad
-Twain~M., The Adventures of Huckleberry Finn. 1884.}}
+ain't ignorant and knows better.'' (Twain~M., \textit{The Adventures of Huckleberry Finn}. 1884).}}
%
-\author[Short authors list]{A.U. Thor\refaddr{label1,label2},
- B.U. Thor\refaddr{label2}, \ldots}
+\author[A. U. Thor, B. U. Thor]{A. U. Thor\orcid{0000-0002-5113-8259}\refaddr{label1,label2}\thanks{Corresponding author: \email{a.u.thor@ou.edu.example}.},
+ B. U. Thor\orcid{0000-0002-1825-0097}\refaddr{label2}}
\addresses{
\addr{label1} Ornstein University, 1 Rain St., 10041 Celsius, Softland
\addr{label2} Zernike Institute, 2 River Ave., 20451 Fahrenheit, Solidshire
@@ -83,6 +85,8 @@ Twain~M., The Adventures of Huckleberry Finn. 1884.}}
%% optional. Use them if your entries exceeds 45 characters.
%
+\Keywords{Up to six keywords (\href{https://physh.aps.org/browse}{Physics Subject Headings})}
+
%\sloppy
\begin{document}
@@ -98,21 +102,25 @@ The abstract will be published separately from the article in a
variety of bibliographical services so it should be completely
self-contained (\emph{no footnotes or numbered references}).
Extremely important references may be incorporated into the
-abstract itself: [Thor~A.U. et al., Condens. Matter Phys., 2004,
+abstract itself: [Thor~A.~U., et al., Condens. Matter Phys., 2004,
\textbf{7}, 111]. The abstract should be written as a single
paragraph not exceeding 150 words. Mathematical expressions are
discouraged. Please define all nonstandard symbols and
abbreviations.
%
-\keywords Up to six keywords (\href{https://physh.aps.org/browse}{Physics Subject Headings})
%
-\pacs Up to six \href{https://journals.aps.org/PACS}{PACS} numbers
+%\keywords Up to six keywords (\href{https://physh.aps.org/browse}{Physics Subject Headings})
+\printkeywords
+%
+\pacs Up to six PACS numbers (optional)
\end{abstract}
\section{Editorial process: from submission to offprints}
+%\doclicenseThis
+
This guide is intended to help in preparing \LaTeX{} compuscripts
for publication in ``Condensed Matter Physics'' (hereinafter CMP)
journal. We appreciate your effort to follow our style in
@@ -123,12 +131,12 @@ advice and specific remarks on preparing your compuscripts.
Authors are encouraged to submit their manuscripts electronically
through the CMP journal management and publishing system at
-\\ [1ex]
- \centerline{\texttt{\url{http://cmpj.icmp.lviv.ua/index.php/cmpj/about/submissions\#onlineSubmissions}}.}
-\\ [1ex]
+\begin{center}
+ \texttt{\url{http://cmpj.icmp.lviv.ua/index.php/cmpj/about/submissions\#onlineSubmissions}}.
+\end{center}
Third-party submissions cause excessive problems. Author
self-submissions are exceedingly preferred. All appropriate files (\LaTeX{}
-sources and figure files) should be combined into a single archive.
+sources and figure files) should be combined into a single \href{https://en.wikipedia.org/wiki/Archive_file}{\textbf{archive file}}.
All information about the submission should be included in
the submission form. This must include: full name, postal
and e-mail addresses, telephone and fax numbers of the
@@ -143,15 +151,19 @@ colleague can often find errors or obscure passages missed by the
author.
Compuscripts should be coded in \LaTeXe{} with the \verb|article| class,
-preferably using the CMP journal style available at the journal Web page
-\\ [1ex]
-\centerline{\texttt{\url{http://www.icmp.lviv.ua/journal/src/cmpj.zip}}}
-\\ [1ex]
+preferably using the CMP journal style, which must be included in your \TeX{} distribution, and is also available at the journal Web page
+\begin{center}
+ \texttt{\url{http://www.icmp.lviv.ua/journal/src/cmpj.zip}}
+\end{center}
or from the Comprehensive \TeX\ Archive Network (CTAN)
-\nopagebreak\\ [1ex]
-\centerline{\texttt{\url{https://www.ctan.org/pkg/cmpj}}.}
+\begin{center}
+ \texttt{\url{http://www.ctan.org/pkg/cmpj}}
+\end{center}
-\smallskip
+For old \TeX{} distributions and in the case of problems with missed packages, it is recommended to use the ``\texttt{cm}'' option, e.g.,
+\begin{center}
+ \verb|\usepackage[eqsecnum,cm]{cmpj3}|
+\end{center}
Manuscript should be arranged in the following order: title of
article, short title of not more than 45~characters, author's name
@@ -176,10 +188,9 @@ department. Authors should prepare a list of necessary corrections
as soon as possible and e-mail it to the Editorial Office. All
articles are freely available in electronic forms (PDF)
at the journal Web page:
-\\ [1ex]
-\centerline{\texttt{\url{http://www.icmp.lviv.ua/journal/}}}
-
-\smallskip
+\begin{center}
+ \texttt{\url{http://www.icmp.lviv.ua/journal/}}
+\end{center}
We look forward to receiving your articles!
@@ -209,26 +220,24 @@ can be placed in a footnote. Dates of receipt of
original and revised versions will be added by the Editorial
Office.
+It is strongly encouraged to provide ORCID (\url{https://orcid.org/})
+for all authors. ORCID for primary and/or corresponding author is mandatory.
+
An abstract should accompany each manuscript; it should
be completely self-contained, not exceeding 150 words and
written as a single paragraph. Mathematical expressions
should be avoided.
Up to six keywords (Physics Subject Headings)
-\\ [1ex]
-\centerline{\texttt{\url{https://physh.aps.org/browse}}}
-\\ [1ex]
+\begin{center}
+ \texttt{\url{https://physh.aps.org/browse}}
+\end{center}
should at a glance give a general idea of the
-article to a reader. PACS numbers (up to six classification codes)
-\emph{must} be given.
-Please use the full classification system which
-is available online at
-\\ [1ex]
-\centerline{\texttt{\url{https://journals.aps.org/PACS}}}
-\\ [1ex]
-There should be no more than six numbers, the principal number
-should be placed first, and the check characters should always be
-included.
+article to a reader.
+
+\href{https://en.wikipedia.org/wiki/Physics_and_Astronomy_Classification_Scheme}{PACS} numbers (up to six classification codes) are optional and are used to select an appropriate journal section.
+%The top level headings are given in appendix~\ref{append:CS}.
+The principal number must be placed first.
\subsection{Main body of the paper}
@@ -307,7 +316,7 @@ determines the formula layout. For example, the definition of
Dirac $\delta$-function in the Fourier representation looks like
\begin{align}
\label{delta-def}
-\delta(x) = \frac{1}{2\uppi}
+\delta(x) = \frac{1}{2\piup}
\int_{-\infty}^{\infty} \re^{\ri sx}
\rd s,
\end{align}
@@ -341,14 +350,14 @@ environments (and other too!) by empty lines unless you do
In mathematics mode \LaTeX{} automatically sets variables in a
math italic font. Such an italicization should be accepted in
-general. However, there are some cases where it is better to use a
-Roman font to mark a special meaning of certain symbols: the Euler
-number ``$\re$'', ``$\ri$'' when used as imaginary
+general. However, there are some cases where it is better to use an
+upright font to mark a special meaning of certain symbols: the Euler
+number ``$\re$'', mathematical constant ``$\piup$'', ``$\ri$'' when used as imaginary
unit ($\ri=\sqrt{-1}$), differential ``$\rd$'', and
the operators ``$\Im$'' and ``$\Re$'' for the
imaginary and real parts of complex numbers, respectively [see
equation~(\ref{delta-def}) for example] and \verb|cmpj3.sty| provides
-commands \verb|\re|, \verb|\ri|, \verb|\rd|, \verb|\Im|, and \verb|\Re|
+commands \verb|\re|, \verb|\piup|, \verb|\ri|, \verb|\rd|, \verb|\Im|, and \verb|\Re|
for typesetting such symbols, respectively.
Mathematical functions, such as \verb|cos|, \verb|sin|, etc.,
@@ -378,7 +387,7 @@ should avoid.
\item
%
For simple fractions in the
-text the solidus \verb|/|, as in $\hbar=h/2\pi$, should be used
+text the solidus \verb|/|, as in $\hbar=h/2\piup$, should be used
instead of \verb|\frac| or \verb|\over|, care being taken to use
parentheses where necessary to avoid ambiguity, for example to
distinguish between $1/(n-1)$ and $1/n-1$. Exceptions to this are
@@ -571,7 +580,7 @@ the CMP Editorial Office too. Photo by Oleh Vorobyov.}
%
\item[Vector images]
%
-are to be prepared in Encapsulated PostScript (EPS) format. The
+are to be prepared in Portable Document Format (PDF) or Encapsulated PostScript (EPS) format. The
Bounding Box should indicate the area of the figure with a minimum
of white space around it and not the dimensions of the page.
Please make sure to use only standard fonts
@@ -590,7 +599,7 @@ should be sent in TIFF (or TIF) format. Continuous-tone figures
should have at least 300~DPI, line drawings -- 600~DPI minimum
resolution in final size. Screen or web resolution is
\emph{absolutely insufficient} for publication. If authors convert
-the bitmap image to EPS format and include it in such a form in
+the bitmap image to PDF or EPS formats and include it in such a form in
the compuscript, they should also send an original TIFF version of
the image to the Editorial Office.
@@ -648,10 +657,10 @@ Journal Title (according to the standard abbreviations),
Year of publication, \textbf{Vol.}, starting page (comments:
e.g. in Ukrainian, unpublished, private communication, in press) \cite{Bus89,Mel00,Mry94,Sta11}.
For journals without volume numbers place the issue number instead as in reference~\cite{Mry94}.
-The names of all authors of cited papers should be given.
-Title of journal should be abbreviated according to the ISO~4 ``\href{https://www.issn.org/services/online-services/access-to-the-ltwa/}{List of Title Word Abbreviations}'' standard (see, \texttt{\url{https://woodward.library.ubc.ca/research-help/journal-abbreviations/}} or \texttt{\url{https://cassi.cas.org/search.jsp}} for the ready for use lists of journal titles).
-Please supply \href{https://www.crossref.org/guestquery/}{DOI} for
-e-version of the papers if available \cite{Bus89,Mel00,Mry94,Sta11,Scient2012}.
+The names of all authors of cited papers should be given \cite{Padova2010}.
+Title of journal should be abbreviated according to the ISO~4 ``\href{http://www.issn.org/services/online-services/access-to-the-ltwa/}{List of Title Word Abbreviations}'' standard (see, \texttt{\url{http://woodward.library.ubc.ca/research-help/journal-abbreviations/}} or \texttt{\url{http://cassi.cas.org/search.jsp}} for the ready for use lists of journal titles).
+Please supply \href{http://www.crossref.org/guestquery/}{DOI} for the
+e-versions of papers if available \cite{Bus89,Mel00,Mry94,Sta11,Scient2012}.
For books, the following order is required (skip irrelevant information):
Book Authors, Book Title. Book Series Vol. No., Editor(s) (Ed[s].),
@@ -664,14 +673,14 @@ Please add language of publication for materials which are not written
in English \cite{Mel00,Sta04,Yuk87}. Indicate materials accepted for
publications by adding ``(in press)'' \cite{Scient2012}. If a preprint
exists of the paper not yet accepted for publication, give the e-print
-\href{https://arxiv.org}{arXiv} number \cite{Shv04}.
-Any web resources should be cited as references \cite{url2}.
+\href{http://arxiv.org}{arXiv} number \cite{Shv04}.
+Any web resources should be cited as references \cite{url2,wiki:xxx}.
Please avoid references to unpublished materials, private communication
and web pages \cite{han12,url2}.
It is important to confirm the accuracy of bibliographic information
in references. This has become more important now that the journal
-is online. To ensure that the \href{https://www.crossref.org/}{CrossRef}
+is online. To ensure that the \href{http://www.crossref.org/}{CrossRef}
facility can hyper-link to the articles quoted in the bibliography,
\textbf{multiple references must not be used}. I.e., a list of
references under the same number is not allowed: each reference has
@@ -685,37 +694,60 @@ A typical numerical reference list might be
{\small \topsep 0.6ex
\begin{verbatim}
\begin{thebibliography}{10}
-\bibitem{Zub74} Zubarev D.N., Nonequilibrium Statistical Thermodynamics, Consultants
- Bureau, New-York, 1974.
-\bibitem{Bus89} Bussmann-Holder A., Simon A., B\"uttner H., Phys. Rev. B, 1989,
- \textbf{39}, 207--214, \doi{10.1103/PhysRevB.39.207}.
-\bibitem{Mel00} Melnyk R.S., Patsahan O.V., Theor. Math. Phys., 2000, \textbf{124}, No.~2,
- 1145--1156, \doi{10.1007/BF02551084}, [Teor. Mat. Fiz., 2000, \textbf{124}, No.~2,
- 339--352 (in Russian), \doi{10.4213/tmf643}].
-\bibitem{Mry94} Mryglod I.M., Tokarchuk M.V., Condens. Matter Phys., 1994, \textbf{3},
- 116--133, \doi{10.5488/CMP.3.116}.
-\bibitem{Sta11} Stasyuk I.V., Velychko O.V., Condens. Matter Phys., 2011, \textbf{14},
- No.~1, 13004 (14 pages), \doi{10.5488/CMP.14.13004}.
-\bibitem{Sta04} Stasyuk I.V., Mysakovych T.S., Preprint of the Institute for Condensed
- Matter Physics, ICMP--04--12U, Lviv, 2004, (in Ukrainian).
-\bibitem{Scient2012} Mryglod O., Kenna R., Holovatch Yu., Berche B., Scientometrics, 2013,
- \doi{10.1007/s11192-012-0874-7}, (in press).
-\bibitem{Abr64} Abramovitz M., Stegun I.A. (Eds.), Handbook of Mathematical Functions with
- Formulas, Graphs, and Mathematical Tables, National Bureau of Standards Applied
- Mathematics Series, Vol.~55, U.S. Government Printing Office, Washington, D.C., 1964.
-\bibitem{Olver64} Olver F.W.J., In: Handbook of Mathematical Functions with Formulas,
- Graphs, and Mathematical Tables, National Bureau of Standards Applied Mathematics
- Series, Vol.~55, Abramovitz M., Stegun I.A. (Eds.), U.S. Government Printing Office,
- Washington, D.C., 1964, 355--434.
-\bibitem{Yuk87} Yukhnovkii I.R., Idzyk I.M., Kolomiets V.O., In: Proceedings of the
- Conference ``Modern Problems of Statistical Physics'' (Lviv, 1987), Vol.~2, Naukova
- Dumka, Kiev, 1987, 97--102, (in Russian).
-\bibitem{Shv04} Shvaika A.M., Vorobyov O., Freericks J.K., Devereaux T.P.,Preprint
- \arxiv{cond-mat/0408400}, 2004.
-\bibitem{url2} {EOSDIS} {W}orldview. {C}ity {L}ights,
- URL~\url{https://earthdata.nasa.gov/labs/worldview/?map=-24.484375,14.05078125,50.75,62.14453125&products=baselayers.VIIRS_CityLights_2012~overlays.sedac_bound&switch=geographic}.
-\bibitem{han12} Han Y., Kida T., Ikeda M., Hagiwara M., Stre\v{c}ka J., Honda Z.,
- (unpublished).
+ \bibitem{Zub74}
+ Zubarev~D.~N., Nonequilibrium Statistical Thermodynamics, Consultants Bureau,
+ New-York, 1974.
+ \bibitem{Bus89}
+ Bussmann-Holder~A., Simon~A., B\"uttner~H., Phys. Rev. B, 1989, \textbf{39},
+ 207--214, \doi{10.1103/PhysRevB.39.207}.
+ \bibitem{Mel00}
+ Melnyk~R.~S., Patsahan~O.~V., Theor. Math. Phys., 2000, \textbf{124}, No.~2,
+ 1145--1156, \doi{10.1007/BF02551084}, [Teor. Mat. Fiz., 2000, \textbf{124},
+ No.~2, 339--352 (in Russian), \bibdoi{10.4213/tmf643}].
+ \bibitem{Mry94}
+ Mryglod~I.~M., Tokarchuk~M.~V., Condens. Matter Phys., 1994, \textbf{3},
+ 116--133, \doi{10.5488/CMP.3.116}.
+ \bibitem{Sta11}
+ Stasyuk~I.~V., Velychko~O.~V., Condens. Matter Phys., 2011, \textbf{14}, No.~1,
+ 13004 (14 pages), \doi{10.5488/CMP.14.13004}.
+ \bibitem{Sta04}
+ Stasyuk~I.~V., Mysakovych~T.~S., Preprint of the Institute for Condensed Matter
+ Physics, ICMP--04--12U, Lviv, 2004, (in Ukrainian).
+ \bibitem{Padova2010}
+ De~Padova~P., Quaresima~C., Ottaviani~C., Sheverdyaeva~P.~M., Moras~P.,
+ Carbone~C., Topwal~D., Olivieri~B., Kara~A., Oughaddou~H., Aufray~B.,
+ Le~Lay~G., Appl. Phys. Lett., 2010, \textbf{96}, No.~26, 261905,
+ \doi{10.1063/1.3459143}.
+ \bibitem{Scient2012}
+ Mryglod~O., Kenna~R., Holovatch~{\relax Yu}., Berche~B., Scientometrics, 2013,
+ \doi{10.1007/s11192-012-0874-7}, (in press).
+ \bibitem{Abr64}
+ Abramovitz~M., Stegun~I.~A. (Eds.), Handbook of Mathematical Functions with
+ Formulas, Graphs, and Mathematical Tables, National Bureau of Standards
+ Applied Mathematics Series, Vol.~55, U.S. Government Printing Office,
+ Washington, D.C., 1964.
+ \bibitem{Olver64}
+ Olver~F. W.~J., In: Handbook of Mathematical Functions with Formulas, Graphs,
+ and Mathematical Tables, National Bureau of Standards Applied Mathematics
+ Series, Vol.~55, Abramovitz~M., Stegun~I.~A. (Eds.), U.S. Government
+ Printing Office, Washington, D.C., 1964, 355--434.
+ \bibitem{Yuk87}
+ Yukhnovkii~I.~R., Idzyk~I.~M., Kolomiets~V.~O., In: Proceedings of the
+ Conference ``Modern Problems of Statistical Physics'' (Lviv, 1987), Vol.~2,
+ Naukova Dumka, Kiev, 1987, 97--102, (in Russian).
+ \bibitem{Shv04}
+ Shvaika~A.~M., Vorobyov~O., Freericks~J.~K., Devereaux~T.~P., Preprint
+ \arxiv{cond-mat/0408400}, 2004.
+ \bibitem{url2}
+ {EOSDIS} {W}orldview. {C}ity {L}ights,
+ URL \url{http://earthdata.nasa.gov/labs/worldview/?map=-24.484375,14.05078125,50.75,62.14453125&products=baselayers.VIIRS_CityLights_2012~overlays.sedac_bound&switch=geographic}.
+ \bibitem{wiki:xxx}
+ Wikipedia, Ellipsoidal coordinates --- {W}ikipedia{,} the free encyclopedia,
+ 2016, [Online; accessed 10-Jan-2017],
+ URL \url{https://en.wikipedia.org/w/index.php?title=Ellipsoidal_coordinates&oldid=722351999}.
+ \bibitem{han12}
+ Han~Y., Kida~T., Ikeda~M., Hagiwara~M., Stre\v{c}ka~J., Honda~Z.,
+ (unpublished).
\end{thebibliography}
\end{verbatim}
}
@@ -741,23 +773,21 @@ working in the fields of physics and mathematics. However, even so
brilliant tool becomes useless without necessary level of knowledge.
A lot of useful (and free) information one can find at
``\TeX{} Users Group'' web site
-\\ [1ex]
-\centerline{\texttt{\url{https://www.tug.org/}}.}
-
-\smallskip
+\begin{center}
+ \texttt{\url{http://www.tug.org/}}.
+\end{center}
``The Not So Short Introduction to \LaTeXe{}'' by Tobias Oetiker is an
absolutely necessary book for beginners:
-\\ [1ex]
-\centerline{\texttt{\url{https://ctan.org/pkg/lshort}}}
-\\ [1ex]
+\begin{center}
+ \texttt{\url{http://ctan.org/tex-archive/info/lshort/}}
+\end{center}
(available in a variety of languages including Ukrainian). Ukrainian
\TeX{}nicians will find a plenty of language-specific information
at Andrij Shvaika's ``\TeX{} \& Ukrainian'' Web-page
-\\ [1ex]
-\centerline{\texttt{\url{http://ph.icmp.lviv.ua/~ashv/tex/TeXandUkrainian.html}}.}
-
-\smallskip
+\begin{center}
+ \texttt{\url{http://ph.icmp.lviv.ua/~ashv/tex/TeXandUkrainian.html}}.
+\end{center}
Remember, you write \LaTeX{} sources not for computers only,
@@ -770,59 +800,84 @@ Frequently good physicists (especially young scientists) have a
little knowledge how to write a good looking article. As
comprehensive (and free) tutorials on the subject one can mention
%``IOP Style Guide''
-%\\ [1ex]
-%\centerline{\texttt{\url{https://www.iop.org/websupport/file_53266.pdf}},}
-%\\ [1ex]
+%\begin{center}
+% \texttt{\url{http://www.iop.org/websupport/file_53266.pdf}}
+%\end{center}
``Physical Review Style and Notation Guide''
-\\ [1ex]
-\centerline{\texttt{\url{https://publish.aps.org/files/styleguide-pr.pdf}},}
-\\ [1ex]
+\begin{center}
+ \texttt{\url{http://publish.aps.org/files/styleguide-pr.pdf}}
+\end{center}
and ``Reviews of Modern Physics Style Guide''
-\\ [1ex]
-\centerline{\texttt{\url{https://rmp.aps.org/files/rmpguide.pdf}}}
-\\ [1ex]
+\begin{center}
+ \texttt{\url{http://rmp.aps.org/files/rmpguide.pdf}}
+\end{center}
Remember: ``\textit{Ignorantia non est argumentum}'' and
``\textit{Scientia potentia est}''!
%% Type in your references using {thebibliography} environment
-%% or create them from your bibtex database using cmpj.bst style (experimental).
-
-%\bibliographystyle{cmpj}
-%\bibliography{cmpjxampl}
+%% or create them from your bibtex database using cmpj.bst style.
+
+\bibliographystyle{cmpj}
+\bibliography{cmpjxampl}
+
+%\begin{thebibliography}{10}
+% \bibitem{Zub74}
+% Zubarev~D.~N., Nonequilibrium Statistical Thermodynamics, Consultants Bureau,
+% New-York, 1974.
+% \bibitem{Bus89}
+% Bussmann-Holder~A., Simon~A., B\"uttner~H., Phys. Rev. B, 1989, \textbf{39},
+% 207--214, \doi{10.1103/PhysRevB.39.207}.
+% \bibitem{Mel00}
+% Melnyk~R.~S., Patsahan~O.~V., Theor. Math. Phys., 2000, \textbf{124}, No.~2,
+% 1145--1156, \doi{10.1007/BF02551084}, [Teor. Mat. Fiz., 2000, \textbf{124},
+% No.~2, 339--352 (in Russian), \bibdoi{10.4213/tmf643}].
+% \bibitem{Mry94}
+% Mryglod~I.~M., Tokarchuk~M.~V., Condens. Matter Phys., 1994, \textbf{3},
+% 116--133, \doi{10.5488/CMP.3.116}.
+% \bibitem{Sta11}
+% Stasyuk~I.~V., Velychko~O.~V., Condens. Matter Phys., 2011, \textbf{14}, No.~1,
+% 13004 (14 pages), \doi{10.5488/CMP.14.13004}.
+% \bibitem{Sta04}
+% Stasyuk~I.~V., Mysakovych~T.~S., Preprint of the Institute for Condensed Matter
+% Physics, ICMP--04--12U, Lviv, 2004, (in Ukrainian).
+% \bibitem{Padova2010}
+% De~Padova~P., Quaresima~C., Ottaviani~C., Sheverdyaeva~P.~M., Moras~P.,
+% Carbone~C., Topwal~D., Olivieri~B., Kara~A., Oughaddou~H., Aufray~B.,
+% Le~Lay~G., Appl. Phys. Lett., 2010, \textbf{96}, No.~26, 261905,
+% \doi{10.1063/1.3459143}.
+% \bibitem{Scient2012}
+% Mryglod~O., Kenna~R., Holovatch~{\relax Yu}., Berche~B., Scientometrics, 2013,
+% \doi{10.1007/s11192-012-0874-7}, (in press).
+% \bibitem{Abr64}
+% Abramovitz~M., Stegun~I.~A. (Eds.), Handbook of Mathematical Functions with
+% Formulas, Graphs, and Mathematical Tables, National Bureau of Standards
+% Applied Mathematics Series, Vol.~55, U.S. Government Printing Office,
+% Washington, D.C., 1964.
+% \bibitem{Olver64}
+% Olver~F. W.~J., In: Handbook of Mathematical Functions with Formulas, Graphs,
+% and Mathematical Tables, National Bureau of Standards Applied Mathematics
+% Series, Vol.~55, Abramovitz~M., Stegun~I.~A. (Eds.), U.S. Government
+% Printing Office, Washington, D.C., 1964, 355--434.
+% \bibitem{Yuk87}
+% Yukhnovkii~I.~R., Idzyk~I.~M., Kolomiets~V.~O., In: Proceedings of the
+% Conference ``Modern Problems of Statistical Physics'' (Lviv, 1987), Vol.~2,
+% Naukova Dumka, Kiev, 1987, 97--102, (in Russian).
+% \bibitem{Shv04}
+% Shvaika~A.~M., Vorobyov~O., Freericks~J.~K., Devereaux~T.~P., Preprint
+% \arxiv{cond-mat/0408400}, 2004.
+% \bibitem{url2}
+% {EOSDIS} {W}orldview. {C}ity {L}ights,
+% URL \url{http://earthdata.nasa.gov/labs/worldview/?map=-24.484375,14.05078125,50.75,62.14453125&products=baselayers.VIIRS_CityLights_2012~overlays.sedac_bound&switch=geographic}.
+% \bibitem{wiki:xxx}
+% Wikipedia, Ellipsoidal coordinates --- {W}ikipedia{,} the free encyclopedia,
+% 2016, [Online; accessed 10-Jan-2017],
+% URL \url{https://en.wikipedia.org/w/index.php?title=Ellipsoidal_coordinates&oldid=722351999}.
+% \bibitem{han12}
+% Han~Y., Kida~T., Ikeda~M., Hagiwara~M., Stre\v{c}ka~J., Honda~Z.,
+% (unpublished).
+%\end{thebibliography}
-\begin{thebibliography}{10}
-\bibitem{Zub74} Zubarev D.N., Nonequilibrium Statistical Thermodynamics, Consultants Bureau,
- New-York, 1974.
-\bibitem{Bus89} Bussmann-Holder A., Simon A., B\"uttner H., Phys. Rev. B, 1989, \textbf{39},
- 207--214, \doi{10.1103/PhysRevB.39.207}.
-\bibitem{Mel00} Melnyk R.S., Patsahan O.V., Theor. Math. Phys., 2000, \textbf{124}, No.~2,
- 1145--1156, \doi{10.1007/BF02551084}, [Teor. Mat. Fiz., 2000, \textbf{124}, No.~2,
- 339--352 (in Russian), \doi{10.4213/tmf643}].
-\bibitem{Mry94} Mryglod I.M., Tokarchuk M.V., Condens. Matter Phys., 1994, \textbf{3},
- 116--133, \doi{10.5488/CMP.3.116}.
-\bibitem{Sta11} Stasyuk I.V., Velychko O.V., Condens. Matter Phys., 2011, \textbf{14},
- No.~1, 13004 (14 pages), \doi{10.5488/CMP.14.13004}.
-\bibitem{Sta04} Stasyuk I.V., Mysakovych T.S., Preprint of the Institute for Condensed Matter
- Physics, ICMP--04--12U, Lviv, 2004, (in Ukrainian).
-\bibitem{Scient2012} Mryglod O., Kenna R., Holovatch Yu., Berche B., Scientometrics, 2013,
- \doi{10.1007/s11192-012-0874-7}, (in press).
-\bibitem{Abr64} Abramovitz M., Stegun I.A. (Eds.), Handbook of Mathematical Functions with
- Formulas, Graphs, and Mathematical Tables, National Bureau of Standards Applied
- Mathematics Series, Vol.~55, U.S. Government Printing Office, Washington, D.C., 1964.
-\bibitem{Olver64} Olver F.W.J., In: Handbook of Mathematical Functions with Formulas, Graphs,
- and Mathematical Tables, National Bureau of Standards Applied Mathematics Series, Vol.~55,
- Abramovitz M., Stegun I.A. (Eds.), U.S. Government Printing Office, Washington, D.C.,
- 1964, 355--434.
-\bibitem{Yuk87} Yukhnovkii I.R., Idzyk I.M., Kolomiets V.O., In: Proceedings of the
- Conference ``Modern Problems of Statistical Physics'' (Lviv, 1987), Vol.~2, Naukova Dumka,
- Kiev, 1987, 97--102, (in Russian).
-\bibitem{Shv04} Shvaika A.M., Vorobyov O., Freericks J.K., Devereaux T.P., Preprint
- \arxiv{cond-mat/0408400}, 2004.
-\bibitem{url2} {EOSDIS} {W}orldview. {C}ity {L}ights,
- URL~\url{https://earthdata.nasa.gov/labs/worldview/?map=-24.484375,14.05078125,50.75,62.14453125&products=baselayers.VIIRS_CityLights_2012~overlays.sedac_bound&switch=geographic}.
-\bibitem{han12} Han Y., Kida T., Ikeda M., Hagiwara M., Stre\v{c}ka J., Honda Z., (unpublished).
-\end{thebibliography}
%
%% If you have problems with typesetting in ukrainian uncomment lines below.
@@ -833,7 +888,7 @@ Remember: ``\textit{Ignorantia non est argumentum}'' and
\ukrainianpart
\title{ : }
-\author{.. \refaddr{label1,label2}, .. \refaddr{label2}}
+\author{. . \refaddr{label1,label2}, . . \refaddr{label2}}
\addresses{
\addr{label1} . , , 10041 , . , 1
\addr{label2} . , , 20451 , . г, 2
@@ -858,7 +913,7 @@ Remember: ``\textit{Ignorantia non est argumentum}'' and
,
(\emph{
}).
-[Thor~A.U. et al., Condens. Matter Phys., 2004, \textbf{7}, 111].
+[Thor~A.~U., et al., Condens. Matter Phys., 2004, \textbf{7}, 111].
150~. .
.
diff --git a/macros/latex/contrib/easybook/doc/chapter1.tex b/macros/latex/contrib/easybook/doc/chapter1.tex
index d11d88a969..1d15512317 100644
--- a/macros/latex/contrib/easybook/doc/chapter1.tex
+++ b/macros/latex/contrib/easybook/doc/chapter1.tex
@@ -40,7 +40,6 @@
\end{subnumcases}
\zhlipsum*[57][name = aspirin]
-\vfill{\small\doclicenseThis}
\clearpage
\section{插图}
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index 8354c965ff..294969ee65 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index 234e9dd482..616abff281 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -13,8 +13,7 @@
color = seaside,
% multoc = true,
% withpart = true,
- % perpart = true,
- perpage = true,
+ footwith = page,
% notomath = false,
rulewidth = 0.75pt,
% uppercase = false,
@@ -94,11 +93,11 @@
\title{\sffamily easybook书籍文档类}
\author
{
- 瞿毅\thanks{texeasybook@foxmail.com.} \\
+ 瞿毅\thanks{quee123@foxmail.com.} \\
\url{https://latexstudio.net} \\
\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/03/17\hskip\ccwd\relax v1.23t}
+\date{2021/03/18\hskip\ccwd\relax v1.23u}
\frontmatter[roman]
\maketitle
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index ae23b7ad64..9346232eb7 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index d11b30abfc..e894992e1a 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -1,11 +1,11 @@
-%\iffalse meta-comment
+% \iffalse meta-comment
%
-%Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+% Copyright (C) 2021 by Qu Yi <quee123@foxmail.com>
%
-%This work may be distributed and/or modified under the
-%conditions of the CC-BY 4.0 License.
-%The latest version of this license is in
-% https://creativecommons.org/licenses/by/4.0/legalcode
+% This work may be distributed and/or modified under the
+% conditions of the CC-BY 4.0 License.
+% The latest version of this license is in
+% https://creativecommons.org/licenses/by/4.0/legalcode
%<*driver>
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
@@ -17,7 +17,7 @@
\askforoverwritefalse
%
\preamble
-Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+Copyright (C) 2021 by Qu Yi <quee123@foxmail.com>
This work may be distributed and/or modified under the
conditions of the CC-BY 4.0 License.
@@ -37,7 +37,6 @@ The latest version of this license is in
\expandafter\endgroup
\fi
%</driver>
-\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<*driver>
\documentclass{ctxdoc}
\OnlyDescription
@@ -48,723 +47,740 @@ The latest version of this license is in
\PrintIndex
\end{document}
%</driver>
-%\fi
-%
-%\changes{v1.20}{2021/01/09}{修改和完善用户文档。}
-%\changes{v1.20}{2021/01/09}{模板更改为使用CC-BY许可协议。}
-%
-%\CheckSum{0}
-%
-%\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 \~}
-%
-%\title{\sffamily easybook书籍文档类}
-%\author{瞿毅}
-%\date{2021/03/17\hskip\ccwd\relax v1.23t\thanks{\url{https://gitee.com/texl3/easybook}}}
-%\maketitle
-%\begin{abstract}
-% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
-%\end{abstract}
-%\tableofcontents
-%
-%\begin{documentation}
-%\section{编译方式}
-%模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
-%\begin{itemize}
-% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
-% \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
-% \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
-%\end{itemize}
-%
-%\subsection{编译步骤}
-%\begin{frameverb}
-% xelatex -shell-escape easybook-demo
-% bibtex easybook-demo
-% makeindex easybook-demo
-% xelatex -shell-escape easybook-demo
-% xelatex -shell-escape easybook-demo
-%\end{frameverb}
-%
-%需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
-%\begin{frameverb}
-% LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
-%\end{frameverb}
-%
-%\subsection{字体设置}
-%\label{subsec:font settings}
-%默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
-%
-%如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
-%\begin{ctexexam}
-% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
-% \setCJKsansfont{SimHei}
-% \setCJKmonofont{FangSong}
-%\end{ctexexam}
-%
-%\section{文档类选项}
-%\label{sec:document class options}
-%标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
-%\begin{itemize}
-% \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
-% \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
-%\end{itemize}
-%
-%\begin{function}[rEXP,added = 2021-01-05]{draft}
-%开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
-%\end{function}
-%
-%\begin{function}[rEXP,added = 2021-01-05]{newline}
-%章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
-%\begin{flushleft}\sffamily\LARGE
-% Chapter 1\vskip 1.3pc
-% This is a title
-%\end{flushleft}
-%\end{function}
-%
-%\begin{function}[rEXP,added = 2021-01-05]{entitle}
-%部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
-%\end{function}
-%\begin{function}[rEXP,added = 2021-01-05]{english}
-%使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
-%\end{function}
-%\begin{function}[rEXP,added = 2021-01-05]{enstyle}
-%同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
-%\end{function}
-%
-%\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
-%\begin{syntax}
-% font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
-%\end{syntax}
-%传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
-%\changes{v1.21}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
-%\end{function}
-%
-%\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
-%\begin{syntax}
-% paper = <(a4paper)|b5paper|letterpaper|...>
-%\end{syntax}
-%设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
-%\end{function}
-%
-%\subsection{article 风格}
-%\begin{function}[rEXP,added = 2021-03-16]{class}
-%\begin{syntax}
-% class = <(book)|article>
-%\end{syntax}
-%设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
-%\changes{v1.23t}{2021/03/16}{增加 article 文章风格,可用于短篇幅的文章。}
-%\end{function}
-%
-%\subsection{文档命令}
-%\label{subsec:document command}
-%\begin{function}[added = 2021-02-20,updated = 2021-03-15]{\frontmatter,\mainmatter,\backmatter,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
-%\begin{syntax}
-% \tn{frontmatter*}\oarg{编号格式|(Roman)}
-% \tn{mainmatter*}
-% \tn{backmatter}
-% \tn{tableofcontents}\oarg{键值列表}
-% \tn{listoffigures*}\oarg{键值列表}
-% \tn{listoftables*}\oarg{键值列表}
-% \tn{listoflistings*}\oarg{键值列表}
-%\end{syntax}
-%\tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
-%\changes{v1.23t}{2021/02/20}{重新定义文档结构划分命令。}
-%\end{function}
-%
-%\begin{function}{multoc,book,article}
-%\begin{syntax}
-% multoc = <true|(false)>
-%\end{syntax}
-%\opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
-%\changes{v1.23t}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
-%\end{function}
-%
-%\section{接口选项}
-%\begin{function}[added = 2021-01-05]{\ctexset}
-%\begin{syntax}
-% \tn{ctexset}\marg{键值列表}
-%\end{syntax}
-%\cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
-%\end{function}
-%
-%\begin{function}[EXP,added = 2021-01-08]{config}
-%\begin{syntax}
-% config = <配置文件名>
-%\end{syntax}
-%\opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
-%\changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
-%\end{function}
-%
-%\subsection{风格}
-%\begin{function}[EXP,added = 2021-01-05,updated = 2021-03-15]{style/...,color,multoc,withpart,perpart,perpage,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{style/...}
-% color = <(none)|seaside|energy|cyberpunk>
-% multoc = <true|(false)>
-% withpart = <true|(false)>
-% perpart = <true|(false)>
-% perpage = <true|(false)>
-% notomath = <(true)|false>
-% rulewidth = <(0.75pt)>
-% uppercase = <(true)|false>
-% figure-sep = <(.)>
-% table-sep = <(.)>
-% listing-sep = <(.)>
-% equation-sep = <(.)>
-% number-sep = <(.)>
-%\end{syntax}
-%\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-%\changes{v1.23t}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-%\changes{v1.23t}{2021/02/09}{增加控制页面横线粗细的选项。}
-%\changes{v1.23t}{2021/03/15}{增加控制编号连接符的选项。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
-% \begin{function}{ctex@frame,ctex@emph,ctex@verb}
-% \begin{syntax}
-% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
-% \end{syntax}
-% 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
-% \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
-% \end{function}
-% \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
-% \item[withpart] 使章跟随每一部分编号,默认不跟随。
-% \item[perpart] 使脚注跟随每一部分编号,默认不跟随。
-% \item[perpage] 使脚注跟随每一页编号,默认不跟随。
-% \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
-% \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
-% \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
-% \item[figure-sep] 图片标题编号的连接符。
-% \item[table-sep] 表格标题编号的连接符。
-% \item[listing-sep] 代码标题编号的连接符。
-% \item[equation-sep] 公式编号的连接符。
-% \item[number-sep] 统一设置所有编号的连接符。
-%\end{optdesc}
-%
-%\subsection{超链接}
-%\label{subsec:hyperlinks}
-%\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/...,hyperlink,linkcolor,linktopage}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{link/...}
-% hyperlink = <(edge)|various|none>
-% linkcolor = <(fresh)|cutepink|skyblue|crimson>
-% linktopage = <true|(false)>
-%\end{syntax}
-%\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
-% \item[linkcolor] 超链接颜色样式。
-% \begin{function}{ctex@link,ctex@url,ctex@cite}
-% \begin{syntax}
-% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
-% \end{syntax}
-% 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
-% \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
-% \end{function}
-% \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
-%\end{optdesc}
-%
-%\subsection{行距}
-%\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{spread/...,line,table,math,caption,footnote}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{link/...}
-% line = <(1.3)>
-% table = <(1.05)>
-% math = <(1.05)>
-% caption = <(1)>
-% footnote = <(1)>
-%\end{syntax}
-%行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
-%\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-%\changes{v1.23t}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[line] 正文行距。
-% \item[table] 表格行距。
-% \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
-% \item[caption] 图表代码标题行距。
-% \item[footnote] 脚注行距。
-%\end{optdesc}
-%
-%\subsection{其它字体}
-%\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{elsefont/...,table-cap,figure-cap,listing-cap,footnote,marginpart}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{elsefont/...}
-% table-cap = <\tn{sffamily}\tn{small}>
-% figure-cap = <\tn{sffamily}\tn{small}>
-% listing-cap = <\tn{sffamily}\tn{small}>
-% footnote = <\tn{rmfamily}>
-% marginpart = <\tn{rmfamily}\tn{footnotesize}>
-%\end{syntax}
-%\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-%\changes{v1.23t}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[table-cap] 表格标题的字体设置。
-% \item[figure-cap] 图片标题的字体设置。
-% \item[listing-cap] 代码标题的字体设置。
-% \item[footnote] 脚注的字体设置,请不要使用字号命令。
-% \item[marginpar] 边注的字体设置。
-%\end{optdesc}
-%
-%\subsection{参考文献}
-%\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{bibset/...,backend,bib-style,cite-style,bibfile}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{bibset/...}
-% backend = <(bibtex)|biblatex>
-% bib-style = <(numerical)|authoryear|其它格式>
-% cite-style = <标注风格>
-% bibfile = <refs.bib>
-%\end{syntax}
-%\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-%\changes{v1.23t}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
-% \item[bib-style] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
-% \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
-% \item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个以 \opt{refs.bib} 命名的文件。
-%\end{optdesc}
-%
-%\begin{function}[added = 2021-01-11,updated = 2021-03-15]{\printbibliography}
-%\begin{syntax}
-% \tn{printbibliography}\oarg{键值列表}
-%\end{syntax}
-%两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
-%\end{function}
-%
-%\begin{function}{heading,title}
-%\begin{syntax}
-% heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
-% title = <参考文献标题名>
-%\end{syntax}
-%\opt{heading} 为参考文献标题的处理方式,\opt{bibliography} 选项以 \opt{chapter} 级别输出参考文献,不加进目录,\opt{subbibliography} 选项以 \opt{section} 级别输出参考文献,不加进目录,\opt{bibintoc} 选项以 \opt{chapter} 级别输出参考文献,加进目录,\opt{subbibintoc} 选项以 \opt{section} 级别输出参考文献,加进目录。\opt{title} 选项覆盖由 \opt{heading} 选项提供的缺省标题名。除此之外其他支持选项可见 \pkg{biblatex} 宏包说明文档。
-%\end{function}
-%
-%\subsection{定理样式}
-%\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/...,thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{thmset/...}
-% thmbox = <true|(false)>
-% numberwith = <(chapter)|section|其它环境|空置>
-% headpunct = <(未设置)>
-% bodyfont = <(未设置)>
-% notefont = <(未设置)>
-% headfont = <(\tn{color}\marg{ctex@emph}\tn{sffamily})>
-% headindent = <(0\tn{ccwd})>
-% spaceabove = <(0.75ex plus .1ex)>
-% spacebelow = <(0.75ex plus .1ex)>
-% spacepost = <(\tn{ccwd})>
-%\end{syntax}
-%\changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[thmbox] 开启定理及习题环境的盒子边框。
-% \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
-% \item[headpunct] 定理标题后的标记。
-% \item[bodyfont] 定理内容部分的字体。
-% \item[notefont] 定理标题内容的字体。
-% \item[headfont] 定理类型标题名的字体。
-% \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
-% \item[spaceabove] 定理环境前的间距。
-% \item[spacebelow] 定理环境后的间距。
-% \item[spacepost] 定理标题后与内容的间距。
-%\end{optdesc}
-%
-%\begin{function}[added = 2021-01-12,updated = 2021-03-13]{\newtheorem, \declaretheoremstyle}
-%\begin{syntax}
-% \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
-% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
-%\end{syntax}
-%\changes{v1.23t}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-%\end{function}
-%
-%\begin{optdesc}
-% \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令 \tn{declaretheorem} 的参数一致。常用的选项如下
-% \begin{description}
-% \item[name] 定理的标题。默认值是环境的名称,并且首字母大写(英文标题)。
-% \item[numbered] 值为 \opt{no}、\opt{yes} 或 \opt{unless unique}。定理将被编号,而不是编号,或者只有在文档中多次出现时才被编号。
-% \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
-% \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
-% \end{description}
-% \item[\tn{declaretheoremstyle}] 定义新的定理样式,可选参数中除了包括上述定理样式选项,还包括 \tn{newtheorem} 的选项。
-%\end{optdesc}
-%
-%\subsubsection{新的定理样式}
-%定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
-%\begin{ctexexam}
-% \newtheorem[style = mythm,name = 定理名]{定理环境名}
-%\end{ctexexam}
-%若要给定理环境增加边框,可以如下进行设置
-%\begin{ctexexam}
-% \tcolorboxenvironment{定理环境名}{thmsty}
-%\end{ctexexam}
-%定义一个新的定理样式可用于 \tn{newtheorem} 的 \opt{style} 选项。
-%\begin{ctexexam}
-% \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
-%\end{ctexexam}
-%
-%\subsection{页面边距}
-%\begin{function}[EXP,added = 2021-01-13]{geoset/...,left,top,hmargin,textwidth,includehead,...}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{geoset/...}
-% left = <长度>
-% top = <长度>
-% hmargin = \marg{左边距,右边距}
-% textwidth = <长度>
-% includehead = <true|(false)>
-%\end{syntax}
-%\opt{geoset} 将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
-%\begin{ctexexam}
-% \ctexset
-% {
-% geoset =
-% {
-% top = 2.5cm,
-% bottom = 2.5cm,
-% left = 3.2cm,
-% right = 3.2cm
-% }
-% }
-%\end{ctexexam}
-%\changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
-%\end{function}
-%
-%\subsection{页眉页脚}
-%\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/...,head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
-%\begin{syntax}
-% 以下选项路径为 \tn{ctexset}\marg{hdrset/...}
-% head-foot = <页眉页脚中的内容>
-% chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
-% sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
-% headrule = <页眉横线格式>
-% footrule = <页脚横线格式>
-% footnoterule = <脚注横线格式>
-%\end{syntax}
-%\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
-%\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
-%\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-%\changes{v1.23t}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-%\changes{v1.23t}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
-%\end{function}
-%
-%\begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
-%\begin{syntax}
-% \tn{easyhead}\oarg{位置}\marg{内容}
-% \tn{easyfoot}\oarg{位置}\marg{内容}
-%\end{syntax}
-%命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,它们用于 \opt{head-foot} 选项中,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
-%\begin{ctexexam}
-% \ctexset
-% {
-% hdrset =
-% {
-% head-foot =
-% {
-% \easyhead[ER]{\leftmark}
-% \easyhead[OL]{\rightmark}
-% \easyhead[EL,OR]{\textbf{\thepage}}
-% },
-% sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
-% headrule = {\hrule width \textwidth height 1pt}
-% }
-% }
-%\end{ctexexam}
-%\end{function}
-%
-%\subsection{目录样式}
-%\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{tocset/.../format,tocset/.../indent,tocset/.../rule,lists/lolskip,lists/belowoffset,tocset/belowoffset}
-%\begin{syntax}
-% format = <目录标题格式>
-% indent = <目录标题左边缩进>
-% rule = <目录引导线样式>
-% lolskip = <(0.8pc)>
-% lists/belowoffset = <(0pc)>
-% belowoffset = <(-1pc)>
-%\end{syntax}
-%\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。
-%
-%\opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8pc。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。\opt{lists} 中的 \opt{belowoffset} 意义类似,但是一般为正值,在 \opt{lolskip = 0pc} 时使用。建议 \opt{lolskip + lists/format/addvspace = -belowoffset}。
-%\changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
-%\end{function}
-%
-%\begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
-%\begin{syntax}
-% \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
-%\end{syntax}
-%\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
-%\begin{ctexexam}
-% \ctexset
-% {
-% tocset =
-% {
-% chapter =
-% {
-% format = \addvspace{8pt}\large,
-% indent = 1.5\ccwd,
-% rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
-% }
-% }
-% }
-%\end{ctexexam}
-%\end{function}
-%
-%\section{常用环境}
-%
-%\subsection{公式}
-%\begin{function}[added = 2021-01-05]{equation,multline,gather,align}
-%\begin{syntax}
-% \tn{begin}\marg{环境名}
-% \tn{item} <行间公式>
-% \tn{end}\marg{环境名}
-%\end{syntax}
-%\opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
-%\end{function}
-%
-%\subsection{列表}
-%\begin{function}[added = 2021-01-05]{enumerate,itemize,description}
-%\begin{syntax}
-% \tn{begin}\marg{环境名}\oarg{键值列表}
-% \tn{item} <列表内容>
-% \tn{end}\marg{环境名}
-%\end{syntax}
-%\pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
-%\begin{ctexexam}
-% \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
-% \begin{itemize}[label = \textbullet]
-% \begin{description}[font = \sffamily\bfseries,style = nextline]
-%\end{ctexexam}
-%\end{function}
-%
-%\subsubsection{排序列表}
-%\label{subsec:sort list}
-%使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
-%\begin{ctexexam}
-% \begin{enumerate*}[(a)]
-% \begin{enumerate}[\bfseries{Item} I]
-%\end{ctexexam}
-%
-%\subsubsection{常规列表}
-%使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
-%
-%用$\star$取代默认的符号
-%\begin{ctexexam}
-% \begin{itemize*}[$\star$]
-% \begin{itemize}[$\star$]
-%\end{ctexexam}
-%
-%\subsubsection{主题列表}
-%使用 \opt{description} 环境可创建带有主题词的列表。
-%\begin{ctexexam}
-% \begin{description}
-% \item[主题一] 内容一
-% \item[主题二] 内容二
-% \end{description}
-%\end{ctexexam}
-%
-%\subsection{定理}
-%\begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
-%\begin{syntax}
-% \tn{begin}\marg{环境名}
-% <定理内容>
-% \tn{end}\marg{环境名}
-%\end{syntax}
-%这些是预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。
-%\end{function}
-%
-%\subsection{习题}
-%\label{subsec:exercise}
-%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
-%\begin{syntax}
-% \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
-% \tn{item} <习题内容>
-% \tn{end}\marg{exercise}
-%\end{syntax}
-%习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
-%\begin{ctexexam}
-% \begin{exercise}[LightYellow][1.][习题]
-% \item 习题内容
-% \item 习题内容
-% \end{exercise}
-%\end{ctexexam}
-%\changes{v1.23t}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
-%\end{function}
-%
-%\subsection{盒子}
-%盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
-%
-%\subsubsection{摘要盒子}
-%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
-%\begin{syntax}
-% \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
-% \tn{item} <摘要内容>
-% \tn{end}\marg{outline}
-%\end{syntax}
-%摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
-%\begin{ctexexam}
-% \begin{outline}[标题名称]
-% \item 摘要内容
-% \item 摘要内容
-% \end{outline}
-%\end{ctexexam}
-%\end{function}
-%
-%\subsubsection{段落盒子}
-%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
-%\begin{syntax}
-% \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
-% <盒子内容>
-% \tn{end}\marg{mybox}
-%\end{syntax}
-%环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
-%\begin{ctexexam}
-% \begin{mybox}*[段落标题][MintCream]
-% 盒子内容
-% \tcblower % 盒子上下部分分界线
-% 盒子内容
-% \end{mybox}
-%\end{ctexexam}
-%\end{function}
-%
-%\subsubsection{行内盒子}
-%\begin{function}[added = 2021-03-13]{\concise,\fuzzy}
-%\begin{syntax}
-% \tn{concise}\oarg{颜色名}\marg{内容}\oarg{配置选项}
-% \tn{fuzzy}\oarg{颜色名}\marg{内容}\oarg{配置选项}
-%\end{syntax}
-%设置了两个参数选项相同的行内盒子,盒子 \opt{concise} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{fuzzy} 也是抄录盒子,具有模糊边缘类似高亮的效果。
-%\end{function}
-%
-%\section{其它用法}
-%
-%\subsection{代码}
-%\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
-%\begin{syntax}
-% \tn{lstinline}\oarg{键值列表}\marg{行内代码}
-% \tn{begin}\marg{lstlisting}\oarg{键值列表}
-% <行间代码>
-% \tn{end}\marg{lstlisting}
-%\end{syntax}
-%加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。
-%\end{function}
-%
-%\subsection{物理量}
-%\begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
-%\begin{syntax}
-% \tn{num}\oarg{选项}\marg{数字}
-% \tn{si}\oarg{选项}\marg{单位}
-% \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
-% \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
-%\end{syntax}
-%\pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
-%\begin{ctexexam}
-% \num{-21x.3e5}
-% \si{mL.min^{-1}}
-% \SI{5}{\mole}
-% \SIrange[unit-color = green]{1.5}{4}{kg}
-%\end{ctexexam}
-%\end{function}
-%
-%\subsection{化学式}
-%\begin{function}[added = 2021-01-05]{\ch,\chemfig}
-%\begin{syntax}
-% \tn{ch}\oarg{选项}\marg{输入}
-% \tn{chemfig}\oarg{键值列表}\marg{分子代码}
-%\end{syntax}
-%除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
-%\end{function}
-%
-%\subsection{引用}
-%\begin{function}[added = 2021-01-05]{\cref}
-% \begin{syntax}
-% \tn{cref}\marg{标签}
-% \end{syntax}
-%使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
-%\end{function}
-%
-%\subsubsection{索引}
-%\begin{function}[added = 2021-01-05]{\index,\printindex}
-%\begin{syntax}
-% \tn{index}\marg{标签}
-% \tn{printindex}\oarg{索引名}
-%\end{syntax}
-%使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
-%\end{function}
-%
-%\subsubsection{自定义脚注}
-%\begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
-%\begin{syntax}
-% \tn{Footnote}\marg{标记}\marg{插入文本}
-% \tn{Footnotetext}\marg{标记}\marg{插入文本}
-% \tn{Footnotemark}\marg{标记}
-%\end{syntax}
-%自定义标记且不影响正常编号的脚注命令。
-%\begin{ctexexam}
-% \Footnote{*}{这是可以自定义标记的脚注。}
-%\end{ctexexam}
-%\end{function}
-%
-%\subsubsection{边注}
-%\begin{function}[added = 2021-01-05]{\marginnote}
-%\begin{syntax}
-% \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
-%\end{syntax}
-%命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
-%\end{function}
-%
-%\subsection{插入文档}
-%\begin{function}[added = 2021-03-14]{\includepdf}
-%\begin{syntax}
-% \tn{includepdf}\oarg{键值列表}\marg{文档名}
-%\end{syntax}
-%该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
-%\end{function}
-%
-%\subsection{横向页面}
-%\begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
-%\begin{syntax}
-% \tn{begin}\marg{环境名}\oarg{位置}
-% <插入图片或表格>
-% \tn{end}\marg{环境名}
-%\end{syntax}
-%该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
-%\end{function}
-%
-%\subsection{指定行距的段落}
-%\begin{function}[added = 2021-03-14]{spacing}
-%\begin{syntax}
-% \tn{begin}\marg{spacing}\marg{浮点数}
-% <段落内容>
-% \tn{end}\marg{spacing}
-%\end{syntax}
-%该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
-%\end{function}
-%\end{documentation}
-%
-%\StopEventually{}
+% \fi
+%
+% \changes{v1.20}{2021/01/09}{修改和完善用户文档。}
+% \changes{v1.20}{2021/01/09}{模板更改为使用 CC-BY 许可协议。}
+% \changes{v1.23u}{2021/03/18}{修复在 \pkg{ctex} v2.5.6 更新后 \cls{easybook} 与 \pkg{hyperref} 冲突问题。}
+%
+% \CheckSum{0}
+%
+% \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 \~}
+%
+% \title{\sffamily easybook书籍文档类}
+% \author{瞿毅}
+% \date{2021/03/18\hskip\ccwd\relax v1.23u\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \maketitle
+% \begin{abstract}
+% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
+% \end{abstract}
+% \tableofcontents
+%
+% \begin{documentation}
+% \section{编译方式}
+% 模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
+% \begin{itemize}
+% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
+% \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
+% \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
+% \end{itemize}
+%
+% \subsection{编译步骤}
+% \begin{frameverb}
+% xelatex -shell-escape easybook-demo
+% bibtex easybook-demo
+% makeindex easybook-demo
+% xelatex -shell-escape easybook-demo
+% xelatex -shell-escape easybook-demo
+% \end{frameverb}
+%
+% 需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
+% \begin{frameverb}
+% LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
+% \end{frameverb}
+%
+% \subsection{字体设置}
+% \label{subsec:font settings}
+% 默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
+%
+% 如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
+% \begin{ctexexam}
+% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
+% \setCJKsansfont{SimHei}
+% \setCJKmonofont{FangSong}
+% \end{ctexexam}
+%
+% \section{文档类选项}
+% \label{sec:document class options}
+% 标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
+% \begin{itemize}
+% \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
+% \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
+% \end{itemize}
+%
+% \begin{function}[rEXP,added = 2021-01-05]{draft}
+% 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
+% \end{function}
+%
+% \begin{function}[rEXP,added = 2021-01-05]{newline}
+% 章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
+% \begin{flushleft}\sffamily\LARGE
+% Chapter 1\vskip 1.3pc
+% This is a title
+% \end{flushleft}
+% \end{function}
+%
+% \begin{function}[rEXP,added = 2021-01-05]{entitle}
+% 部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
+% \end{function}
+% \begin{function}[rEXP,added = 2021-01-05]{english}
+% 使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
+% \end{function}
+% \begin{function}[rEXP,added = 2021-01-05]{enstyle}
+% 同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
+% \end{function}
+%
+% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
+% \begin{syntax}
+% font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
+% \end{syntax}
+% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
+% \changes{v1.21}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
+% \end{function}
+%
+% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
+% \begin{syntax}
+% paper = <(a4paper)|b5paper|letterpaper|...>
+% \end{syntax}
+% 设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
+% \end{function}
+%
+% \subsection{article 模式}
+% \begin{function}[rEXP,added = 2021-03-16]{class}
+% \begin{syntax}
+% class = <(book)|article>
+% \end{syntax}
+% 设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
+% \changes{v1.23u}{2021/03/16}{增加 article 文章模式,可用于短篇幅的文章。}
+% \end{function}
+%
+% \subsection{文档命令}
+% \label{subsec:document command}
+% \begin{function}[added = 2021-02-20,updated = 2021-03-15]{\frontmatter,\mainmatter,\backmatter,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
+% \begin{syntax}
+% \tn{frontmatter*}\oarg{编号格式|(Roman)}
+% \tn{mainmatter*}
+% \tn{backmatter}
+% \tn{tableofcontents}\oarg{键值列表}
+% \tn{listoffigures*}\oarg{键值列表}
+% \tn{listoftables*}\oarg{键值列表}
+% \tn{listoflistings*}\oarg{键值列表}
+% \end{syntax}
+% \tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
+% \changes{v1.23u}{2021/02/20}{重新定义文档结构划分命令。}
+% \end{function}
+%
+% \begin{function}{multoc,book,article}
+% \begin{syntax}
+% multoc = <true|(false)>
+% \end{syntax}
+% \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
+% \changes{v1.23u}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
+% \end{function}
+%
+% \section{接口选项}
+% \begin{function}[added = 2021-01-05]{\ctexset}
+% \begin{syntax}
+% \tn{ctexset}\marg{键值列表}
+% \end{syntax}
+% \cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
+% \end{function}
+%
+% \begin{function}[EXP,added = 2021-01-08]{config}
+% \begin{syntax}
+% config = <配置文件名>
+% \end{syntax}
+% \opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
+% \changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
+% \end{function}
+%
+% \subsection{风格}
+% \begin{function}[EXP,added = 2021-01-05,updated = 2021-03-18]{color,multoc,withpart,footwith,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
+% \begin{syntax}
+% color = <(none)|seaside|energy|cyberpunk>
+% multoc = <true|(false)>
+% withpart = <true|(false)>
+% footwith = <part|(chapter)|page>
+% notomath = <(true)|false>
+% rulewidth = <(0.75pt)>
+% uppercase = <(true)|false>
+% figure-sep = <(.)>
+% table-sep = <(.)>
+% listing-sep = <(.)>
+% equation-sep = <(.)>
+% number-sep = <(.)>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{style/...}
+% \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
+% \changes{v1.23u}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+% \changes{v1.23u}{2021/02/09}{增加控制页面横线粗细的选项。}
+% \changes{v1.23u}{2021/03/15}{增加控制编号连接符的选项。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
+% \begin{function}{ctex@frame,ctex@emph,ctex@verb}
+% \begin{syntax}
+% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
+% \end{syntax}
+% 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
+% \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
+% \end{function}
+% \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式。
+% \item[withpart] 使章跟随每一部分编号,默认不跟随。
+% \item[footwith] 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从1开始。
+% \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
+% \item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
+% \item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
+% \item[figure-sep] 图片标题编号的连接符。
+% \item[table-sep] 表格标题编号的连接符。
+% \item[listing-sep] 代码标题编号的连接符。
+% \item[equation-sep] 公式编号的连接符。
+% \item[number-sep] 统一设置所有编号的连接符。
+% \end{optdesc}
+%
+% \subsection{超链接}
+% \label{subsec:hyperlinks}
+% \begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{hyperlink,linkcolor,linktopage}
+% \begin{syntax}
+% hyperlink = <(edge)|various|none>
+% linkcolor = <(fresh)|cutepink|skyblue|crimson>
+% linktopage = <true|(false)>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{link/...}
+% \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
+% \item[linkcolor] 超链接颜色样式。
+% \begin{function}{ctex@link,ctex@url,ctex@cite}
+% \begin{syntax}
+% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
+% \end{syntax}
+% 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
+% \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
+% \end{function}
+% \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
+% \end{optdesc}
+%
+% \subsection{行距}
+% \begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{line,table,math,caption,footnote}
+% \begin{syntax}
+% line = <(1.3)>
+% table = <(1.05)>
+% math = <(1.05)>
+% caption = <(1)>
+% footnote = <(1)>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{spread/...} \\
+% 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
+% \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
+% \changes{v1.23u}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[line] 正文行距。
+% \item[table] 表格行距。
+% \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
+% \item[caption] 图表代码标题行距。
+% \item[footnote] 脚注行距。
+% \end{optdesc}
+%
+% \subsection{其它字体}
+% \begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{table-cap,figure-cap,listing-cap,footnote,marginpart}
+% \begin{syntax}
+% table-cap = <\tn{sffamily}\tn{small}>
+% figure-cap = <\tn{sffamily}\tn{small}>
+% listing-cap = <\tn{sffamily}\tn{small}>
+% footnote = <\tn{rmfamily}>
+% marginpart = <\tn{rmfamily}\tn{footnotesize}>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{elsefont/...}
+% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
+% \changes{v1.23u}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[table-cap] 表格标题的字体设置。
+% \item[figure-cap] 图片标题的字体设置。
+% \item[listing-cap] 代码标题的字体设置。
+% \item[footnote] 脚注的字体设置,请不要使用字号命令。
+% \item[marginpar] 边注的字体设置。
+% \end{optdesc}
+%
+% \subsection{参考文献}
+% \begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{backend,bib-style,cite-style,bibfile}
+% \begin{syntax}
+% backend = <(bibtex)|biblatex>
+% bib-style = <(numerical)|authoryear|其它格式>
+% cite-style = <标注风格>
+% bibfile = <refs.bib>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{bibset/...}
+% \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
+% \changes{v1.23u}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
+% \item[bib-style] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。
+% \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(数字上标标注,默认)或 \opt{numbers}(数字标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。
+% \item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个以 \opt{refs.bib} 命名的文件。
+% \end{optdesc}
+%
+% \begin{function}[added = 2021-01-11,updated = 2021-03-15]{\printbibliography}
+% \begin{syntax}
+% \tn{printbibliography}\oarg{键值列表}
+% \end{syntax}
+% 两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
+% \end{function}
+%
+% \begin{function}{heading,title}
+% \begin{syntax}
+% heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
+% title = <参考文献标题名>
+% \end{syntax}
+% \opt{heading} 为参考文献标题的处理方式,\opt{bibliography} 选项以 \opt{chapter} 级别输出参考文献,不加进目录,\opt{subbibliography} 选项以 \opt{section} 级别输出参考文献,不加进目录,\opt{bibintoc} 选项以 \opt{chapter} 级别输出参考文献,加进目录,\opt{subbibintoc} 选项以 \opt{section} 级别输出参考文献,加进目录。\opt{title} 选项覆盖由 \opt{heading} 选项提供的缺省标题名。除此之外其他支持选项可见 \pkg{biblatex} 宏包说明文档。
+% \end{function}
+%
+% \subsection{定理样式}
+% \begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
+% \begin{syntax}
+% thmbox = <true|(false)>
+% numberwith = <(chapter)|section|其它环境|空置>
+% headpunct = <(未设置)>
+% bodyfont = <(未设置)>
+% notefont = <(未设置)>
+% headfont = <(\tn{color}\marg{ctex@emph}\tn{sffamily})>
+% headindent = <(0\tn{ccwd})>
+% spaceabove = <(0.75ex plus .1ex)>
+% spacebelow = <(0.75ex plus .1ex)>
+% spacepost = <(\tn{ccwd})>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{thmset/...}
+% \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[thmbox] 开启定理及习题环境的盒子边框。
+% \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
+% \item[headpunct] 定理标题末尾后的标记,在换行符或第一段内容的间隔之前。
+% \item[bodyfont] 定理内容部分的字体。
+% \item[notefont] 定理副标题内容的字体。
+% \item[headfont] 定理种类标题名的字体。
+% \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
+% \item[spaceabove] 定理环境前的间距。
+% \item[spacebelow] 定理环境后的间距。
+% \item[spacepost] 定理标题后与第一段内容的间隔。
+% \end{optdesc}
+%
+% \begin{function}[added = 2021-01-12,updated = 2021-03-13]{\newtheorem, \declaretheoremstyle}
+% \begin{syntax}
+% \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
+% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
+% \end{syntax}
+% 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。
+% \changes{v1.23u}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+% \end{function}
+%
+% \begin{optdesc}
+% \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令 \tn{declaretheorem} 的参数一致。常用的选项如下
+% \begin{description}
+% \item[name] 定理的标题。默认值是环境的名称,并且首字母大写(英文标题)。
+% \item[numbered] 值为 \opt{no}、\opt{yes} 或 \opt{unless unique}。定理将被编号,而不是编号,或者只有在文档中多次出现时才被编号。
+% \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
+% \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
+% \end{description}
+% \item[\tn{declaretheoremstyle}] 定义新的定理样式,可选参数中除了包括上述定理样式选项,还包括 \tn{newtheorem} 的选项。
+% \end{optdesc}
+%
+% \subsubsection{新的定理样式}
+% 定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
+% \begin{ctexexam}
+% \newtheorem[style = mythm,name = 定理名]{定理环境名}
+% \end{ctexexam}
+% 若要给定理环境增加边框,可以如下进行设置
+% \begin{ctexexam}
+% \tcolorboxenvironment{定理环境名}{thmsty}
+% \end{ctexexam}
+% 定义一个新的定理样式可用于 \tn{newtheorem} 的 \opt{style} 选项。
+% \begin{ctexexam}
+% \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
+% \end{ctexexam}
+%
+% \subsection{页面边距}
+% \begin{function}[EXP,added = 2021-01-13]{left,top,hmargin,textwidth,includehead}
+% \begin{syntax}
+% left = <长度>
+% top = <长度>
+% hmargin = \marg{左边距,右边距}
+% textwidth = <长度>
+% includehead = <true|(false)>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{geoset/...} \\
+% \opt{geoset} 将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,上面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
+% \begin{ctexexam}
+% \ctexset
+% {
+% geoset =
+% {
+% top = 2.5cm,
+% bottom = 2.5cm,
+% left = 3.2cm,
+% right = 3.2cm
+% }
+% }
+% \end{ctexexam}
+% \changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
+% \end{function}
+%
+% \subsection{页眉页脚}
+% \begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
+% \begin{syntax}
+% head-foot = <页眉页脚中的内容>
+% chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
+% sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
+% headrule = <页眉横线格式>
+% footrule = <页脚横线格式>
+% footnoterule = <脚注横线格式>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
+% \opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
+% \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
+% \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
+% \changes{v1.23u}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+% \changes{v1.23u}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+% \end{function}
+%
+% \begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
+% \begin{syntax}
+% \tn{easyhead}\oarg{位置}\marg{内容}
+% \tn{easyfoot}\oarg{位置}\marg{内容}
+% \end{syntax}
+% 命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,它们用于 \opt{head-foot} 选项中,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
+% \begin{ctexexam}
+% \ctexset
+% {
+% hdrset =
+% {
+% head-foot =
+% {
+% \easyhead[ER]{\leftmark}
+% \easyhead[OL]{\rightmark}
+% \easyhead[EL,OR]{\textbf{\thepage}}
+% },
+% sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
+% headrule = {\hrule width \textwidth height 1pt}
+% }
+% }
+% \end{ctexexam}
+% \end{function}
+%
+% \subsection{目录样式}
+% \begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{format,indent,rule}
+% \begin{syntax}
+% format = <目录标题格式>
+% indent = <目录标题左边缩进>
+% rule = <目录引导线样式>
+% \end{syntax}
+% \ding{229} 以上选项路径为 \opt{tocset/(level)/...} \\
+% \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{level} 代表 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录样式设置,其中 \opt{lists} 为图片、表格和代码目录样式的级别。
+%
+% \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。
+% \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
+% \end{function}
+%
+% \begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{lists/lolskip,lists/belowoffset,tocset/belowoffset}
+% \begin{syntax}
+% lolskip = <(0.8pc)>
+% belowoffset = <(0pc)>
+% belowoffset = <(-1pc)>
+% \end{syntax}
+% \opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 \opt{article} 模式中此选项失效。\opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似,但是一般为正值,可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。
+% \end{function}
+%
+% \begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
+% \begin{syntax}
+% \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
+% \end{syntax}
+% \tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
+% \begin{ctexexam}
+% \ctexset
+% {
+% tocset =
+% {
+% chapter =
+% {
+% format = \addvspace{8pt}\large,
+% indent = 1.5\ccwd,
+% rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
+% }
+% }
+% }
+% \end{ctexexam}
+% \end{function}
+%
+% \section{常用环境}
+%
+% \subsection{公式}
+% \begin{function}[added = 2021-01-05]{equation,multline,gather,align}
+% \begin{syntax}
+% \tn{begin}\marg{环境名}
+% \tn{item} <行间公式>
+% \tn{end}\marg{环境名}
+% \end{syntax}
+% \opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
+% \end{function}
+%
+% \subsection{列表}
+% \begin{function}[added = 2021-01-05]{enumerate,itemize,description}
+% \begin{syntax}
+% \tn{begin}\marg{环境名}\oarg{键值列表}
+% \tn{item} <列表内容>
+% \tn{end}\marg{环境名}
+% \end{syntax}
+% \pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
+% \begin{ctexexam}
+% \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
+% \begin{itemize}[label = \textbullet]
+% \begin{description}[font = \sffamily\bfseries,style = nextline]
+% \end{ctexexam}
+% \end{function}
+%
+% \subsubsection{排序列表}
+% \label{subsec:sort list}
+% 使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样
+% \begin{ctexexam}
+% \begin{enumerate*}[(a)]
+% \begin{enumerate}[\bfseries{Item} I]
+% \end{ctexexam}
+%
+% \subsubsection{常规列表}
+% 使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
+%
+% 用$\star$取代默认的符号
+% \begin{ctexexam}
+% \begin{itemize*}[$\star$]
+% \begin{itemize}[$\star$]
+% \end{ctexexam}
+%
+% \subsubsection{主题列表}
+% 使用 \opt{description} 环境可创建带有主题词的列表。
+% \begin{ctexexam}
+% \begin{description}
+% \item[主题一] 内容一
+% \item[主题二] 内容二
+% \end{description}
+% \end{ctexexam}
+%
+% \subsection{定理}
+% \label{subsec:theorem}
+% \begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
+% \begin{syntax}
+% \tn{begin}\marg{环境名}
+% <定理内容>
+% \tn{end}\marg{环境名}
+% \end{syntax}
+% 这些是已预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。环境名对应的定理标题名如下
+% \begin{center}
+% \begin{tabular}{*{8}{c}}
+% \toprule
+% theorem & definition & lemma & corollary & proposition & example & remark & prooof \\
+% 定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明 \\
+% \bottomrule
+% \end{tabular}
+% \end{center}
+% \end{function}
+%
+% \subsection{习题}
+% \label{subsec:exercise}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
+% \begin{syntax}
+% \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
+% \tn{item} <习题内容>
+% \tn{end}\marg{exercise}
+% \end{syntax}
+% 习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
+% \begin{ctexexam}
+% \begin{exercise}[LightYellow][1.][习题]
+% \item 习题内容
+% \item 习题内容
+% \end{exercise}
+% \end{ctexexam}
+% \changes{v1.23u}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+% \end{function}
+%
+% \subsection{盒子}
+% 盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
+%
+% \subsubsection{摘要盒子}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
+% \begin{syntax}
+% \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
+% \tn{item} <摘要内容>
+% \tn{end}\marg{outline}
+% \end{syntax}
+% 摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
+% \begin{ctexexam}
+% \begin{outline}[标题名称]
+% \item 摘要内容
+% \item 摘要内容
+% \end{outline}
+% \end{ctexexam}
+% \end{function}
+%
+% \subsubsection{段落盒子}
+% \begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
+% \begin{syntax}
+% \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
+% <盒子内容>
+% \tn{end}\marg{mybox}
+% \end{syntax}
+% 环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
+% \begin{ctexexam}
+% \begin{mybox}*[段落标题][MintCream]
+% 盒子内容
+% \tcblower % 盒子上下部分分界线
+% 盒子内容
+% \end{mybox}
+% \end{ctexexam}
+% \end{function}
+%
+% \subsubsection{行内盒子}
+% \begin{function}[added = 2021-03-13]{\concise,\fuzzy}
+% \begin{syntax}
+% \tn{concise}\oarg{颜色名}\marg{内容}\oarg{配置选项}
+% \tn{fuzzy}\oarg{颜色名}\marg{内容}\oarg{配置选项}
+% \end{syntax}
+% 设置了两个参数选项相同的行内盒子,盒子 \opt{concise} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{fuzzy} 也是抄录盒子,具有模糊边缘类似高亮的效果。
+% \end{function}
+%
+% \section{其它用法}
+%
+% \subsection{代码}
+% \begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
+% \begin{syntax}
+% \tn{lstinline}\oarg{键值列表}\marg{行内代码}
+% \tn{begin}\marg{lstlisting}\oarg{键值列表}
+% <行间代码>
+% \tn{end}\marg{lstlisting}
+% \end{syntax}
+% 加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。
+% \end{function}
+%
+% \subsection{物理量}
+% \begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
+% \begin{syntax}
+% \tn{num}\oarg{选项}\marg{数字}
+% \tn{si}\oarg{选项}\marg{单位}
+% \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
+% \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
+% \end{syntax}
+% \pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
+% \begin{ctexexam}
+% \num{-21x.3e5}
+% \si{mL.min^{-1}}
+% \SI{5}{\mole}
+% \SIrange[unit-color = green]{1.5}{4}{kg}
+% \end{ctexexam}
+% \end{function}
+%
+% \subsection{化学式}
+% \begin{function}[added = 2021-01-05]{\ch,\chemfig}
+% \begin{syntax}
+% \tn{ch}\oarg{选项}\marg{输入}
+% \tn{chemfig}\oarg{键值列表}\marg{分子代码}
+% \end{syntax}
+% 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
+% \end{function}
+%
+% \subsection{引用}
+% \begin{function}[added = 2021-01-05]{\cref}
+% \begin{syntax}
+% \tn{cref}\marg{标签}
+% \end{syntax}
+% 使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
+% \end{function}
+%
+% \subsubsection{索引}
+% \begin{function}[added = 2021-01-05]{\index,\printindex}
+% \begin{syntax}
+% \tn{index}\marg{标签}
+% \tn{printindex}\oarg{索引名}
+% \end{syntax}
+% 使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
+% \end{function}
+%
+% \subsubsection{自定义脚注}
+% \begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
+% \begin{syntax}
+% \tn{Footnote}\marg{标记}\marg{插入文本}
+% \tn{Footnotetext}\marg{标记}\marg{插入文本}
+% \tn{Footnotemark}\marg{标记}
+% \end{syntax}
+% 自定义标记且不影响正常编号的脚注命令。
+% \begin{ctexexam}
+% \Footnote{*}{这是可以自定义标记的脚注。}
+% \end{ctexexam}
+% \end{function}
+%
+% \subsubsection{边注}
+% \begin{function}[added = 2021-01-05]{\marginnote}
+% \begin{syntax}
+% \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
+% \end{syntax}
+% 命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
+% \end{function}
+%
+% \subsection{插入文档}
+% \begin{function}[added = 2021-03-14]{\includepdf}
+% \begin{syntax}
+% \tn{includepdf}\oarg{键值列表}\marg{文档名}
+% \end{syntax}
+% 该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
+% \end{function}
+%
+% \subsection{横向页面}
+% \begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
+% \begin{syntax}
+% \tn{begin}\marg{环境名}\oarg{位置}
+% <插入图片或表格>
+% \tn{end}\marg{环境名}
+% \end{syntax}
+% 该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
+% \end{function}
+%
+% \subsection{指定行距的段落}
+% \begin{function}[added = 2021-03-14]{spacing}
+% \begin{syntax}
+% \tn{begin}\marg{spacing}\marg{浮点数}
+% <段落内容>
+% \tn{end}\marg{spacing}
+% \end{syntax}
+% 该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
+% \end{function}
+% \end{documentation}
+%
+% \StopEventually{}
%<*class>
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/17}{1.23t}{}
+\ProvidesExplClass{easybook}{2021/03/18}{1.23u}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -816,9 +832,9 @@ The latest version of this license is in
paper/unknown .code:n = {\PassOptionsToPackage{#1}{geometry}},
paper .initial:n = a4paper,
- oneside .value_forbidden:n = true,
- twoside .value_forbidden:n = true,
- oneside .code:n =
+ oneside .value_forbidden:n = true,
+ twoside .value_forbidden:n = true,
+ oneside .code:n =
{
\bool_set_false:N \l__page_twoside_bool
\__put_ctexbook:n {oneside}
@@ -850,17 +866,17 @@ The latest version of this license is in
{most}{tcolorbox},
{xindy}{imakeidx},
{CJKmath = true}{xeCJK},
- {no-math}{fontspec}
+ {no-math}{fontspec},
+ {noto,upint}{newtxmath}
}{\PassOptionsToPackage#1}
\__put_ctexbook:n {\g__options_clist}
\LoadClass[UTF8]{ctexbook}
\bool_new:N \l__multoc_bool
-\bool_new:N \l__chap_withpart_bool
-\bool_new:N \l__foot_perpart_bool
-\bool_new:N \l__foot_perpage_bool
\bool_new:N \l__notomath_bool
\bool_new:N \l__uppercase_bool
+\bool_new:N \l__chap_withpart_bool
+\tl_new:N \l__foot_numberwith_tl
\tl_new:N \g__config_tl
\ctex_define:n
@@ -880,35 +896,37 @@ The latest version of this license is in
}
\__ctex_define:nn {style}
{
- multoc .bool_set:N = \l__multoc_bool,
- multoc .default:n = true,
- withpart .bool_set:N = \l__chap_withpart_bool,
- withpart .default:n = true,
- withpart .initial:n = false,
- perpart .bool_set:N = \l__foot_perpart_bool,
- perpart .default:n = true,
- perpart .initial:n = false,
- perpage .bool_set:N = \l__foot_perpage_bool,
- perpage .default:n = true,
- perpage .initial:n = false,
- notomath .bool_set:N = \l__notomath_bool,
- notomath .default:n = true,
- notomath .initial:n = true,
- rulewidth .dim_set:N = \l__rule_width_dim,
- rulewidth .initial:n = 0.75pt,
- uppercase .bool_set:N = \l__uppercase_bool,
- uppercase .default:n = true,
- uppercase .initial:n = true,
- figure-sep .tl_set:N = \l__figure_separator_tl,
- table-sep .tl_set:N = \l__table_separator_tl,
- listing-sep .tl_set:N = \l__lstlisting_separator_tl,
- equation-sep .tl_set:N = \l__equation_separator_tl,
- number-sep .meta:n =
+ multoc .bool_set:N = \l__multoc_bool,
+ multoc .default:n = true,
+ withpart .bool_set:N = \l__chap_withpart_bool,
+ withpart .default:n = true,
+ withpart .initial:n = false,
+ footwith .choice:,
+ footwith .value_required:n = true,
+ footwith/part .code:n =
+ {\tl_set:Nn \l__foot_numberwith_tl{#1}},
+ footwith/page .code:n =
+ {\tl_set:Nn \l__foot_numberwith_tl{#1}},
+ footwith/chapter .code:n = {},
+ footwith .initial:n = chapter,
+ notomath .bool_set:N = \l__notomath_bool,
+ notomath .default:n = true,
+ notomath .initial:n = true,
+ rulewidth .dim_set:N = \l__rule_width_dim,
+ rulewidth .initial:n = 0.75pt,
+ uppercase .bool_set:N = \l__uppercase_bool,
+ uppercase .default:n = true,
+ uppercase .initial:n = true,
+ figure-sep .tl_set:N = \l__figure_separator_tl,
+ table-sep .tl_set:N = \l__table_separator_tl,
+ listing-sep .tl_set:N = \l__lstlisting_separator_tl,
+ equation-sep .tl_set:N = \l__equation_separator_tl,
+ number-sep .meta:n =
{
figure-sep = {#1},table-sep = {#1},
listing-sep = {#1},equation-sep = {#1}
},
- number-sep .initial:n = {.}
+ number-sep .initial:n = {.}
}
\RequirePackage
@@ -928,19 +946,9 @@ The latest version of this license is in
tcolorbox,
imakeidx
}
-\RequirePackage[
- lang = {chinese-utf8},
- type = {CC},
- modifier = {by},
- version = {4.0}
- ]{doclicense}
\ctex_at_end_preamble:n
{
- \bool_if:NT \l__notomath_bool
- {
- \RequirePackage[noto,upint]{newtxmath}
- \RequirePackage{bm}
- }
+ \bool_if:NT \l__notomath_bool{\RequirePackage{newtxmath,bm}}
\tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}}
}
@@ -1084,15 +1092,15 @@ The latest version of this license is in
\cs_gset_eq:NN \easypagestyle\fancypagestyle
\__ctex_define:nn {hdrset}
{
- head-foot .tl_set:N = \l__fancyhf_content_tl,
- head-foot .initial:n =
+ head-foot .tl_set:N = \l__fancyhf_content_tl,
+ head-foot .initial:n =
{
\easyhead[EC]{\color{ctex@frame}\kaishu\leftmark}
\easyhead[OC]{\color{ctex@frame}\kaishu\rightmark}
\easyhead[EL,OR]{\color{ctex@frame}\thepage}
},
- chap-mark .tl_set:N = \l__fancyhf_chap_mark_tl,
- chap-mark .initial:n =
+ chap-mark .tl_set:N = \l__fancyhf_chap_mark_tl,
+ chap-mark .initial:n =
{
\int_compare:nT {\c@secnumdepth > -1}
{
@@ -1103,8 +1111,8 @@ The latest version of this license is in
\fi
}
},
- sec-mark .tl_set:N = \l__fancyhf_sec_mark_tl,
- sec-mark .initial:n =
+ sec-mark .tl_set:N = \l__fancyhf_sec_mark_tl,
+ sec-mark .initial:n =
{
\int_compare:nT {\c@secnumdepth > 0}
{
@@ -1872,9 +1880,9 @@ The latest version of this license is in
\__ctex_define:nn {bibset}
{
- backend .choice:,
- backend/bibtex .code:n = {},
- backend/biblatex .code:n =
+ backend .choice:,
+ backend/bibtex .code:n = {},
+ backend/biblatex .code:n =
{\bool_set_false:N \l__backend_bibtex_bool},
bib-style .choice:,
@@ -1893,10 +1901,10 @@ The latest version of this license is in
{\tl_set_eq:NN \l__bib_otherstyle_tl\l_keys_value_tl},
bib-style .initial:n = numerical,
- cite-style .code:n =
+ cite-style .code:n =
{\tl_set:Nn \l__bib_citestyle_tl{#1}},
- bibfile .tl_set:N = \l__bib_file_tl,
- bibfile .initial:n = refs.bib
+ bibfile .tl_set:N = \l__bib_file_tl,
+ bibfile .initial:n = refs.bib
}
\cs_new_protected:Npn \__bibtex_set:
@@ -1983,12 +1991,12 @@ The latest version of this license is in
{\cs_gset:Npn \hangfootparindent{2\ccwd}}
\bool_if:NT \l__chap_withpart_bool
{\counterwithin*{chapter}{part}}
- \bool_if:NT \l__foot_perpart_bool
+ \tl_if_eq:NnT \l__foot_numberwith_tl{part}
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{part}
}
- \bool_if:NT \l__foot_perpage_bool
+ \tl_if_eq:NnT \l__foot_numberwith_tl{page}
{
\counterwithout*{footnote}{chapter}
\counterwithin*{footnote}{page}
@@ -2134,12 +2142,11 @@ The latest version of this license is in
\ctex_at_end_preamble:n
{
- \RequirePackage[pdfstartview = FitH,bookmarksnumbered]{hyperref}
- \RequirePackage{cleveref}
+ \RequirePackage{hyperref,cleveref}
\urlstyle{same}
- \exp_args:NV \hypersetup\l__hyperref_clist
\__allow_urlbreak:
-
+ \ctex_hypersetup:n {pdfstartview = FitH,bookmarksnumbered}
+ \exp_args:NV \hypersetup\l__hyperref_clist
\bool_if:NTF \l__lang_chinese_bool
{
\keys_set_known:nn {ctex}
@@ -2264,5 +2271,5 @@ The latest version of this license is in
}
}
%</class>
-%\Finale
+% \Finale
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/fontsize/fontsize.dtx b/macros/latex/contrib/fontsize/fontsize.dtx
index a7a75d6db6..a471f4c5ca 100644
--- a/macros/latex/contrib/fontsize/fontsize.dtx
+++ b/macros/latex/contrib/fontsize/fontsize.dtx
@@ -56,16 +56,14 @@ This work has the LPPL maintenance status "author-maintained".
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{fontsize}
%<*package>
- [2021/03/04 v0.8 'fontsize' package. Set main font sizes (Ivan Valbusa)]
+ [2021/03/14 v0.8.1 'fontsize' package. Set main font sizes (Ivan Valbusa)]
%</package>
%<*driver>
\documentclass[12pt]{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
-\usepackage[fontsize=12pt]{fontsize}
-\usepackage{array,booktabs,tabu}
-\usepackage{siunitx}
-\usepackage{multicol}
+\usepackage{fontsize}
+ \changefontsize[13.7]{11.7}
%--------------------------------------------------------
% GRAPHICS
%--------------------------------------------------------
@@ -117,6 +115,13 @@ This work has the LPPL maintenance status "author-maintained".
\usepackage[autostyle]{csquotes}
\usepackage[style=philosophy-classic]{biblatex}
\addbibresource{fontsize.bib}
+\usepackage{array}
+\usepackage{booktabs}
+\usepackage{tabu}
+\usepackage{siunitx}
+\usepackage{multicol}
+\usepackage{longtable}
+\usepackage{caption}
%--------------------------------------------------------
% COMMANDS AND ENVIRONMENTS
%--------------------------------------------------------
@@ -169,6 +174,73 @@ This work has the LPPL maintenance status "author-maintained".
\end{multicols}}
\makeatother
%
+% Commands for table 1 and 2
+%
+\ExplSyntaxOn
+\NewExpandableDocumentCommand{\getsize}{O{5}m}
+{
+ \fp_eval:n { round(#2,#1) }
+}
+\ExplSyntaxOff
+\makeatletter
+\def\tabfontsize{\fontsize{12}{14}\selectfont}
+\def\fs@getsize#1{%
+ \edef\fs@value{%
+ \SI[
+ detect-all = true,
+ round-mode = places,
+ round-precision = 2,
+ round-integer-to-decimal
+ ]{\getsize[2]{#1}}{}%
+ }%
+ \tabfontsize%
+ \fs@value%
+}
+\newcommand{\tabrowone}[1]{%
+ \tabfontsize
+ \texttt{\symbol{92}#1}
+ &
+ \changefontsize[9.6]{8}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[10.2]{8.5}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[10.8]{9}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[11.4]{9.5}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[12]{10}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[12.6]{10.5}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[13.2]{11}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[13.8]{11.5}\csname#1\endcsname\fs@getsize{\f@size} &
+ \changefontsize[14,4]{12}\csname#1\endcsname\fs@getsize{\f@size}
+ \\*
+ \rowfont{\color{black!70}}
+ &
+ \changefontsize[9.6]{8}\csname#1\endcsname\fs@getsize{\baselineskip} &
+ \changefontsize[10.2]{8.5}\csname#1\endcsname\fs@getsize{\baselineskip} &
+ \changefontsize[10.8]{9}\csname#1\endcsname\fs@getsize{\baselineskip} &
+ \changefontsize[11.4]{9.5}\csname#1\endcsname\fs@getsize{\baselineskip} &
+ \changefontsize[12]{10}\csname#1\endcsname\fs@getsize{\baselineskip} &
+ \changefontsize[12.6]{10.5}\csname#1\endcsname\fs@getsize{\baselineskip}&
+ \changefontsize[13.2]{11}\csname#1\endcsname\fs@getsize{\baselineskip} &
+ \changefontsize[13.8]{11.5}\csname#1\endcsname\fs@getsize{\baselineskip}&
+ \changefontsize[14.4]{12}\csname#1\endcsname\fs@getsize{\baselineskip}
+}
+
+\newcommand{\tabrowtwo}[2]{%
+ \tabfontsize
+ \texttt{\symbol{92}#1}#2
+ &
+ \changefontsize[12]{10.0}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.1}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.2}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.3}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.4}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.5}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.6}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.7}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.8}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{10.9}\fs@getsize{\csname#1\endcsname} &
+ \changefontsize[12]{11}\fs@getsize{\csname#1\endcsname}
+}
+\makeatother
+%
% Commands for code
%
\def\baddition{\color{DarkBlue}}
@@ -196,7 +268,7 @@ This work has the LPPL maintenance status "author-maintained".
%</driver>
% \fi
%
-% \CheckSum{3128}
+% \CheckSum{3064}
%
% \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
@@ -215,6 +287,8 @@ This work has the LPPL maintenance status "author-maintained".
% Right brace \} Tilde \~}
%
%
+% \changes{v0.8.1}{2021/03/14}{New \cmd{sampletext} command.
+% Some lengths are now defined via \sty{xfp} package. Removed \cmd{headheight} definition. Updated documentation.}
% \changes{v0.8}{2021/03/04}{Corrected a bug occuring when the line spacing is grater than \SI{163.84}{pt}.}
% \changes{v0.7}{2021/02/10}{New font sizing commands \cmd{HUGE}, \cmd{HUGEr}, \cmd{HUGErr}, \cmd{HUGErrr}. Changed default name for the \file{.clo} file to \opt{fontsize}. Updated documentation.}
% \changes{v0.6}{2021/02/06}{New font sizing commands from \cmd{small} down. Updated documentation.}
@@ -345,7 +419,7 @@ This work has the LPPL maintenance status "author-maintained".
%^^A---------------------------------------------------------------------
% \section{Usage}
%^^A---------------------------------------------------------------------
-% \enlargethispage{\baselineskip}
+%^^A \enlargethispage{\baselineskip}
%
% The package can be loaded, as usual, with:
% \begin{ttquote}
@@ -365,9 +439,16 @@ This work has the LPPL maintenance status "author-maintained".
%
% Sets the normal size to \meta{fontsize} and the normal line spacing
% to 1.2\meta{fontsize}. The other sizes (\cmd{tiny}, \cmd{scriptsize},
-% \cmd{small}, ecc.) and line spacings are set proportionally.
+% ecc.) and line spacings are set proportionally.
% You can use any unit recognized by \TeX\ and you can
% omit the unit as well (in which case it defaults to \texttt{pt}).
+%
+% \begin{footnotesize}
+% As \sty{fontsize} takes effect after the class is loaded, you should
+% set a font size class option that comes close to the font size passed
+% to \sty{fontsize}. For example,
+% if you set \opt{fontsize=12.2pt} you should load the class option \opt{12pt}.
+% \end{footnotesize}
%
% \optitem[fontsize]{cloname}{\meta{name}}
%
@@ -375,6 +456,13 @@ This work has the LPPL maintenance status "author-maintained".
% \file{\meta{name}\meta{fontsize}.clo} to setup the font sizes.
% This file can be generated through the \cmd{generateclofile}
% command (see below).
+%
+%^^A If \opt{cloname=fontsize-std} and \opt{fontsize=10\OR 11\OR 12}
+%^^A a file which emulate the standard bk*.clo files will be used.
+%^^A \file{fontsize-std10pt.clo},
+%^^A \file{fontsize-std11pt.clo} or
+%^^A \file{fontsize-std11pt.clo} will be used,
+%
%
% \end{optionlist*}
%
@@ -388,11 +476,11 @@ This work has the LPPL maintenance status "author-maintained".
%
% Sets the normal size to \meta{fontsize} and the normal line spacing to
% \meta{baselineskip}. The other sizes (\cmd{tiny}, \cmd{scriptsize},
-% \cmd{small}, ecc.) and line spacings are set proportionally.
+% ecc.) and line spacings are set proportionally.
% If the first optional argument is omitted, the command has the same effect
% of the \opt{fontsize} option. You can use any unit recognized by \TeX\ and
% you can omit the unit as well (in which case it defaults to \texttt{pt}).
-% For example:
+%
%\begin{latexcode}
%\begin{verbatim}
%\changefontsize[13.5pt]{11.5pt}
@@ -411,7 +499,7 @@ This work has the LPPL maintenance status "author-maintained".
% If \opt{cloname=\meta{name}} \textit{and} \opt{fontsize=\meta{fontsize}},
% the generated file will be automatically used to setup the main sizes.
%
-% \alert \emph{In fact the \file{.clo} file is only needed if you intend to modify it.
+% \emph{In fact the \file{.clo} file is only needed if you intend to modify it.
% In this case remember to comment the command, otherwise the edited
% file will be overwritten.}
%
@@ -436,9 +524,9 @@ This work has the LPPL maintenance status "author-maintained".
%\end{verbatim}
%\end{latexcode}
%
-%^^A \cmditem{sampletext}{text}
+% \cmditem{sampletext}{text}
%
-%^^A Defines the \meta{text} to be used by \cmd{printsamples}.
+% Defines the \meta{text} to be used by \cmd{printsamples}.
%
% \end{ltxsyntax}
%
@@ -446,9 +534,8 @@ This work has the LPPL maintenance status "author-maintained".
% \subsection{New font sizing commands}\label{sec:sizingcmd}
%^^A--------------------------------------------------------------------
%
-% The package provides three additional font sizing commands for each standard size.
-% The value of these new sizes (rounded to the second decimal place) are shown in
-% table \ref{tab:sizes}.
+% The package provides three additional font sizing commands for each standard size (plus the new \cmd{HUGE} command).
+% See table \ref{tab:sizes} for details.
% \medskip
%
%\def\fshw{Lipsum}
@@ -484,6 +571,7 @@ This work has the LPPL maintenance status "author-maintained".
% \tcmd{Largerr} & \Largerr \fshw \\
% \tcmd{Largerrr} & \Largerrr \fshw
% \end{tabular}
+% \hskip5mm
% \begin{tabular}[b]{ll}
% \cmd{LARGE} & \LARGE \fshw \\
% \tcmd{LARGEr} & \LARGEr \fshw \\
@@ -505,21 +593,21 @@ This work has the LPPL maintenance status "author-maintained".
% }
%\medskip
%
-% \begin{footnotesize}
+% \begin{small}
%\alert If you want these commands to work as expected, the font must be
% smoothly scalable.
% This is the case of many Type 1 and Open Type fonts such as Cochineal
% used in this document \parencite{cochineal}, but
% if the font has optical sizes, unusual things can happen:
-% some larger sizes may appear smaller. In any case, with the \LaTeX\
-% default font (i.e. Computer Modern) I recommend loading
-% \cmd{RequirePackage}|{fix-cm}| just before \cmd{documentclass}.
-% For example, with the Latin Modern 12\,pt typeface \parencite{lm}
-% a similar situation can be encountered:\medskip
+% some larger sizes may appear smaller.
+% For example, with the Latin Modern typeface \parencite{lm}
+% a similar situation can be encountered when normal size is set
+% to 12\,pt:\medskip
%
% \begingroup
% \centering
% \fontfamily{lmr}\selectfont
+%
%\begin{minipage}[b]{8cm}
% \begin{tabular}[b]{lll}
% \tcmd{largerr} & \texttlf{15.84\,pt} &\largerr Hello world \\
@@ -540,86 +628,99 @@ This work has the LPPL maintenance status "author-maintained".
% right which shows the letter H appropriately scaled to see the
% differences better).
%
-% \end{footnotesize}
-%
-% \clearpage\thispagestyle{empty}
-% \def\ivalbmidrule{\arrayrulecolor{black!40}\midrule\rowfont{\color{philA}}}
-% \begin{table}
-%\vspace*{-1cm}
-% \centering
-% \centerline{%
-% \begin{tabu}{lSSSSSSSSS}
-%\toprule\rowfont{\color{philA}}
-% \tcmd{tiny} & 4.00 & 4.25 & 4.50 & 4.75 & 5.00 & 5.25 & 5.50 & 5.75 & 6.00 \\
-% \cmd{tinyr} & 4.33 & 4.60 & 4.88 & 5.15 & 5.42 & 5.69 & 5.96 & 6.23 & 6.50 \\
-% \cmd{tinyrr} & 4.67 & 4.96 & 5.25 & 5.54 & 5.83 & 6.12 & 6.42 & 6.71 & 7.00 \\
-% \cmd{tinyrrr} & 5.00 & 5.31 & 5.62 & 5.94 & 6.25 & 6.56 & 6.88 & 7.19 & 7.50 \\
-%\ivalbmidrule
-% \tcmd{scriptsize} & 5.33 & 5.67 & 6.00 & 6.33 & 6.67 & 7.00 & 7.33 & 7.67 & 8.00 \\
-% \cmd{scriptsizer} & 5.67 & 6.02 & 6.38 & 6.73 & 7.08 & 7.44 & 7.79 & 8.15 & 8.50 \\
-% \cmd{scriptsizerr} & 6.00 & 6.38 & 6.75 & 7.12 & 7.50 & 7.88 & 8.25 & 8.62 & 9.00 \\
-% \cmd{scriptsizerrr} & 6.33 & 6.73 & 7.13 & 7.52 & 7.92 & 8.31 & 8.71 & 9.10 & 9.50 \\
-%\ivalbmidrule
-% \tcmd{footnotesize} & 6.67 & 7.08 & 7.50 & 7.92 & 8.33 & 8.75 & 9.17 & 9.58 & 10.00 \\
-% \cmd{footnotesizer} & 6.83 & 7.25 & 7.68 & 8.10 & 8.53 & 8.96 & 9.38 & 9.81 & 10.24 \\
-% \cmd{footnotesizerr} & 6.98 & 7.42 & 7.86 & 8.29 & 8.73 & 9.17 & 9.60 & 10.04 & 10.48 \\
-% \cmd{footnotesizerrr} & 7.14 & 7.59 & 8.03 & 8.48 & 8.93 & 9.37 & 9.82 & 10.27 & 10.71 \\
-%\ivalbmidrule
-% \tcmd{small} & 7.30 & 7.76 & 8.21 & 8.67 & 9.13 & 9.58 & 10.04 & 10.49 & 10.95 \\
-% \cmd{smallr} & 7.47 & 7.94 & 8.41 & 8.88 & 9.34 & 9.81 & 10.28 & 10.75 & 11.21 \\
-% \cmd{smallrr} & 7.65 & 8.13 & 8.61 & 9.08 & 9.56 & 10.04 & 10.52 & 11.00 & 11.48 \\
-% \cmd{smallrrr} & 7.82 & 8.31 & 8.80 & 9.29 & 9.78 & 10.27 & 10.76 & 11.25 & 11.74 \\
-%\ivalbmidrule
-% \tcmd{normalsize} & 8.00 & 8.50 & 9.00 & 9.50 & 10.00 & 10.50 & 11.00 & 11.50 & 12.00 \\
-% \cmd{normalsizer} & 8.40 & 8.93 & 9.45 & 9.98 & 10.50 & 11.03 & 11.55 & 12.08 & 12.60 \\
-% \cmd{normalsizerr} & 8.80 & 9.35 & 9.90 & 10.45 & 11.00 & 11.55 & 12.10 & 12.65 & 13.20 \\
-% \cmd{normalsizerrr} & 9.20 & 9.77 & 10.35 & 10.92 & 11.50 & 12.07 & 12.65 & 13.22 & 13.80 \\
-%\ivalbmidrule
-% \tcmd{large} & 9.60 & 10.20 & 10.80 & 11.40 & 12.00 & 12.60 & 13.20 & 13.80 & 14.40 \\
-% \cmd{larger} & 10.08 & 10.71 & 11.34 & 11.97 & 12.60 & 13.23 & 13.86 & 14.49 & 15.12 \\
-% \cmd{largerr} & 10.56 & 11.22 & 11.88 & 12.54 & 13.20 & 13.86 & 14.52 & 15.18 & 15.84 \\
-% \cmd{largerrr} & 11.04 & 11.73 & 12.42 & 13.11 & 13.80 & 14.49 & 15.18 & 15.87 & 16.56 \\
-%\ivalbmidrule
-% \tcmd{Large} & 11.52 & 12.24 & 12.96 & 13.68 & 14.40 & 15.12 & 15.84 & 16.56 & 17.28 \\
-% \cmd{Larger} & 12.10 & 12.85 & 13.61 & 14.36 & 15.12 & 15.88 & 16.63 & 17.39 & 18.14 \\
-% \cmd{Largerr} & 12.67 & 13.46 & 14.26 & 15.05 & 15.84 & 16.63 & 17.42 & 18.22 & 19.01 \\
-% \cmd{Largerrr} & 13.25 & 14.08 & 14.90 & 15.73 & 16.56 & 17.39 & 18.22 & 19.04 & 19.87 \\
-%\ivalbmidrule
-% \tcmd{LARGE} & 13.82 & 14.69 & 15.55 & 16.42 & 17.28 & 18.14 & 19.01 & 19.87 & 20.74 \\
-% \cmd{LARGEr} & 14.52 & 15.42 & 16.33 & 17.24 & 18.14 & 19.05 & 19.96 & 20.87 & 21.77 \\
-% \cmd{LARGErr} & 15.21 & 16.16 & 17.11 & 18.06 & 19.01 & 19.96 & 20.91 & 21.86 & 22.81 \\
-% \cmd{LARGErrr} & 15.90 & 16.89 & 17.89 & 18.88 & 19.88 & 20.87 & 21.86 & 22.86 & 23.85 \\
-%\ivalbmidrule
-% \tcmd{huge} & 16.59 & 17.63 & 18.67 & 19.70 & 20.74 & 21.78 & 22.81 & 23.85 & 24.89 \\
-% \cmd{huger} & 17.42 & 18.51 & 19.6 & 20.69 & 21.78 & 22.86 & 23.95 & 25.04 & 26.13 \\
-% \cmd{hugerr} & 18.25 & 19.39 & 20.53 & 21.67 & 22.81 & 23.95 & 25.09 & 26.23 & 27.37 \\
-% \cmd{hugerrr} & 19.08 & 20.27 & 21.46 & 22.65 & 23.85 & 25.04 & 26.23 & 27.42 & 28.61 \\
-%\ivalbmidrule
-% \tcmd{Huge} & 19.90 & 21.15 & 22.39 & 23.64 & 24.88 & 26.12 & 27.37 & 28.61 & 29.86 \\
-% \cmd{Huger} & 20.89 & 22.19 & 23.50 & 24.80 & 26.11 & 27.42 & 28.72 & 30.03 & 31.33 \\
-% \cmd{Hugerr} & 21.87 & 23.24 & 24.61 & 25.97 & 27.34 & 28.71 & 30.07 & 31.44 & 32.81 \\
-% \cmd{Hugerrr} & 22.86 & 24.28 & 25.71 & 27.14 & 28.57 & 30.00 & 31.43 & 32.86 & 34.28 \\
-%\ivalbmidrule
-% \tcmd{HUGE} & 24.05 & 25.55 & 27.05 & 28.56 & 30.06 & 31.56 & 33.07 & 34.57 & 36.07 \\
-% \cmd{HUGEr} & 25.24 & 26.82 & 28.39 & 29.97 & 31.55 & 33.13 & 34.70 & 36.28 & 37.86 \\
-% \cmd{HUGErr} & 26.43 & 28.08 & 29.74 & 31.39 & 33.04 & 34.69 & 36.34 & 38.00 & 39.65 \\
-% \cmd{HUGErrr} & 27.62 & 29.35 & 31.08 & 32.80 & 34.53 & 36.26 & 37.98 & 39.71 & 41.44 \\
-% \arrayrulecolor{black}\bottomrule
-%\end{tabu}
-%}
-% \caption{The value of all available sizes (rounded to the second decimal place) relative to \cmd{normalsize} ranging from 8\,pt to 12\,pt with an increment of 0.5\,pt}\label{tab:sizes}
-%\end{table}
-%\clearpage\thispagestyle{plain}
+%^^A In any case, if you use this package with the \LaTeX\
+%^^A default font (i.e. Computer Modern) I recommend loading
+%^^A \cmd{RequirePackage}|{fix-cm}| just before \cmd{documentclass}.
+%
+%
+% \end{small}
+%
+%\newgeometry{top=2cm,bottom=3cm}
+%
+%\begin{smallrrr}
+%
+%\def\grayrule{\\\tabucline[0.4pt black!40 off 2pt]{-}\\[-2ex]\rowfont{\color{philA}}}
+%
+%\begin{longtabu}{m{3.4cm}@{}*{8}{@{}r@{}}r}
+% \caption{The value of all available sizes (rounded to the second decimal place)
+% relative to \cmd{normalsize} ranging from 8\,pt to 12\,pt with increments of
+% 0.5\,pt. The first row of each size shows the font size; the second row (colored in
+% gray) shows the default line spacing}\label{tab:sizes}\\[1ex]
+% \toprule
+% \endfirsthead
+%
+% \multicolumn{10}{l}{\scriptsize\itshape \ldots continues from previous page}\\*[1ex]
+% \endhead
+%
+% \multicolumn{10}{r}{\scriptsize\itshape continues on next page\ldots}
+% \endfoot
+%
+% \arrayrulecolor{black}
+% \bottomrule
+% \endlastfoot
+%
+% \rowfont{\color{philA}}
+% \tabrowone{tiny}\\
+% \tabrowone{tinyr}\\
+% \tabrowone{tinyrr}\\
+% \tabrowone{tinyrrr}\grayrule
+% \tabrowone{scriptsize}\\
+% \tabrowone{scriptsizer}\\
+% \tabrowone{scriptsizerr}\\
+% \tabrowone{scriptsizerrr}\grayrule
+% \tabrowone{footnotesize}\\
+% \tabrowone{footnotesizer}\\
+% \tabrowone{footnotesizerr}\\
+% \tabrowone{footnotesizerrr}\grayrule
+% \tabrowone{small}\\
+% \tabrowone{smallr}\\
+% \tabrowone{smallrr}\\
+% \tabrowone{smallrrr}\grayrule
+% \tabrowone{normalsize}\\
+% \tabrowone{normalsizer}\\
+% \tabrowone{normalsizerr}\\
+% \tabrowone{normalsizerrr}\grayrule
+% \tabrowone{large}\\
+% \tabrowone{larger}\\
+% \tabrowone{largerr}\\
+% \tabrowone{largerrr}\grayrule
+% \tabrowone{Large}\\
+% \tabrowone{Larger}\\
+% \tabrowone{Largerr}\\
+% \tabrowone{Largerrr}\grayrule
+% \tabrowone{LARGE}\\
+% \tabrowone{LARGEr}\\
+% \tabrowone{LARGErr}\\
+% \tabrowone{LARGErrr}\grayrule
+% \tabrowone{huge}\\
+% \tabrowone{huger}\\
+% \tabrowone{hugerr}\\
+% \tabrowone{hugerrr}\grayrule
+% \tabrowone{Huge}\\
+% \tabrowone{Huger}\\
+% \tabrowone{Hugerr}\\
+% \tabrowone{Hugerrr}\grayrule
+% \tabrowone{HUGE}\\
+% \tabrowone{HUGEr}\\
+% \tabrowone{HUGErr}\\
+% \tabrowone{HUGErrr}\\
+%\end{longtabu}
+%
+%\end{smallrrr}
+%
+%\restoregeometry
%
%^^A---------------------------------------------------------------------
%
% \section{Some text samples}\label{sec:example}
%
%^^A--------------------------------------------------------------------
-% The following examples are obtained with the \cmd{printsamples} command (see section \ref{sec:commands}).
+% The following samples are obtained with the \cmd{printsamples} command (see section \ref{sec:commands}):
+%\begin{verbatim}
+%\printsamples{12.6pt}{10.6pt}[normalsizerr,normalsizerrr,large,larger,largerr]
+%\end{verbatim}
%
-% \printsamples{13.2pt}{11.2pt}[normalsizer,normalsizerr,normalsizerrr,large,larger]
-% \printsamples{13.4pt}{11.7pt}[normalsizer,normalsizerr,normalsizerrr,large,larger]
+% \printsamples{12.6pt}{10.6pt}[normalsizerr,normalsizerrr,large,larger,largerr]
%
% \StopEventually{%
% \printbibliography[heading=bibintoc]
@@ -633,10 +734,14 @@ This work has the LPPL maintenance status "author-maintained".
%^^A---------------------------------------------------------------------
%\textcolor{DarkBlue}{The parts added to the basic code of \file{scrextend} and \file{scrfontsizes} are highlighted in blue.}
%
-%\noindent All the options of the package are defined via \sty{xkeyval} \parencite{xkeyval}. Only a new package option called \opt{cloname} is defined.
+%\noindent All the options of the package are defined via \sty{xkeyval} \parencite{xkeyval},
+% while the \sty{xfp} package \parencite{xfp} provides the \cmd{fpeval} command
+% to use instead of \cmd{dimexpr} for some size calculations.
+% Only a new package option called \opt{cloname} is defined.
% \baddition
% \begin{macrocode}
\@ifpackageloaded{xkeyval}{}{\RequirePackage{xkeyval}}
+\@ifpackageloaded{xfp}{}{\RequirePackage{xfp}}
\DeclareOptionX{cloname}[fontsize]{\def\@fontsizefilebase{#1}}
% \end{macrocode}
% \eaddition
@@ -732,10 +837,10 @@ This work has the LPPL maintenance status "author-maintained".
% the maximum dimension that may be stored in plain
% \TeX\ and \LaTeX.
% The problem, which is probably more theoretical than practical,
-% can be solved simply by changing it to this (thanks to Claudio Beccari):
+% can be solved (thanks to Claudio Beccari) simply by changing it to this:
% \baddition
% \begin{macrocode}
- \setlength{\@tempdimc}{100\dimexpr (\@tempdimb * \p@ / \@tempdima)}
+ \setlength{\@tempdimc}{\fpeval{100*\@tempdimb/\@tempdima}pt}%
% \end{macrocode}
% \eaddition
% \begin{macrocode}
@@ -1136,43 +1241,40 @@ This work has the LPPL maintenance status "author-maintained".
% \begin{macrocode}
\normalsize%
% \end{macrocode}
-% The KOMA files do not define \cmd{parindent} and other lengths related to the page dimensions (\cmd{textheight}, \cmd{headheight}, \cmd{headsep}, etc.) Anyway, I think that some of these lengths are strictly linked to the font rather than to the dimensions of the page and the text, particularly \cmd{headheight}, whose value may cause a well known warning if \sty{fancyhdr} is loaded. So we define the following new lengths:
+% The KOMA files do not define \cmd{parindent} and other lengths that are
+% are strictly linked to the font rather than to the dimensions of the page and the text. So first we set \cmd{parindent} to \cmd{normalsize}:
% \baddition
% \begin{macrocode}
\setlength\parindent{\@tempdimb}%
-\setlength\headheight{\dimexpr(\@tempdimb+2pt)}%
% \end{macrocode}
% \eaddition
-% For the following lengths, all values are calculated proportionally to the main font. I took the \file{bk11.clo} file as a reference point. Note that the differences of these lengths in the files \file{bk10.clo} \file{bk11.clo} and \file{bk12.clo} only affect \cmd{headsep}, \cmd{topskip} and \cmd{footskip}, which are not redefined here.
+% For the following lengths, all values are calculated proportionally to the main font. I took the \file{bk11.clo} file as a reference point. Note that the differences of the lengths in the files \file{bk*.clo} not affected by \sty{fontsize} only concern \cmd{headheight}, \cmd{headsep}, \cmd{topskip} and \cmd{footskip}.
% \baddition
% \begin{macrocode}
-\setlength\smallskipamount{\dimexpr(1.1\@tempdimb/4) \@plus 1\p@ \@minus 1\p@}%
-\setlength\medskipamount{\dimexpr(1.1\@tempdimb/2) \@plus 2\p@ \@minus 2\p@}%
-\setlength\bigskipamount{\dimexpr(1.1\@tempdimb) \@plus 4\p@ \@minus 4\p@}%
+\setlength\smallskipamount{\fpeval{1.090909091\@tempdimb/4}pt \@plus 1\p@ \@minus 1\p@}%
+\setlength\medskipamount{\fpeval{1.090909091\@tempdimb/2}pt \@plus 2\p@ \@minus 2\p@}%
+\setlength\bigskipamount{\fpeval{1.090909091\@tempdimb}pt \@plus 4\p@ \@minus 4\p@}%
% \end{macrocode}
% \eaddition
-% The following table shows the values of some specific lengths
-% defined by the package, in relation to some significant settings
-% of the main font and line spacing. The values are expressed in pt
-% and rounded to the second decimal place.\medskip
-%
-% \begin{footnotesize}
-% \newcolumntype{Y}{@{}S[table-column-width=1.04cm]}
-% \centerline{%
-% \noindent\begin{tabular}{@{}m{3.7cm}@{\hskip2mm}YYYYYYYYYYY@{}}
-%\toprule
-% Normal size & 10.00 & 10.10 & 10.20 & 10.30 & 10.40 & 10.50 & 10.60 & 10.70 & 10.80 & 10.90 & 11.00 \\
-% Line spacing & 12.00 & 12.12 & 12.24 & 12.36 & 12.48 & 12.60 & 12.72 & 12.84 & 12.96 & 13.08 & 13.20 \\
-% \midrule
-% \cmd{headheight} & 12.00 & 12.10 & 12.20 & 12.30 & 12.40 & 12.50 & 12.60 & 12.70 & 12.80 & 12.90 & 13.00 \\
-% \cmd{parindent} & 10.00 & 10.10 & 10.20 & 10.30 & 10.40 & 10.50 & 10.60 & 10.70 & 10.80 & 10.90 & 11.00 \\
-% \cmd{smallskipamount}\ \hfill$\pm$\SI{1}{pt} & 2.75 & 2.78 & 2.81 & 2.83 & 2.86 & 2.89 & 2.92 & 2.94 & 2.97 & 3.00 & 3.03 \\
-% \cmd{medskipamount}\ \hfill$\pm$\SI{2}{pt} & 5.50 & 5.56 & 5.61 & 5.67 & 5.72 & 5.78 & 5.83 & 5.89 & 5.94 & 6.00 & 6.05 \\
-% \cmd{bigskipamount}\ \hfill$\pm$\SI{4}{pt} & 11.00 & 11.11 & 11.22 & 11.33 & 11.44 & 11.55 & 11.66 & 11.77 & 11.88 & 11.99 & 12.10 \\
+% \def\tabfontsize{\fontsize{10.5}{12.5}\selectfont}
+% \def\plusminus{\hskip.5pt\parbox[b]{4mm}{\fontsize{5}{5}\itshape plus\\minus}\hskip1pt}
+% \begin{table}\tabfontsize\centering
+% \caption{The values of some specific lengths set by the package,
+% in relation to some significant settings of the normal size.
+% The values are expressed in pt and rounded to the second
+% decimal place.}\label{tab:skips}
+% \begin{tabu}{@{\hskip2pt}m{4.5cm}@{\hskip2mm}*{11}{@{\hskip-1pt}r}@{\hskip2pt}}
+% \toprule
+% \rowfont{\tabfontsize}Normal size
+% & 10.00 & 10.10 & 10.20 & 10.30 & 10.40 & 10.50
+% & 10.60 & 10.70 & 10.80 & 10.90 & 11.00 \\\midrule
+% \tabrowtwo{parindent}{}\\
+% \tabrowtwo{smallskipamount}{\ \hfill (\plusminus\SI{1}{pt})}\\
+% \tabrowtwo{medskipamount}{\ \hfill (\plusminus\SI{2}{pt})}\\
+% \tabrowtwo{bigskipamount}{\ \hfill (\plusminus\SI{4}{pt})}\\
% \bottomrule
-% \end{tabular}
-% }
-% \end{footnotesize}
+% \end{tabu}
+%\end{table}
% \begin{macrocode}
\setlength{\@tempdimb}{\f@baselineskip}%
\ctm@setlength{\parsep}%
@@ -1862,27 +1964,12 @@ This work has the LPPL maintenance status "author-maintained".
}%
\endgroup
\immediate\write\@fontfile{%
- \string\@ifundefined{@list@extra}{}{\@percentchar^^J%
- \string\expandafter\string\ifnum\string\scr@v@is@ge{3.17}%
- \string\par@updaterelative\string\fi^^J%
- \@ind\string\l@addto@macro{\string\@listi}{\string\@list@extra}%
- \@percentchar^^J%
- \@ind\string\let\string\@listI=\string\@listi^^J%
- \@ind\string\l@addto@macro{\string\@listii}{\string\@list@extra}%
- \@percentchar^^J%
- \@ind\string\l@addto@macro{\string\@listiii}{\string\@list@extra}%
- \@percentchar^^J%
- \@ind\string\l@addto@macro{\string\footnotesize}{\string\protect
- \string\add@extra@listi{ftns}}\@percentchar^^J%
- \@ind\string\l@addto@macro{\string\small}{\string\protect
- \string\add@extra@listi{sml}}\@percentchar^^J%
- }\@percentchar^^J%
- \string\@listi^^J%
- \string\endinput^^J%
- \@percentchar^^J%
- \@percentchar\space End of file `#1#2.clo'.
- }
- \immediate\closeout\@fontfile
+ \string\@listi^^J%
+ \string\endinput^^J%
+ \@percentchar^^J%
+ \@percentchar\space End of file `#1#2.clo'.
+}
+\immediate\closeout\@fontfile
}
\@onlypreamble\generateclofile
% \end{macrocode}
@@ -1892,15 +1979,16 @@ This work has the LPPL maintenance status "author-maintained".
% \sty{etoolbox} \parencite{etoolbox}.
% \baddition
% \begin{macrocode}
-\def\fontsizelipsum{%
- As any dedicated reader can clearly see, the Ideal of practical reason is a
- representation of, as far as I know, the things in themselves; as I have shown
- elsewhere, the phenomena should only be used as a canon for our understanding.
- The paralogisms of practical reason are what first give rise to the
- architectonic of practical reason. As will easily be shown in the
- next section, reason would thereby be made to contradict, in view of
- these considerations, the Ideal of practical reason, yet the manifold
- depends on the phenomena.}
+\newcommand{\sampletext}[1]{\def\fs@sampletext{#1}}
+\def\fs@sampletext{%
+ As any dedicated reader can clearly see, the Ideal of practical reason
+ is a representation of, as far as I know, the things in themselves; as
+ I have shown elsewhere, the phenomena should only be used as a canon for
+ our understanding. The paralogisms of practical reason are what first give
+ rise to the architectonic of practical reason. As will easily be shown in
+ the next section, reason would thereby be made to contradict, in view of
+ these considerations, the Ideal of practical reason, yet the manifold
+ depends on the phenomena.}
\ExplSyntaxOn
@@ -1947,7 +2035,7 @@ This work has the LPPL maintenance status "author-maintained".
\noindent\texttt{\symbol{92}##1}:~ % print the font size command
\__fontsize_round_f:n {size}~on~ % print the size in points
\__fontsize_round_f:n {baselineskip}.~ % print the baseline skip in points
- \fontsizelipsum % sample text
+ \fs@sampletext % sample text
\par\addvspace{\medskipamount} % finish up
}
% close the group
@@ -2008,6 +2096,14 @@ This work has the LPPL maintenance status "author-maintained".
date = {2020-12-19},
version = {1.065 }
}
+
+@manual{xfp,
+ title = {The \textit{xfp} package Floating Point Unit},
+ author = {{The \LaTeX\ Project}},
+ url = {https://www.ctan.org/pkg/xfp},
+ urldate = {2021-03-14},
+ date = {2021-03-12},
+}
%</bib>
% \fi
% \Finale
diff --git a/macros/latex/contrib/fontsize/fontsize.pdf b/macros/latex/contrib/fontsize/fontsize.pdf
index 5642de57f8..37a1db0cfa 100644
--- a/macros/latex/contrib/fontsize/fontsize.pdf
+++ b/macros/latex/contrib/fontsize/fontsize.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3backend/CHANGELOG.md b/macros/latex/contrib/l3backend/CHANGELOG.md
index ed6da43a39..093a2f8c58 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]
+## [2021-03-18]
+
+### Fixed
+- Maintain stack color correctly with `(x)dvipdfmx`
+
## [2021-03-02]
### Changed
@@ -168,7 +173,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/2021-03-02...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2021-03-18...HEAD
+[2021-03-18]: https://github.com/latex3/latex3/compare/2021-03-02...2021-03-18
[2021-03-02]: https://github.com/latex3/latex3/compare/2021-02-18...2021-03-02
[2021-02-18]: https://github.com/latex3/latex3/compare/2021-02-06...2021-02-18
[2021-02-06]: https://github.com/latex3/latex3/compare/2021-01-29...2021-02-06
diff --git a/macros/latex/contrib/l3backend/README.md b/macros/latex/contrib/l3backend/README.md
index 564a2e8cd6..93ff4b33f7 100644
--- a/macros/latex/contrib/l3backend/README.md
+++ b/macros/latex/contrib/l3backend/README.md
@@ -1,7 +1,7 @@
LaTeX3 Backend Drivers
======================
-Release 2021-03-02
+Release 2021-03-18
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 c5b5dd73e1..787232cc30 100644
--- a/macros/latex/contrib/l3backend/l3backend-basics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
@@ -70,27 +70,27 @@
% \begin{macrocode}
\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-dvipdfmx.def}{2021-03-02}{}
+ {l3backend-dvipdfmx.def}{2021-03-18}{}
{L3 backend support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-dvips.def}{2021-03-02}{}
+ {l3backend-dvips.def}{2021-03-18}{}
{L3 backend support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-dvisvgm.def}{2021-03-02}{}
+ {l3backend-dvisvgm.def}{2021-03-18}{}
{L3 backend support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-luatex.def}{2021-03-02}{}
+ {l3backend-luatex.def}{2021-03-18}{}
{L3 backend support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-pdftex.def}{2021-03-02}{}
+ {l3backend-pdftex.def}{2021-03-18}{}
{L3 backend support: PDF output (pdfTeX)}
%</pdftex>
%<*xetex>
- {l3backend-xetex.def}{2021-03-02}{}
+ {l3backend-xetex.def}{2021-03-18}{}
{L3 backend support: XeTeX}
%</xetex>
% \end{macrocode}
diff --git a/macros/latex/contrib/l3backend/l3backend-box.dtx b/macros/latex/contrib/l3backend/l3backend-box.dtx
index 84e5dad2cb..7ecbfc81e3 100644
--- a/macros/latex/contrib/l3backend/l3backend-box.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-code.pdf b/macros/latex/contrib/l3backend/l3backend-code.pdf
index 3a2b841607..71b71a28c6 100644
--- a/macros/latex/contrib/l3backend/l3backend-code.pdf
+++ b/macros/latex/contrib/l3backend/l3backend-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/l3backend/l3backend-color.dtx b/macros/latex/contrib/l3backend/l3backend-color.dtx
index 50271f57b3..d5cd5b0428 100644
--- a/macros/latex/contrib/l3backend/l3backend-color.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
@@ -240,6 +240,17 @@
\c_@@_backend_main_stack_int
\int_const:cn { main@pdfcolorstack } { \c_@@_backend_main_stack_int }
}
+% \end{macrocode}
+% The backend automatically restores the stack color from the \enquote{classical}
+% approach (\texttt{pdf:bcolor}) after a scope. That will be an issue for us, so
+% we manually ensure that the one we are using is inserted.
+% \begin{macrocode}
+ \cs_gset_protected:Npn \__kernel_backend_scope_end:
+ {
+ \__kernel_backend_literal:n { x:grestore }
+ \__kernel_backend_literal:n
+ { pdfcolorstack ~ \g_@@_backend_stack_int current }
+ }
}
% \end{macrocode}
% \end{variable}
diff --git a/macros/latex/contrib/l3backend/l3backend-draw.dtx b/macros/latex/contrib/l3backend/l3backend-draw.dtx
index 492a899ee6..3c818933e7 100644
--- a/macros/latex/contrib/l3backend/l3backend-draw.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-draw.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-graphics.dtx b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
index fc8ae066a0..c4d052f713 100644
--- a/macros/latex/contrib/l3backend/l3backend-graphics.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-graphics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-header.dtx b/macros/latex/contrib/l3backend/l3backend-header.dtx
index 41e15d39d9..80270ae47c 100644
--- a/macros/latex/contrib/l3backend/l3backend-header.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-header.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-opacity.dtx b/macros/latex/contrib/l3backend/l3backend-opacity.dtx
index d4725d6bfe..d19d3ade67 100644
--- a/macros/latex/contrib/l3backend/l3backend-opacity.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-opacity.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
index b6e7e39837..936d7a72dc 100644
--- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx
+++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2021-03-02}
+% \date{Released 2021-03-18}
%
% \maketitle
%
diff --git a/macros/latex/contrib/mathtools/empheq.ins b/macros/latex/contrib/mathtools/empheq.ins
index 632545df72..265efeb2bb 100644
--- a/macros/latex/contrib/mathtools/empheq.ins
+++ b/macros/latex/contrib/mathtools/empheq.ins
@@ -33,7 +33,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: empheq 2017/03/31 v2.15 empheq}
+\Msg{* Package: empheq 2020/03/24 v2.16 empheq}
\Msg{************************************************************************}
\keepsilent
diff --git a/macros/latex/contrib/mathtools/empheq.pdf b/macros/latex/contrib/mathtools/empheq.pdf
index c8e8077f11..5d28a71b09 100644
--- a/macros/latex/contrib/mathtools/empheq.pdf
+++ b/macros/latex/contrib/mathtools/empheq.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathtools/mathtools.dtx b/macros/latex/contrib/mathtools/mathtools.dtx
index 472c713942..68672cfe35 100644
--- a/macros/latex/contrib/mathtools/mathtools.dtx
+++ b/macros/latex/contrib/mathtools/mathtools.dtx
@@ -6,11 +6,11 @@
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
-% version 1.3 of this license or (at your option) any later
+% 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.
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008/05/05 or later.
%
% This work has the LPPL maintenance status "maintained".
%
@@ -69,7 +69,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mathtools 2020/03/24 v1.24}
+\Msg{* Package: mathtools 2021/03/18 v1.25}
\Msg{************************************************************************}
\keepsilent
@@ -81,16 +81,16 @@ This is a generated file.
Copyright (C) 2002-2011 by Morten Hoegholm
Copyright (C) 2012-2019 by Lars Madsen
-Copyright (C) 2020 by Lars Madsen, the LaTeX3 project
+Copyright (C) 2020- by Lars Madsen, the LaTeX3 project
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
-version 1.3 of this license or (at your option) any later
+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.
+and version 1.3c or later is part of all distributions of
+LaTeX version 2008/05/04 or later.
This work has the LPPL maintenance status "maintained".
@@ -133,7 +133,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mathtools.drv}%
- [2020/03/24 v1.24 mathematical typesetting tools]
+ [2021/03/18 v1.25 mathematical typesetting tools]
\documentclass{ltxdoc}
\IfFileExists{fourier.sty}{\usepackage{fourier}}{}
\addtolength\marginparwidth{-25pt}
@@ -321,7 +321,7 @@ colorlinks,
%
% \GetFileInfo{mathtools.drv}
%
-% \CheckSum{3333}
+% \CheckSum{3364}
%
% \title{The \pkg{mathtools} package\thanks{This file has version number
% \fileversion, last revised \filedate.}}
@@ -696,15 +696,15 @@ colorlinks,
% \SpecialUsageIndex{\smashoperator}
% \cs{smashoperator}\oarg{pos}\marg{operator with limits}
% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/05/04}
-% Above we shoved how to get \LaTeX{} to ignore the width of the
-% subscript of an operator. However this approach takes a lot of
-% extra typing, especially if you have a wide superscript, meaning
-% you have to put in \cs{crampedclap} in both sub- and superscript.
-% To make things easier, \pkg{mathtools} provides a
-% \cs{smashoperator} command, which simply ignores the width of the
-% sub- and superscript. It also takes an optional argument,
-% \texttt{l}, \texttt{r}, or \texttt{lr} (default), denoting which
+% \FeatureRequest{Lars Madsen}{2004/05/04} Above we showed how to get
+% \LaTeX{} to ignore the width of the subscript of an
+% operator. However this approach takes a lot of extra typing,
+% especially if you have a wide superscript, meaning you have to put
+% in \cs{crampedclap} in both sub- and superscript. To make things
+% easier, \pkg{mathtools} provides a \cs{smashoperator} command,
+% which simply ignores the width of the sub- and superscript. It also
+% takes an optional argument, \texttt{l}, \texttt{r}, or \texttt{lr}
+% (default, \texttt{rl} is an alias for \texttt{lr}), denoting which
% side of the operator should be ignored (smashed).
% \begin{verbatim}
% \[
@@ -1967,11 +1967,11 @@ colorlinks,
%
% Thus
% \begin{quote}
-% \cs{DeclarePairedDelimiter}\marg{cmd}\marg{left_delim}\marg{right_delim}
+% \cs{DeclarePairedDelimiter}\marg{cmd}\marg{left_delim}\marg{right_delim}
% \end{quote}
% is the same thing as
% \begin{quote}
-% \cs{DeclarePairedDelimiterX}\marg{cmd}\verb|[1]|\marg{left_delim}\marg{right_delim}\verb|{#1}|
+% \cs{DeclarePairedDelimiterX}\marg{cmd}\texttt{[1]}\marg{left_delim}\marg{right_delim}\rlap{\texttt{\{\#1\}}}
% \end{quote}
% %
% Let us do some examples. First we want to prepare a macro for inner
@@ -2157,7 +2157,9 @@ colorlinks,
% '$\sin$' and '('. In some special cases it may be useful to be
% able to tinker with the behavior.
% \begin{codesyntax}
-% \SpecialUsageIndex{\reDeclarePairedDelimiterInnerWrapper}\cs{reDeclarePairedDelimiterInnerWrapper}\marg{macro name}\marg{\textnormal{\texttt{star}} or \textnormal{\texttt{nostarnonscaled}} or \textnormal{\texttt{nostarscaled}}}\marg{code}
+% \SpecialUsageIndex{\reDeclarePairedDelimiterInnerWrapper}
+% \cs{reDeclarePairedDelimiterInnerWrapper}\marg{macro name}\%\\
+% \qquad \marg{\textnormal{\texttt{star}} or \textnormal{\texttt{nostarnonscaled}} or \textnormal{\texttt{nostarscaled}}}\marg{code}
% \end{codesyntax}
% Internally several macros are created, including three call backs
% that take care of the formatting. There is one internal macro for
@@ -2298,6 +2300,7 @@ colorlinks,
% \cs{vcentcolon} is a shorthand for such a vertically centered
% colon, and can be used as in |$a \vcentcolon= b$| and results in
% the desired output: $a \vcentcolon= b$. % for now
+% See also the \pkg{colonequals} package.
%
% Typing \cs{vcentcolon} every time is quite tedious, so one can use
% the key \key{centercolon} to make the colon active instead.
@@ -2537,8 +2540,8 @@ colorlinks,
% been fixed in \LaTeX, this fix will be removed from
% \pkg{mathtools}.
%
-% The \CommentAdded{2015/11/12} fix was added to the \LaTeX{} kernel i 2015. We will continue to
-% provide it on older kernels.
+% The \CommentAdded{2015/11/12} fix was added to the \LaTeX{} kernel
+% in 2015. We will continue to provide it on older kernels.
%
% \subsection{Spreading equations}\label{sec:spread}
%
@@ -2755,7 +2758,7 @@ colorlinks,
% \verb|\xmathstrut{0.1}|
% \end{center}
% will give you a new strut where 10\% of the \emph{total height of
-% the normal math stut} (\verb|\mathstrut=\mathstrut{0}|) will be
+% the normal math stut} (\verb|\mathstrut=\xmathstrut{0}|) will be
% added to both \emph{the height} and \emph{the depth} of the
% original strut (thus 20\% gets added in total). On the other hand
% \begin{center}
@@ -2785,14 +2788,14 @@ colorlinks,
% \]
% \begin{verbatim}
% \[ \begin{cases*}
-% \frac{\frac{ x-1 }{ x-\sin x} }{ \sqrt{ 1 -x }} & $x >0$ \\
+% \frac{ \frac{ x-1 }{ x-\sin x } }{ \sqrt{ 1-x } } & $x>0$ \\
% 0 & otherwise
% \end{cases*}
% \qquad\text{vs.}\qquad
% \begin{cases*}
% \frac{ \frac{ \xmathstrut{0.1} x-1 }
-% { \xmathstrut{0.25} x-\sin x} }
-% {\xmathstrut{0.4} \sqrt{ 1 -x } } & $x >0$ \\
+% { \xmathstrut{0.25} x-\sin x } }
+% {\xmathstrut{0.4} \sqrt{ 1-x } } & $x>0$ \\
% 0 & otherwise
% \end{cases*} \]
% \end{verbatim}
@@ -2808,15 +2811,17 @@ colorlinks,
% \begin{verbatim}
% \newcommand\vfb[1]{\begingroup\fboxsep=0pt\boxed{\,#1\,}\endgroup}
% \[
-% a \vfb{\mathstrut} \ % normal strut
-% \vfb{\xmathstrut{0}} \ % just 0 => normal strut
-% \vfb{\xmathstrut{0.5} } \ % twice as large 50% + 50%
-% \vfb{\xmathstrut{-0.1} } \ % negative gives something smaller
-% \vfb{\xmathstrut[0.5]{0}} a % change only the depth
+% a
+% \vfb{ \mathstrut } \ % normal strut
+% \vfb{ \xmathstrut{0} } \ % just 0 => normal strut
+% \vfb{ \xmathstrut{0.5} } \ % twice as large 50% + 50%
+% \vfb{ \xmathstrut{-0.1} } \ % negative gives something smaller
+% \vfb{ \xmathstrut[0.5]{0} } % change only the depth
+% a
% \]
% \end{verbatim}
% -- the last box showcases a strut where we have only changed the
-% depth of the strut. One can see \verb|\xmathstrut[B]{0}| kind of the
+% depth of the strut. One can see \verb|\xmathstrut[0.5]{0}| kind of the
% opposite of \verb|\smash[b]{...}|, the former makes the depth larger
% and the latter ignores the depth.
%
@@ -2925,20 +2930,19 @@ colorlinks,
%
%
% \begin{thebibliography}{9}
-% \bibitem{Perlis01}
-% Alexander R. Perlis,
-% \emph{A complement to \cs{smash}, \cs{llap}, and \cs{rlap}},
-% TUGboat 22(4) (2001).
-% \bibitem{Ams99}
-% American Mathematical Society and Michael Downes,
-% \emph{Technical notes on the \pkg{amsmath} package} Version 2.0,
-% 1999/10/29.
-% (Available from CTAN as file \texttt{technote.tex}.)
-% \bibitem{Ams00}
-% Frank Mittelbach, Rainer Sch\"opf, Michael Downes, and David M.~Jones,
-% \emph{The \pkg{amsmath} package} Version 2.13,
-% 2000/07/18.
-% (Available from CTAN as file \texttt{amsmath.dtx}.)
+% \bibitem{Perlis01} Alexander R. Perlis, \emph{A complement to
+% \cs{smash}, \cs{llap}, and \cs{rlap}}, TUGboat 22(4)
+% (2001). Available at
+% \url{https://www.tug.org/TUGboat/tb22-4/tb72perlS.pdf}.
+% \bibitem{Ams99} American Mathematical Society and Michael Downes,
+% \emph{Technical notes on the \pkg{amsmath} package}. Version 2.0,
+% 1999/10/29. Available via
+% \url{http://mirrors.ctan.org/macros/latex/required/amsmath/technote.pdf}.
+% \bibitem{Ams00} Frank Mittelbach, Rainer Sch\"opf, Michael Downes,
+% David M.~Jones and David Carlisle, \emph{The \pkg{amsmath}
+% package}. Version 2.17e, 2020/01/20. Maintained by the \LaTeX3
+% project. Available as file
+% \url{http://mirrors.ctan.org/macros/latex/required/amsmath/amsmath.dtx}.
% \bibitem{A-W:MG04}
% Frank Mittelbach and Michel Goossens.
% \emph{The {\LaTeX} Companion}.
@@ -2946,28 +2950,25 @@ colorlinks,
% Boston, Massachusetts, 2 edition, 2004.
% With Johannes Braams, David Carlisle, and Chris Rowley.
%
-% \bibitem{Carl99}
-% David Carlisle,
-% \emph{The \pkg{keyval} Package},
-% Version 1.13, 1999/03/16.
-% (Available from CTAN as file \texttt{keyval.dtx}.)
-%
-% \bibitem{Voss:2004}
-% Herbert Vo\ss,
-% \emph{Math mode}, Version 1.71,
-% 2004/07/06.
-% (Available from CTAN as file \texttt{Voss-Mathmode.pdf}.)
+% \bibitem{Carl99} David Carlisle, \emph{The \pkg{keyval} Package}.
+% Version 1.15, 2014/10/28. Available via
+% \url{https://ctan.org/pkg/keyval}.
+%
+% \bibitem{Voss:2004} Herbert Vo\ss, \emph{Math mode}. Version 2.47,
+% 2014/01/30. Available as
+% \url{http://mirrors.ctan.org/obsolete/info/math/voss/mathmode/Mathmode.pdf}. Please
+% note that the author has marked the document as \emph{obsolete}.
%
% \bibitem{Swanson}
% Ellen Swanson,
% \emph{Mathematics into type}.
% American Mathematical Society, updated edition, 1999.
% Updated by Arlene O'Sean and Antoinette Schleyer. Available from
-% the AMS at \url{http://www.ams.org/arc/styleguide/mit-2.pdf}
+% the AMS at \url{https://www.ams.org/arc/styleguide/mit-2.pdf}.
%
-% \bibitem{TBT}
-% Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician's Reference}, 2007.
-% Freely available at \url{https://ctan.org/pkg/texbytopic}.
+% \bibitem{TBT} Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician's
+% Reference}, 2007. The book is available at
+% \url{https://ctan.org/pkg/texbytopic}.
% \end{thebibliography}
%
%
@@ -2981,13 +2982,13 @@ colorlinks,
% \begin{macrocode}
%<*package>
\ProvidesPackage{mathtools}%
- [2020/03/24 v1.24 mathematical typesetting tools]
+ [2021/03/18 v1.25 mathematical typesetting tools]
% \end{macrocode}
% \changes{v1.10}{2011/02/12}{Might as well make sure that we need the
% latest version of \texttt{mhsetup}}
% \begin{macrocode}
\RequirePackage{keyval,calc}
-\RequirePackage{mhsetup}[2017/03/31]
+\RequirePackage{mhsetup}[2021/03/18]
\MHInternalSyntaxOn
% \end{macrocode}
% \changes{v1.13}{2013/02/11}{Robustifying \cs{(}\cs{)}\cs{[}\cs{]}}
@@ -4158,7 +4159,13 @@ colorlinks,
\lineskip\thr@@\fontdimen8 \scriptfont\thr@@
\lineskiplimit\lineskip
\ialign\bgroup\ifx c##1\hfil\fi
- $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
+% \end{macrocode}
+% \changes{v1.25}{2021/03/18}{use \cs{MT_cramped_internal:Nn} instead,
+% see issue \#17}
+% Here we should use the proper cramped internal macro
+% \begin{macrocode}
+ %% $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
+ \span\MT_cramped_internal:Nn \scriptstyle {####}%
\hfil\crcr
}{%
\crcr\egroup\egroup
@@ -4728,21 +4735,24 @@ colorlinks,
% both columns, while \env{dcases*} has text in the second column.
% \changes{v1.08}{2010/06/10}{changed to match the change in
% \cs{newcases} plus added rcases and drcases}
+% \changes{v1.25}{2021/01/14}{Replaced \texttt{\{\#\#\}} by
+% \texttt{\#\#}, otherwise one cannot counteract the \cs{hfil} in the
+% definition with a \cs{hfil(l)} in a cell. Related to issue \#20 and https://tex.stackexchange.com/a/252412/3929}
% \begin{macrocode}
\newcases{dcases}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
+ $\m@th\displaystyle##$\hfil}{$\m@th\displaystyle##$\hfil}{\lbrace}{.}
\newcases{dcases*}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{\lbrace}{.}
+ $\m@th\displaystyle##$\hfil}{##\hfil}{\lbrace}{.}
\newcases{rcases}{\quad}{%
- $\m@th{##}$\hfil}{$\m@th{##}$\hfil}{.}{\rbrace}
+ $\m@th##$\hfil}{$\m@th##$\hfil}{.}{\rbrace}
\newcases{rcases*}{\quad}{%
- $\m@th{##}$\hfil}{{##}\hfil}{.}{\rbrace}
+ $\m@th##$\hfil}{##\hfil}{.}{\rbrace}
\newcases{drcases}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{.}{\rbrace}
+ $\m@th\displaystyle##$\hfil}{$\m@th\displaystyle##$\hfil}{.}{\rbrace}
\newcases{drcases*}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{.}{\rbrace}
+ $\m@th\displaystyle##$\hfil}{##\hfil}{.}{\rbrace}
\newcases{cases*}{\quad}{%
- $\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{.}
+ $\m@th##$\hfil}{##\hfil}{\lbrace}{.}
% \end{macrocode}
% \end{environment}
% \end{environment}
@@ -4913,12 +4923,19 @@ colorlinks,
% specialized commands \cs{MT_smop_smash_l:NNNNN},
% \cs{MT_smop_smash_r:NNNNN}, or the default
% \cs{MT_smop_smash_lr:NNNNN}.
+% \changes{v1.25}{2021/03/04}{Verify that opt arg corresponds to
+% something predefined}
% \begin{macrocode}
\newcommand*\smashoperator[2][lr]{
- \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}}
- \toks@{#2}
- \expandafter\MT_smop_get_args:wwwNnNn
+ \@ifundefined{MT_smop_smash_#1:NNNNN}{
+ \PackageError{mathtools}{Opt~ arg~ '#1'~ for~ \@backslashchar smashoperator~
+ is~ not~ supported.\MessageBreak Use~ l,~r~or~lr~ (default)}{}
+ }{
+ \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}}
+ \toks@{#2}
+ \expandafter\MT_smop_get_args:wwwNnNn
\the\toks@\@nil\@nil\@nil\@nil\@nil\@nil\@@nil
+ }
}
% \end{macrocode}
% \end{macro}
@@ -5119,12 +5136,17 @@ colorlinks,
}
% \end{macrocode}
% The `lr' variant
+% \changes{v1.25}{2021/03/04}{add `rl' as an alias for `lr'}
% \begin{macrocode}
\def\MT_smop_smash_lr:NNNNN #1#2#3#4#5{
\MT_smop_needed_args:NNNNN #1#2#3#4#5
}
% \end{macrocode}
-%
+% Add `rl' as an alias for `lr'
+% \begin{macrocode}
+\MH_let:NwN \MT_smop_smash_rl:NNNNN \MT_smop_smash_lr:NNNNN
+% \end{macrocode}
+%
%
% \subsection{Adjusting limits}
%
@@ -5777,24 +5799,26 @@ colorlinks,
% \begin{macro}{\MT_mathclap:Nn}
% First we'll \cs{provide} those macros (they are so simple that I
% think other packages might define them as well).
+% \changes{v1.15}{2021/03/04}{Add \cs{relax} before the \cs{ifx}'s to
+% prevent corner case premature expansions}
% \begin{macrocode}
\providecommand*\clap[1]{\hb@xt@\z@{\hss#1\hss}}
\providecommand*\mathllap[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_mathllap:Nn
\else
\expandafter \MT_mathllap:Nn \expandafter #1
\fi
}
\providecommand*\mathrlap[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_mathrlap:Nn
\else
\expandafter \MT_mathrlap:Nn \expandafter #1
\fi
}
\providecommand*\mathclap[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_mathclap:Nn
\else
\expandafter \MT_mathclap:Nn \expandafter #1
@@ -5881,9 +5905,11 @@ colorlinks,
%
% \begin{macro}{\cramped}
% Make sure the expansion is timed correctly.
+% \changes{v1.15}{2021/03/04}{Add \cs{relax} before the \cs{ifx}'s to
+% prevent corner case premature expansions}
% \begin{macrocode}
\providecommand*\cramped[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_cramped_internal:Nn
\else
\expandafter \MT_cramped_internal:Nn \expandafter #1
@@ -5898,8 +5924,14 @@ colorlinks,
% \end{macrocode}
% Create a box containing the math and force a cramped style by
% issuing a non-existing radical.
+% \changes{v1.25}{2020/12/16}{Don't set \cs{nulldelimiterspace} to
+% zero, back kern intead, solves issue \#18}
+% \changes{v1.25}{2021/03/18}{placed \cs{sbox}\cs{z@} by
+% \cs{setbox}\cs{z@}\cs{hbox} to better handle expansion in
+% \env{crampedsubarray}, see issue \#17}
% \begin{macrocode}
- \sbox\z@{$\m@th#1\nulldelimiterspace=\z@\radical\z@{#2}$}
+ %% \sbox\z@{$\m@th#1\kern-\nulldelimiterspace\radical\z@{#2}$}
+ \setbox\z@\hbox{$\m@th#1\kern-\nulldelimiterspace\radical\z@{#2}$}
% \end{macrocode}
% Then make sure the height is correct.
% \begin{macrocode}
@@ -5919,7 +5951,14 @@ colorlinks,
3
\fi
\advance\dimen@-\ht\z@ \ht\z@=-\dimen@
- \box\z@
+% \end{macrocode}
+% Leave vertical mode before typesetting the box and add a
+% \texttt{\{\}} in front to gard against unnecessary reboxing
+% \changes{v1.25}{2021/03/04}{Added vmode protection and reboxing
+% gard, see issue \#19}
+% \begin{macrocode}
+ \ifvmode\leavevmode\fi
+ {}\box\z@
}
% \end{macrocode}
% \end{macro}
@@ -5934,9 +5973,11 @@ colorlinks,
% \begin{macro}{\crampedrlap}
% \begin{macro}{\MT_cramped_rlap_internal:Nn}
% Cramped versions of \cs{mathXlap} (for speed). Made by the author.
+% \changes{v1.15}{2021/03/04}{Add \cs{relax} before the \cs{ifx}'s to
+% prevent corner case premature expansions}
% \begin{macrocode}
\providecommand*\crampedllap[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_cramped_llap_internal:Nn
\else
\expandafter \MT_cramped_llap_internal:Nn \expandafter #1
@@ -5946,7 +5987,7 @@ colorlinks,
{}\llap{\MT_cramped_internal:Nn #1{#2}}
}
\providecommand*\crampedclap[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_cramped_clap_internal:Nn
\else
\expandafter \MT_cramped_clap_internal:Nn \expandafter #1
@@ -5956,7 +5997,7 @@ colorlinks,
{}\clap{\MT_cramped_internal:Nn #1{#2}}
}
\providecommand*\crampedrlap[1][\@empty]{
- \ifx\@empty#1\@empty
+ \relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_cramped_rlap_internal:Nn
\else
\expandafter \MT_cramped_rlap_internal:Nn \expandafter #1
@@ -5992,7 +6033,14 @@ colorlinks,
\lineskip\thr@@\fontdimen8 \scriptfont\thr@@
\lineskiplimit\lineskip
\ialign\bgroup\ifx c#1\hfil\fi
- $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+% \end{macrocode}
+% Though here we ought to use the proper cramped internal macro, as
+% otherwise there will be a slight difference in vertical spacing
+% \changes{v1.25}{2021/03/18}{Added \cs{MT_cramped_internal:Nn}, see
+% issue \#17}
+% \begin{macrocode}
+ %%$\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+ \span\MT_cramped_internal:Nn \scriptstyle {##}%
\hfil\crcr%
}{%
\crcr\egroup\egroup
diff --git a/macros/latex/contrib/mathtools/mathtools.ins b/macros/latex/contrib/mathtools/mathtools.ins
index 7cb4e3727c..82b7c16ff0 100644
--- a/macros/latex/contrib/mathtools/mathtools.ins
+++ b/macros/latex/contrib/mathtools/mathtools.ins
@@ -12,7 +12,6 @@
%% Copyright (C) 2012-2019 by Lars Madsen
%% Copyright (C) 2012-2020 by Lars Madsen, the LaTeX3 project
%%
-%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any later
@@ -33,7 +32,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mathtools 2020/01/17 v1.23}
+\Msg{* Package: mathtools 2020/03/24 v1.24}
\Msg{************************************************************************}
\keepsilent
@@ -45,7 +44,7 @@ This is a generated file.
Copyright (C) 2002-2011 by Morten Hoegholm
Copyright (C) 2012-2019 by Lars Madsen
-Copyright (C) 2012-2020 by Lars Madsen, the LaTeX3 project
+Copyright (C) 2020 by Lars Madsen, the LaTeX3 project
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
diff --git a/macros/latex/contrib/mathtools/mathtools.pdf b/macros/latex/contrib/mathtools/mathtools.pdf
index f779170580..0ca42bfa06 100644
--- a/macros/latex/contrib/mathtools/mathtools.pdf
+++ b/macros/latex/contrib/mathtools/mathtools.pdf
Binary files differ
diff --git a/macros/latex/contrib/mathtools/mhsetup.dtx b/macros/latex/contrib/mathtools/mhsetup.dtx
index b44eea12cb..bf89bc9c88 100644
--- a/macros/latex/contrib/mathtools/mhsetup.dtx
+++ b/macros/latex/contrib/mathtools/mhsetup.dtx
@@ -6,11 +6,11 @@
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
-% version 1.3 of this license or (at your option) any later
+% 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.
+% and version 1.3c or later is part of all distributions of
+% LaTeX version 2008/05/04 or later.
%
% This work has the LPPL maintenance status "maintained".
%
@@ -70,7 +70,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mhsetup 2017/03/31 v1.3 mhsetup}
+\Msg{* Package: mhsetup 2021/03/18 v1.4 mhsetup}
\Msg{************************************************************************}
\keepsilent
@@ -86,11 +86,11 @@ Copyright (C) 2020- by Lars Madsen, The LaTeX3 team
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
-version 1.3 of this license or (at your option) any later
+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.
+and version 1.3c or later is part of all distributions of
+LaTeX version 2008/05/04 or later.
This work has the LPPL maintenance status "maintained".
@@ -133,7 +133,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mhsetup.drv}%
- [2017/03/31 v1.3 programming setup (MH)]
+ [2021/03/18 v1.4 programming setup (MH)]
\documentclass{ltxdoc}
\usepackage{mhsetup}
@@ -162,7 +162,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{298}
+% \CheckSum{301}
%
% \GetFileInfo{mhsetup.drv}
%
@@ -302,7 +302,7 @@ and the derived files
% \begin{macrocode}
%<*package>
\ProvidesPackage{mhsetup}%
- [2017/03/31 v1.3 programming setup (MH)]
+ [2021/03/18 v1.4 programming setup (MH)]
% \end{macrocode}
% \subsection{The new internal syntax}
% \begin{macro}{\MHInternalSyntaxOn}
@@ -576,11 +576,16 @@ and the derived files
% \begin{macro}{\MH_nospace_protected_testopt:n}
% Scanning for the next character but disallow spaces.
% \changes{v1.3}{2017/03/31}{Added MH\_ prefix to several \cs{if...} macros}
+% \changes{v1.4}{2021/01/14}{Added
+% \cs{MH\_group\_align\_safe\_begin/end:} as suggested by
+% Phelype Oleinik in issue \#15. This enables
+% \cs{MH\_nospace\_ifnextchar:Nnn} to work correctly inside nested alignments}
% \begin{macrocode}
\long\def\MH_nospace_ifnextchar:Nnn #1#2#3{
+ \MH_group_align_safe_begin: % added 2021/01/14
\MH_let:NwN\reserved@d=~#1
- \def\reserved@a{#2}
- \def\reserved@b{#3}
+ \def\reserved@a{\MH_group_align_safe_end: #2} % changed 2021/01/14
+ \def\reserved@b{\MH_group_align_safe_end: #3} % changed 2021/01/14
\futurelet\@let@token\MH_nospace_nextchar:
}
\def\MH_nospace_nextchar:{
diff --git a/macros/latex/contrib/mathtools/mhsetup.ins b/macros/latex/contrib/mathtools/mhsetup.ins
new file mode 100644
index 0000000000..edf6baa824
--- /dev/null
+++ b/macros/latex/contrib/mathtools/mhsetup.ins
@@ -0,0 +1,93 @@
+%%
+%% This is file `mhsetup.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mhsetup.dtx (with options: `install')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2002-2007,2010 by Morten Hoegholm
+%% Copyright (C) 2017-2019 by Lars Madsen
+%% Copyright (C) 2020- by Lars Madsen, The LaTeX3 team
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 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".
+%%
+%% This Current Maintainer of this work is Lars Madsen
+%% <daleif@math.au.dk>, The LaTeX3 team https://github.com/latex3/mathtools
+%%
+%% This work consists of the main source file mhsetup.dtx
+%% and the derived files
+%% mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv.
+%%
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: mhsetup 2017/03/31 v1.3 mhsetup}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2002-2007,2010 by Morten Hoegholm
+Copyright (C) 2017-2019 by Lars Madsen
+Copyright (C) 2020- by Lars Madsen, The LaTeX3 team
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 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".
+
+This Current Maintainer of this work is Lars Madsen
+<daleif@math.au.dk>, The LaTeX3 team https://github.com/latex3/mathtools
+
+This work consists of the main source file mhsetup.dtx
+and the derived files
+ mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv.
+
+\endpreamble
+
+\generate{%
+ \file{mhsetup.ins}{\from{mhsetup.dtx}{install}}%
+ \file{mhsetup.drv}{\from{mhsetup.dtx}{driver}}%
+ \usedir{tex/latex/mh}%
+ \file{mhsetup.sty}{\from{mhsetup.dtx}{package}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* mhsetup.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `mhsetup.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+\endinput
+%%
+%% End of file `mhsetup.ins'.
diff --git a/macros/latex/contrib/mathtools/mhsetup.pdf b/macros/latex/contrib/mathtools/mhsetup.pdf
index 2af0d0843c..cdade1846e 100644
--- a/macros/latex/contrib/mathtools/mhsetup.pdf
+++ b/macros/latex/contrib/mathtools/mhsetup.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
index 4d417af72d..2f09d1fbf8 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
+++ b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md
@@ -5,7 +5,23 @@ first release 0.95a, 2021-02-23 will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project uses date-based 'snapshot' version identifiers.
-## [Unreleased]
+## [2021-03-17]
+
+### Fixed
+- \pdffield-setup:nn
+- ocgcolorlinks test for dvips (pdf version is not available)
+
+### Changed
+- \pdf_name_from_unicode_e:n: use cvn operator with dvips
+- \url: it has an optional argument through which protocol, formatting command and encoding
+ can be changed
+- \href can use the url arguments too.
+- \hyper@linkfile (GoToR links) now uses a filespec dictionary. This improves the
+ support for non-ascii files names.
+
+### Added
+- \hrefurl, \hrefrun, \hrefpdf for better support of non-ascii input and
+ default options, see the hyperref-generic documentation.
## [2021-03-07]
diff --git a/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md
index e8ccd6bde2..40ae909e00 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/README.md
+++ b/macros/latex/contrib/pdfmanagement-testphase/README.md
@@ -1,6 +1,6 @@
# LaTeX PDF management testphase bundle
-Version: 0.95b, 2021-03-07
+Version: 0.95c, 2021-03-17
This package is used during a test phase to load the new PDF management code
of LaTeX.
diff --git a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
index 0fbe8eb671..15754414a1 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty
@@ -22,8 +22,8 @@
%% This file has the LPPL maintenance status "maintained".
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{color-ltx}
- [2021/03/07 v1.2e Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase 2021-03-07 v0.95b) (DPC)]
+\ProvidesPackage{color-ltx}[2021-03-17 v0.95c
+ Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2021/03/07 v1.2e) (DPC)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
\catcode`\noexpand\"\the\catcode`\"\relax
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
index ee7c99874a..8c60439dd3 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx
@@ -86,7 +86,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -172,7 +172,7 @@
% The current handling of the metadata is problematic:
% \begin{itemize}
% \item External package like \pkg{hyperxmp} wants to access them too and for
-% this had to patch an number of internal hyperref commands---which is a problem
+% this had to patch an number of internal \pkg{hyperref} commands---which is a problem
% if the internal commands change (as happens with this new driver)
% \item \pkg {hyperref} (and also \pkg{hyperxmp})
% tries to deduce some datas from document commands like
@@ -212,7 +212,7 @@
%
% \end{itemize}
% \section{Dates}
-% \pkg{hyperref has a few keys to set dates}. They typically expect the date
+% \pkg{hyperref} has a few keys to set dates. They typically expect the date
% in \enquote{PDF} format: |D:YYYYMMDDhhmmss+01'00'|.
%
% One should be aware that \pkg{hyperxmp} will sometimes
@@ -243,6 +243,115 @@
% So if the PDF page size is wrong: load one of the other packages setting it
% e.g. the \pkg{color} or the \pkg{graphicx} package.
%
+% \section{Commands to create \enquote{external} references}
+% \pkg{hyperref} has three commands related to external references like
+% URL and file: \cs{url},
+% \cs{nolinkurl} and \cs{href}. The first two take one argument,
+% while the last has two: the url and some free text.
+%
+%
+% \cs{url} and \cs{href} create link annotations. \cs{url} creates always an URI
+% type, \cs{href} creates URI, GoToR and Launch
+% depending on the structure of the argument.
+%
+% \cs{href} has to create a (in the PDF) valid url or file name from its first argument.
+% \cs{url} has to create a (in the PDF) valid url from its only argument and has also to print
+% this argument as url. \cs{nolinkurl} only prints the url.
+%
+% For the printing \cs{url} and \cs{nolinkurl} rely on the url package and its \cs{Url} command.
+%
+% (Expandable) commands are expanded and special chars can also be input by commands but
+% beside this no conversion is done: for all input \pkg{hyperref} basically assumes that
+% the input is already a valid percent encoded url or a valid file name. \pkg{hyperref} also
+% doesn't extend or add protocols.
+%
+% As nowadays everyone is used to copy and paste links with all sorts of unicode into a browser and
+% they work the \pkg{hyperref} input is clearly rather restricted.
+%
+% So the new driver tries to extend the input and print options. Both \cs{href} and \cs{url}
+% can now be told to accept non-ascii url's and to convert them internally to
+% percent encoding. It is possible to define a standard protocol and so to avoid to
+% have to type it all the time.
+%
+% But extending the \emph{print} options for \cs{url} and \cs{nolinkurl} while still
+% using the url-package is hard to impossible in pdf\LaTeX{} due to the way the url package works.
+% Some chars can be added with the help of \cs{UrlSpecial} (at the cost of warnings)
+% but it doesn't work for every input and documenting and explaining all the edge cases is no joy.
+% So instead the new driver offers here the option to use different commands to format
+% the printed output. It must be noted that this disable the special \enquote{hyphenation} method of
+% url's.
+%
+%
+% \subsection{Special problem: links to files}
+%
+% When a file is linked with \cs{href} than normally it is added as URI link. The exceptions are PDF's:
+% for them PDF has the special type GoToR which allows also to link to a destination or a special page.
+%
+% After a number of tests with various PDF viewer established that non-ascii files names don't
+% work at all with a simple file name specification GoToR links now use a full
+% filespec dictionary. This works better, but still no every PDF viewer support this correctly.
+% on various system.
+%
+% The following can be used to test viewers. It assumes that a \texttt{test.pdf},
+% a \texttt{grüßpdf.pdf} and a \texttt{grüße.txt} are in the current folder.
+%
+% \hrefpdf{test.pdf}{test-ascii}
+%
+% \hrefpdf{grüßpdf.pdf}{test grüßpdf.pdf}
+%
+% \hrefurl[urlencode]{grüße.txt}{test grüße.txt}
+%
+%
+% \subsection{Splits}
+%
+% \cs{href} tries to be clever and to detect from the argument
+% if a url or a file link or a launch command should be created.
+%
+% The rules are not trivial, and they make the code complicated.
+% This detection also makes it more difficult to handle special cases
+% like non-ascii input for the link types.
+%
+% For this reason three new commands have been create:
+%
+% \begin{itemize}
+% \item \cs{hrefurl} for standard urls (and non-pdf files)
+% \item \cs{hrefpdf} for references to pdf files
+% \item \cs{hrefrun} for launch links
+% \end{itemize}
+%
+% The new commands don't use prefixes like \cs{href}.
+% Their argument should be the real content.
+%
+% \subsection{Options}
+% All \cs{href} commands and \cs{url} have an option argument for keyval syntax.
+% It accepts the following keys. Not all keys make sense for all keys, but they don't
+% error, they are silently ignored.
+%
+% \begin{tabular}{llp{6cm}}
+% key & applicable commands & note\\\hline
+% urlencode & \cs{hrefurl} & if set the code will convert the argument to percent encoding. This allows non-ascii input.\\
+% protocol & \cs{hrefurl}, \cs{url} & This sets a prefix/protocol that is added to the url, see below. \\
+% format & \cs{url} & a command used to format the printed text. It replaces the standard \cs{Url}. This can improve non-ascii
+% typesetting at the cost of losing the special line breaking.\\
+% destination & \cs{href}, \cs{hrefpdf} & A destination name in the PDF\\
+% page & \cs{href}, \cs{hrefpdf} & destination page, default: 1\\
+% pdfremotestartview &\cs{href}, \cs{hrefpdf} & start view, default: Fit\\
+% ismap & \cs{href}, \cs{hrefurl} & see PDF reference\\
+% afrelationship & \cs{href}, \cs{hrefpdf} & Changes the /AFRelationship key of the filespec dictionary. The value should be a PDF name without the starting slash.\\
+% run-parameter & \cs{hreflaunch} & run parameter (see the PDF reference)\\
+% nextactionraw & various & puts a /Next entry in the action dictionary (see the PDF reference)\\
+% \end{tabular}
+%
+%
+% The first four keys can be set also in \cs{hypersetup} for all following commands in
+% the current group through the keys
+% \texttt{href/urlencode}, \texttt{href/protocol}, \texttt{href/destination}, \texttt{href/format}.
+%
+% It is possible to define own url commands with specific options e.g. with
+%
+% \begin{verbatim}
+% \NewDocumentCommand\myurl{O{}}{\url[protocol=https://,format=\textsc,#1]}
+% \end{verbatim}
%
% \section{Link decorations: border, color, OCG-color, \ldots}
% Some main changes are
@@ -329,7 +438,7 @@
%
% The new key |colorscheme| allows to switch the colors (both for text and borders)
% with a key word. It takes one of the values
-% |orginal| (the colors as hyperref uses normally), |phelype|, |daleif|,
+% |orginal| (the colors as \pkg{hyperref} uses normally), |phelype|, |daleif|,
% |szabolcsA|, |szabolcsB|, |tivv|, |julian|, |henryford|.
%
% The names refer to the authors in answers and comments in
@@ -396,7 +505,7 @@
% to pdftex and luatex driver, but a change for the xetex and dvips driver.
% The (undocumentated) command \cs{setpdflinkmargin} does nothing.
% Use either the key |pdflinkmargin| or \cs{pdfannot_link_margin:n} to change the margin.
-% See also the description in section~\ref{sec:keydesc} and in the hyperref manual.
+% See also the description in section~\ref{sec:keydesc} and in the \pkg{hyperref} manual.
% \end{description}
%
% \section{PDF strings}
@@ -483,7 +592,7 @@
% in \cs{hypersetup} and disable links and anchors completely.
% The new driver passes the options also to the \pkg{bookmark} package if
% \pkg{bookmark} hasn't been loaded yet as bookmarks can't work properly if
-% the anchors from hyperref are missing.
+% the anchors from \pkg{hyperref} are missing.
%
% \DescribeHypkey{link}%
% \DescribeHypkey{url}%
@@ -812,8 +921,7 @@
%<@@=hyp>
% \end{macrocode}
% \begin{macrocode}
-\ProvidesFile{hgeneric-testphase.def}
- [2021/02/22 v0.95b %
+\ProvidesFile{hgeneric-testphase.def}[2021-03-17 v0.95c %
generic Hyperref driver for the LaTeX PDF management testphase bundle]
\RequirePackage{etoolbox} %why?
@@ -989,9 +1097,10 @@
% \section{Variants}
% \begin{macrocode}
\cs_generate_variant:Nn\pdf_destination:nn {nf}
+\cs_generate_variant:Nn\pdf_object_ref:n {e}
% \end{macrocode}
% \section{Overwriting/providing commands from hyperref}
-% hyperref checks driver version, we need to suppress this during the development
+% \pkg{hyperref} checks driver version, we need to suppress this during the development
% \begin{macrocode}
\chardef\Hy@VersionChecked=1 %don't check the version!
% \end{macrocode}
@@ -1066,7 +1175,165 @@
}
}
% \end{macrocode}
+% Allow non-ascii in href, and add more href versions.
+% We add a few new keys:
+% |urlencode| to force percent encoding (\cs{hrefurl}, \cs{href})
+% |protocol | to add a protocol (\cs{hrefurl},
+% \cs{href} doesn't work here as it needs the colon for the split and the guessing.)
+% |destination| to add a destination (\cs{hrefpdf})
%
+% \begin{macrocode}
+
+\bool_new:N \l_@@_href_url_encode_bool
+\bool_new:N \l_@@_href_url_ismap_bool
+\tl_new:N \l_@@_href_url_protocol_tl
+\tl_new:N \l_@@_href_pdf_destination_tl
+\tl_new:N \l_@@_href_pdf_page_tl
+\tl_new:N \l_@@_href_run_parameter_tl
+\cs_new_protected:Npn \@@_href_url_format {\begingroup\Url}
+
+
+\keys_define:nn { hyp / href }
+ {
+ ,urlencode .bool_set:N = \l_@@_href_url_encode_bool
+ ,format .code:n = { \cs_set_eq:NN \@@_href_url_format #1 },
+ ,protocol .tl_set:N = \l_@@_href_url_protocol_tl
+ ,destination .tl_set:N = \l_@@_href_pdf_destination_tl
+ ,pdfremotestartview .code:n =
+ {
+ \keys_set:nn { hyp / setup }
+ { pdfremotestartview = #1 }
+ }
+ ,page .code:n =
+ {
+ \tl_set:Nn \l_@@_href_pdf_page_tl {#1}
+ \tl_set:Nn \Hy@href@page {#1}
+ }
+ ,ismap .bool_set:N = \l_@@_href_url_ismap_bool
+ ,run-parameter .tl_set:N = \l_@@_href_run_parameter_tl
+ ,nextactionraw .code:n =
+ { %perhaps some safety match later, see hyperref code
+ \tl_if_empty:nTF
+ {
+ \pdfdict_remove:nn{l_hyp/annot/A}{Next}
+ }
+ {
+ \pdfdict_put:nnn{l_hyp/annot/A}{Next}{#1}
+ \tl_set:Nn \Hy@href@nextactionraw {/Next~#1}
+ \keys_set:nn {hyp / setup }{ pdfnewwindow = true}
+ }
+ }
+ ,afrelationship .code:n =
+ {
+ \pdfdict_put:nnx
+ { l_pdffile/Filespec}{AFRelationship}{ \pdf_name_from_unicode_e:n {#1}}
+ }
+
+ }
+
+\keys_define:nn { hyp / setup }
+ {
+ ,href / urlencode .bool_set:N = \l_@@_href_url_encode_bool
+ ,href / urlencode .default:n = {true}
+ ,href / urlencode .initial:n = {false}
+ ,href / protocol .tl_set:N = \l_@@_href_url_protocol_tl
+ ,href / destination .tl_set:N = \l_@@_href_pdf_destination_tl
+ ,href / format .code:n = { \cs_set_eq:NN \@@_href_url_format #1 }
+ }
+
+
+
+\DeclareRobustCommand*{\href}[1][]{%
+ \begingroup
+ \keys_set:nn { hyp / href } {#1}
+ \let\protect\@unexpandable@protect
+ \bool_if:NTF \l_@@_href_url_encode_bool
+ {
+ \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI}
+ }
+ {
+ \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string}
+ }
+ \@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}%
+}
+
+
+\DeclareRobustCommand*{\hrefurl}[1][]{
+ \group_begin:
+ \keys_set:nn { hyp / href } {#1}
+ \let\protect\@unexpandable@protect
+ \bool_if:NTF \l_@@_href_url_encode_bool
+ {
+ \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI}
+ }
+ {
+ \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string}
+ }
+ \hyper@normalise\@@_href_url_aux:nn}
+
+\cs_new_protected:Npn \@@_href_url_aux:nn #1 #2
+ {
+ \exp_args:Nno\hyper@linkurl{#2}{\l_@@_href_url_protocol_tl#1}
+ \group_end:
+ }
+
+
+\DeclareRobustCommand*{\hrefpdf}[1][]
+ {
+ \begingroup
+ \keys_set:nn { hyp / href } {#1}
+ \let\protect\@unexpandable@protect
+ \hyper@normalise\@@_href_pdf_aux:nn
+ }
+
+\cs_new_protected:Npn \@@_href_pdf_aux:nn #1 #2
+ {
+ \exp_args:Nnno\hyper@linkfile{#2}{#1}{\l_@@_href_pdf_destination_tl}\endgroup
+ }
+
+\DeclareRobustCommand*{\hrefrun}[1][]
+ {
+ \group_begin:
+ \keys_set:nn { hyp / href } {#1}
+ \let\protect\@unexpandable@protect
+ \hyper@normalise\@@_href_run_aux:nn
+ }
+
+\cs_new_protected:Npn \@@_href_run_aux:nn #1 #2
+ {
+ \exp_args:Nnno\hyper@linklaunch{#2}{#1}{\l_@@_href_run_parameter_tl}
+ \group_end:
+ }
+
+\DeclareRobustCommand*{\url}[1][]
+ {
+ \group_begin:
+ \keys_set:nn {hyp / href } {#1}
+ \let\protect \@unexpandable@protect
+ \bool_if:NTF \l_@@_href_url_encode_bool
+ {
+ \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI}
+ }
+ {
+ \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string}
+ }
+ \hyper@normalise\@@_href_url_aux:n
+ }
+
+\cs_new_protected:Npn \@@_href_url_aux:n #1
+ {
+ \exp_args:Nno
+ \hyper@linkurl{\@@_href_url_format {#1}}
+ {\l_@@_href_url_protocol_tl#1}
+ \group_end:
+ }
+
+
+\NewExpandableDocumentCommand\@@_secondoftwowithopt:wnn {omm}{#3}
+\pdfstringdefDisableCommands{\let\hrefurl\@@_secondoftwowithopt:wnn}
+\pdfstringdefDisableCommands{\let\hrefpdf\@@_secondoftwowithopt:wnn}
+\pdfstringdefDisableCommands{\let\hrefrun\@@_secondoftwowithopt:wnn}
+% \end{macrocode}
% \section{Compability commands}
% \subsection{Metadata}
% A number of values should be accessible from other packages. Until now
@@ -1591,7 +1858,7 @@
% \end{macrocode}
% \end{macro}
% \section {Core Hyperref Commands}
-% Every hyperref has to define eight core command:
+% Every \pkg{hyperref} has to define eight core command:
% \begin{verbatim}
% \hyper@anchor
% \hyper@anchorstart
@@ -1719,7 +1986,7 @@
}
% \end{macrocode}
%
-% Now the three hyperref commands.
+% Now the three \pkg{hyperref} commands.
% The splitted commands \cs{hyper@linkstart} and \cs{hyper@linkend} are used for
% footnotemarks, toc and natbib-cites.
% \begin{function}{\hyper@link}
@@ -1768,7 +2035,8 @@
\__hyp_link_goto_end:
\group_end:
\Hy@VerboseLinkStop
- }{#3}
+ }
+ {{\let\protect\relax#3}}
}
\cs_new_protected:Npn \hyper@linkstart #1 #2 %#1 context, #2=destination name
@@ -1810,13 +2078,9 @@
{ \l_@@_text_enc_uri_print_tl }
\l_@@_uri_tmpa_tl
\pdfdict_put:nno{l_hyp/annot/A/URI}{URI}{\l_@@_uri_tmpa_tl}
- \ifHy@href@ismap
- \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
- \fi
- \tl_if_empty:NF \Hy@href@nextactionraw
+ \bool_if:NT \l_@@_href_url_ismap_bool
{
- \str_remove_once:Nn \Hy@href@nextactionraw {/Next}
- \pdfdict_put:nno{l_hyp/annot/A/Next}{\Hy@href@nextactionraw}
+ \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
}
\cs_set_eq:NN \# \c_hash_str
\cs_set_eq:NN \% \c_percent_str
@@ -1825,19 +2089,16 @@
\pdfannot_dict_put:nnx {link/URI}{A}{<<\pdfdict_use:n {l_hyp/annot/A/URI}>>}
\pdfannot_link:nxn { URI }
{
- % /A
-% <<
-% \pdfdict_use:n {l_hyp/annot/A/URI}
-% >>
}
{
+ \let\protect\relax
#1
\Hy@xspace@end
\Hy@VerboseLinkStop %where is the start??
}
\group_end:
}
- {#1}
+ {{\let\protect\relax#1}}
}
% \end{macrocode}
@@ -1847,52 +2108,60 @@
\pdfdict_put:nnn {l_hyp/annot/A/GoToR}{Type}{/Action}
\pdfdict_put:nnn {l_hyp/annot/A/GoToR}{S}{/GoToR}
+
\cs_new_protected:Npn \hyper@linkfile #1 #2 #3 % link text, filename, destname
{
\bool_if:NTF \l_@@_annot_GoToR_bool
{
\group_begin:
- \tl_set:Nn \l_@@_filename_tmpa_tl { #2 }
- \Hy@CleanupFile \l_@@_filename_tmpa_tl
- \@@_text_pdfstring:ooN
- { \l_@@_filename_tmpa_tl }
- { \l_@@_text_enc_file_print_tl }
- \l_@@_filename_tmpa_tl
- \pdfdict_put:nno {l_hyp/annot/A/GoToR}{F}{\l_@@_filename_tmpa_tl}
+ \tl_set:Nx \l_@@_filename_tmpa_tl { \text_expand:n { #2 } }
+ \exp_args:Nx
+ \pdf_object_if_exist:nF { @@_file_\tl_to_str:N \l_@@_filename_tmpa_tl }
+ {
+ \pdfdict_put:nnx { l_pdffile/Filespec}{Subtype}{\pdf_name_from_unicode_e:n {application/pdf}}
+ \exp_args:Nnox
+ \pdffile_embed_file:nnn
+ {}
+ {\l_@@_filename_tmpa_tl }
+ {@@_file_\tl_to_str:N \l_@@_filename_tmpa_tl }
+ }
+ \pdfdict_put:nnx
+ {l_hyp/annot/A/GoToR}
+ {F}
+ {\pdf_object_ref:e {@@_file_\tl_to_str:N \l_@@_filename_tmpa_tl}}
\@@_text_pdfstring:nnN
{ #3 }
{ \l_@@_text_enc_dest_print_tl }
\l_@@_dest_name_tmpa_tl
- \Hy@MakeRemoteAction
\tl_if_blank:eTF {#3}
{
\pdfdict_put:nnx {l_hyp/annot/A/GoToR}{D}
- {[\Hy@href@page/\l_@@_dest_pdfremotestartview_tl]}
+ {
+ [
+ \int_eval:n
+ { \int_max:nn {0}{ 0\l_@@_href_pdf_page_tl - 1 }}
+ /\l_@@_dest_pdfremotestartview_tl
+ ]
+ }
}
{
\pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl}
}
- \tl_if_empty:NF \Hy@href@nextactionraw
- {
- \str_remove_once:Nn \Hy@href@nextactionraw {/Next}
- \pdfdict_put:nno{l_hyp/annot/A/Next}{Next}{\Hy@href@nextactionraw}
- }
\mode_leave_vertical:
- \pdfannot_dict_put:nnx {link/GoToR}{A}{<<\pdfdict_use:n {l_hyp/annot/A/GoToR}>>}
+ \pdf_object_unnamed_write:nx{dict}{\pdfdict_use:n {l_hyp/annot/A/GoToR}}
+ \pdfannot_dict_put:nnx {link/GoToR}{A}{\pdf_object_ref_last:}
\pdfannot_link:nxn %expansion??
{ GoToR }
{
- % /A<<
-% \pdfdict_use:n {l_hyp/annot/A/GoToR}
-% >>
}
{
+ \let\protect\relax
#1\Hy@xspace@end
\Hy@VerboseLinkStop %where is the start??
}
\group_end:
}
- {#1}
+ {{\let\protect\relax#1}}
}
% \end{macrocode}
%
@@ -1931,11 +2200,6 @@
\pdfdict_put:nnx {l_hyp/annot/A/Launch}{Win}
{<</P \l_@@_para_tmpa_tl /F \l_@@_filename_tmpa_tl >>}
}
- \tl_if_empty:NF \Hy@href@nextactionraw
- {
- \str_remove_once:Nn \Hy@href@nextactionraw {/Next}
- \pdfdict_put:nno{l_hyp/annot/A/Next}{Next}{\Hy@href@nextactionraw}
- }
\mode_leave_vertical:
\pdfannot_dict_put:nnx {link/Launch}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Launch}>>}
\pdfannot_link:nxn
@@ -1947,15 +2211,16 @@
% >>
}
{
+ \let\protect\relax
#2\Hy@xspace@end
\Hy@VerboseLinkStop %where is the start??
}
\group_end:
}
- {#2}
+ {{\let\protect\relax#2}}
}
% \end{macrocode}
-% The actually command used by hyperref is \cs{@hyper@launch} which uses a delimited
+% The actually command used by \pkg{hyperref} is \cs{@hyper@launch} which uses a delimited
% argument, because of the color the definition is a bit convoluted.
% \begin{macrocode}
\use:x
@@ -1984,11 +2249,6 @@
\mode_leave_vertical:
\pdfdict_put:nnx {l_hyp/annot/A/Named}{N}
{\pdf_name_from_unicode_e:n{#1}}
- \tl_if_empty:NF \Hy@href@nextactionraw
- {
- \str_remove_once:Nn \Hy@href@nextactionraw {/Next}
- \pdfdict_put:nno{l_hyp/annot/A/Next}{Next}{\Hy@href@nextactionraw}
- }
\pdfannot_dict_put:nnx {link/Named}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Named}>>}
\pdfannot_link:nxn { Named }
{
@@ -2009,7 +2269,7 @@
}
\group_end:
}
- {#2}
+ {{\let\protect\relax#2}}
}
% \end{macrocode}
@@ -2117,7 +2377,7 @@
% \end{macro}
% \subsection{Textcolor of links}
% colors are added in the hooks. This means that they can also be removed if needed.
-% They add a group---this isn't needed with hyperref code, but could be relevant
+% They add a group---this isn't needed with \pkg{hyperref} code, but could be relevant
% with low-level annotations.
% \begin{macrocode}
\prop_map_inline:Nn \c_@@_map_hyp_annot_prop
@@ -2472,19 +2732,9 @@
% These are the keys for ocgcolors. We try to disable it
% for pdf version below 1.5
% \begin{macrocode}
-\pdf_version_compare:NnTF < {1.5}
- {
- \keys_define:nn { hyp / setup }
- {
- ,_ocgcolorlinks .code:n =
- {
- \msg_warning:nnxx
- { hyp }
- { ignore-deprecated-or-unknown-option-in-pdf-version }
- { ocgcolorlinks } { \pdf_version_major:.\pdf_version_minor: }
- }
- }
- }
+\bool_lazy_or:nnTF
+ { \pdf_version_compare_p:Nn > {1.4} }
+ { \str_if_eq_p:ee{\pdf_version_major:}{-1} }
{
\keys_define:nn { hyp / setup }
{
@@ -2499,6 +2749,18 @@
,_ocgcolorlinks .default:n = true
}
}
+ {
+ \keys_define:nn { hyp / setup }
+ {
+ ,_ocgcolorlinks .code:n =
+ {
+ \msg_warning:nnxx
+ { hyp }
+ { ignore-deprecated-or-unknown-option-in-pdf-version }
+ { ocgcolorlinks } { \pdf_version_major:.\pdf_version_minor: }
+ }
+ }
+ }
\keys_define:nn { hyp / setup }
{
@@ -2519,7 +2781,15 @@
\seq_map_inline:Nn \c_@@_annot_types_seq
{
- \pdf_version_compare:NnTF < {1.5}
+ \bool_lazy_or:nnTF
+ { \pdf_version_compare_p:Nn > {1.4} }
+ { \str_if_eq_p:ee{\pdf_version_major:}{-1} }
+ {
+ \keys_define:nn { hyp / setup }
+ {
+ ,ocgcolor#1 .bool_set:c = { l_hyp_annot_ocgcolor#1_bool }
+ }
+ }
{
\keys_define:nn { hyp / setup }
{
@@ -2533,12 +2803,6 @@
}
}
}
- {
- \keys_define:nn { hyp / setup }
- {
- ,ocgcolor#1 .bool_set:c = { l_hyp_annot_ocgcolor#1_bool }
- }
- }
}
% \end{macrocode}
% \end{hypkey}
@@ -3678,7 +3942,7 @@
% set in the preamble for all pages or in the document for the current and the
% following pages. Due to the asynchronous page breaking one has to be careful
% to set it on the right page, e.g. only after a |\newpage|.
-% The generic driver uses a different syntax than the other hyperref drivers:
+% The generic driver uses a different syntax than the other \pkg{hyperref} drivers:
% various transition options can be set by a keyval syntax in the value of
% |pdfpagetransition|. A typical setting looks e.g. like this\\
% |\hypersetup{pdfpagetransition={style=Fly,duration=2,direction=90,opaque=false}}|
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
index 49fbd11925..ddb0c9b2b9 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
index ee89218a7d..b38a47f09c 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
@@ -19,8 +19,7 @@
%
% for those people who are interested.
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}
- {2021-03-07} {0.95b}
+\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-03-17}{0.95c}
{Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF}
\cs_if_exist:NT \pdfmanagement_add:nnn
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
index 796ba7f701..1b1e1b1b91 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx
@@ -45,7 +45,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
%
@@ -56,27 +56,27 @@
% \begin{macrocode}
%<drivers>\ProvidesExplFile
%<*dvipdfmx>
- {l3backend-testphase-dvipdfmx.def}{2021-03-07}{}
+ {l3backend-testphase-dvipdfmx.def}{2021-03-17}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
%</dvipdfmx>
%<*dvips>
- {l3backend-testphase-dvips.def}{2021-03-07}{}
+ {l3backend-testphase-dvips.def}{2021-03-17}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
%</dvips>
%<*dvisvgm>
- {l3backend-testphase-dvisvgm.def}{2021-03-07}{}
+ {l3backend-testphase-dvisvgm.def}{2021-03-17}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
%</dvisvgm>
%<*luatex>
- {l3backend-testphase-luatex.def}{2021-03-07}{}
+ {l3backend-testphase-luatex.def}{2021-03-17}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
%</luatex>
%<*pdftex>
- {l3backend-testphase-pdftex.def}{2021-03-07}{}
+ {l3backend-testphase-pdftex.def}{2021-03-17}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
%</pdftex>
%<*xdvipdfmx>
- {l3backend-testphase-xetex.def}{2021-03-07}{}
+ {l3backend-testphase-xetex.def}{2021-03-17}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
%</xdvipdfmx>
% \end{macrocode}
@@ -144,6 +144,22 @@
\directlua { require("l3backend-testphase.lua") }
%</luatex>
% \end{macrocode}
+% \subsection{Converting unicode strings to a pdfname}
+% dvips needs a special function here, so we add this as backend function.
+% \begin{macrocode}
+%<*pdftex|luatex|dvipdfmx|xdvipdfmx|dvisvgm>
+\cs_new:Npn \__kernel_pdf_name_from_unicode_e:n #1
+ {
+ / \str_convert_pdfname:e { \text_expand:n { #1 } }
+ }
+%</pdftex|luatex|dvipdfmx|xdvipdfmx|dvisvgm>
+%<*dvips>
+\cs_new:Npn \__kernel_pdf_name_from_unicode_e:n #1
+ {
+ ~ ( \text_expand:n { #1 } ) ~ cvn
+ }
+%</dvips>
+% \end{macrocode}
% \subsection{Hooks}
% \subsubsection{Add the \enquote{end run} hooks}
% Here we add the end run hook to suitable
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
index b89ccd6af0..6e5e8afd77 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
index 71ee24f53d..256e3e6dc9 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx
@@ -52,7 +52,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-02-21}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -163,7 +163,8 @@
% \texttt{Launch}, \texttt{GoTo} or \texttt{Named}. The dictionary can be changed
% by the commands \cs{pdfannot_dict_put:nnn} and friends described below.
% \end{variable}
-% \begin{function}[added = 2020-03-12, updated = 2020-12-06]{ \pdfannot_link:nnn }
+% \begin{function}[added = 2020-03-12, updated = 2020-12-06]
+% { \pdfannot_link:nnn,\pdfannot_link:nxn }
% \begin{syntax}
% \cs{pdfannot_link:nnn} \Arg{type} \Arg{user action spec} \Arg{link text}
% \end{syntax}
@@ -191,22 +192,56 @@
% text. None of the hooks introduce a group.
% \meta{type} should normally be identical to the value of the |/S| key
% in the action dictionary.
-% As example
+% As example either with a direct action
% \begin{verbatim}
+% \pdfannot_link:nnn { URI }
+% {
+% /A<<
+% /Type/Action
+% /S/URI
+% /URI(https://www.latex-project.org)
+% >>
+% }
+% { link text}
+% \end{verbatim}
+% Or through a dictionary:
+% \begin{verbatim}
+% \pdfdict_new:n {l_my_action_dict}
+% \pdfdict_put:nnn {l_my_action_dict}{Type}{/Action}
+% \pdfdict_put:nnn {l_my_action_dict}{S}{/URI}
+% \pdfdict_put:nnn {l_my_action_dict}{URI}{(https://www.latex-project.org)}
+%
% \pdfannot_dict_put:nnn
% {link/URI} { C } {[1~0~0]} %red border
-% \pdfannot_link:nnn { URI }
+%
+% \pdfannot_link:nxn { URI }
% {
-% /A
-% <<
-% /Type/Action
-% /S/URI
-% /URI(https://www.latex-project.org)
-% >>
+% /A <<\pdfdict_use:n{l_my_action_dict}>>
% }
% { link text }
% \end{verbatim}
%
+% Or if you want to exclude the possibility of a duplicated /A entry
+% (if the action is already in the link/GoTo dictionary e.g. if you can expect
+% other packages to add a dictionary). An alternative is to ensure that
+% no /A is there by removing it explicitly.
+%
+% \begin{verbatim}
+% \pdfdict_new:n {l_my_action_dict}
+% \pdfdict_put:nnn {l_my_action_dict}{Type}{/Action}
+% \pdfdict_put:nnn {l_my_action_dict}{S}{/URI}
+% \pdfdict_put:nnn {l_my_action_dict}{URI}{(https://www.latex-project.org)}
+%
+%
+% \pdfannot_dict_put:nnn
+% {link/URI} { C } {[1~0~0]} %red border
+%
+% \group_begin:
+% \pdfannot_dict_put:nnx {link/GoTo}{A}{<<\pdfdict_use:n{l_my_action_dict}>>}
+% \pdfannot_link:nnn { URI }{}{ link text }
+% \group_end:
+% \end{verbatim}
+%
%
% \end{function}
% \begin{function}[updated = 2020-12-06]{ \pdfannot_link_begin:nnw, \pdfannot_link_end:n }
@@ -357,7 +392,7 @@
% \begin{macrocode}
%<@@=pdfannot>
%<*header>
-\ProvidesExplPackage {l3pdfannot} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdfannot}{2021-03-17}{0.95c}
{PDF-annotations}
\RequirePackage{l3pdfdict}
%</header>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
index 6299ff3a30..3e647106b5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
index 2362863e3a..25a3599445 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -212,7 +212,7 @@
% \begin{macrocode}
%<@@=pdfdict>
%<*header>
-\ProvidesExplPackage {l3pdfdict} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdfdict}{2021-03-17}{0.95c}
{Tools for PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
index 4d2d2c1841..970086e088 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
index 3d7e6123e1..dc3fcc3df6 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx
@@ -68,7 +68,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -349,7 +349,8 @@
%<*package>
%<@@=pdffield>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-checkbox}{0000-00-00}{v0.00a}{form field checkbox}%
+\ProvidesExplPackage{l3pdffield-testphase}{2021-03-17}{0.95c}%
+ {form field checkboxes}
% \end{macrocode}
% \subsection{hyperref specific command}
% hyperref sets NeedAppearances by default. As this is deprecated we disable this.
@@ -397,26 +398,26 @@
% \begin{macrocode}
\bitset_new:Nn \l_@@_Ff_bitset
{
- ReadOnly = 0,
- Required = 1,
- NoExport = 2,
- Multiline = 12,%Tx
- Password = 13,
- NoToggleToOff = 14,%Btn, radio button
- Radio = 15,%Btn: Radio: 15=1, 16=0
- Pushbutton = 16,%Btn: Checkbox: 15=0, 16=0
+ ReadOnly = 1,
+ Required = 2,
+ NoExport = 3,
+ Multiline = 13,%Tx
+ Password = 14,
+ NoToggleToOff = 15,%Btn, radio button
+ Radio = 16,%Btn: Radio: 15=1, 16=0
+ Pushbutton = 17,%Btn: Checkbox: 15=0, 16=0
%Btn: Pushbutton: 16=1
- Combo = 17,%Ch: Combo=1 List=0
- Edit = 18,%Ch, Combo=1 -> + edit field
- Sort = 19,%Ch, not relevant for view...
- FileSelect = 20,%Tx
- MultiSelect = 21,%Ch
- DoNotSpellCheck = 22,%Tx, Ch (if Combo + Edit set)
- DoNotScroll = 23,%Tx
- Comb = 24,%Tx, requires MaxLen in dict
- RadiosInUnison = 25,%Btn Radio
- RichText = 25,%Tx
- CommitOnSelChange = 26
+ Combo = 18,%Ch: Combo=1 List=0
+ Edit = 19,%Ch, Combo=1 -> + edit field
+ Sort = 20,%Ch, not relevant for view...
+ FileSelect = 21,%Tx
+ MultiSelect = 22,%Ch
+ DoNotSpellCheck = 23,%Tx, Ch (if Combo + Edit set)
+ DoNotScroll = 24,%Tx
+ Comb = 25,%Tx, requires MaxLen in dict
+ RadiosInUnison = 26,%Btn Radio
+ RichText = 26,%Tx
+ CommitOnSelChange = 27
}
\bitset_new:Nn \l_@@_F_bitset
@@ -881,7 +882,7 @@
\cs_new_protected:Npn \pdffield_setup:nn #1 #2
{
- \keys_set:n {pdffield / #1 } {#2}
+ \keys_set:nn {pdffield / #1 } {#2}
}
%</package>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
index 6fc5c3844b..0c96ffee00 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
index 4a65e09fd6..e8810f81ff 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -125,7 +125,7 @@
% \end{verbatim}
% The strings (keys) in the |/Names| dictionary must be sorted lexically.
% But they don't have to be the file name or anything related to
-% the file name. The resource management code uses l3emb0001, l3emb0002~\ldots,
+% the file name. The resource management code uses l3ef0001, l3ef0002~\ldots,
% which allows up to 9999 files.
% The key can be needed to identify the start file in a collection,
% so their relation to the files are stored in a property list.
@@ -376,7 +376,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {l3pdffile} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdffile}{2021-03-17}{0.95c}
{embedding and referencing files in PDF---LaTeX PDF management testphase bundle}
\RequirePackage{l3pdftools} %temporarly!!
%</header>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
index 49e015fef5..f93e47b28d 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
index f6b9a7fafe..e22600ea5b 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx
@@ -61,7 +61,7 @@
% }^^A
% }
%
-% \date{Version 0.95b,released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -557,7 +557,7 @@
%<@@=pdfmanagement>
%<*header>
%
-\ProvidesExplPackage {l3pdfmanagement} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdfmanagement}{2021-03-17}{0.95c}
{Management of core PDF dictionaries (LaTeX PDF management testphase bundle)}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
index 3a21c93c56..92e9fe605e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
index 48d2f14759..2b48f0646c 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-02-21}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -340,7 +340,7 @@
% \begin{macrocode}
%<@@=pdfmeta>
%<*header>
-\ProvidesExplPackage {l3pdfmeta} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdfmeta}{2021-03-17}{0.95c}
{PDF-Standards---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
index 1162dcd1cf..f41e8f553f 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
index d1ded1659b..60d60d184e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx
@@ -53,7 +53,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -68,13 +68,20 @@
% \cs{pdf_name_from_unicode_e:n} \Arg{content}
% \end{syntax}
% This converts \meta{content} to a format suitable for a PDF Name.
-% It will first expand the content with \cs{text_expand:n} and
+% The output depends on the backend: For almost all backends
+% it will first expand the content with \cs{text_expand:n} and
% then escape it in the way needed in a PDF Name with
% \cs{str_convert_pdfname:e}, and at last prepend a slash before.
% Typically such names use only ascii,
% but non-ascii is supported, but should be utf8 encoded. For example\\
% |\pdf_name_from_unicode_e:n {A~B\c_percent_str C\c_hash_str D€}}|\\
% will output |/A#20B#25C#23D#E2#82#AC|.
+%
+% With dvips it will expand the content with \cs{text_expand:n} and then wrap it
+% in a |cvn| operation (\enquote{convert to name}).
+% So the example above will output |(A B%C#D€) cvn| to
+% the postscript. The content should not contain unbalanced parentheses with dvips.
+%
% \end{function}
% \begin{function}[added=2020-07-04]
% {\pdf_string_from_unicode:nnN}
@@ -208,7 +215,7 @@
%
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {l3pdftools} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdftools}{2021-03-17}{0.95c}
{candidate commands for l3pdf---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
@@ -224,7 +231,7 @@
\cs_new:Npn \pdf_name_from_unicode_e:n #1
{
- / \str_convert_pdfname:e { \text_expand:n { #1 } }
+ \__kernel_pdf_name_from_unicode_e:n { #1 }
}
\cs_generate_variant:Nn \pdf_name_from_unicode_e:n {V}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
index e8988db424..ed1f4381e4 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
index fa52253471..f0fcda4aab 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx
@@ -52,7 +52,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -133,7 +133,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*header>
-\ProvidesExplPackage {l3pdfxform-beta} {2021-03-07} {0.95b}
+\ProvidesExplPackage{l3pdfxform}{2021-03-17}{0.95c}
{command to create xforms (beta)---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
index 4c345d4006..8b0acbedcf 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
index 53bb237c69..fec2da64ba 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -164,7 +164,7 @@
% \begin{macrocode}
%<@@=pdfmanagement>
%<*header>
-\ProvidesExplPackage {ltdocinit} {2021-03-07} {0.95b}
+\ProvidesExplPackage{ltdocinit}{2021-03-17}{0.95c}
{Initialize document metadata}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
index 99ee652c79..81e648525e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty
index ef27c06cf1..d43c363fe5 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty
@@ -1,8 +1,6 @@
%%
%% This is file `pdflscape-ltx.sty',
%%
-%% Version: 2021/02/22 v0.95b
-%%
%% Copyright (C) 2021 The LaTeX Project
%%
%% This work may be distributed and/or modified under the
@@ -24,7 +22,7 @@
%% This work consists of the main source file pdflscape-ltx.sty
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage {pdflscape-ltx}{2021/02/22}{v0.95b}
+\ProvidesExplPackage{pdflscape-ltx}{2021-03-17}{0.95c}
{Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)}
\RequirePackage{lscape}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
index dc33bf093c..54fb0ffa10 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -67,7 +67,7 @@
% |firstaidoff={name1,name2,...}|.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage {pdfmanagement-firstaid} {2021-03-07} {0.95b}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2021-03-17}{0.95c}
{LaTeX PDF management testphase bundle / firstaid-patches}
%<@@=pdfmanagement>
@@ -204,7 +204,7 @@
% the commands to add page resources
\def\pgf@sys@addpdfresource@extgs@plain##1
{
- \exp_after:wN %for transparent which passes a command
+ %\exp_after:wN %for transparent which passes a command
\@@_patch_pgfextgs:w ##1\q_stop
}
\def\pgf@sys@addpdfresource@patterns@plain##1
@@ -226,11 +226,13 @@
\tl_set:Nn #2 {#4}
}
+\cs_generate_variant:Nn \tl_trim_spaces:n{V}
+\cs_generate_variant:Nn \__pdf_backend_PageResources_gput:nnn {nex}
\cs_new:Npn \@@_patch_pgfextgs:w #1/#2<<#3>>#4\q_stop
{
- \exp_args:Nne
- \__pdf_backend_PageResources_gput:nnn
- {ExtGState}{\tl_trim_spaces:n{#2}}{<<#3>>}
+ \tl_set:Nx\l_tmpa_tl{#2}
+ \__pdf_backend_PageResources_gput:nex
+ {ExtGState}{\tl_trim_spaces:V\l_tmpa_tl}{<<#3 #4>>}
}
\cs_new:Npn \@@_patch_pgfpatterns:w #1/#2\space#3\q_stop
{
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
index 92144a63e7..d702eae143 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
index 7f37e132d7..8cee17982e 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Version 0.95b, released 2021-03-07}
+% \date{Version 0.95c, released 2021-03-17}
%
% \maketitle
% \begin{documentation}
@@ -384,7 +384,7 @@
% \begin{macrocode}
%<@@=pdf>
%<*package>
-\ProvidesExplPackage {pdfmanagement-testphase} {2021-03-07} {0.95b}
+\ProvidesExplPackage{pdfmanagement-testphase}{2021-03-17}{0.95c}
{LaTeX PDF management testphase bundle}
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{2020-10-01}{}{
@@ -411,8 +411,7 @@
% to allow to set it in the document.
% \begin{macrocode}
%<*header>
-\ProvidesExplFile
- {pdfmanagement-testphase.ltx}{2021-03-07}{0.95b}
+\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-03-17}{0.95c}
{PDF~management~code~(testphase)}
%</header>
%<*package>
diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
index c5021da118..cc1239e23a 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
+++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty
index 7fd747325d..8d5abb7e2a 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty
@@ -3,8 +3,8 @@
%% a replacement for transparent sty from Heiko Oberdiek
%%
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{transparent-ltx}%
- {2021-03-07}{v0.95b}{Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}%
+\ProvidesExplPackage{transparent-ltx}{2021-03-17}{0.95c}
+ {Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}%
\RequirePackage{l3opacity}
diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
index 5363a83077..aec0fbb632 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
+++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
@@ -1,6 +1,6 @@
%% LaTeX2e file `xcolor-patches.sty'
%%
-\ProvidesPackage{xcolor-patches-tmp-ltx}[2021/02/22 v0.95b patch xcolor for l3color]
+\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-03-17 v0.95c patch xcolor for l3color]
\@ifundefined{color_set:nn}{\RequirePackage{l3color}}{}
\ExplSyntaxOn
diff --git a/macros/latex/contrib/srdp-mathematik/README.txt b/macros/latex/contrib/srdp-mathematik/README.txt
index f1435cb61f..98bf90021a 100644
--- a/macros/latex/contrib/srdp-mathematik/README.txt
+++ b/macros/latex/contrib/srdp-mathematik/README.txt
@@ -1,28 +1,28 @@
-__________________________________
-
- The
- srdp-mathematik package
- v1.7
-
- 2021/03/12
-___________________________________
-
-Maintainer: Christoph Weberndorfer
-E-mail : c.weberndorfer@gmail.com
- Comments, bug reports and suggestions are welcome.
-Licence : Released under the LaTeX Project Public License 1.3c or
- later, see http://www.latex-project.org/lppl.txt
-
-----------------------------------------------------------------------
-
-This package provides basic commands for the defined formats of the Austrian sRDP in mathematics.
-Furthermore, it includes ways to implement answers in the tex file, which can be voluntarily displayed in the pdf file and
-it offers a way of varying the answers in order to create different groups (e.g. for tests) easily.
-
-----------------------------------------------------------------------
-
-Dieses Paket bietet grundlegende Befehle für die vorgegebenen Formate der österreichischen, standardisierten
-Reife- und Diplomprüfung (sRDP) in Mathematik.
-Es bietet darüber hinaus die Möglichkeit, Antworten in die tex Datei zu implentieren und diese bei Bedarf in der pdf Datei anzuzeigen.
-Außerdem können die eingegeben Antwortmöglichkeiten variiert werden, um mehrere Gruppe für zum Beispiel Schularbeiten einfach zu erstellen.
-
+__________________________________
+
+ The
+ srdp-mathematik package
+ v1.8
+
+ 2021/03/18
+___________________________________
+
+Maintainer: Christoph Weberndorfer
+E-mail : c.weberndorfer@gmail.com
+ Comments, bug reports and suggestions are welcome.
+Licence : Released under the LaTeX Project Public License 1.3c or
+ later, see http://www.latex-project.org/lppl.txt
+
+----------------------------------------------------------------------
+
+This package provides basic commands for the defined formats of the Austrian sRDP in mathematics.
+Furthermore, it includes ways to implement answers in the tex file, which can be voluntarily displayed in the pdf file and
+it offers a way of varying the answers in order to create different groups (e.g. for tests) easily.
+
+----------------------------------------------------------------------
+
+Dieses Paket bietet grundlegende Befehle für die vorgegebenen Formate der österreichischen, standardisierten
+Reife- und Diplomprüfung (sRDP) in Mathematik.
+Es bietet darüber hinaus die Möglichkeit, Antworten in die tex Datei zu implentieren und diese bei Bedarf in der pdf Datei anzuzeigen.
+Außerdem können die eingegeben Antwortmöglichkeiten variiert werden, um mehrere Gruppe für zum Beispiel Schularbeiten einfach zu erstellen.
+
diff --git a/macros/latex/contrib/srdp-mathematik/srdp-mathematik.pdf b/macros/latex/contrib/srdp-mathematik/srdp-mathematik.pdf
index f4c3f26c31..610ae58130 100644
--- a/macros/latex/contrib/srdp-mathematik/srdp-mathematik.pdf
+++ b/macros/latex/contrib/srdp-mathematik/srdp-mathematik.pdf
Binary files differ
diff --git a/macros/latex/contrib/srdp-mathematik/srdp-mathematik.sty b/macros/latex/contrib/srdp-mathematik/srdp-mathematik.sty
index aa63751436..6176e19db1 100644
--- a/macros/latex/contrib/srdp-mathematik/srdp-mathematik.sty
+++ b/macros/latex/contrib/srdp-mathematik/srdp-mathematik.sty
@@ -10,7 +10,7 @@
%
\NeedsTeXFormat{LaTeX2e}[1996/12/26]
-\ProvidesPackage{srdp-mathematik}[2021/03/12 v1.7 Standard-Schularbeitsformate]
+\ProvidesPackage{srdp-mathematik}[2021/03/18 v1.8 Standard-Schularbeitsformate]
\usepackage{color}
@@ -766,6 +766,7 @@ Complete the following sentence by putting a cross next to one of the given poss
\jeroen@set@keys{#2}%%
\pgfmathsetseed{\theZufall}
\declarenumlist{group}{1}{#1}
+\pgfmathrandomitem\z{group}\setcounter{antworta}{\z}\prunelist{group}
\ifthenelse{\numexpr#1 > 1}{\pgfmathrandomitem\z{group}\setcounter{antwortb}{\z}\prunelist{group}}{}
\ifthenelse{\numexpr#1 > 2}{\pgfmathrandomitem\z{group}\setcounter{antwortc}{\z}\prunelist{group}}{}
\ifthenelse{\numexpr#1 > 3}{\pgfmathrandomitem\z{group}\setcounter{antwortd}{\z}\prunelist{group}}{}
@@ -836,6 +837,7 @@ Complete the following sentence by putting a cross next to one of the given poss
\tabulinesep=3mm
\pgfmathsetseed{\theZufall}
\declarenumlist{group}{1}{#1}
+\pgfmathrandomitem\z{group}\setcounter{antworta}{\z}\prunelist{group}
\ifthenelse{\numexpr#1 > 1}{\pgfmathrandomitem\z{group}\setcounter{antwortb}{\z}\prunelist{group}}{}
\ifthenelse{\numexpr#1 > 2}{\pgfmathrandomitem\z{group}\setcounter{antwortc}{\z}\prunelist{group}}{}
\ifthenelse{\numexpr#1 > 3}{\pgfmathrandomitem\z{group}\setcounter{antwortd}{\z}\prunelist{group}}{}
diff --git a/macros/latex/contrib/srdp-mathematik/srdp-mathematik.tex b/macros/latex/contrib/srdp-mathematik/srdp-mathematik.tex
index 370fa9b3f9..8dbc5baae6 100644
--- a/macros/latex/contrib/srdp-mathematik/srdp-mathematik.tex
+++ b/macros/latex/contrib/srdp-mathematik/srdp-mathematik.tex
@@ -55,7 +55,7 @@ hidelinks
\vfill
-\Huge The \textit{srdp-mathematik} package v1.7\\[1cm]
+\Huge The \textit{srdp-mathematik} package v1.8\\[1cm]
Documentation \\ [1cm]
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf b/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf
index b64a2f91f2..ecec4cb867 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf
Binary files differ
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex b/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex
index beb958a7b7..7354c5805e 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex
@@ -1,8 +1,11 @@
-\documentclass[arabic,babel={layout=lists}]{beamer-rl}
+\documentclass[arabic,babel={layout=lists.counters}]{beamer-rl}
\usepackage{hologo} % pdflatex, xelatex, lualatex logos
+\usepackage{listings}
+
+\usepackage{tikz}
\babelprovide[import=ar-DZ, main]{arabic}
-\babelfont{sf}{Amiri}
+\babelfont{alm}[Script=Arabic,Scale=.88]{ALM Fixed}
% Themes without Navigation Bars
%\mode<presentation>{\usetheme{default}}
@@ -59,6 +62,20 @@
\def\cs#1{\babelsublr{\texttt{\textbackslash#1}}}
+\lstset{language=TeX,basicstyle=\small\ttfamily,escapeinside={(*@}{@*)},aboveskip=3pt,belowskip=3pt}
+
+\lstnewenvironment{codeblock}{%
+\selectlanguage{nil}
+\smallskip\hfill%
+\beamercolorbox[wd=\linewidth,sep=.2ex,dp=.5ex]{title}
+}{%
+\endbeamercolorbox
+\hfill
+\smallskip
+%\end{verbatim}
+}
+
+
\begin{document}
\parskip=6pt
@@ -86,7 +103,7 @@
\verb|babel| وخصوصا الكتابة بالاتجاهين (\verb|bidi| writing)
هذه الفئة (class) تعدل في بعض اوامر وتعليمات beamer لغرض انشاء عروض من اليمين إلى اليسار (العربية على سبيل المثال)، الفئة تستدعي \verb|babel| مع الخيار
-\verb|bidi=basic-r|
+\verb|bidi=basic|
والمعالجة تتطلب استخدام
\hologo{LuaLaTeX}
@@ -97,19 +114,18 @@
\begin{frame}[fragile]
\frametitle{كيفية استعمال الفئة}
-\selectlanguage{nil}
-
-\begin{verbatim}
+\begin{codeblock}
\documentclass{beamer-rl}
-\babelprovide[import=ar-DZ, main]{arabic}
-\babelfont{sf}{Amiri}
-\mode<presentation>{\usetheme{Warsaw}}
+% import languages
+\babelprovide[import=ar-DZ, main]{arabic}
+
+\usetheme{CambridgeUS}
+
\begin{document}
...
\end{document}
-
-\end{verbatim}
+\end{codeblock}
\end{frame}
@@ -119,6 +135,15 @@
\frametitle{بعض الملاحظات}
\begin{itemize}
+
+\item
+الفئة تعرف خط الأميري (\verb:Amiri:) ضمنيا كخط أساسي للكتابة
+\babelsublr{sans serif}، يمكن تغيير ذلك مع بداية الوثيقة باستعمال التعليمة
+
+\begin{codeblock}
+\babelfont{sf}{<font name>}
+\end{codeblock}
+
\item
يمكن اضافة كل الخيارات التي تتيحها الفئة \verb:beamer: عند استدعاء الفئة \verb:beamer-rl:
@@ -128,11 +153,9 @@
\medskip
-{\selectlanguage{nil}
-\verb:\documentclass[babel={<babel options>}]{beamer-rl}:
-}
-
-\medskip
+\begin{codeblock}
+\documentclass[babel={<babel options>}]{beamer-rl}
+\end{codeblock}
\item
الفئة
@@ -164,46 +187,44 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
للفئة يمكن من استدعاء قاموس عربي لترجمة بعض المفردات مثل
\verb:example: ،\verb:definition: ،\verb:theorem: ....
+\begin{codeblock}
+\documentclass[arabic]{beamer-rl}
+\end{codeblock}
-\medskip
-
-{\selectlanguage{nil}
-\verb:\documentclass[arabic]{beamer-rl}:
-}
-
-\medskip
-
\item
في بعض الحالات يمكن استعمال التعليمة
\cs{babelsublr} التي توفرها الحزمة \verb:bebel:
لادراج نص من اليسار لليمين (لاتيني) في وسط نص من اليمين لليسار،
على سبيل المثال في حال الحاجة إلى ادراج رسم
\verb:pspicture: ضمن نص من اليمين لليسار.
-
-\medskip
-{\selectlanguage{nil}
-\verb:\bebelsublr{LTR context ... }:
-}
+\begin{codeblock}
+\bebelsublr{LTR context ... }
+\end{codeblock}
\end{itemize}
+\end{frame}
+
+\section{أمثلة}
+
+\begin{frame}[plain]{}
+
+\fontsize{70}{60}\selectfont\centerline{أمثـلة}
\end{frame}
-\section{أمثلة}
\subsection{الإطارات}
\begin{frame}[fragile]
\frametitle{الإطارات}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[default]:
-}
-
+\begin{codeblock}
\setbeamertemplate{blocks}[default]
+\end{codeblock}
+\setbeamertemplate{blocks}[default]
\begin{block}{أورستد}
لاحظ هانز أورستد في 21 أبريل 1820 وهو يُعد أحد التجارب أن إبرة
@@ -211,9 +232,9 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
دائرة كهربائية يُعدها.
\end{block}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[rounded][shadow=true]:
-}
+\begin{codeblock}
+\setbeamertemplate{blocks}[rounded][shadow=true]
+\end{codeblock}
\setbeamertemplate{blocks}[rounded][shadow=true]
@@ -227,52 +248,98 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
\subsection{القوائم}
-\begin{frame}[fragile]
-\frametitle{enumerate, itemize}
+\begin{frame}[fragile,allowframebreaks]
+\frametitle{القوائم}
+\begin{columns}[t,onlytextwidth]
+
+\begin{column}{2cm}
+\begin{enumerate}
+\item أولا
+\item ثانيا
+\end{enumerate}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+\setbeamertemplate{enumerate item}[ball]
\begin{enumerate}
-\item فيزياء تطبيقية
-\item فيزياء تجريبية
-\item فيزياء نظرية
+\item (*@\almfamily أولا @*)
+\item (*@\almfamily ثانيا @*)
\end{enumerate}
+\end{codeblock}
+\end{column}
+
+\end{columns}
+\vfill
\setbeamertemplate{itemize item}[triangle]
-{\selectlanguage{nil}
-\verb|\setbeamertemplate{itemize item}[triangle]|
-}
+\begin{columns}[t,onlytextwidth]
+\begin{column}{2cm}
+\begin{itemize}
+\item أولا
+\item ثانيا
+\end{itemize}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+% in RTL context
+\setbeamertemplate{itemize item}[triangle]
\begin{itemize}
-\item فيزياء تطبيقية
-\item فيزياء تجريبية
-\item فيزياء نظرية
+\item (*@\almfamily أولا @*)
+\item (*@\almfamily ثانيا @*)
\end{itemize}
+\end{codeblock}
+\end{column}
+
+\end{columns}
+
+\framebreak
\selectlanguage{nil}
-\shapemode=2
+\begin{columns}[t]
+\begin{column}{2cm}
+\begin{itemize}
+\item First
+\item Second
+\end{itemize}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+% in LTR context
+\setbeamertemplate{itemize item}[triangle]
\begin{itemize}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{itemize}
+\end{codeblock}
+\end{column}
+\end{columns}
\end{frame}
\subsection{الروابط}
-\begin{frame}
+\begin{frame}[fragile]
\frametitle{الروابط}
\begin{itemize}
\item<1-> العنصر الأول.
\item<2-> العنصر الثاني.
-\item<3-> العنصر الثالث.
\end{itemize}
-\hyperlink{jumptosecond}{\beamerreturnbutton{الرجوع إلى الشريحة الثانية}}
-\hypertarget<2>{jumptosecond}{}
+\hyperlink{jumptosecond}{\beamerreturnbutton{الرجوع إلى الشريحة الأولى}}
+\hypertarget<1>{jumptosecond}{}
-\end{frame}
+\pause
+\begin{codeblock}
+\hyperlink{jumptofirst}
+{\beamergotobutton{(*@\almfamily الرجوع إلى الشريحة الأولى@*)}}
+\hypertarget<1>{jumptofirst}{}
+\end{codeblock}
+
+\end{frame}
\subsection{النظريات}
@@ -297,20 +364,20 @@ number not in the first $p$ numbers.\qedhere
\subsection{التكبير}
+
\begin{frame}[fragile]
\frametitle{التكبير}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-\pgfimage[height=5cm]{example-image}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+\pgfimage[height=4cm]{example-image}
-\selectlanguage{nil}
-
-\begin{verbatim}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-% (3cm,2cm)=(<upper right x>,<upper right y>)
+\begin{codeblock}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+% (1cm,1cm)=(<upper right x>,<upper right y>)
% (2cm,2cm)=(<zoom area width>,<zoom area depth>)
\pgfimage[height=5cm]{example-image}
-\end{verbatim}
+\end{codeblock}
+
\end{frame}
\end{document}
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf b/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf
index e80315dae6..2fa964af5a 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf
Binary files differ
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-en.tex b/macros/luatex/latex/beamer-rl/Example-of-use-en.tex
index 0827670803..200ffe04f9 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-en.tex
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-en.tex
@@ -1,9 +1,9 @@
\documentclass[arabic,babel={layout=lists}]{beamer-rl}
\usepackage{hologo} % pdflatex, xelatex, lualatex logos
+\usepackage{verbatim}
\babelprovide[import=ar-DZ, main]{arabic}
\babelprovide[import,language=Default]{english}
-\babelfont{sf}{Amiri}
% Themes without Navigation Bars
%\mode<presentation>{\usetheme{default}}
@@ -53,11 +53,30 @@
{\color{blue} Bug tracker: } https://github.com/seloumi/beamer-rl/issues
}
-
\date{{\selectlanguage{english} \today}}
\setbeamercovered{transparent=10}
+% reduce space above and below verbatim env
+\makeatletter
+\preto{\@verbatim}{\topsep=0pt \partopsep=0pt }
+\makeatother
+
+\newenvironment{codeblock}{%
+\selectlanguage{nil}
+\smallskip\hfill%
+\beamercolorbox[wd=\linewidth,sep=.3ex,dp=1ex]{block body}
+\endgraf
+\verbatim
+}{%
+\endverbatim
+\endbeamercolorbox
+\hfill
+\smallskip
+%\end{verbatim}
+}
+
+
\begin{document}
\parskip=6pt
@@ -76,12 +95,12 @@
\begin{frame}[fragile]
\frametitle{Introduction}
-Creating beamer presentation for right to left language (like arabic) using \hologo{pdfLaTeX} or \hologo{XeLaTeX} still poses many problems due to bugs not currently resolved especially for colors and hyperlinks
+Creating beamer presentation for right to left languages (like arabic) using \hologo{pdfLaTeX} or \hologo{XeLaTeX} still poses many problems due to bugs not currently resolved especially for colors and hyperlinks
The \hologo{LuaTeX} team set solutions for these issues thanks to them and to \textit{Javier~Bezos} for his works on the package \verb|babel| and \verb|bidi| writing
-This class provides patchs of some beamer templates and commands
-for right to left presentation, this package call babel with \verb|bidi=basic-r| option and require lualatex engine
+This class provides patchs of some beamer templates and commands to create
+ right to left beamer presentation, the class call babel with \verb|bidi=basic| option and require \hologo{LuaLaTeX} engine
\end{frame}
@@ -90,19 +109,18 @@ for right to left presentation, this package call babel with \verb|bidi=basic-r|
\begin{frame}[fragile]
\frametitle{How to use beamer-rl}
-\selectlanguage{nil}
-
-\begin{verbatim}
+\begin{codeblock}
\documentclass{beamer-rl}
-\babelprovide[import=ar-DZ, main]{arabic}
-\babelfont{sf}{Amiri}
-\mode<presentation>{\usetheme{Warsaw}}
+% import language
+\babelprovide[import=ar-DZ, main]{arabic}
+
+\usetheme{Madrid}
+
\begin{document}
...
\end{document}
-
-\end{verbatim}
+\end{codeblock}
\end{frame}
@@ -114,6 +132,14 @@ for right to left presentation, this package call babel with \verb|bidi=basic-r|
\begin{itemize}
\item
+The class define \verb:Amiri: as default sans serif font, we can
+modify this in the preambule with
+
+\begin{codeblock}
+\babelfont{sf}{<font name>}
+\end{codeblock}
+
+\item
All options provided by \verb:beamer: can be added with \verb:beamer-rl:
@@ -121,13 +147,9 @@ Additional options can also be passed to package
\verb:babel:
with \verb:beamer-rl: like this
-\medskip
-
-{\selectlanguage{nil}
-\verb:\documentclass[babel={<babel options>}]{beamer-rl}:
-}
-
-\medskip
+\begin{codeblock}
+\documentclass[babel={<babel options>}]{beamer-rl}
+\end{codeblock}
\item
The \verb:beamer-rl: class swap the definition of \verb:\blacktriangleright: with \verb:\blacktriangleleft: in RTL context
@@ -150,49 +172,45 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
\bigskip
-
\item
Class option \verb:arabic: call an Arabic dictionary to translate strings like \verb:theorem:, \verb:example:, \verb:definition: ....
-\medskip
-
-{\selectlanguage{nil}
-\verb:\documentclass[arabic]{beamer-rl}:
-}
-
-\medskip
-
+\begin{codeblock}
+\documentclass[arabic]{beamer-rl}
+\end{codeblock}
\item
In some cases you need to use \verb:\babelsublr: command from \verb:bebel:
package to insert a left to right text within your right to left text, e.g if you need to insert a \verb:pspicture: drawing in RTL context
-\medskip
-
-{\selectlanguage{nil}
-\verb:\bebelsublr{LTR context ... }:
-}
+\begin{codeblock}
+\bebelsublr{LTR context ... }
+\end{codeblock}
\end{itemize}
-
\end{frame}
-
\section{Examples}
+
+\begin{frame}[plain]{}
+
+\fontsize{70}{60}\selectfont\centerline{Examples}
+
+\end{frame}
+
\subsection{Blocks}
\begin{frame}[fragile]
\frametitle{Blocks}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[default]:
-}
-
+\begin{codeblock}
\setbeamertemplate{blocks}[default]
+\end{codeblock}
+\setbeamertemplate{blocks}[default]
\begin{block}{Lorem}
\selectlanguage{nil}
@@ -201,9 +219,9 @@ package to insert a left to right text within your right to left text, e.g if yo
electric current from a battery was switched on and off.
\end{block}
-{\selectlanguage{nil}
-\verb:\setbeamertemplate{blocks}[rounded][shadow=true]:
-}
+\begin{codeblock}
+\setbeamertemplate{blocks}[rounded][shadow=true]
+\end{codeblock}
\setbeamertemplate{blocks}[rounded][shadow=true]
@@ -218,51 +236,98 @@ package to insert a left to right text within your right to left text, e.g if yo
\subsection{Lists}
-\begin{frame}[fragile]
+\begin{frame}[fragile,allowframebreaks]
\frametitle{enumerate, itemize}
+\begin{columns}[t,onlytextwidth]
+
+\begin{column}{2cm}
+\begin{enumerate}
+\item First
+\item Second
+\end{enumerate}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+\setbeamertemplate{enumerate item}[ball]
\begin{enumerate}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{enumerate}
+\end{codeblock}
+\end{column}
-\setbeamertemplate{itemize item}[triangle]
+\end{columns}
-{\selectlanguage{nil}
-\verb|\setbeamertemplate{itemize item}[triangle]|
-}
+\vfill
+\setbeamertemplate{itemize item}[triangle]
+\begin{columns}[t,onlytextwidth]
+\begin{column}{2cm}
\begin{itemize}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{itemize}
+\end{column}
+\begin{column}{8.8cm}
+\begin{codeblock}
+% in RTL context
+\setbeamertemplate{itemize item}[triangle]
+\begin{itemize}
+\item First
+\item Second
+\end{itemize}
+\end{codeblock}
+\end{column}
+
+\end{columns}
+
+\framebreak
\selectlanguage{nil}
-\shapemode=2
+\begin{columns}[t]
+\begin{column}{2cm}
\begin{itemize}
-\item first item
-\item second item
-\item third item
+\item First
+\item Second
\end{itemize}
-
+\end{column}
+\begin{column}{8.5cm}
+\begin{codeblock}
+% in LTR context
+\setbeamertemplate{itemize item}[triangle]
+\begin{itemize}
+\item First
+\item Second
+\end{itemize}
+\end{codeblock}
+\end{column}
+\end{columns}
\end{frame}
\subsection{Hyperlinks}
-\begin{frame}
+\begin{frame}[fragile]
\frametitle{Hyperlinks}
\begin{itemize}
-\item<1-> First item.
-\item<2-> Second item.
-\item<3-> Third item.
+\item<1-> First.
+\item<2-> Second.
\end{itemize}
-\hyperlink{jumptosecond}{\beamergotobutton{return to second slide}}
-\hypertarget<2>{jumptosecond}{}
+
+\hyperlink{jumptofirst}{\beamergotobutton{return to first slide}}
+\hypertarget<1>{jumptofirst}{}
+
+\pause
+
+\begin{codeblock}
+\hyperlink{jumptofirst}
+{\beamergotobutton{return to first slide}}
+\hypertarget<1>{jumptofirst}{}
+\end{codeblock}
+
\end{frame}
@@ -292,19 +357,16 @@ number not in the first $p$ numbers.\qedhere
\begin{frame}[fragile]
\frametitle{Zooming}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-\pgfimage[height=5cm]{example-image}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+\pgfimage[height=4cm]{example-image}
-\selectlanguage{nil}
-
-\begin{verbatim}
-\framezoom<1><2>[border=2](3cm,2cm)(2cm,2cm)
-% (3cm,2cm)=(<upper right x>,<upper right y>)
+\begin{codeblock}
+\framezoom<1><2>[border=2](1cm,1cm)(2cm,2cm)
+% (1cm,1cm)=(<upper right x>,<upper right y>)
% (2cm,2cm)=(<zoom area width>,<zoom area depth>)
\pgfimage[height=5cm]{example-image}
-\end{verbatim}
+\end{codeblock}
\end{frame}
-
\end{document}
diff --git a/macros/luatex/latex/beamer-rl/README.txt b/macros/luatex/latex/beamer-rl/README.txt
index e6b53616f9..c796202f1f 100644
--- a/macros/luatex/latex/beamer-rl/README.txt
+++ b/macros/luatex/latex/beamer-rl/README.txt
@@ -1,5 +1,5 @@
The beamer-rl class
-v1.4a
+v1.4b
This class provides patchs of some beamer templates and commands
for right to left presentation, the class require babel with lualatex engine
@@ -9,12 +9,12 @@ please use the issue tracker:
<https://github.com/seloumi/beamer-rl/issues>
-Current version release date: 2020/08/21
+Current version release date: 2021/03/15
___________________
Salim Bou
-Copyright (c) 2019-2020
+Copyright (c) 2019-2021
It may be distributed and/or modified 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
diff --git a/macros/luatex/latex/beamer-rl/beamer-rl.cls b/macros/luatex/latex/beamer-rl/beamer-rl.cls
index 906a46fd9f..c85b7c769e 100644
--- a/macros/luatex/latex/beamer-rl/beamer-rl.cls
+++ b/macros/luatex/latex/beamer-rl/beamer-rl.cls
@@ -1,527 +1,423 @@
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{beamer-rl}
-[2020/08/04 v1.4a LaTeX class to patch beamer for right to left presentation with babel]
-
-\RequirePackage{kvoptions}
-\RequirePackage{kvsetkeys}
-
-\SetupKeyvalOptions{
- family=beamer-rl,
- prefix=beamer-rl@,
- setkeys=\kvsetkeys,
-}
-
-% babel options:
-\define@key{beamer-rl}{babel}{%
- \PassOptionsToPackage{#1}{babel}%
-}
-
-\DeclareVoidOption{arabic}{%
- \@expandtwoargs\@removeelement\CurrentOption\@classoptionslist\@classoptionslist % remove arabic option from global list
- % \PassOptionsToPackage{arabic}{translator}%
- \AtBeginDocument{\uselanguage{Arabic}\languagealias{arabic}{Arabic}}
-}
-
-\DeclareDefaultOption{%
- \PassOptionsToClass{\CurrentOption}{beamer}%
-}
-
-\ProcessKeyvalOptions*\relax
-
-\RequirePackage{ifluatex}
-
-\ifluatex
-\else
-\ClassError{beamer-rl}{beamer-rl require luatex}
-\fi
-
-\LoadClass[hyperref={unicode}]{beamer}
-
-\RequirePackage[nil,bidi=basic-r]{babel}
-
-\def\reset@temp#1#2{\expandafter\let\csname beamer@@tmpop@#1@#2\endcsname\relax}
-\def\@@defbeamertemplate#1#2{\reset@temp{#1}{#2}\defbeamertemplate{#1}{#2}}
-\def\@defbeamertemplate#1#2{\reset@temp{#1}{#2}\defbeamertemplate*{#1}{#2}}
-
-\def\redefbeamertemplate{%
- \@ifstar{\@defbeamertemplate}{\@@defbeamertemplate}%
-}
-
-\let\old@blacktriangleright\blacktriangleright
-\let\old@blacktriangleleft\blacktriangleleft
-
-\def\blacktriangleright{%
- \ifcase\bbl@thepardir \old@blacktriangleright\else\old@blacktriangleleft\fi}
-\def\blacktriangleleft{%
- \ifcase\bbl@thepardir \old@blacktriangleleft\else\old@blacktriangleright\fi}
-
-
-\let\oldpgfpicture\pgfpicture
-\let\endoldpgfpicture\endpgfpicture
-
-\def\pgfpicture{\babelsublr\bgroup\oldpgfpicture}
-\def\endpgfpicture{\endoldpgfpicture\egroup}
-
-\let\oldpgfuseshading\pgfuseshading
-\def\pgfuseshading#1{\babelsublr{\oldpgfuseshading{#1}}}
-
-
-%% beamerbasebox
-
-\newdimen\bmb@dimc
-
-\renewcommand\beamerboxesrounded[2][]{%
- \global\let\beamer@firstlineitemizeunskip=\relax%
- \vbox\bgroup%
- \setkeys{beamerboxes}{upper=block title,lower=block body,width=\textwidth,shadow=false}%
- \setkeys{beamerboxes}{#1}%
- {%
- \usebeamercolor{\bmb@lower}%
- \globalcolorstrue%
- \colorlet{lower.bg}{bg}%
- }%
- {%
- \usebeamercolor{\bmb@upper}%
- \globalcolorstrue%
- \colorlet{upper.bg}{bg}%
- }%
- %
- % Typeset head
- %
- \vskip4bp
- \setbox\bmb@box=\hbox{%
- \begin{minipage}[b]{\bmb@width}%
- \usebeamercolor[fg]{\bmb@upper}%
- #2%
- \end{minipage}}%
- \ifdim\wd\bmb@box=0pt%
- \setbox\bmb@box=\hbox{}%
- \ht\bmb@box=1.5pt%
- \bmb@prevheight=-4.5pt%
- \else%
- \wd\bmb@box=\bmb@width%
- \bmb@temp=\dp\bmb@box%
- \ifdim\bmb@temp<1.5pt%
- \bmb@temp=1.5pt%
- \fi%
- \setbox\bmb@box=\hbox{\raise\bmb@temp\hbox{\box\bmb@box}}%
- \dp\bmb@box=0pt%
- \bmb@prevheight=\ht\bmb@box%
- \fi%
- \bmb@temp=\bmb@width%
- \bmb@dima=\bmb@temp\advance\bmb@dima by2.2bp%
- \bmb@dimb=\bmb@temp\advance\bmb@dimb by4bp%
- \bmb@dimc=0pt%
- \ifdim\wd\bmb@box=0pt
- \bmb@dimc=\bmb@width%
- \fi
- \hbox{%
- \textdir TLT\begin{pgfpicture}{0bp}{+-\ht\bmb@box}{\bmb@dimc}{+-\ht\bmb@box}
- \ifdim\wd\bmb@box=0pt%
- \color{lower.bg}%
- \else%
- \color{upper.bg}%
- \fi%
- \pgfpathqmoveto{-4bp}{-1bp}
- \pgfpathqcurveto{-4bp}{1.2bp}{-2.2bp}{3bp}{0bp}{3bp}
- \pgfpathlineto{\pgfpoint{\bmb@temp}{3bp}}
- \pgfpathcurveto%
- {\pgfpoint{\bmb@dima}{3bp}}%
- {\pgfpoint{\bmb@dimb}{1.2bp}}%
- {\pgfpoint{\bmb@dimb}{-1bp}}%
- \bmb@dima=-\ht\bmb@box%
- \advance\bmb@dima by-2pt%
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfpathlineto{\pgfpoint{-4bp}{\bmb@dima}}
- \pgfusepath{fill}
- \end{pgfpicture}%
- \copy\bmb@box%
- }%
- \nointerlineskip%
- \vskip-1pt%
- \ifdim\wd\bmb@box=0pt%
- \else%
- \hbox{%
- \begin{pgfpicture}{0pt}{0pt}{\bmb@width}{6pt}
- \bmb@dima=\bmb@width%
- \advance\bmb@dima by8bp%
- \pgfpathrectangle{\pgfpoint{-4bp}{-1bp}}{\pgfpoint{\bmb@dima}{8bp}}
- \pgfusepath{clip}
- {\pgftransformshift{\pgfpoint{-4bp}{0bp}}\pgftext[left,base]{\pgfuseshading{bmb@transition}}}%
- \end{pgfpicture}%
- }%
- \nointerlineskip%
- \vskip-0.5pt%
- \fi%
- \ifbmb@shadow%
- \setbox\bmb@boxshadow=\hbox{\pgfuseshading{bmb@shadow}}%
- \setbox\bmb@boxshadowball=\hbox{\pgfuseshading{bmb@shadowball}}%
- \setbox\bmb@boxshadowballlarge=\hbox{\pgfuseshading{bmb@shadowballlarge}}%
- \fi%
- \setbox\bmb@colorbox=\hbox{{\pgfpicturetrue\pgfsetcolor{lower.bg}}}%
- \setbox\bmb@box=\hbox\bgroup\begin{minipage}[b]{\bmb@width}%
- \vskip2pt%
- \usebeamercolor[fg]{\bmb@lower}%
- \colorlet{beamerstructure}{upper.bg}%
- \colorlet{structure}{upper.bg}%
- %\color{.}%
- }
-
- \def\endbeamerboxesrounded{%
- \end{minipage}\egroup%
- \wd\bmb@box=\bmb@width%
- \bmb@temp=\dp\bmb@box%
- \advance\bmb@temp by.5pt%
- \setbox\bmb@box=\hbox{\raise\bmb@temp\hbox{\box\bmb@box}}%
- \dp\bmb@box=0pt%
- \bmb@temp=\wd\bmb@box%
- \bmb@dima=\bmb@temp\advance\bmb@dima by2.2bp%
- \bmb@dimb=\bmb@temp\advance\bmb@dimb by4bp%
- \hbox{%
- \textdir TLT\begin{pgfpicture}{0bp}{0bp}{0bp}{0bp}
- \ifbmb@shadow%
- {\pgftransformshift{\pgfpoint{4bp}{-3bp}}\pgftext{\copy\bmb@boxshadowball}}
- \begin{pgfscope}
- {%
- \advance\bmb@temp by-1bp%
- \pgfpathrectangle{\pgfpoint{\bmb@temp}{-7bp}}{\pgfpoint{9bp}{9bp}}%
- \pgfusepath{clip}
- }%
- {\pgftransformshift{\pgfpoint{\bmb@temp}{1bp}}\pgftext{\box\bmb@boxshadowballlarge}}
- \end{pgfscope}
- \begin{pgfscope}
- \advance\bmb@temp by-4bp%
- \pgfpathrectangle{\pgfpoint{4bp}{-7bp}}{\pgfpoint{\bmb@temp}{5bp}}
- \pgfusepath{clip}
- {\pgftransformshift{\pgfpoint{4bp}{-7bp}}\pgftext[left,base]{\copy\bmb@boxshadow}}%
- \end{pgfscope}
- \begin{pgfscope}
- \advance\bmb@temp by 4bp%
- \bmb@dima=\ht\bmb@box%
- \advance\bmb@dima by\bmb@prevheight%
- \advance\bmb@dima by 4bp%
- \pgfpathrectangle{\pgfpoint{\bmb@temp}{1bp}}{\pgfpoint{4bp}{\bmb@dima}}
- \pgfusepath{clip}
- \advance\bmb@dima by-4bp%
- {\pgftransformshift{\pgfpoint{\bmb@temp}{\bmb@dima}}\pgftext{\box\bmb@boxshadowball}}
- \advance\bmb@dima by-1bp%
- \pgfpathrectangle{\pgfpoint{\bmb@temp}{1bp}}{\pgfpoint{4bp}{\bmb@dima}}
- \pgfusepath{clip}
- \advance\bmb@temp by4bp%
- {\pgftransformshift{\pgfpoint{\bmb@temp}{-3bp}}%
- \pgftransformrotate{90}%
- \pgftext[left,base]{\box\bmb@boxshadow}}%
- \end{pgfscope}
- \fi%
- \unhbox\bmb@colorbox%
- \pgfpathqmoveto{-4bp}{1bp}
- \pgfpathqcurveto{-4bp}{-1.2bp}{-2.2bp}{-3bp}{0bp}{-3bp}
- \pgfpathlineto{\pgfpoint{\the\bmb@temp}{-3bp}}
- \pgfpathcurveto%
- {\pgfpoint{\the\bmb@dima}{-3bp}}%
- {\pgfpoint{\the\bmb@dimb}{-1.2bp}}%
- {\pgfpoint{\the\bmb@dimb}{1bp}}%
- {
- \bmb@dima=\ht\bmb@box%
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfpathlineto{\pgfpoint{-4bp}{\bmb@dima}}
- \pgfusepath{fill}
- }
- \ifbmb@shadow%
- {
- \color{black!50!bg}
- \pgfsetlinewidth{0pt}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{-.5bp}}
- \bmb@dima=\ht\bmb@box%
- \advance\bmb@dima by\bmb@prevheight%
- \advance\bmb@dima by 1bp%
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \bmb@temp=\bmb@dima
- \advance\bmb@dima by 1bp%
- \color{black!31!bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \advance\bmb@dima by 1bp%
- \advance\bmb@temp by 1bp%
- \color{black!19!bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \advance\bmb@dima by 1bp%
- \advance\bmb@temp by 1bp%
- \color{black!6!bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- \advance\bmb@dima by 1.5bp%
- \advance\bmb@temp by 1bp%
- \color{bg}
- \pgfpathmoveto{\pgfpoint{\bmb@dimb}{\bmb@temp}}
- \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
- \pgfusepath{stroke}
- }
- \fi
- \end{pgfpicture}%
- \box\bmb@box%
- }%
- \ifbmb@shadow%
- \vskip4bp minus 2bp%
- \else%
- \vskip2bp%
- \fi%
- \egroup% of \vbox\bgroup
-}
-
-
-%% beamerbaseauxtemplates
-
-
-% (sub-)section in toc: subsections numbered
-
-\redefbeamertemplate{subsection in toc}{subsections numbered}
-{\leavevmode\leftskip=2em\rlap{\hskip-2em \inserttocsectionnumber\hbox{.}\inserttocsubsectionnumber}\inserttocsubsection\par}
-
-
-%% beamerinnerthemedefault
-
-\redefbeamertemplate*{button}{default}
-{%
- \setbox\beamer@tempbox=\hbox{{\insertbuttontext}}%
- \ht\beamer@tempbox=6pt%
- \dp\beamer@tempbox=0pt%
- \setbox\beamer@tempbox=\vbox{\box\beamer@tempbox\vskip2pt}%
- \beamer@tempdim=\wd\beamer@tempbox%
- \beamer@dima=\beamer@tempdim\advance\beamer@dima by2.2pt
- \beamer@dimb=\beamer@tempdim\advance\beamer@dimb by4pt
- \textdir TLT\begin{pgfpicture}{-4pt}{0pt}{\the\beamer@tempdim}{8pt}
- \color{bg}
- \pgfsetlinewidth{0.8pt}
- \pgfpathqmoveto{0pt}{0pt}
- \pgfpathqcurveto{-2.2pt}{0pt}{-4pt}{1.8pt}{-4pt}{4pt}
- \pgfpathqcurveto{-4pt}{6.2pt}{-2.2pt}{8pt}{0pt}{8pt}
- \pgfpathlineto{\pgfpoint{\the\beamer@tempdim}{8pt}}
- \pgfpathcurveto%
- {\pgfpoint{\the\beamer@dima}{8pt}}%
- {\pgfpoint{\the\beamer@dimb}{6.2pt}}%
- {\pgfpoint{\the\beamer@dimb}{4pt}}
- \pgfpathcurveto%
- {\pgfpoint{\the\beamer@dimb}{1.8pt}}%
- {\pgfpoint{\the\beamer@dima}{0pt}}%
- {\pgfpoint{\the\beamer@tempdim}{0pt}}
- \pgfpathclose
- \pgfusepathqfill
- \colorlet{bg}{parent.bg}
- \usebeamercolor[fg]{button border}
- \pgfpathqmoveto{0pt}{0pt}
- \pgfpathqcurveto{-2.2pt}{0pt}{-4pt}{1.8pt}{-4pt}{4pt}
- \pgfpathqcurveto{-4pt}{6.2pt}{-2.2pt}{8pt}{0pt}{8pt}
- \pgfpathlineto{\pgfpoint{\the\beamer@tempdim}{8pt}}
- \pgfpathcurveto%
- {\pgfpoint{\the\beamer@dima}{8pt}}%
- {\pgfpoint{\the\beamer@dimb}{6.2pt}}%
- {\pgfpoint{\the\beamer@dimb}{4pt}}
- \pgfpathcurveto%
- {\pgfpoint{\the\beamer@dimb}{1.8pt}}%
- {\pgfpoint{\the\beamer@dima}{0pt}}%
- {\pgfpoint{\the\beamer@tempdim}{0pt}}
- \pgfpathclose
- \pgfusepathqstroke
- \end{pgfpicture}%
- \hskip-\beamer@tempdim%
- \box\beamer@tempbox%
- \kern4pt%
-}
-
-%% beamerbasenavigation
-
-% User Buttons
-
-\pgfdefobject{beamergotosymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{5pt}{5pt}}
-{
- \pgfpathqmoveto{1.5bp}{0.5bp}
- \pgfpathqlineto{3.5bp}{2bp}
- \pgfpathqlineto{1.5bp}{3.5bp}
- \pgfusepathqfill
-}
-
-\def\insertgotosymbol{%
- \begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
- \pgfuseobject{\ifcase\bbl@thepardir beamergotosymbol\else beamerreturnsymbol\fi}%
-\end{pgfpicture}}
-
-\pgfdefobject{beamerreturnsymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{5pt}{5pt}}
-{
- \pgfpathqmoveto{3.5bp}{0.5bp}
- \pgfpathqlineto{1.5bp}{2bp}
- \pgfpathqlineto{3.5bp}{3.5bp}
- \pgfusepathqfill
-}
-
-\def\insertreturnsymbol{%
- \begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
- \pgfuseobject{\ifcase\bbl@thepardir beamerreturnsymbol\else beamergotosymbol\fi}%
-\end{pgfpicture}}
-
-
-\pgfdefobject{beamerskipsymbolrl}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{7pt}{5pt}}
-{
- \pgfpathqmoveto{3.5bp}{0.5bp}
- \pgfpathqlineto{1.5bp}{2bp}
- \pgfpathqlineto{3.5bp}{3.5bp}
- \pgfpathqmoveto{5.5bp}{0.5bp}
- \pgfpathqlineto{3.5bp}{2bp}
- \pgfpathqlineto{5.5bp}{3.5bp}
- \pgfusepathqfill
-}
-
-\pgfdefobject{beamerskipsymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{7pt}{5pt}}
-{
- \pgfpathqmoveto{1.5bp}{0.5bp}
- \pgfpathqlineto{3.5bp}{2bp}
- \pgfpathqlineto{1.5bp}{3.5bp}
- \pgfpathqmoveto{3.5bp}{0.5bp}
- \pgfpathqlineto{5.5bp}{2bp}
- \pgfpathqlineto{3.5bp}{3.5bp}
- \pgfusepathqfill
-}
-
-\def\insertskipsymbol{%
- \begin{pgfpicture}{-1pt}{0pt}{6pt}{5pt}
- \pgfuseobject{\ifcase\bbl@thepardir beamerskipsymbol\else beamerskipsymbolrl\fi}%
-\end{pgfpicture}}
-
-\def\beamergotobutton#1{\beamerbutton{\insertgotosymbol\ #1}}
-\def\beamerreturnbutton#1{\beamerbutton{\insertreturnsymbol\ #1}}
-\def\beamerskipbutton#1{\beamerbutton{\insertskipsymbol\ #1}}
-
-%% beamerbaseframesize
-
-%
-% Zoom stuff
-%
-
-\def\beamer@framezoom<#1><#2>[#3](#4,#5)(#6,#7){%
- \par\nointerlineskip%
- \global\beamer@slidehaszoomtrue%
- \advance\beamer@zoomcount by1\relax%
- \def\beamer@zoomborderwidth{0}%
- \edef\beamer@labelzoomed{beamer@labelzoomed@\the\beamer@zoomframecount @\the\beamer@zoomcount}%
- \setkeys{beamerzoom}{#3}%
- \only<#1>{%
- {\hypersetup{pdfhighlight={/P},pdfborder={0 0 \beamer@zoomborderwidth}}%
- \global\setbox\@tempboxa=\vbox{\hyperlink{\beamer@labelzoomed}{\vbox to #7{\hbox
- to#6{\hfil}\vfil}}}}%
- \ht\@tempboxa=0pt%
- \wd\@tempboxa=0pt%
- \dp\@tempboxa=0pt%
- \setbox\@tempboxa=\vbox{\moveright#4\hbox{\lower#5\vbox{\box\@tempboxa}}}%
- \ht\@tempboxa=0pt%
- \wd\@tempboxa=0pt%
- \dp\@tempboxa=0pt%
- \global\setbox\beamer@zoombox=\vbox to0pt{\unvbox\beamer@zoombox\box\@tempboxa}%
- }%
- \only<#2>{%
- \@ifundefined{\beamer@labelzoomed}%
- {%
- \hypertarget{\beamer@labelzoomed}{}%
- \expandafter\gdef\csname\beamer@labelzoomed\endcsname{}%
- }{}%
- \gdef\beamer@zoomer{%
- % compute zoom factor
- \@tempdima=\beamer@frametextheight%
- \@tempdimb=#7\relax%
- \@tempcnta=\@tempdimb%
- \divide\@tempcnta by4096\relax%
- \multiply\@tempdima by16\relax%
- \divide\@tempdima by\@tempcnta%
- \@tempdimb=\paperwidth%
- \ifbeamer@plainframe%
- \else%
- \advance\@tempdimb by-\beamer@leftsidebar%
- \advance\@tempdimb by-\beamer@rightsidebar\relax%
- \fi%
- \@tempdimc=#6\relax%
- \@tempcntb=\@tempdimc%
- \divide\@tempcntb by4096\relax%
- \multiply\@tempdimb by16\relax%
- \divide\@tempdimb by\@tempcntb%
- \ifdim\@tempdimb<\@tempdima%
- \@tempdima=\@tempdimb%
- \fi%
- \edef\beamer@temp{\strip@pt\@tempdima}%
- \@tempdimc=\beamer@frametextheight%
- \advance\@tempdimc by4pt%
- \@tempdimb=\paperwidth%
- \ifbeamer@plainframe%
- \else%
- \advance\@tempdimb by-\beamer@leftsidebar%
- \advance\@tempdimb by-\beamer@rightsidebar\relax%
- \fi%
- \setbox\@tempboxa=\vbox{\hsize=\@tempdimb\Acrobatmenu{GoBack}{\vbox to
- \beamer@frametextheight{\hbox to\@tempdimb{\hfil}\vfil}}}%
- \ht\@tempboxa=0pt%
- \wd\@tempboxa=0pt%
- \dp\@tempboxa=0pt%
- \setbox\beamer@framebox=\vbox to\beamer@frametextheight{{%
- \ifbeamer@plainframe\beamer@leftmargin=\Gm@lmargin\fi%
- \begin{oldpgfpicture}{\beamer@leftmargin}{-\beamer@frametextheight}{\beamer@leftmargin}{0pt}
- \pgftext[left,top]{\box\@tempboxa}
- \pgfpathrectangle{\pgfpoint{0pt}{-\@tempdimc}}{\pgfpoint{\ifcase\bbl@thepardir \else-\fi\@tempdimb}{\@tempdimc}}%
- \pgfusepath{clip}
- \begingroup
- \pgftransformscale{\beamer@temp}
- \@tempdima=#4\relax%
- \@tempdimb=#5\relax%
- {\pgftransformshift{\pgfpoint{-\@tempdima}{\@tempdimb}}%
- \pgftext[left,top]{\vbox{\vbox{}\nointerlineskip\unvbox\beamer@framebox}}}
- \endgroup
- \end{oldpgfpicture}%
- }}%
- \setbox\beamer@framebox=\vbox{%
- \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%
- \nointerlineskip\unvbox\beamer@frametitlebox%
- \nobreak%
- \box\beamer@framebox%
- \nobreak%
- \vss%
- \beamer@exitcode%
- }%
- \global\setbox\beamer@footins=\box\voidb@x% no footnotes in zoomed slides
- }%
- }%
-}
-
-
-%
-% Shrink stuff
-%
-
-\def\beamer@shrinkframebox{%
- \@tempdima=\ht\beamer@framebox%
-% \ifdim\@tempdima>\beamer@frametextheight%
- \@tempcnta=\@tempdima%
- \divide\@tempcnta by 65536\relax%
- \@tempdimc=\beamer@frametextheight%
- \divide\@tempdimc by\@tempcnta\relax%
- \ifdim\@tempdimc>\beamer@shrinkfactor pt%
- \@tempdimc=\beamer@shrinkfactor pt%
- \else%
- \@tempdima=-100\@tempdimc%
- \advance\@tempdima by100pt%
- \ClassWarning{beamer}{Frame text is shrunk by a factor of %
- \strip@pt\@tempdima\space percent instead of
- \beamer@shrinkpercentage\space percent}%
- \fi%
- \edef\beamer@factortemp{\strip@pt\@tempdimc}%
- \setbox\beamer@framebox=\vbox to\beamer@frametextheight{%
- \begin{oldpgfpicture}{0pt}{-\beamer@frametextheight}{0pt}{0pt}
- {\pgftransformscale{\beamer@factortemp}%
- \pgftext[left,top]{\box\beamer@framebox}}%
- \end{oldpgfpicture}%
- }%
-% \fi%
-}
-
-\endinput
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{beamer-rl}
+[2021/03/12 v1.4b LaTeX class to patch beamer for right to left presentation with babel]
+
+\RequirePackage{kvoptions}
+\RequirePackage{kvsetkeys}
+
+\SetupKeyvalOptions{
+ family=beamer-rl,
+ prefix=beamer-rl@,
+ setkeys=\kvsetkeys,
+}
+
+% babel options:
+\define@key{beamer-rl}{babel}{%
+ \PassOptionsToPackage{#1}{babel}%
+}
+
+\DeclareVoidOption{arabic}{%
+ \@expandtwoargs\@removeelement\CurrentOption\@classoptionslist\@classoptionslist % remove arabic option from global list
+ % \PassOptionsToPackage{arabic}{translator}%
+ \AtBeginDocument{\uselanguage{Arabic}\languagealias{arabic}{Arabic}}
+}
+
+\DeclareDefaultOption{%
+ \PassOptionsToClass{\CurrentOption}{beamer}%
+}
+
+\ProcessKeyvalOptions*\relax
+
+\RequirePackage{ifluatex}
+
+\ifluatex
+\else
+\ClassError{beamer-rl}{beamer-rl require lualatex}
+\fi
+
+\LoadClass[hyperref={unicode}]{beamer}
+
+\RequirePackage[nil,bidi=basic]{babel}
+
+\def\reset@temp#1#2{\expandafter\let\csname beamer@@tmpop@#1@#2\endcsname\relax}
+\def\@@defbeamertemplate#1#2{\reset@temp{#1}{#2}\defbeamertemplate{#1}{#2}}
+\def\@defbeamertemplate#1#2{\reset@temp{#1}{#2}\defbeamertemplate*{#1}{#2}}
+
+\def\redefbeamertemplate{%
+ \@ifstar{\@defbeamertemplate}{\@@defbeamertemplate}%
+}
+
+\let\old@blacktriangleright\blacktriangleright
+\let\old@blacktriangleleft\blacktriangleleft
+
+\def\blacktriangleright{%
+ \ifcase\bbl@thepardir \old@blacktriangleright\else\old@blacktriangleleft\fi}
+\def\blacktriangleleft{%
+ \ifcase\bbl@thepardir \old@blacktriangleleft\else\old@blacktriangleright\fi}
+
+
+\let\oldpgfpicture\pgfpicture
+\let\endoldpgfpicture\endpgfpicture
+
+\def\pgfpicture{\babelsublr\bgroup\oldpgfpicture}
+\def\endpgfpicture{\endoldpgfpicture\egroup}
+
+\let\oldpgfuseshading\pgfuseshading
+\def\pgfuseshading#1{\babelsublr{\oldpgfuseshading{#1}}}
+
+
+%% beamerbasebox
+
+\newdimen\bmb@dimc
+
+\renewcommand\beamerboxesrounded[2][]{%
+ \global\let\beamer@firstlineitemizeunskip=\relax%
+ \vbox\bgroup%
+ \setkeys{beamerboxes}{upper=block title,lower=block body,width=\textwidth,shadow=false}%
+ \setkeys{beamerboxes}{#1}%
+ {%
+ \usebeamercolor{\bmb@lower}%
+ \globalcolorstrue%
+ \colorlet{lower.bg}{bg}%
+ }%
+ {%
+ \usebeamercolor{\bmb@upper}%
+ \globalcolorstrue%
+ \colorlet{upper.bg}{bg}%
+ }%
+ %
+ % Typeset head
+ %
+ \vskip4bp
+ \setbox\bmb@box=\hbox{%
+ \begin{minipage}[b]{\bmb@width}%
+ \usebeamercolor[fg]{\bmb@upper}%
+ #2%
+ \end{minipage}}%
+ \ifdim\wd\bmb@box=0pt%
+ \ifcase\bbl@thetextdir\relax
+ \else%
+ \bmb@dimc=\bmb@width%
+ \fi% <--
+ \setbox\bmb@box=\hbox{}%
+ \ht\bmb@box=1.5pt%
+ \bmb@prevheight=-4.5pt%
+ \else%
+ \wd\bmb@box=\bmb@width%
+ \bmb@temp=\dp\bmb@box%
+ \ifdim\bmb@temp<1.5pt%
+ \bmb@temp=1.5pt%
+ \fi%
+ \setbox\bmb@box=\hbox{\raise\bmb@temp\hbox{\box\bmb@box}}%
+ \dp\bmb@box=0pt%
+ \bmb@prevheight=\ht\bmb@box%
+ \fi%
+ \bmb@temp=\bmb@width%
+ \bmb@dima=\bmb@temp\advance\bmb@dima by2.2bp%
+ \bmb@dimb=\bmb@temp\advance\bmb@dimb by4bp%
+ \hbox dir TLT {%
+ \begin{pgfpicture}{0bp}{+-\ht\bmb@box}{\bmb@dimc}{+-\ht\bmb@box}
+ \ifdim\wd\bmb@box=0pt%
+ \color{lower.bg}%
+ \else%
+ \color{upper.bg}%
+ \fi%
+ \pgfpathqmoveto{-4bp}{-1bp}
+ \pgfpathqcurveto{-4bp}{1.2bp}{-2.2bp}{3bp}{0bp}{3bp}
+ \pgfpathlineto{\pgfpoint{\bmb@temp}{3bp}}
+ \pgfpathcurveto%
+ {\pgfpoint{\bmb@dima}{3bp}}%
+ {\pgfpoint{\bmb@dimb}{1.2bp}}%
+ {\pgfpoint{\bmb@dimb}{-1bp}}%
+ \bmb@dima=-\ht\bmb@box%
+ \advance\bmb@dima by-2pt%
+ \pgfpathlineto{\pgfpoint{\bmb@dimb}{\bmb@dima}}
+ \pgfpathlineto{\pgfpoint{-4bp}{\bmb@dima}}
+ \pgfusepath{fill}
+ \end{pgfpicture}%
+ \copy\bmb@box%
+ }%
+ \nointerlineskip%
+ \vskip-1pt%
+ \ifdim\wd\bmb@box=0pt%
+ \else%
+ \hbox{%
+ \begin{pgfpicture}{0pt}{0pt}{\bmb@width}{6pt}
+ \bmb@dima=\bmb@width%
+ \advance\bmb@dima by8bp%
+ \pgfpathrectangle{\pgfpoint{-4bp}{-1bp}}{\pgfpoint{\bmb@dima}{8bp}}
+ \pgfusepath{clip}
+ {\pgftransformshift{\pgfpoint{-4bp}{0bp}}\pgftext[left,base]{\pgfuseshading{bmb@transition}}}%
+ \end{pgfpicture}%
+ }%
+ \nointerlineskip%
+ \vskip-0.5pt%
+ \fi%
+ \setbox\bmb@colorbox=\hbox{{\pgfpicturetrue\pgfsetcolor{lower.bg}}}%
+ \setbox\bmb@box=\hbox\bgroup\begin{minipage}[b]{\bmb@width}%
+ \vskip2pt%
+ \usebeamercolor[fg]{\bmb@lower}%
+ \colorlet{beamerstructure}{upper.bg}%
+ \colorlet{structure}{upper.bg}%
+ %\color{.}%
+ }
+
+\bbl@sreplace\endbeamerboxesrounded{\begin{pgfpicture}}%
+ {\textdir TLT\begin{pgfpicture}}%
+
+
+
+%% beamerbaseauxtemplates
+
+
+% (sub-)section in toc: subsections numbered
+
+\redefbeamertemplate{subsection in toc}{subsections numbered}
+{\leavevmode\leftskip=2em\rlap{\hskip-2em \inserttocsectionnumber\hbox{.}\inserttocsubsectionnumber}\inserttocsubsection\par}
+
+
+%% beamerinnerthemedefault
+
+\redefbeamertemplate*{button}{default}
+{%
+ \setbox\beamer@tempbox=\hbox{{\insertbuttontext}}%
+ \ht\beamer@tempbox=6pt%
+ \dp\beamer@tempbox=0pt%
+ \setbox\beamer@tempbox=\vbox{\box\beamer@tempbox\vskip2pt}%
+ \beamer@tempdim=\wd\beamer@tempbox%
+ \beamer@dima=\beamer@tempdim\advance\beamer@dima by2.2pt
+ \beamer@dimb=\beamer@tempdim\advance\beamer@dimb by4pt
+ \textdir TLT\begin{pgfpicture}{-4pt}{0pt}{\the\beamer@tempdim}{8pt}
+ \color{bg}
+ \pgfsetlinewidth{0.8pt}
+ \pgfpathqmoveto{0pt}{0pt}
+ \pgfpathqcurveto{-2.2pt}{0pt}{-4pt}{1.8pt}{-4pt}{4pt}
+ \pgfpathqcurveto{-4pt}{6.2pt}{-2.2pt}{8pt}{0pt}{8pt}
+ \pgfpathlineto{\pgfpoint{\the\beamer@tempdim}{8pt}}
+ \pgfpathcurveto%
+ {\pgfpoint{\the\beamer@dima}{8pt}}%
+ {\pgfpoint{\the\beamer@dimb}{6.2pt}}%
+ {\pgfpoint{\the\beamer@dimb}{4pt}}
+ \pgfpathcurveto%
+ {\pgfpoint{\the\beamer@dimb}{1.8pt}}%
+ {\pgfpoint{\the\beamer@dima}{0pt}}%
+ {\pgfpoint{\the\beamer@tempdim}{0pt}}
+ \pgfpathclose
+ \pgfusepathqfill
+ \colorlet{bg}{parent.bg}
+ \usebeamercolor[fg]{button border}
+ \pgfpathqmoveto{0pt}{0pt}
+ \pgfpathqcurveto{-2.2pt}{0pt}{-4pt}{1.8pt}{-4pt}{4pt}
+ \pgfpathqcurveto{-4pt}{6.2pt}{-2.2pt}{8pt}{0pt}{8pt}
+ \pgfpathlineto{\pgfpoint{\the\beamer@tempdim}{8pt}}
+ \pgfpathcurveto%
+ {\pgfpoint{\the\beamer@dima}{8pt}}%
+ {\pgfpoint{\the\beamer@dimb}{6.2pt}}%
+ {\pgfpoint{\the\beamer@dimb}{4pt}}
+ \pgfpathcurveto%
+ {\pgfpoint{\the\beamer@dimb}{1.8pt}}%
+ {\pgfpoint{\the\beamer@dima}{0pt}}%
+ {\pgfpoint{\the\beamer@tempdim}{0pt}}
+ \pgfpathclose
+ \pgfusepathqstroke
+ \end{pgfpicture}%
+ \hskip-\beamer@tempdim%
+ \box\beamer@tempbox%
+ \kern4pt%
+}
+
+%% beamerbasenavigation
+
+% User Buttons
+
+\pgfdefobject{beamergotosymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{5pt}{5pt}}
+{
+ \pgfpathqmoveto{1.5bp}{0.5bp}
+ \pgfpathqlineto{3.5bp}{2bp}
+ \pgfpathqlineto{1.5bp}{3.5bp}
+ \pgfusepathqfill
+}
+
+\def\insertgotosymbol{%
+\begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
+ \pgfuseobject{\ifcase\bbl@thepardir beamergotosymbol\else beamerreturnsymbol\fi}%
+\end{pgfpicture}}
+
+\pgfdefobject{beamerreturnsymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{5pt}{5pt}}
+{
+ \pgfpathqmoveto{3.5bp}{0.5bp}
+ \pgfpathqlineto{1.5bp}{2bp}
+ \pgfpathqlineto{3.5bp}{3.5bp}
+ \pgfusepathqfill
+}
+
+\def\insertreturnsymbol{%
+\begin{pgfpicture}{1pt}{0pt}{6pt}{5pt}
+ \pgfuseobject{\ifcase\bbl@thepardir beamerreturnsymbol\else beamergotosymbol\fi}%
+\end{pgfpicture}}
+
+
+\pgfdefobject{beamerskipsymbolrl}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{7pt}{5pt}}
+{
+ \pgfpathqmoveto{3.5bp}{0.5bp}
+ \pgfpathqlineto{1.5bp}{2bp}
+ \pgfpathqlineto{3.5bp}{3.5bp}
+ \pgfpathqmoveto{5.5bp}{0.5bp}
+ \pgfpathqlineto{3.5bp}{2bp}
+ \pgfpathqlineto{5.5bp}{3.5bp}
+ \pgfusepathqfill
+}
+
+\pgfdefobject{beamerskipsymbol}{\pgfpoint{0pt}{-1pt}}{\pgfpoint{7pt}{5pt}}
+{
+ \pgfpathqmoveto{1.5bp}{0.5bp}
+ \pgfpathqlineto{3.5bp}{2bp}
+ \pgfpathqlineto{1.5bp}{3.5bp}
+ \pgfpathqmoveto{3.5bp}{0.5bp}
+ \pgfpathqlineto{5.5bp}{2bp}
+ \pgfpathqlineto{3.5bp}{3.5bp}
+ \pgfusepathqfill
+}
+
+\def\insertskipsymbol{%
+\begin{pgfpicture}{-1pt}{0pt}{6pt}{5pt}
+ \pgfuseobject{\ifcase\bbl@thepardir beamerskipsymbol\else beamerskipsymbolrl\fi}%
+\end{pgfpicture}}
+
+\def\beamergotobutton#1{\beamerbutton{\insertgotosymbol\ #1}}
+\def\beamerreturnbutton#1{\beamerbutton{\insertreturnsymbol\ #1}}
+\def\beamerskipbutton#1{\beamerbutton{\insertskipsymbol\ #1}}
+
+%% beamerbaseframesize
+
+%
+% Zoom stuff
+%
+
+\def\beamer@framezoom<#1><#2>[#3](#4,#5)(#6,#7){%
+ \par\nointerlineskip%
+ \global\beamer@slidehaszoomtrue%
+ \advance\beamer@zoomcount by1\relax%
+ \def\beamer@zoomborderwidth{0}%
+ \edef\beamer@labelzoomed{beamer@labelzoomed@\the\beamer@zoomframecount @\the\beamer@zoomcount}%
+ \setkeys{beamerzoom}{#3}%
+ \only<#1>{%
+ {\hypersetup{pdfhighlight={/P},pdfborder={0 0 \beamer@zoomborderwidth}}%
+ \global\setbox\@tempboxa=\vbox{\hyperlink{\beamer@labelzoomed}{\vbox to #7{\hbox
+ to#6{\hfil}\vfil}}}}%
+ \ht\@tempboxa=0pt%
+ \wd\@tempboxa=0pt%
+ \dp\@tempboxa=0pt%
+ \setbox\@tempboxa=\vbox{\moveright#4\hbox{\lower#5\vbox{\box\@tempboxa}}}%
+ \ht\@tempboxa=0pt%
+ \wd\@tempboxa=0pt%
+ \dp\@tempboxa=0pt%
+ \global\setbox\beamer@zoombox=\vbox to0pt{\unvbox\beamer@zoombox\box\@tempboxa}%
+ }%
+ \only<#2>{%
+ \@ifundefined{\beamer@labelzoomed}%
+ {%
+ \hypertarget{\beamer@labelzoomed}{}%
+ \expandafter\gdef\csname\beamer@labelzoomed\endcsname{}%
+ }{}%
+ \gdef\beamer@zoomer{%
+ % compute zoom factor
+ \@tempdima=\beamer@frametextheight%
+ \@tempdimb=#7\relax%
+ \@tempcnta=\@tempdimb%
+ \divide\@tempcnta by4096\relax%
+ \multiply\@tempdima by16\relax%
+ \divide\@tempdima by\@tempcnta%
+ \@tempdimb=\paperwidth%
+ \ifbeamer@plainframe%
+ \else%
+ \advance\@tempdimb by-\beamer@leftsidebar%
+ \advance\@tempdimb by-\beamer@rightsidebar\relax%
+ \fi%
+ \@tempdimc=#6\relax%
+ \@tempcntb=\@tempdimc%
+ \divide\@tempcntb by4096\relax%
+ \multiply\@tempdimb by16\relax%
+ \divide\@tempdimb by\@tempcntb%
+ \ifdim\@tempdimb<\@tempdima%
+ \@tempdima=\@tempdimb%
+ \fi%
+ \edef\beamer@temp{\strip@pt\@tempdima}%
+ \@tempdimc=\beamer@frametextheight%
+ \advance\@tempdimc by4pt%
+ \@tempdimb=\paperwidth%
+ \ifbeamer@plainframe%
+ \else%
+ \advance\@tempdimb by-\beamer@leftsidebar%
+ \advance\@tempdimb by-\beamer@rightsidebar\relax%
+ \fi%
+ \setbox\@tempboxa=\vbox{\hsize=\@tempdimb\Acrobatmenu{GoBack}{\vbox to
+ \beamer@frametextheight{\hbox to\@tempdimb{\hfil}\vfil}}}%
+ \ht\@tempboxa=0pt%
+ \wd\@tempboxa=0pt%
+ \dp\@tempboxa=0pt%
+ \setbox\beamer@framebox=\vbox to\beamer@frametextheight{{%
+ \ifbeamer@plainframe\beamer@leftmargin=\Gm@lmargin\fi%
+ \ifcase\bbl@thepardir \else\multiply\@tempdimb by -1\relax\fi%
+ \begin{oldpgfpicture}{\beamer@leftmargin}{-\beamer@frametextheight}{\beamer@leftmargin}{0pt}
+ \pgftext[left,top]{\box\@tempboxa}
+ \pgfpathrectangle{\pgfpoint{0pt}{-\@tempdimc}}{\pgfpoint{\@tempdimb}{\@tempdimc}}%
+ \pgfusepath{clip}
+ \begingroup
+ \pgftransformscale{\beamer@temp}
+ \@tempdima=#4\relax%
+ \@tempdimb=#5\relax%
+ {\pgftransformshift{\pgfpoint{-\@tempdima}{\@tempdimb}}%
+ \pgftext[left,top]{\vbox{\vbox{}\nointerlineskip\unvbox\beamer@framebox }}}
+ \endgroup
+ \end{oldpgfpicture}%
+ }}%
+ \setbox\beamer@framebox=\vbox{%
+ \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%
+ \nointerlineskip\unvbox\beamer@frametitlebox%
+ \nobreak%
+ \box\beamer@framebox%
+ \nobreak%
+ \vss%
+ \beamer@exitcode%
+ }%
+ \global\setbox\beamer@footins=\box\voidb@x% no footnotes in zoomed slides
+ }%
+ }%
+}
+
+
+%
+% Shrink stuff
+%
+
+
+ \bbl@sreplace\beamer@shrinkframebox{\vbox}%
+ {\vbox dir TLT}%
+
+% Temporary workaround for issue of \shapemode bug
+% https://github.com/latex3/babel/issues/13
+% this work fine with lists inside frame, if they are included within \vbox
+% may be we need to insert \shapemode=2 or \shapemode=0 manualy at beginning of list
+% \begin{enumerate} \shapemode=.. & \begin{itemize} \shapemode=..
+
+\newcounter{beginframepardir}
+
+\let\oldframe\frame
+\def\frame{\setcounter{beginframepardir}{\bbl@getluadir{par}}
+% 0 for TLT 1 for TRT
+\oldframe}
+
+\redefbeamertemplate*{itemize/enumerate body begin}{default}{\ifnum\value{beginframepardir}=\bbl@getluadir{par} \else\shapemode=2\fi}
+
+\redefbeamertemplate*{description body begin}{default}{\ifnum\value{beginframepardir}=\bbl@getluadir{par} \else\shapemode \tw@\fi}
+
+% Use Amiri as default sans serif font
+
+\font\sffont@rl="Amiri" at 10pt
+\ifx\sffont@rl\nullfont
+\else
+\babelfont{sf}{Amiri}
+\fi
+
+\endinput \ No newline at end of file
diff --git a/macros/luatex/latex/lua-ul/docstrip-luacode.sty b/macros/luatex/latex/lua-ul/docstrip-luacode.sty
index 29f055258f..f406b6a0d1 100644
--- a/macros/luatex/latex/lua-ul/docstrip-luacode.sty
+++ b/macros/luatex/latex/lua-ul/docstrip-luacode.sty
@@ -13,7 +13,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage
{docstrip-luacode}
- [2021/02/02 v0.1.1 Directly execute Lua code from DocStrip files]
+ [2021/02/15 v0.1.2 Directly execute Lua code from DocStrip files]
\expanded{%
\def\noexpand\docstrip@luacode@argscanner#1\directlua{
tex.sprint(\the\catcodetable@string, "\string\\end{docstrip-luacode}")
diff --git a/macros/luatex/latex/lua-ul/lua-ul.dtx b/macros/luatex/latex/lua-ul/lua-ul.dtx
index ad57f41b67..c530c492b4 100644
--- a/macros/luatex/latex/lua-ul/lua-ul.dtx
+++ b/macros/luatex/latex/lua-ul/lua-ul.dtx
@@ -62,7 +62,7 @@
% \duck
% \end{tikzpicture}§
% }}
-% \NewDocumentCommand\underDuck{m}{{\beginUnderDuck#1}}
+% \NewDocumentCommand\underDuck{+m}{{\beginUnderDuck#1}}
% \newunderlinetype\beginUnderWavy[\number\dimexpr1ex]{\cleaders\hbox{§
% \setlength\unitlength{.3ex}§
% \begin{picture}(4,0)(0,1)
@@ -72,11 +72,11 @@
% \qbezier(2,0)(3,-1)(4,0)
% \end{picture}§
% }}
-% \NewDocumentCommand\underWavy{m}{{\beginUnderWavy#1}}
+% \NewDocumentCommand\underWavy{+m}{{\beginUnderWavy#1}}
% \newunderlinetype\beginStrikeThough{\leaders\hbox{§
% \normalfont\bfseries/§
% }}
-% \NewDocumentCommand\StrikeThough{m}{{\beginStrikeThough#1}}
+% \NewDocumentCommand\StrikeThough{+m}{{\beginStrikeThough#1}}
%
% \newcommand\Luaul{Lua-UL}
% \newcommand\luaul{Lua-UL}
@@ -180,7 +180,7 @@
% \duck
% \end{tikzpicture}%
% }}
-% \NewDocumentCommand\underDuck{m}{{\beginUnderDuck#1}}
+% \NewDocumentCommand\underDuck{+m}{{\beginUnderDuck#1}}
% \newunderlinetype\beginUnderWavy[\number\dimexpr1ex]{\cleaders\hbox{%
% \setlength\unitlength{.3ex}%
% \begin{picture}(4,0)(0,1)
@@ -190,11 +190,11 @@
% \qbezier(2,0)(3,-1)(4,0)
% \end{picture}%
% }}
-% \NewDocumentCommand\underWavy{m}{{\beginUnderWavy#1}}
+% \NewDocumentCommand\underWavy{+m}{{\beginUnderWavy#1}}
% \newunderlinetype\beginStrikeThough{\leaders\hbox{%
% \normalfont\bfseries/%
% }}
-% \NewDocumentCommand\StrikeThough{m}{{\beginStrikeThough#1}}
+% \NewDocumentCommand\StrikeThough{+m}{{\beginStrikeThough#1}}
% \end{verbatim}
%
% Here \verb+\underWavy+ uses a custom context because it doesn't change depending on the current font color.
@@ -816,7 +816,7 @@ luatexbase.add_to_callback('vpack_filter',
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage
{lua-ul}
- [2021/02/02 v0.1.1 Underlining and related functionality for LuaTeX]
+ [2021/02/15 v0.1.2 Underlining and related functionality for LuaTeX]
% \fi
% Only \LuaLaTeX{} is supported.
@@ -910,15 +910,16 @@ luatexbase.add_to_callback('vpack_filter',
\edef\luaul@highlight@color{\IfValueTF{#1}{[#1]{#2}}{#2}}%
}
% \end{macrocode}
-% \changes{0.1.1}{2020-03-15}{Use \texttt{xparse} for all user commands}
+% \changes{0.1.1}{2021-02-02}{Use \texttt{xparse} for all user commands}
% \changes{0.1.1}{2021-02-02}{Optionally color \texttt{\protect\string\protect\strikeThrough}}
+% \changes{0.1.2}{2021-02-15}{Allow \texttt{long} arguments (again)}
% The sizes for the predefined commands are stolen from the \enquote{soul}
% default values.
% \begin{macrocode}
\newunderlinetype\@underLine{%
\leaders\vrule height -.65ex depth .75ex
}
- \NewDocumentCommand\underLine{m}{{\@underLine#1}}
+ \NewDocumentCommand\underLine{+m}{{\@underLine#1}}
\newunderlinetype\@strikeThrough{%
\leaders\vrule height .55ex depth -.45ex
@@ -928,7 +929,7 @@ luatexbase.add_to_callback('vpack_filter',
\luaul@applycolor
\leaders\vrule height .55ex depth -.45ex
}
- \NewDocumentCommand\strikeThrough{om}{{%
+ \NewDocumentCommand\strikeThrough{o+m}{{%
\IfValueTF{#1}{%
\luaul@setcolor{#1}%
\colored@strikeThrough
@@ -941,7 +942,7 @@ luatexbase.add_to_callback('vpack_filter',
\luaul@applycolor
\leaders\vrule height 1.75ex depth .75ex
}
- \NewDocumentCommand\highLight{O{\luaul@highlight@color}m}{{%
+ \NewDocumentCommand\highLight{O{\luaul@highlight@color}+m}{{%
\luaul@setcolor{#1}%
\@highLight#2%
}}
diff --git a/macros/luatex/latex/lua-ul/lua-ul.pdf b/macros/luatex/latex/lua-ul/lua-ul.pdf
index a868e5e6ef..f87859a29d 100644
--- a/macros/luatex/latex/lua-ul/lua-ul.pdf
+++ b/macros/luatex/latex/lua-ul/lua-ul.pdf
Binary files differ
diff --git a/macros/luatex/optex/README b/macros/luatex/optex/README
index 6c5ae30b5a..b8f925e47c 100644
--- a/macros/luatex/optex/README
+++ b/macros/luatex/optex/README
@@ -19,6 +19,13 @@ doc/ ... PDF version of the OpTeX documentation and sources.
History:
+<1.01> Mar. 2021
+ Minor code fixes (thanks to reports from users).
+ LibreCaslon font file added.
+ two new callbacks from new LuaTeX 1.13 added to optex.lua
+ active * (in lists) works as normal in math mode.
+ f-heros(\slides): additional font XITSMath loaded (to the base FiraMath font).
+ \_xhsize seting added to \margins.
<1.00> Feb. 2021
The OMLS (OpTeX Markup Language Standard) was developed. It helps to create
convertors from/to OpTeX documents and similar applications.
diff --git a/macros/luatex/optex/base/alloc.opm b/macros/luatex/optex/base/alloc.opm
index 56c1d3dd63..5d874134d4 100644
--- a/macros/luatex/optex/base/alloc.opm
+++ b/macros/luatex/optex/base/alloc.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \newdimen {Allocators for registers <2020-05-12>} % loaded in format
+\_codedecl \newdimen {Allocators for registers <2021-02-15>} % loaded in format
\_doc -----------------------------
The limits are set first.
@@ -39,7 +39,7 @@
\_cod -----------------------------
\_def\_allocator #1#2#3{%
- \_global\_advance\_cs{_#2alloc}by1
+ \_incr{\_cs{_#2alloc}}%
\_ifnum\_cs{_#2alloc}>\_cs{_mai#2}%
\_errmessage{No room for a new \_ea\_string\_csname #2\_endcsname}%
\_else
@@ -75,7 +75,7 @@
\_chardef\_insertmin = 201
\_def\_newinsert #1{%
- \_global\_advance\_insertalloc by-1
+ \_decr\_insertalloc
\_ifnum\_insertalloc <\_insertmin
\_errmessage {No room for a new \_string\insert}%
\_else
@@ -168,5 +168,6 @@ the array-like declarator of counters.
\_endinput
+2021-02-15 \_advance -> \_incr, \_decr
2020-05-12 \newmath -> \newfam bug fixing
2020-01-23 released
diff --git a/macros/luatex/optex/base/f-heros.opm b/macros/luatex/optex/base/f-heros.opm
index ca62da93a5..767052cc45 100644
--- a/macros/luatex/optex/base/f-heros.opm
+++ b/macros/luatex/optex/base/f-heros.opm
@@ -19,7 +19,21 @@ Modifiers:^^J
\_initfontfamily % new font family must be initialized
-\_loadmath {[FiraMath-Regular]}
+\_ifmathloading
+ \_loadmath {[FiraMath-Regular]}
+ \_addto\_normalmath{\_loadumathfamily 5 {xitsmath-regular}{} }
+ \_addto\_boldmath {\_loadumathfamily 5 {xitsmath-bold}{} }
+ \_addto\frak{\_fam5 }\_addto\cal{\_fam5 }
+ \_normalmath
+ \_wterm{MATH-FONT(5): "[XITSMath-Regular/Bold]" -- used for \_string\cal, \_string\frak}
+ % \bf, \bi from FiraMath:
+ \_let\_bsansvariables=\_bfvariables
+ \_let\_bsansGreek=\_bfGreek
+ \_let\_bsansgreek=\_bfgreek
+ \_let\_bsansdigits=\_bfdigits
+ \_let\_bisansvariables=\_bivariables
+ \_let\_bisansgreek=\_bigreek
+\_fi
\_endcode
diff --git a/macros/luatex/optex/base/f-librecaslon.opm b/macros/luatex/optex/base/f-librecaslon.opm
new file mode 100644
index 0000000000..53f61834f1
--- /dev/null
+++ b/macros/luatex/optex/base/f-librecaslon.opm
@@ -0,0 +1,22 @@
+%% This is part of the OpTeX project, see http://petr.olsak.net/optex
+
+\_famdecl [LibreCaslon] \Librecaslon {Libre Caslon Text, inspired by Caslon}
+ {\onum} {\rm \bf \it \bi} {Termes}
+ {[LibreCaslonText-Regular]}
+ {\_def\_fontnamegen {[Libre\_currV]:\_capsV\_fontfeatures}}
+
+\_wlog{\_detokenize{%
+Modifier:^^J
+ \onum ...... oldstyle figures^^J
+}}
+
+\_moddef \resetmod {\_fsetV caps={},csl={CaslonText}
+ \_fvars \_cslV-Regular \_cslV-Bold \_cslV-Italic Csln-Bolditalic }
+\_moddef \onum {\_fsetV caps=+onum; }
+
+\_initfontfamily % new font family must be initialized
+
+\_loadmath {[texgyretermes-math]}
+
+\_endcode
+
diff --git a/macros/luatex/optex/base/fams-ini.opm b/macros/luatex/optex/base/fams-ini.opm
index 4b12550553..3c8ded975e 100644
--- a/macros/luatex/optex/base/fams-ini.opm
+++ b/macros/luatex/optex/base/fams-ini.opm
@@ -99,6 +99,11 @@
{ -,\caps: {\rm\bf\it\bi} \swash: {\it\bi} }
\_famalias [GaramondL]
+\_famfrom {Pablo Impallari, Rodrigo Fuenzalida}
+\_faminfo [LibreCaslon] {Libre Caslon Text, inspired by Caslon} {f-librecaslon}
+ { -,\onum: {\rm\bf\it\bi} }
+\_famalias [Caslon]
+
\_famfrom {Adobe, Paul D. Hunt}
\_faminfo [Source Pro] {Adobe SourceSerifPro, SourceSansPro, SourceCodePro} {f-sourcepro}
{ \elight,\light,-,\bolder: {\rm\it} -,\bolder: {\bf\bi}
diff --git a/macros/luatex/optex/base/fonts-opmac.opm b/macros/luatex/optex/base/fonts-opmac.opm
index a5dda559f1..3ae2f0c5e1 100644
--- a/macros/luatex/optex/base/fonts-opmac.opm
+++ b/macros/luatex/optex/base/fonts-opmac.opm
@@ -1,12 +1,12 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \typosize {Font managing macros from OPmac <2020-12-12>} % loaded in format
+\_codedecl \typosize {Font managing macros from OPmac <2021-03-10>} % loaded in format
\_doc -----------------------------
\`\typosize` `[<font-size>/<baselineskip>]` sets given parameters.
It sets text font size by the \^`\setfontsize` macro and math font sizes
by setting internal macros \^`\_sizemtext`, \^`\_sizemscript` and
- \^`\_sizemsscript`. It uses common concept font thes sizes: 100\,\%,
+ \^`\_sizemsscript`. It uses common concept font sizes: 100\,\%,
70\,\% and 50\,\%.
The \^`\_setmainvalues` sets the parameters as main values when
the `\_typosize` is called first.
@@ -23,7 +23,7 @@
\_edef\_sizemtext{\_ea\_ignorept \_the\_tmpdim \_ptmunit}%
\_tmpdim=0.7\_tmpdim
\_edef\_sizemscript{\_ea\_ignorept \_the\_tmpdim \_ptmunit}%
- \_tmpdim=#1\_ptunit \_tmpdim=0.5\_tmpdim
+ \_tmpdim=#1\_ptunit \_tmpdim=0.5\_tmpdim
\_edef\_sizemsscript{\_ea\_ignorept \_the\_tmpdim \_ptmunit}%
\_fi
}
@@ -71,26 +71,49 @@
\_doc -----------------------------
\`\_setmainvalues` sets the current font size and `\baselineskip`
- values to the \`\mainfosize` and \hbox{\`\mainbaselineskip`} registers.
- It redefines itself to set the main values only first.
+ values to the \`\mainfosize` and \hbox{\`\mainbaselineskip`} registers
+ and loads fonts at given sizes.
+ It redefines itself as \`\_setmainvaluesL`
+ to set the main values only first. The \^`\_setmainvaluesL` does only
+ fonts loading.
\nl
\`\scalemain` returns to these values if they were set. Else they are set
to 10/12\,pt.
+ \nl
+ \`\mfontsrule` gives the rule how math fonts are loaded when \^`\typosize`
+ or \^`\typoscale` are used. The value of \^`\mfontsrule` can be:
+ \begitems
+ * 0: no math fonts are loaded. User must use \^`\normalmath` or \^`\boldmath` explicitly.
+ * 1: `\_normalmath` is run if \^`\typosize`/\^`\typoscale` are used
+ first or they are run at outer group level. No
+ `\everymath`/`\everydisplay` are set in this case. If
+ \^`\typosize`/\^`\typoscale` are run repeatedly in a group then `\_normalmath` is
+ run only when math formula occurs. This is done using
+ `\everymath`/`\everydisplay` and \^`\_setmathfonts`.
+ \^`\mfontsrule=1` is default.
+ * 2: `\_normalmath` is run whenever \^`\typosize`/\^`\typoscale` are used.
+ `\everymath`/`\everydisplay` registers are untouched.
+ \enditems
\_cod -----------------------------
\_newskip \_mainbaselineskip \_mainbaselineskip=0pt \_relax
\_newdimen \_mainfosize \_mainfosize=0pt
+\_newcount \_mfontsrule \_mfontsrule=1
\_def\_setmainvalues {%
\_mainbaselineskip=\_baselineskip
\_mainfosize=\_optsize
\_topskip=\_mainfosize \_splittopskip=\_topskip
\_ifmmode \_else \_bf \_it \_bi \_rm \_fi % load all basic variants of the family
- \_normalmath % load fonts if \typosize is running first
+ \_ifnum \_mfontsrule>0 \_normalmath \_fi % load math fonts first
\_let \_setmainvalues =\_setmainvaluesL
}
-\_def\_setmainvaluesL {\_ifmmode \_normalmath \_else
- \_rm \_everymath={\_normalmath}\_everydisplay={\_normalmath}\_fi}
+\_def\_setmainvaluesL {\_relax \_ifmmode \_else \_rm \_fi % load text font
+ \_ifcase \_mfontsrule % load math fonts
+ \_or \_ifnum\_currentgrouplevel=0 \_normalmath
+ \_else \_everymath={\_setmathfonts}\_everydisplay={\_normalmath}%
+ \_let\_runboldmath=\_relax \_fi
+ \_or \_normalmath \_fi}
\_def\_scalemain {%
\_ifdim \_mainfosize=\_zo
\_mainfosize=10pt \_mainbaselineskip=12pt
@@ -98,7 +121,21 @@
\_fi
\_optsize=\_mainfosize \_baselineskip=\_mainbaselineskip
}
-\_public \scalemain \mainfosize \mainbaselineskip ;
+\_public \scalemain \mainfosize \mainbaselineskip \mfontsrule ;
+
+ \_doc -----------------------------
+ Suppose following example:
+ `{\typosize[13/15] Let $M$ be a subset of $R$ and $x\in M$...}`
+ If \^`\mfontsrule=1` then \^`\typosize` does not load math fonts
+ immediatelly but at the first math formula. It is done by `\everymath`
+ register, but the contents of this register is processed inside the math
+ group. If we do `\everymath={\_normalmath}` then this complicated macro
+ will be processed three times in your example above. We want only one
+ pocessing, so we do `\everymath={`\`\_setmathfonts``}` and
+ this macro closes math mode first, loads fonts and opens math mode again.
+ \_cod -----------------------------
+
+\_def\_setmathfonts{$\_normalmath\_everymath{}\_everydisplay{}$}
\_doc -----------------------------
\`\thefontsize` `[<size>]` and \`\thefontscale` `[<factor>]`
@@ -141,13 +178,25 @@
\_let\_italcorr=\/
\_doc -----------------------------
- The \`\boldify` macro does `\let\it\bi` and `\let\normalmath=\boldmath`.
+ The \`\boldify` macro does `\let\rm\bf`, `\let\it\bi` and
+ `\let\normalmath=\boldmath`. All following text will be in bold.
+ If should be used after \^`\typosize` or \^`\typoscale` macros.\nl
+ The internal \`\_runboldmath` macro runs `\_boldmath` immediatelly
+ if no delay of the math font loading is set by \^`\_setmainvaluesL`.\nl
+ The `\rm`, `\it` in math mode must keep its original meaning.
\_cod -----------------------------
\_protected\_def \_boldify {%
\_let \_setmainvalues=\_setmainvaluesL
\_let\it =\_bi \_let\rm =\_bf \_let\_normalmath=\_boldmath \_bf
+ \_runboldmath
+ \_ifx\_ncharrmA\_undefined \_protected\_addto\rm{\_fam0 }\_protected\_addto\it{\_fam1 }%
+ \_else \_protected\_def\rm {\_tryloadbf \_tenbf \_inmath{\_rmvariables \_rmdigits}}%
+ \_protected\_def\it {\_tryloadbi \_tenbi \_inmath{\_itvariables}}%
+ \_fi
}
+\_def\_runboldmath{\_boldmath}
+
\_public \em \boldify ;
\_doc -----------------------------
@@ -169,6 +218,8 @@
\_endcode % -------------------------------------
History:
+2021-03-10 \boldify corrected
+2021-03-09 \mfontsrule and \_setmathfonts introduced
2020-12-12 \_rmfixed fixed
2020-04-28 \boldify: removed \let\_rm=\_bf
2020-04-14 \_setmainvaluesL: \_ifmmode test added
diff --git a/macros/luatex/optex/base/fonts-select.opm b/macros/luatex/optex/base/fonts-select.opm
index 9066d4fed5..740b311a67 100644
--- a/macros/luatex/optex/base/fonts-select.opm
+++ b/macros/luatex/optex/base/fonts-select.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \fontfam {Fonts selection system <2020-01-27>} % preloaded in format
+\_codedecl \fontfam {Fonts selection system <2021-02-25>} % preloaded in format
\_doc -----------------------------
\`\initunifonts` macro extends \LuaTeX's font capabalities,
@@ -13,7 +13,9 @@
macro \`\_doresizeunifont`. This mode includes
a fallback to TFM mode if \^`\_fontnamegen` is not defined.
Finally, `\initunifonts` sets itself to relax because we don't want to do
- this work twice.
+ this work twice.\nl
+ \`\_ttunifont` is default font for `\tt` variant if
+ `f-lmfonts.opm` (or another font file where `\tt` is declared) is not loaded.
\_cod -----------------------------
\_def\_initunifonts {%
@@ -23,7 +25,7 @@
}%
\_gdef\_rfskipatX ##1" ##2\_relax{"##1"}%
\_global\_let \_doresizefont=\_doresizeunifont
- \_gdef\_tryloadtt {\_fontdef\_tentt{\_def\_fontnamegen{[lmmono10-regular]}\_rm}}%
+ \_gdef\_tryloadtt {\_fontdef\_tentt{\_let\_fontnamegen=\_ttunifont\_rm}}%
\_global\_let \_initunifonts=\_relax % we need not to do this work twice
\_global\_let \initunifonts=\_relax
}
@@ -32,6 +34,8 @@
\_font#1={\_fontnamegen} \_sizespec \_relax \_setwsp#1\_relax
\_fi
}
+\_def\_ttunifont{[lmmono10-regular]:\_fontfeatures-tlig;}
+
\_public \initunifonts ;
\_doc -----------------------------
@@ -834,6 +838,7 @@ Luaotfload documentation for more information.
\endinput
+2021-02-25 \_ttunifont introduced
2021-01-27 lua hack (print function) removed because luaotfload 3.17 removes bug.
2020-12-12 \_modlist added, doc improved
2020-04-18 \_tryloadfamslocal introduced
diff --git a/macros/luatex/optex/base/lists.opm b/macros/luatex/optex/base/lists.opm
index a32d13319f..189719302d 100644
--- a/macros/luatex/optex/base/lists.opm
+++ b/macros/luatex/optex/base/lists.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \begitems {Lists: begitems, enditems <2020-04-21>} % preloaded in format
+\_codedecl \begitems {Lists: begitems, enditems <2021-03-10>} % preloaded in format
\_doc -----------------------------
\`\_aboveliskip` is used above the list of items,\nl
@@ -47,7 +47,7 @@
\_advance \_ilevel by1
\_setlistskip
\_ifnum\_lastpenalty<10000 \_aboveliskip \_fi
- \_itemnum=0 \_adef*{\_startitem}
+ \_itemnum=0 \_adef*{\_relax\_ifmmode*\_else\_ea\_startitem\_fi}
\_advance\_leftskip by\_iindent
\_printitem=\_defaultitem
\_the\_everylist \_relax
@@ -123,5 +123,6 @@
\_endcode % -------------------------------------
+2021-03-10 \_ifmmode*\_else\_ea\_startitem\_fi added to * defintition
2020-04-21 \isnextchar\par added to \enditems
2020-03-18 introduced
diff --git a/macros/luatex/optex/base/makeindex.opm b/macros/luatex/optex/base/makeindex.opm
index 8c58f7085c..e5f7b4032e 100644
--- a/macros/luatex/optex/base/makeindex.opm
+++ b/macros/luatex/optex/base/makeindex.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \makeindex {Makeindex and sorting <2021-02-01>} % loaded in format
+\_codedecl \makeindex {Makeindex and sorting <2021-02-15>} % loaded in format
\_doc -----------------------------
\^`\makeindex` implements sorting algorithm at \TeX/ macro-language level.
@@ -334,7 +334,7 @@
\_def\_printiiA #1/{\_if^#1^\_let\_previi=\_currii \_else
\_ea\_scanprevii\_previi/&\_edef\_tmpb{\_detokenize{#1}}%
\_ifx\_tmpa\_tmpb \_iiemdash \_else#1 \_gdef\_previi{}\_fi
- \_expandafter\_printiiA\_fi
+ \_ea\_printiiA\_fi
}
\_def\_iiemdash{\_kern.1em---\_space}
\_def\_lastii{}
@@ -457,6 +457,7 @@
\_endcode % -------------------------------------
+2021-02-15 \_expandafter -> \_ea
2021-02-01 secodary sorting: start from code 65
2020-04-21 \isempty \iffalse ... \fi added to \iindex
2020-03-26 introduced
diff --git a/macros/luatex/optex/base/margins.opm b/macros/luatex/optex/base/margins.opm
index 8799dec294..d88cc04237 100644
--- a/macros/luatex/optex/base/margins.opm
+++ b/macros/luatex/optex/base/margins.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \margins {Macros for margins setting <2020-03-14>} % preloaded in format
+\_codedecl \margins {Macros for margins setting <2021-03-15>} % preloaded in format
\_doc ----------------------------
\`\margins``/<pg> <fmt> (<left>,<right>,<top>,<bot>)<unit>`
@@ -25,6 +25,7 @@
\_else \_if$#4$\_hoffset = #3\_tmp \_relax % only left margin
\_else \_hsize =\_dimexpr \_pgwidth - #3\_tmp - #4\_tmp \_relax % left+right margin
\_hoffset = #3\_tmp \_relax
+ \_xhsize =\_hsize \_setxhsize % \_xhsize used by \output routine
\_fi\_fi
\_if$#5$\_if$#6$\_voffset =\_dimexpr (\_pgheight -\_vsize)/2 \_relax
\_else \_voffset =\_dimexpr \_pgheight -\_vsize - #6\_tmp \_relax % only bottom margin
@@ -75,4 +76,5 @@
\_endcode % -----------------------------------------
-
+2021-03-15 \_setxhsize added
+2020-03-14 released
diff --git a/macros/luatex/optex/base/math-macros.opm b/macros/luatex/optex/base/math-macros.opm
index 6d5278d5c2..2b090ee1b8 100644
--- a/macros/luatex/optex/base/math-macros.opm
+++ b/macros/luatex/optex/base/math-macros.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \sin {Math macros plus mathchardefs <2021-02-04>} % preloaded in format
+\_codedecl \sin {Math macros plus mathchardefs <2021-02-15>} % preloaded in format
\_doc -----------------------------
The category code of the character `_` remains as the letter (11) and the mathocode
@@ -1013,7 +1013,7 @@
depending on the current math style when \^`\mathstyles` was opened.
\enditems
Example of usage of \^`\mathstyles`:
- `\def\mathframe#1{\mathstyles{\frame{$\currstyle#1$}}}`.
+ `\def\mathframe#1{\mathstyles{\frame{$\currstyle{#1}$}}}`.
\_cod -----------------------------
\_newcount\_stylenum
@@ -1044,17 +1044,26 @@
\_doc -----------------------------
The \`\mathbox``{<text>}` macro is copied from OPmac trick 078.
It behaves like `\hbox{<text>}` but the `<text>` is scaled to a smaller
- size if it is used in scriptstyle or scriptscript style.
+ size if it is used in scriptstyle or scriptscript style.\nl
+ The \^`\_textmff` and \^`\_scriptmff` are redefined in order to
+ respect optical sizes. If we are in script style then the math mode
+ starts in text style, but optical size is given to script style.
+ The `\mathbox` in non-Unicode math respects optical sizes
+ using different principle.
\_cod -----------------------------
\_def\_mathbox#1{{\_mathstyles{\_hbox{%
\_ifnum\_stylenum<2 \_everymath{\_currstyle}%
- \_else \_typoscale[\_dobystyle{}{}{700}{500}/]\_fi #1}}}%
+ \_else
+ \_ifnum\_stylenum=2 \_def\_textmff{+ssty=0;}\_fi
+ \_ifnum\_stylenum=3 \_def\_textmff{+ssty=1;}\_def\_scriptmff{+ssty=1;}\_fi
+ \_typoscale[\_dobystyle{}{}{700}{500}/]\_fi #1}}}%
}
\_public \mathbox ;
\_endcode %---------------------------------------------------
+2021-02-15 \_mathbox redefines \_textmff etc. in order to respect optical sizes
2021-02-04 \_bordermatrixwithdelims introduced.
2021-01-23 better expession for math styles in \matrix
2021-01-22 bad use of \_stylenum in \matrix + bad value (bug fix: \_stylenum->\_mtstylenum)
diff --git a/macros/luatex/optex/base/math-unicode.opm b/macros/luatex/optex/base/math-unicode.opm
index 680da012d6..96f9983380 100644
--- a/macros/luatex/optex/base/math-unicode.opm
+++ b/macros/luatex/optex/base/math-unicode.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \loadmath {Unicode Math fonts <2020-06-06>} % preloaded in format
+\_codedecl \loadmath {Unicode Math fonts <2021-03-09>} % preloaded in format
\_doc -----------------------------
\`\loadmath` `{<Unicode-math font>}` loads the given font. It does:
@@ -88,7 +88,8 @@
\_delimitershortfall=0.5\_fontdimen6\_textfont3
\_nulldelimiterspace=0.12\_fontdimen6\_textfont3
\_scriptspace=0.05\_fontdimen6\_textfont3
- {\_everymath{}\_global\_setbox0=\_hbox{$\_fam1\_displaystyle{0\_atop0}$}}% correction for \choose
+ \_begingroup % correction for \choose
+ \_everymath{}\_global\_setbox0=\_hbox{$\_fam1\_displaystyle{0\_atop0}$}\_endgroup
\_Umathfractiondelsize\_displaystyle = \_dimexpr(\_ht0-\_Umathaxis\_displaystyle)*2\_relax
}
@@ -120,7 +121,10 @@
math formulae from these three math families. All information needed by
\TeX/ is collected in single Unicode-math font.\nl
The \^`\_corrmsize` `<factor><space>` can be used just before
- `\_loadumathfamily`, see section~\ref[math-preload] for more information.
+ `\_loadumathfamily`, see section~\ref[math-preload] for more information.\nl
+ The \`\_textmff`, \`\_scriptmff` and \`\_sscriptmff` are additional font
+ features for text, script and sscript sizes respectively. They are
+ locally re-defined in \^`\mathbox` macro.
\_cod -----------------------------
\_def\_umathname#1#2{"#1:\_mfontfeatures#2"}
@@ -128,14 +132,15 @@
\_def\_loadumathfamily #1 #2#3 {%
\_edef\_optsizesave{\_the\_optsize}%
- \_optsize=\_sizemtext \_font\_mF=\_umathname{#2}{#3} at\_optsize \_textfont#1=\_mF
- \_ifnum#1=1 \_textfont2=\_mF \_textfont3=\_mF \_fi
- \_optsize=\_sizemscript \_font\_mF=\_umathname{#2}{+ssty=0;#3} at\_optsize \_scriptfont#1=\_mF
- \_ifnum#1=1 \_scriptfont2=\_mF \_scriptfont3=\_mF \_fi
- \_optsize=\_sizemsscript \_font\_mF=\_umathname{#2}{+ssty=1;#3} at\_optsize\_scriptscriptfont#1=\_mF
- \_ifnum#1=1 \_scriptscriptfont2=\_mF \_scriptscriptfont3=\_mF \_fi
+ \_optsize=\_sizemtext \_font\_mF=\_umathname{#2}{\_textmff #3} at\_optsize
+ \_textfont#1=\_mF \_ifnum#1=1 \_textfont2=\_mF \_textfont3=\_mF \_fi
+ \_optsize=\_sizemscript \_font\_mF=\_umathname{#2}{\_scriptmff #3} at\_optsize
+ \_scriptfont#1=\_mF \_ifnum#1=1 \_scriptfont2=\_mF \_scriptfont3=\_mF \_fi
+ \_optsize=\_sizemsscript \_font\_mF=\_umathname{#2}{\_sscriptmff #3} at\_optsize
+ \_scriptscriptfont#1=\_mF \_ifnum#1=1 \_scriptscriptfont2=\_mF \_scriptscriptfont3=\_mF \_fi
\_optsize=\_optsizesave \_ptmunit=\_ptunit
}
+\_def\_textmff{} \_def\_scriptmff{+ssty=0;} \_def\_sscriptmff{+ssty=1;}
\_doc -----------------------------
Unicode math font includes all typical math alphabets together, user needs not to
@@ -194,7 +199,7 @@
\_def\_greekdef#1{\_ifx#1\_relax \_else
\_begingroup \_lccode`X=\_umathnumB \_lowercase{\_endgroup \_def#1{X}}%
\_advance\_umathnumB by 1
- \_expandafter\_greekdef \_fi
+ \_ea\_greekdef \_fi
}
\_endcode
@@ -253,6 +258,9 @@ the section~\ref[math-macros].
\_endinput
+2021-03-09 \_setunimathdimes: \_begin/end/group instead {}, bug fixed
+2021-02-15 \_textmff, \_scriptmff and \_sscriptmff introduced
+2021-02-15 \_expandafter -> \_ea
2020-06-07 \Umathfractiondelsize (for \choose brackets) corrected, see https://tug.org/pipermail/luatex/2020-June/007365.html
2020-04-15 \_setmathdimens -> \_setuniathdimens
2020-02-25 implemented
diff --git a/macros/luatex/optex/base/optex.ini b/macros/luatex/optex/base/optex.ini
index 3826ccf0e1..c695b7d809 100644
--- a/macros/luatex/optex/base/optex.ini
+++ b/macros/luatex/optex/base/optex.ini
@@ -21,8 +21,9 @@
% OpTeX version
-\def\optexversion{1.00 Feb.2021}
+\def\optexversion{1.01 Mar.2021}
\def\fmtname{OpTeX}
+\let\fmtversion=\optexversion
% Engine testing:
diff --git a/macros/luatex/optex/base/optex.lua b/macros/luatex/optex/base/optex.lua
index 9bc8d6f7d8..2d83f38ed6 100644
--- a/macros/luatex/optex/base/optex.lua
+++ b/macros/luatex/optex/base/optex.lua
@@ -92,6 +92,7 @@ local callback_types = {
process_input_buffer = "data",
process_output_buffer = "data",
process_jobname = "data",
+ input_level_string = "data",
-- node list processing
contribute_filter = "simple",
@@ -141,6 +142,7 @@ local callback_types = {
-- undocumented
glyph_stream_provider = "exclusive",
+ provide_charproc_data = "exclusive",
}
--
-- Return a list containing descriptions of added callback functions for
diff --git a/macros/luatex/optex/base/outlines.opm b/macros/luatex/optex/base/outlines.opm
index ad05c97edc..6230d8988b 100644
--- a/macros/luatex/optex/base/outlines.opm
+++ b/macros/luatex/optex/base/outlines.opm
@@ -50,7 +50,7 @@
\_def\_outlinesC#1#2#3#4{\_pdfoutline goto name{#1} count #2#3{#4}\_relax}
\_newcount\_oulnum
-\_def\_insertoutline#1{\_global\_advance\_oulnum by1
+\_def\_insertoutline#1{\_incr\_oulnum
\_pdfdest name{oul:\_the\_oulnum} xyz\_relax
\_pdfunidef\_tmp{#1}%
\_pdfoutline goto name{oul:\_the\_oulnum} count0 {\_tmp}\_relax
@@ -100,3 +100,9 @@ labels are used.
It creates a link destination of the type `oul:<num>` into the document
(where \^`\insertoutline` is used) and the link itself is created too in the
outline.
+
+\endinput
+
+2021-02-15 \_advance -> \_incr
+2021-02-09 \thisoutline implemented
+2020-03-12 released
diff --git a/macros/luatex/optex/base/output.opm b/macros/luatex/optex/base/output.opm
index 8bf02af753..5bb93c2477 100644
--- a/macros/luatex/optex/base/output.opm
+++ b/macros/luatex/optex/base/output.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \nopagenumbers {Output routine <2020-03-28>} % preloaded in format
+\_codedecl \nopagenumbers {Output routine <2021-02-25>} % preloaded in format
\_doc -----------------------------
\`\_optexoutput` is the default output routine. You can create another...
@@ -38,7 +38,8 @@
(for headlines and footlines, for instance). This value is set
from the current value of `\hsize` when \`\_setxhsize` macro is called.
This macro destroys itself, so the value is set only once. Typically it is
- done when first \^`\_optexoutput` routine is called (see \^`\_begoutput`).
+ done in \^`\margins` macro or
+ when first \^`\_optexoutput` routine is called (see \^`\_begoutput`).
Or it is called at the begining of the \^`\begtt`...`\endtt` environment before
`\hsize` value is eventually changed by the user in this environment.
\_cod -----------------------------
@@ -130,7 +131,7 @@
\_def \_folio {\_ifnum\_pageno<0 \_romannumeral-\_pageno \_else \_number\_pageno \_fi}
\_def \_nopagenumbers {\_footline={}}
\_def \_advancepageno {%
- \_ifnum\_pageno<0 \_global\_advance\_pageno by-1 \_else \_incr\_pageno \_fi
+ \_ifnum\_pageno<0 \_decr\_pageno \_else \_incr\_pageno \_fi
} % increase |pageno|
\_def \_raggedbottom {\_topskip=\_dimexpr\_topskip plus60pt \_pgbottomskip=0pt plus1fil\_relax}
\_def \_normalbottom {\_topskip=\_dimexpr\_topskip \_pgbottomskip=0pt\_relax}
@@ -214,10 +215,10 @@
\_global\_let\_draftfont=\_draftfont
}
\_def \_draftbox #1{\_setbox0=\_hbox{#1}%
- \_kern.5\_vsize \_kern4.5\_wd0
- \_hbox to0pt{\_kern.5\_xhsize \_kern-1\_wd0
+ \_kern.5\_vsize \_kern\_voffset \_kern4.5\_wd0
+ \_hbox to0pt{\_kern.5\_xhsize \_kern\_hoffset \_kern-2\_wd0
\_pdfsave \_pdfrotate{55}\_pdfscale{10}{10}%
- \_hbox to0pt{\_localcolor\LightGrey \_box0\_hss}%
+ \_hbox to0pt{\_localcolor\_setgreycolor{.8}\_box0\_hss}%
\_pdfrestore
\_hss}%
}
@@ -260,5 +261,7 @@ The output routine \^`\_optexoutput` is similar as in plain \TeX. It does:
\_endinput
+2021-02-25 \_draftbox improved
+2021-02-15 \_advance -> \_decr
2020-05-12 \vfootB: \uskip -> \unskip bug fixed
2020-03-28 Released
diff --git a/macros/luatex/optex/base/prefixed.opm b/macros/luatex/optex/base/prefixed.opm
index ff6dffa20a..61df791ddb 100644
--- a/macros/luatex/optex/base/prefixed.opm
+++ b/macros/luatex/optex/base/prefixed.opm
@@ -56,7 +56,7 @@
\_def \_codedecl #1#2{%
\_ifx #1\_undefined \_wterm{#2}%
- \_else \_expandafter \_endinput \_fi
+ \_else \_ea \_endinput \_fi
}
\_def \_wterm {\_immediate \_write16 }
@@ -292,3 +292,7 @@ the \^`\load` macro is used.
The `qrcode.opm` is the first example of how an external macro file for \OpTeX/
can look like.
+\endinput
+
+2021-02-15 \_expandafter -> \_ea in \_codedecl
+2020-02-14 released
diff --git a/macros/luatex/optex/base/sections.opm b/macros/luatex/optex/base/sections.opm
index 5e50fa3b9f..39759962bf 100644
--- a/macros/luatex/optex/base/sections.opm
+++ b/macros/luatex/optex/base/sections.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \chap {Titles, chapters, sections, subsections <2021-02-09>} % preloaded in format
+\_codedecl \chap {Titles, chapters, sections, subsections <2021-03-03>} % preloaded in format
\_doc ---------------------------
We are using scaled fonts for titles
@@ -147,8 +147,8 @@
\_def \_thechapnum {\_the\_chapnum}
\_def \_thesecnum {\_othe\_chapnum.\_the\_secnum}
\_def \_theseccnum {\_othe\_chapnum.\_the\_secnum.\_the\_seccnum}
-\_def \_thetnum {\_othe\_chapnum.\_the\_secnum.\_the\_tnum}
-\_def \_thefnum {\_othe\_chapnum.\_the\_secnum.\_the\_fnum}
+\_def \_thetnum {\_othe\_chapnum.\_othe\_secnum.\_the\_tnum}
+\_def \_thefnum {\_othe\_chapnum.\_othe\_secnum.\_the\_fnum}
\_def \_thednum {(\_the\_dnum)}
\_def\_othe #1.{\_ifnum#1>0 \_the#1.\_fi}
@@ -363,12 +363,21 @@
the current language).
* \^`\_thecapnum` ... expands to `\the<letter>num` (caption number).
\enditems
+ The \`\_captionsep` inserts a separator between auto-generated
+ caption number and the following caption text. Default separator
+ is `\_enspace` but if the caption text starts with dot or colon, then
+ the space is not inserted. A user can wite `\caption/t: My table`
+ and \"{\bf Table 1.1:} My table" is printed. You can re-define
+ the \^`\_captionsep` macro if you want to use another separator.
\_cod -----------------------------
\_def \_printcaptiont {%
- \_noindent \_wlabel\_thecapnum {\_bf\_thecaptitle~\_thecapnum}\_enspace
- \_narrowlastlinecentered\_iindent
+ \_noindent \_wlabel\_thecapnum {\_bf\_thecaptitle~\_thecapnum}%
+ \_narrowlastlinecentered\_iindent \_futurelet\_next\_captionsep
}
+\_def\_captionsep{\_ifx\_next.\_ea\_bfnext \_else\_ifx\_next:\_ea\_ea\_ea\_bfnext
+ \_else \_enspace \_fi\_fi}
+\_def\_bfnext#1{{\_bf#1}}
\_let \_printcaptionf = \_printcaptiont % caption of figures = caption of tables
\_doc -----------------------------
@@ -450,6 +459,7 @@
\_endcode % -------------------------------------
+2021-03-03 \_captionsep introduced, \_othe used in \_thetnum, \_thefnum.
2021-02-09 \thisoutline implemented
2021-01-26 \_nl: \unskip added
2021-01-11 \secl introduced
diff --git a/macros/luatex/optex/base/slides.opm b/macros/luatex/optex/base/slides.opm
index 5ee4346674..94fa3afac8 100644
--- a/macros/luatex/optex/base/slides.opm
+++ b/macros/luatex/optex/base/slides.opm
@@ -1,6 +1,6 @@
% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \slideshow {Slides style for OpTeX <2021-01-16>} % loaded on demand by \slides
+\_codedecl \slideshow {Slides style for OpTeX <2021-03-10>} % loaded on demand by \slides
\_doc -----------------------------
Default margins and design is declared here.
@@ -79,7 +79,7 @@
\_newcount\_gilevel
\_def\*{*}
-\_adef*{\_startitem}
+\_adef*{\_relax\_ifmmode*\_else\_ea\_startitem\_fi}
\_sdef{_item:X}{\Blue\_raise.2ex\_fullrectangle{.8ex}\_kern.5em}
\_sdef{_item:x}{\Blue\_raise.3ex\_fullrectangle{.6ex}\_kern.4em}
\_style X
@@ -146,9 +146,10 @@
\_newbox\_slidepage \_newbox\_slidepageB
\_countdef\_slidelayer=1
-\_def\_decr#1{\_global\_advance#1 by-1 }
-\_def\_slideshow{\_slidelayer=1 \_slideshowactive \_setbox\_slidepage=\_vbox\_bgroup}
+\_def\_slideshow{\_slidelayer=1 \_slideshowactive
+ \_let\slideopen=\_relax % first wins
+ \_setbox\_slidepage=\_vbox\_bgroup\_bgroup}
\_def\_slideshowactive{%
\_sdef{_spg:;}{\_closepage \_global\_slidelayer=1 \_resetpage \_openslide}
@@ -159,11 +160,11 @@
}
\_def\_destboxslide{\_def\_destbox[##1:##2]{\_isequal{##1}{ref}\_iffalse \_destboxori[##1:##2]\_fi}}
-\_def\_openslide{\_setbox\_slidepage=\_vbox\_bgroup \_setilevel
+\_def\_openslide{\_setbox\_slidepage=\_vbox\_bgroup\_bgroup \_setilevel
\_ifvoid\_slidepage \_else \_unvbox\_slidepage \_nointerlineskip\_lastbox \_fi}
\_def\_setilevel{\_loop \_decr\_gilevel \_ifnum\_gilevel<0 \_else \_begitems \_repeat}
-\_def\_closepage{\_egroups
+\_def\_closepage{\_egroups \_egroup
\_ifnum \_maxlayers=0 \_unvcopy\_slidepage \_vfil\_break
\_else \_begingroup \_setwarnslides \_layernum=0
\_loop
@@ -202,7 +203,14 @@
\_global\_maxlayers=#1
\_setbox\_slidepageB=\_vbox\_bgroup
}
-\_public \subtit \slideshow \pg \wideformat \use \pshow \layernum ;
+\_def\_slideopen{\_let\slideshow=\_relax % first wins
+ \_sdef{_spg:;}{\_egroups\_vfil\_break \_lfnotenumreset\_bgroup \_setilevel}
+ \_sdef{_spg:.}{\_egroups\_endslides}
+ \_sdef{_spg:+}{\_egroups\_bgroup \_setilevel}
+ \_bgroup
+}
+
+\_public \subtit \slideshow \slideopen \pg \wideformat \use \pshow \layernum ;
\_doc -----------------------------
Default \`\layers` `<num>` macro (when \^`\slideshow` is not activated) is simple.
@@ -232,5 +240,8 @@
The user manual of \OpTeX/ slides are in `op-slides.tex` file.
+2021-03-10 \slideopen introduced, bug with colors in \setbox fixed
+2021-03-10 \ifmmode* added to \adef*
+2021-02-15 \_def\_decr removed
2021-01-16 \layers at empty page raises error: problem fixed
2020-03-19 slides introduced
diff --git a/macros/luatex/optex/base/styles.opm b/macros/luatex/optex/base/styles.opm
index 8df96f795d..534eb13663 100644
--- a/macros/luatex/optex/base/styles.opm
+++ b/macros/luatex/optex/base/styles.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \report {Basic styles of OpTeX <2020-03-28>} % preloaded in format
+\_codedecl \report {Basic styles of OpTeX <2021-03-10>} % preloaded in format
\_doc -----------------------------
We define auxiliary macro first (used by the \^`\address` macro)
@@ -61,7 +61,7 @@
\_def\_slides{\_par
\_opinput{slides.opm}
- \_adef*{\_startitem}
+ \_adef*{\_relax\_ifmmode*\_else\_ea\_startitem\_fi}
}
\_public \slides ;
@@ -114,3 +114,7 @@ S úctou
\endtt %---------------------------------------------------------------------
+\endinput
+
+2021-03-10 \ifmmode* added to \adef*
+2020-03-28 released
diff --git a/macros/luatex/optex/base/table.opm b/macros/luatex/optex/base/table.opm
index d6edaff20f..a4a6511958 100644
--- a/macros/luatex/optex/base/table.opm
+++ b/macros/luatex/optex/base/table.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \table {Basic macros for OpTeX <2021-01-27>} % preloaded in format
+\_codedecl \table {Basic macros for OpTeX <2021-03-09>} % preloaded in format
\_doc -----------------------------
The result of the \`\table``{<declaration>}{<data>}` macro is inserted into
@@ -101,7 +101,7 @@
\_replstring\_tmpb{\crlp}{\_crcr\crlp}%
\_edef\_tabskipmid{\_the\_tabskip}\_tabskip=\_tabskipl
\_ifpxto
- \_tsize=\_hsize \_setbox0 = \_vbox{\_halign \_tableC}%
+ \_tsize=\_hsize \_setbox0 = \_vbox{\_tablepxpreset \_halign \_tableC}%
\_tsize=\_dimexpr\_hsize-(\_wd0-\_tmpdim)\_relax
\_setbox0=\_null \_halign \_tableC
\_else
@@ -111,8 +111,9 @@
\_def\_tableC{\_ea{\_ea\_bgroup\_the\_tabdata\_egroup\_tabskip=\_tabskipr\_cr
\_scantextokens\_ea{\_tmpb\_crcr}}}
-\_newbox\_tstrutbox % strut used in table rows
-\_newtoks\_tabdata % the \halign declaration line
+\_def\_tablepxpreset{} % can be used to de-activate references to .ref file
+\_newbox\_tstrutbox % strut used in table rows
+\_newtoks\_tabdata % the \halign declaration line
\_doc -----------------------------
The \`\_scantabdata` macro converts `\table`'s `<declaration>` to
@@ -261,11 +262,11 @@
\_def\_tablinefil{\_leaders\_hrule\_hfil}
\_def\_crlp#1{\_crcr \_zerotabrule \_noalign{\_kern-\_drulewidth}%
- \_omit \_xdef\_crlplist{#1}\_xdef\_crlplist{,\_expandafter}\_expandafter\_crlpA\_crlplist,\_end,%
+ \_omit \_xdef\_crlplist{#1}\_xdef\_crlplist{,\_ea}\_ea\_crlpA\_crlplist,\_end,%
\_global\_tmpnum=0 \_gdef\_dditem{\_omit\_crlpD}%
\_gdef\_vvitem{\_kern\_vvkern\_kern\_drulewidth}\_gdef\_vvitemA{\_kern\_drulewidth}%
\_vvleft\_crlpD\_ddlinedata \_global\_tmpnum=0 \_crcr \_zerotabrule}
-\_def\_crlpA#1,{\_ifx\_end#1\_else \_crlpB#1-\_end,\_expandafter\_crlpA\_fi}
+\_def\_crlpA#1,{\_ifx\_end#1\_else \_crlpB#1-\_end,\_ea\_crlpA\_fi}
\_def\_crlpB#1#2-#3,{\_ifx\_end#3\_xdef\_crlplist{\_crlplist#1#2,}\_else\_crlpC#1#2-#3,\_fi}
\_def\_crlpC#1-#2-#3,{\_tmpnum=#1\_relax
\_loop \_xdef\_crlplist{\_crlplist\_the\_tmpnum,}\_ifnum\_tmpnum<#2\_advance\_tmpnum by1 \_repeat}
@@ -511,6 +512,8 @@ after the second one.
\_endinput
+2021-03-09 \_tablepxpreset introduced
+2021-02-15 \_expandafter -> \_ea
2021-01-27 \_tableB: \long\def added, \vspan syntax improved
2020-05-26 \eqbox implemented
2020-05-20 \colnum implemented.
diff --git a/macros/luatex/optex/base/unimath-codes.opm b/macros/luatex/optex/base/unimath-codes.opm
index a52a9a02cb..6e83ab94ad 100644
--- a/macros/luatex/optex/base/unimath-codes.opm
+++ b/macros/luatex/optex/base/unimath-codes.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \_ncharrmA {Uni math codes <2021-02-03>} % preloaded on demand by \loadmath
+\_codedecl \_ncharrmA {Uni math codes <2021-03-11>} % preloaded on demand by \loadmath
\_doc -----------------------------
The control sequences for `\alpha`, `\beta` etc are redefined here.
@@ -204,6 +204,8 @@
\_Umathcode `? = 5 1 `? % keep plain.tex declaration
\_Umathchardef \mathquestion = 5 1 `?
+\_Umathcode `* = 2 1 "02217 % equivalent to \ast, like in plain TeX
+
\_protected\_def \_sqrt {\_Uradical 1 "0221A }
\_protected\_def \_cuberoot {\_Uradical 1 "0221B }
\_protected\_def \_fourthroot {\_Uradical 1 "0221C }
@@ -425,6 +427,7 @@ for technical details about Unicode-math.
\_endinput
History:
+2021-03-11 Umathcode `* declaed as \ast
2021-02-03 Unicode superscripts, subscripts declared
2021-01-31 Mathcode of ! ? set to Close, codes undeclared in mathclass set correctly
2021-01-23 Compressed \vdots, \ddots, \adots in script(script)style.
diff --git a/macros/luatex/optex/base/usebib.opm b/macros/luatex/optex/base/usebib.opm
index fbf4300356..f37d21b315 100644
--- a/macros/luatex/optex/base/usebib.opm
+++ b/macros/luatex/optex/base/usebib.opm
@@ -1,6 +1,6 @@
%% This is part of the OpTeX project, see http://petr.olsak.net/optex
-\_codedecl \MakeReference {Reading bib databases <2020-03-13>} % loaded on demand by \usebib
+\_codedecl \MakeReference {Reading bib databases <2021-03-12>} % loaded on demand by \usebib
\_doc -----------------------------
Loading the `librarian.tex` macro package. See `texdoc librarian`
@@ -24,6 +24,8 @@
\_cod -----------------------------
\_def\_usebib/#1 (#2) #3 {%
+ \_let\_citeI=\_relax \_xdef\_citelist{\_citelist\_citelistB}%
+ \_global\_let\_addcitelist=\_writeXcite
\_ifx\_citelist\_empty
\_opwarning{No cited items. \_noexpand\usebib ignored}%
\_else
@@ -40,13 +42,11 @@
"\_cs{_lan:\_the\_language}" (using "en")}%
\_language=0 \_chardef\_documentlanguage=0
\_fi
- \_let\_citeI=\_relax \_xdef\_citelist{\_citelist\_citelistB}%
- \_global\_let\_addcitelist=\_writeXcite
- \_def\_tmp##1[*]##2\_relax{\_def\_tmp{##2}}\_expandafter\_tmp\_citelist[*]\_relax
+ \_def\_tmp##1[*]##2\_relax{\_def\_tmp{##2}}\_ea\_tmp\_citelist[*]\_relax
\_ifx\_tmp\_empty\_else % there was \nocite[*] used.
\_setbox0=\_vbox{\_hsize=\_maxdimen \_def\_citelist{}\_adef@{\_readbibentry}%
\_input #3.bib
- \_expandafter}\_expandafter\_def\_expandafter\_citelist\_expandafter{\_citelist}%
+ \_ea}\_ea\_def\_ea\_citelist\_ea{\_citelist}%
\_fi
\_def\_citeI[##1]{\_csname lb@cite\_endcsname{##1}{\_bibpart}{}{}}\_citelist
\_BibFile{#3}%
@@ -370,6 +370,8 @@ character is sorted before `A`.
History:
--------
+2021-03-12 \_citelistB added before first test.
+2021-02-15 \_expandafter -> \_ea
Apr. 2014: released in OPmac
Jan. 2016: "first entry wins" implemented
Apr. 2016: \readentry -> \readbibentry, \usebib->\MakeReference
diff --git a/macros/luatex/optex/demo/op-slides.tex b/macros/luatex/optex/demo/op-slides.tex
index 45b65fb657..50bcdaffa6 100644
--- a/macros/luatex/optex/demo/op-slides.tex
+++ b/macros/luatex/optex/demo/op-slides.tex
@@ -149,19 +149,52 @@ The previous page was created by:
\pg; %------------------------------------------------------------------
-\sec Notes
+\sec Notes to `\slideshow`
* When `\slideshow` is active then you cannot reference sections by
hyperlinked `\ref`. Only `\pgref` works (and goes to the last layer
of the referenced page).
* If the text overfull the page (slide) then it follows to the next page without
saying explicitly `\pg;`. But `\slideshow` cannot work in this case.\pg+
+* If `\slideshow` then each part of page between two `\pg`'s or between
+ `\slideshow` and the first `\pg` is processed in a local group.
+* If not `\slideshow` then the document is not separated to groups.
+ This can lead to different results. So, you can put `\slideopen` command
+ instead of `\slideshow`. Then local groups are opened exactly as when
+ `\slideshow` is used but `\slideshow` is not activated. Example:
+
+\begtt
+\slides
+\def\foo...{...} % global definitions.
+%\slideshow % printing version, no slide show.
+\slideopen % opens group for first page.
+... first page
+\pg; % closes group and opens group for second page.
+... second page
+\pg. % closes group of the last page.
+\endtt
+
+\pg; %------------------------------------------------------------------
\sec More about design
* You can use `\backgroundpic{<image-file>}` for putting an image to the background.
* You can re-declare `\footline` or re-define internal macros for design as
you wish.
+* The TeXGyre Heros font is used as default text font, the FiraMath is used
+ for math.
+* If you want to use another text font fmaily, use `\fontfam`
+ {\em before} `\slides` command.
+* If you want to use different math font, use
+ `\loadmath{[font]}` before `\fontfam` (if used) and before `\slides`. For example:
+
+\begtt
+\loadmath{[Asana-Math]} % Math font: Asana
+\fontfam[Termes] % Text font: Termes
+\slides
+...
+\endtt
+
* You can put the images or text wherever using `\putimege` or `\puttext`
macros...
@@ -272,8 +305,8 @@ are prepared for Beamer, {\bf\Red but}
You can concentrate on the contents of your document, not on the
programming syntax.\pg+
* User needs to read 250 pages of doc for understanding Beamer,\pg+
-* on the other hand, you need to read only ten
- slides\fnote{this eleventh slide isn't counted}
+* on the other hand, you need to read only eleven
+ slides\fnote{this twelfth slide isn't counted}
and you are ready to use {\bf\Blue\OpTeX/ slides}.
\pg; %------------------------------------------------------------------
diff --git a/macros/luatex/optex/doc/omls.tex b/macros/luatex/optex/doc/omls.tex
index f161f151d7..bcc5749a51 100644
--- a/macros/luatex/optex/doc/omls.tex
+++ b/macros/luatex/optex/doc/omls.tex
@@ -457,7 +457,7 @@ output of the \LaTeX/ source file.
* `\,` \: should be small space or space.
* \.`\quad`, \.`\qquad` \: should be bigger space or more spaces.
* \.`\-`, \.`\/` \: should be ignored.
-* \.`\"<text>"` or \.`\'<text>'` \: `<clqq><text><crqq>` or `<clq><text><crq>`,
+* \.`\"<text>"` or \.`\'<text>'` \: `<qql><text><qqr>` or `<ql><text><qr>`,
only if `%%:quotes` are set.
\enditems
@@ -588,7 +588,7 @@ Code blocks are inline verbatim or display verbatim.
\enditems
-\secc Multiclolumns
+\secc Multicolumns
\.`\begmulti <number><space>` opens the group and \.`\endmulti`
closes the group. If output format allows multi-columns then
diff --git a/macros/luatex/optex/doc/optex-doc.pdf b/macros/luatex/optex/doc/optex-doc.pdf
index 4bd55547cb..a4df4f013a 100644
--- a/macros/luatex/optex/doc/optex-doc.pdf
+++ b/macros/luatex/optex/doc/optex-doc.pdf
Binary files differ
diff --git a/macros/luatex/optex/doc/optex-doc.tex b/macros/luatex/optex/doc/optex-doc.tex
index f8fcc45ca0..9f2fadeeb4 100644
--- a/macros/luatex/optex/doc/optex-doc.tex
+++ b/macros/luatex/optex/doc/optex-doc.tex
@@ -20,7 +20,7 @@
\tit Format Based on Plain \TeX/ and OPmac\fnotemark1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\hfill Version 1.00
+\hfill Version 1.01
\centerline{\it Petr Olšák, 2020, 2021}
diff --git a/macros/luatex/optex/doc/optex-math.tex b/macros/luatex/optex/doc/optex-math.tex
index 2fd21af218..789dd5a187 100644
--- a/macros/luatex/optex/doc/optex-math.tex
+++ b/macros/luatex/optex/doc/optex-math.tex
@@ -740,6 +740,12 @@ For example, this document loads `latimodern-math.otf` font.
And the result from `\input print-unimath.opm` looks like the following ten
pages.
+Unsupported characters can be replaced by characters from other Unicode math
+font, see
+\ulink[http://petr.olsak.net/optex/optex-tricks.html\#addumathfont]{OpTeX trick 0030}
+or section~\ref[newfam].
+
+
\label[listA]\wlabel{}
\bigskip
diff --git a/macros/luatex/optex/doc/optex-userdoc.tex b/macros/luatex/optex/doc/optex-userdoc.tex
index 899b1d55aa..a70cedcf4d 100644
--- a/macros/luatex/optex/doc/optex-userdoc.tex
+++ b/macros/luatex/optex/doc/optex-userdoc.tex
@@ -1709,7 +1709,7 @@ to more files (with individual chapters or sections), use simply the `\input` pr
The macro packages intended to \OpTeX/ have the name `*.opm`.
The following packages are distributed as part of \OpTeX/:
\begitems
-* `qrcodes.opm` enables to create QR codes.
+* `qrcode.opm` enables to create QR codes.
* `vlna.opm` enables to protect of one-letter prepositions and more things automatically.
* `emoji.opm` defines `\emoji{<name>}` command for colored emoticons.
* `plain-at.opm` defines the old names from plain \TeX/.