summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-09-30 03:01:06 +0000
committerNorbert Preining <norbert@preining.info>2021-09-30 03:01:06 +0000
commitc0e66330261a0098e8041d4cc1428666ef598c30 (patch)
tree6048e9d4cf052ff3dc32b3ffd1081ef3c95bc42c /macros/latex/contrib
parent0396814223158484c2f424d382bcd670de158d82 (diff)
CTAN sync 202109300301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx8
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin577949 -> 578327 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex42
-rw-r--r--macros/latex/contrib/linenoamsmath/README15
-rw-r--r--macros/latex/contrib/linenoamsmath/linenoamsmath.dtx583
-rw-r--r--macros/latex/contrib/linenoamsmath/linenoamsmath.ins26
-rw-r--r--macros/latex/contrib/linenoamsmath/linenoamsmath.pdfbin0 -> 224791 bytes
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md16
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1513710 -> 1515203 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-symbol.dtx32
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin637213 -> 638362 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex16
13 files changed, 703 insertions, 37 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 2a841ac896..7a2475dd58 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/09/28}{1.3e}
+\ProvidesExplClass{easybook}{2021/09/28}{1.3F}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/09/28}{1.3e}
+\ProvidesExplPackage{easybase}{2021/09/28}{1.3F}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1771,7 +1771,7 @@
\tl_gset:Nn \dbltopfraction { 0.9 }
\tl_gset:Nn \dblfloatpagefraction { 0.9 }
}
-\dim_zero:N \mathindent
+\dim_zero_new:N \mathindent
\skip_set:Nn \parskip { 0pt plus 2pt minus 1pt }
\skip_set:Nn \intextsep { 14pt plus 2pt minus 2pt }
\skip_set:Nn \textfloatsep { 16pt plus 2pt minus 4pt }
@@ -2390,7 +2390,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/28}{1.3e}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/28}{1.3F}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 9a4997299c..67e4adfe07 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 0c202a3674..61c180ba7a 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -3,8 +3,8 @@
\usepackage[fontset = fandol]{ctex}
\usepackage
{
- booktabs,enumitem,newtxmath,indentfirst,
- fancyvrb,geometry,colortbl,hologo,pifont
+ enumitem,newtxmath,indentfirst,tabularray,
+ fancyvrb,geometry,hologo,pifont
}
\colorlet{cnltxred}{violet}
\setcnltx
@@ -12,7 +12,7 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.3e,
+ version = v1.3F,
date = 2021/09/28,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
@@ -37,7 +37,6 @@
\geometry{margin = 1in,marginparwidth = 0.65in}
\setlist{nosep,labelindent = \parindent,leftmargin = *,labelsep = 0.5em}
\setlist[itemize,1]{label = \small\color{cnltxblue}\textbullet}
-\arrayrulecolor{cnltxblue}
\setcounter{tocdepth}{2}
\ExplSyntaxOn\makeatletter
@@ -204,17 +203,19 @@
\keychoice{font}{noto,garamond,times,libertine,palatino,auto}\Default{auto}
预置的英文字体相关配置方案如下表所示,这些字体已经包含在了 \TeX Live 发行版中,所以通常不需要再专门安装。如果您想使用其他英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
\begin{center}
- \begin{tabular}{cccc}
- \toprule
+ \begin{tblr}
+ {
+ colspec = cccc,
+ hline{1,7} = {1pt,cnltxblue},
+ hline{2} = {0.6pt,cnltxblue}
+ }
& \textsf{正文字体} & \textsf{无衬线字体} & \textsf{等宽字体} \\
- \midrule[0.6pt]
\code{noto} & Noto Serif & Noto Sans & Noto Sans Mono \\
\code{garamond} & EB Garamond & Libertinus Sans & LM Mono \\
\code{palatino} & TG Pagella & Libertinus Sans & LM Mono \\
\code{libertine} & TG Pagella & Libertinus Sans & LM Mono \\
\code{times} & XITS & TG Heros & TG Cursor \\
- \bottomrule
- \end{tabular}
+ \end{tblr}
\end{center}
\end{options}
@@ -318,15 +319,17 @@
\command*{ctexset}[\marg{键值列表}]
\cls*{easybook} 扩展了 C\TeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有 9 个模块用于实现常规的排版功能,如下表所示,它们既是统一接口 \cs*{ctexset} 的路径,也是相关模块的接口命令名:
\begin{center}
- \begin{tabular}{*{5}{c}}
- \toprule
+ \begin{tblr}
+ {
+ colspec = *{5}{c},
+ hline{1,5} = {1pt,cnltxblue},
+ hline{3} = {0.6pt,cnltxblue}
+ }
\hyperref[subsec:style]{风格} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
\module*{style} & \module*{subfont} & \module*{spread} & \module*{refset} & \module*{bibset} \\
- \midrule[0.6pt]
\hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
\module*{thmset} & \module*{geoset} & \module*{hdrset} & \module*{tocset} & \\
- \bottomrule
- \end{tabular}
+ \end{tblr}
\end{center}
例如使用下面小节 \ref{subsec:style} 介绍的风格 \module*{style} 模块,路径名与所属下级选项之间可以 \code{/} 或 \code{=} 号分开,符号后不能有空格或者换行:
@@ -866,12 +869,15 @@
\environment{proof}
这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下:
\begin{center}
- \begin{tabular}{*{8}{c}}
- \toprule
+ \begin{tblr}
+ {
+ colspec = *{8}{c},
+ hline{1,3} = {1pt,cnltxblue},
+ hline{2} = {0.6pt,cnltxblue}
+ }
\env{theorem} & \env{definition} & \env{lemma} & \env{corollary} & \env{proposition} & \env{example} & \env{remark} & \env{proof} \\
定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明 \\
- \bottomrule
- \end{tabular}
+ \end{tblr}
\end{center}
\end{environments}
diff --git a/macros/latex/contrib/linenoamsmath/README b/macros/latex/contrib/linenoamsmath/README
new file mode 100644
index 0000000000..7e3cef33bd
--- /dev/null
+++ b/macros/latex/contrib/linenoamsmath/README
@@ -0,0 +1,15 @@
+linenoamsmath -- Make the `amsmath' package work with the `lineno' package
+
+Karl Wette, 2021/09/29
+
+This package patches the `amsmath' package to work with the `lineno'
+package. The code I've used is largely based on the posts at
+https://tex.stackexchange.com/a/461192 and
+https://tex.stackexchange.com/a/443201; credit is due to their author.
+In addition I've made a few refinements to handle some corner cases.
+
+This work is licensed under the LaTeX Project Public License 1.3 or
+any later version.
+
+History:
+* v1.0 (2021/09/29) Initial version
diff --git a/macros/latex/contrib/linenoamsmath/linenoamsmath.dtx b/macros/latex/contrib/linenoamsmath/linenoamsmath.dtx
new file mode 100644
index 0000000000..09c5bb66e5
--- /dev/null
+++ b/macros/latex/contrib/linenoamsmath/linenoamsmath.dtx
@@ -0,0 +1,583 @@
+% \iffalse meta-comment
+%
+% linenoamsmath.dtx
+% Copyright 2021 Karl Wette
+%
+% 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'.
+%
+% The Current Maintainer of this work is Karl Wette.
+%
+% This work consists of the files linenoamsmath.dtx and
+% linenoamsmath.ins and the derived file linenoamsmath.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{linenoamsmath.dtx}
+%</driver>
+%<*package>
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{linenoamsmath}
+ [2021/09/29 v1.0 Make the amsmath package work with the lineno package]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[leqno]{amsmath}
+\usepackage[mathlines]{linenoamsmath}[2021/09/29]
+\usepackage{lipsum}
+\usepackage{hyperref}
+\RecordChanges
+\begin{document}
+\DocInput{linenoamsmath.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{74}
+%
+% \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 \~}
+%
+% \changes{v1.0}{2021/09/29}{Initial version}
+%
+% \GetFileInfo{linenoamsmath.sty}
+%
+% \title{The \textsf{linenoamsmath} package\thanks{This document
+% corresponds to \textsf{linenoamsmath}~\fileversion, dated \filedate.}}
+% \author{Karl Wette}
+%
+% \maketitle
+%
+% This package patches the
+% \textsf{amsmath}\footnote{\url{https://ctan.org/pkg/amsmath}} package to work
+% with the \textsf{lineno}\footnote{\url{https://ctan.org/pkg/lineno}}
+% package. The code I've used is largely based on the posts at
+% \url{https://tex.stackexchange.com/a/461192} and
+% \url{https://tex.stackexchange.com/a/443201}; credit is due to their author.
+% In addition I've made a few refinements to handle some corner cases.
+%
+% \section{Usage}
+%
+% Just include the package; it will automatically include \textsf{amsmath} and \textsf{lineno}:
+% \begin{verse}
+% |\usepackage{linenoamsmath}| \\
+% ... \\
+% |\linenumbers| \\
+% ... Text with line numbers ... \\
+% |\begin{align}| \\
+% ... Equations without line numbers ... \\
+% |\end{align}|
+% \end{verse}
+% All options to this package are passed through to \textsf{lineno},
+% so e.g.\ if you want to add line numbers to equations you can specity the
+% |[mathlines]| option:
+% \begin{verse}
+% |\usepackage[mathlines]{linenoamsmath}| \\
+% ... \\
+% |\linenumbers| \\
+% ... Text with line numbers ... \\
+% |\begin{align}| \\
+% ... Equations with line numbers ... \\
+% |\end{align}|
+% \end{verse}
+% If you need to pass options to \textsf{amsmath}, you can include it manually first:
+% \begin{verse}
+% |\usepackage[...]{amsmath}| \\
+% |\usepackage[mathlines]{linenoamsmath}|
+% \end{verse}
+%
+% \section{Demonstration}
+%
+% This section demonstrates that, with this package, line numbers are correctly
+% formatted when using \textsf{amsmath} math environments.
+%
+% \newcounter{lipsumparagraph}
+% \newcommand{\nextlipsum}{\stepcounter{lipsumparagraph}\lipsum[\thelipsumparagraph][1-4]}
+% \newcommand{\crs}{\qquad\qquad\texttt{[\textbackslash\textbackslash{}*]}\\*}
+%
+% \linenumbers
+%
+% \subsection{Normal text}
+%
+% \nextlipsum
+%
+% \subsection{\texttt{equation}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{equation}
+% E = m c^2 \,.
+% \end{equation}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{equation}
+% E = m c^2 \,.
+% \end{equation}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{equation*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{equation*}
+% E = m c^2 \,.
+% \end{equation*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{equation*}
+% E = m c^2 \,.
+% \end{equation*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{\textbackslash[\ldots\textbackslash]}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \[
+% E = m c^2 \,.
+% \]
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \[
+% E = m c^2 \,.
+% \]
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{multline}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline}
+% \nextlipsum
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \\
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \\
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{multline*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline*}
+% \nextlipsum
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \crs
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} + \mathcal{O}(x^{10}) \,.
+% \end{multline*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{multline*}
+% \frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + x^{4} - x^{5} + x^{6} - x^{7} + x^{8} - x^{9} \\
+% + x^{10} - x^{11} + x^{12} - x^{13} + x^{14} - x^{15} + x^{16} - x^{17} + x^{18} - x^{19} + \mathcal{O}(x^{20}) \,.
+% \end{multline*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{gather}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{gather}
+% E = m c^2 \,.
+% \end{gather}
+% \nextlipsum
+% \begin{gather}
+% E = m c^2 \,, \\
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather}
+% E = m c^2 \,.
+% \end{gather}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather}
+% E = m c^2 \,, \\
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{gather*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{gather*}
+% E = m c^2 \,.
+% \end{gather*}
+% \nextlipsum
+% \begin{gather*}
+% E = m c^2 \,, \crs
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather*}
+% E = m c^2 \,.
+% \end{gather*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{gather*}
+% E = m c^2 \,, \\
+% E^2 = p^2 c^2 + m_0^2 c^4 \,.
+% \end{gather*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{align}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align}
+% \nextlipsum
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{align*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align*}
+% \nextlipsum
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \crs
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{align*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{align*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{align*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{alignat}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat}
+% \nextlipsum
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{alignat*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat*}
+% \nextlipsum
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \crs
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{alignat*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{alignat*}{2}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{alignat*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{flalign}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign}
+% \nextlipsum
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \subsection{\texttt{flalign*}}
+%
+% \subsection{With line numbers in equations}
+% \nextlipsum
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign*}
+% \nextlipsum
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \crs
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign*}
+% \nextlipsum
+%
+% \subsection{Without line numbers in equations}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,.
+% \end{flalign*}
+% \end{linenomath*}
+% \nextlipsum
+% \begin{linenomath*}
+% \begin{flalign*}
+% \nabla \cdot \vec E = 0 \,, &\quad \nabla \times \vec E = - \frac{\partial \vec B}{\partial t} \,, \\
+% \nabla \cdot \vec B = 0 \,, &\quad \nabla \times \vec B = \frac{1}{c^2} \frac{\partial \vec E}{\partial t} \,.
+% \end{flalign*}
+% \end{linenomath*}
+% \nextlipsum
+%
+% \nolinenumbers
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% All options to this package are passed through to \textsf{lineno}.
+% \begin{macrocode}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{lineno}}
+\ProcessOptions\relax
+% \end{macrocode}
+% Include \textsf{amsmath} and \textsf{lineno}.
+% \begin{macrocode}
+\RequirePackage{amsmath}
+\RequirePackage{lineno}
+% \end{macrocode}
+% Needs \textsf{etoolbox} for patching macros.
+% \begin{macrocode}
+\RequirePackage{etoolbox}
+% \end{macrocode}
+% Patch math environments:
+% \begin{itemize}
+%
+% \item Setting |\postdisplaypenalty=0| removes extra line numbers from
+% \textsf{amsmath} math environments.
+%
+% \item Patching |\math@cr@| to add |\linenoamsmath@ams@eqpen| to |\@eqpen|,
+% then setting |\linenoamsmath@ams@eqpen| to |\interdisplaylinepenalty|,
+% preserves line numbers when equations are separated using the |\\*| line
+% break instead of |\\|.
+%
+% \end{itemize}
+% \begin{macrocode}
+\newcommand*\linenoamsmath@patch[1]{%
+ \cspreto{#1}{\linenomath}%
+ \cspreto{#1*}{\linenomath}%
+ \csappto{end#1}{\endlinenomath}%
+ \csappto{end#1*}{\endlinenomath}%
+}
+\newcount\linenoamsmath@ams@eqpen
+\cspreto{math@cr@}{\global\@eqpen\numexpr\@eqpen+\linenoamsmath@ams@eqpen\relax}
+\newcommand*\linenoamsmath@patch@ams[1]{%
+ \cspreto{#1}{%
+ \linenomath%
+ \postdisplaypenalty=0%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+ }%
+ \cspreto{#1*}{%
+ \linenomath%
+ \postdisplaypenalty=0%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+ }%
+ \csappto{end#1}{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \endlinenomath%
+ }%
+ \csappto{end#1*}{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \endlinenomath%
+ }%
+}
+\linenoamsmath@patch{equation}
+\linenoamsmath@patch@ams{multline}
+\linenoamsmath@patch@ams{gather}
+\linenoamsmath@patch@ams{align}
+\linenoamsmath@patch@ams{alignat}
+\linenoamsmath@patch@ams{flalign}
+% \end{macrocode}
+% Patch |\mmeasure@| which is used internally by |multline|:
+% \begin{itemize}
+%
+% \item Setting |\interdisplaylinepenalty=0| removes an extra line number from
+% the beginning of a multi-line |multline| where line numbers in equations are
+% turned on.
+%
+% \item Adding |\\| to the end of the argument of |\mmeasure@| removes an extra
+% line number from the beginning of a single-line |multline| where line
+% numbers in equations are turned off.
+%
+% \item Need to set |\linenoamsmath@ams@eqpen| to zero while in this macro to
+% avoid creating extra line numbers.
+%
+% \end{itemize}
+% \begin{macrocode}
+\let\linenoamsmath@ams@mmeasure\mmeasure@
+\def\mmeasure@#1{%
+ \global\linenoamsmath@ams@eqpen\z@%
+ \begingroup%
+ \interdisplaylinepenalty=0%
+ \linenoamsmath@ams@mmeasure{#1\\}%
+ \endgroup%
+ \global\linenoamsmath@ams@eqpen\interdisplaylinepenalty%
+}
+% \end{macrocode}
+%
+% \PrintChanges
+% \Finale
+\endinput
+% \endinput
+% Local Variables:
+% mode: doctex
+% TeX-master: t
+% End:
diff --git a/macros/latex/contrib/linenoamsmath/linenoamsmath.ins b/macros/latex/contrib/linenoamsmath/linenoamsmath.ins
new file mode 100644
index 0000000000..0bf4ed10b1
--- /dev/null
+++ b/macros/latex/contrib/linenoamsmath/linenoamsmath.ins
@@ -0,0 +1,26 @@
+% linenoamsmath.ins
+% Copyright 2021 Karl Wette
+%
+% 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'.
+%
+% The Current Maintainer of this work is Karl Wette.
+%
+% This work consists of the files linenoamsmath.dtx and
+% linenoamsmath.ins and the derived file linenoamsmath.sty.
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/linenoamsmath}
+
+\generate{\file{linenoamsmath.sty}{\from{linenoamsmath.dtx}{package}}}
+
+\endbatchfile
diff --git a/macros/latex/contrib/linenoamsmath/linenoamsmath.pdf b/macros/latex/contrib/linenoamsmath/linenoamsmath.pdf
new file mode 100644
index 0000000000..c150b242e9
--- /dev/null
+++ b/macros/latex/contrib/linenoamsmath/linenoamsmath.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 0ffdc514f5..8818c33ad9 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,9 +7,20 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
-## [v3.0.31]
+## [v3.0.32]
+
+### Added
+- Hint concerning non-standard font encodings (see issues
+ [#547](https://github.com/josephwright/siunitx/issues/550) and
+ [#550](https://github.com/josephwright/siunitx/issues/550))
### Changed
+- Use math mode symbol for degree where possible (see issue
+ [#550](https://github.com/josephwright/siunitx/issues/550))
+
+## [v3.0.31]
+
+### Fixed
- Avoid infinite loop with `tex4ht` (issue
[#549](https://github.com/josephwright/siunitx/issues/549))
@@ -1585,7 +1596,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.31...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.32...HEAD
+[v3.0.32]: https://github.com/josephwright/siunitx/compare/v3.0.31...v3.0.32
[v3.0.31]: https://github.com/josephwright/siunitx/compare/v3.0.30...v3.0.31
[v3.0.30]: https://github.com/josephwright/siunitx/compare/v3.0.29...v3.0.30
[v3.0.29]: https://github.com/josephwright/siunitx/compare/v3.0.28...v3.0.29
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 5070f406eb..02cae532e0 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
index 1501f334b3..e851918722 100644
--- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
@@ -179,12 +179,16 @@
{
\siunitx_declare_unit:Nxn \degree
{
- \exp_not:N \text
- {
- \@ifpackageloaded { inputenc }
- { \exp_not:N \textdegree }
- { \@@_non_latin:n { "00B0 } }
- }
+ \exp_not:N \ifmmode
+ { } ^ { \exp_not:N \circ }
+ \exp_not:N \else
+ \exp_not:N \text
+ {
+ \@ifpackageloaded { inputenc }
+ { \exp_not:N \textdegree }
+ { \@@_non_latin:n { "00B0 } }
+ }
+ \exp_not:N \fi
}
{ quantity-product = { } }
}
@@ -203,12 +207,16 @@
\group_end:
\siunitx_declare_unit:Nx \degreeCelsius
{
- \exp_not:N \text
- {
- \@ifpackageloaded { inputenc }
- { \exp_not:N \textdegree }
- { \@@_non_latin:n { "00B0 } }
- }
+ \exp_not:N \ifmmode
+ { } ^ { \exp_not:N \circ }
+ \exp_not:N \else
+ \exp_not:N \text
+ {
+ \@ifpackageloaded { inputenc }
+ { \exp_not:N \textdegree }
+ { \@@_non_latin:n { "00B0 } }
+ }
+ \exp_not:N \fi
C
}
}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 736c737e92..f786828c46 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-09-22} {3.0.31}
+\ProvidesExplPackage {siunitx} {2021-09-29} {3.0.32}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 71b3565536..ac7c947955 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index d6d300c399..3ef382d722 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -3063,6 +3063,22 @@ When the \pkg{units} package is loaded before \pkg{siunitx}, the command
\section{Hints for using \pkg{siunitx}}
+\subsection{Problematic font encodings%
+ \label{sec:hint:encoding}}
+
+The standard settings in \pkg{siunitx} assume that \enquote{sensible} input and
+font encoding values prevail. The input encoding is assumed to be \acro{UTF-8}
+in all cases. With pdf\LaTeX{}, the font encoding should be \texttt{T1},
+whereas for Xe\LaTeX{} and Lua\LaTeX{}, \texttt{TU} (Unicode font encoding) is
+expected.
+
+Some packages, for example \pkg{newtxtext} or \pkg{stix2}, either force
+\texttt{T1} or do not anticipate \texttt{TU} correctly with Xe\LaTeX{} and
+Lua\LaTeX{}. In these cases, the symbols used by \pkg{siunitx} may be
+incorrect. If correcting the font encoding is not possible, you will need to
+re-declare the relevant units using symbol definitions which account for this
+non-standard setup.
+
\subsection{Adjusting \cs{litre} and \cs{liter}%
\label{sec:hint:litre}}