summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-27 21:57:08 +0000
committerKarl Berry <karl@freefriends.org>2023-01-27 21:57:08 +0000
commit99669706cc43d7cd292672c98ef84f27cb4a23e0 (patch)
treea5db8f9a42e7d6a31aabe451666bd3ab4bf13793
parent684f8f831bfb7df2bd6e3c0f90f832bca7d87c92 (diff)
fixdif (27jan23)
git-svn-id: svn://tug.org/texlive/trunk@65644 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/fixdif/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdfbin163034 -> 163584 bytes
-rw-r--r--Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex38
-rw-r--r--Master/texmf-dist/doc/latex/fixdif/fixdif.pdfbin97443 -> 97610 bytes
-rw-r--r--Master/texmf-dist/source/latex/fixdif/fixdif.dtx40
-rw-r--r--Master/texmf-dist/source/latex/fixdif/fixdif.ins4
-rw-r--r--Master/texmf-dist/tex/latex/fixdif/fixdif.sty32
7 files changed, 51 insertions, 65 deletions
diff --git a/Master/texmf-dist/doc/latex/fixdif/README.md b/Master/texmf-dist/doc/latex/fixdif/README.md
index 5fb480f7c82..c1fc6d7f3e3 100644
--- a/Master/texmf-dist/doc/latex/fixdif/README.md
+++ b/Master/texmf-dist/doc/latex/fixdif/README.md
@@ -19,4 +19,4 @@ either version 1.3c of this license or (at your option) any later version.
------
-Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
+Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>.
diff --git a/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdf b/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdf
index 09902e25b1e..576280efef9 100644
--- a/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdf
+++ b/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex b/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
index 075b57610e5..4c4793742d5 100644
--- a/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
+++ b/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
@@ -1,25 +1,21 @@
\documentclass[letterpaper,11pt]{article}
-\date{2022/10/27\quad Version 1.4b%
+\date{2023/01/27\quad Version 1.6%
\thanks{源代码见~\hyperref{https://github.com/AlphaZTX/fixdif}{}{}{GitHub}
或~\hyperref{https://www.ctan.org/pkg/fixdif}{}{}{CTAN}。}
}
\ifcsname XeTeXversion\endcsname\else\errmessage{本文档需使用 xelatex 编译}\fi
-
\usepackage{indentfirst,enumitem}
-
\usepackage{manfnt,marginnote}
\newcounter{fixdifattention}
\newcommand\attention[1][1]{\setcounter{fixdifattention}{1}%
\ifnum#1=1 \def\attentiontext{\dbend}\else
- \def\attentiontext{\loop\dbend\,%
+ \def\attentiontext{\loop\dbend\kern1pt%
\addtocounter{fixdifattention}{1}%
\ifnum \value{fixdifattention}<#1 \repeat\dbend}\fi%
- \marginnote{\makebox[0pt][r]{\attentiontext}}}
-
+ \marginnote{\hbox to 0pt{\hss\attentiontext}}}
\usepackage{xcolor}
\definecolor{titlecolor}{RGB}{0,128,8}
\definecolor{lnkcolor}{RGB}{0,12,160}
-
\usepackage{fontspec}
\setmainfont{STIX Two Text}
\setsansfont{Inter}[Scale=MatchLowercase]
@@ -33,31 +29,24 @@
\DeclareRobustCommand\zhemph{\CJKunderdot}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
-
\usepackage{hyperref}
\hypersetup{pdffitwindow,
- pdftitle = {fixdif 宏包(中文文档)},
+ pdftitle = {fixdif 宏包},
pdfauthor = {AlphaZTX},
- pdfcreator = {pdfLaTeX/XeLaTeX/LuaLaTeX},
+ pdfcreator = {XeTeX},
linkcolor = black,
- urlcolor = lnkcolor,
-}
-
-\usepackage{doc}
+ urlcolor = lnkcolor}
+\usepackage{doc}% Warning
\DeclareRobustCommand\marg[1]{\texttt{\{}\meta{#1}\texttt{\}}}
-
\usepackage{fancyvrb}
\fvset{xleftmargin=2em,fontsize=\small}
\MakeShortVerb|
-
\usepackage{hologo}
\DeclareRobustCommand\pdflatex{\hologo{pdfLaTeX}}
\DeclareRobustCommand\xelatex{\hologo{XeLaTeX}}
\DeclareRobustCommand\lualatex{\hologo{LuaLaTeX}}
-
\DeclareRobustCommand\pkg{\textsf}
\DeclareRobustCommand\opt{\texttt}
-
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-2.5ex plus -1ex minus -.2ex}%
@@ -73,23 +62,19 @@
{\indent\normalfont\normalsize\bfseries\color{titlecolor}}}
\gdef\fd@name{\char"66\char"69\char"78\char"64\char"69\char"66}
\def\ps@plain{\let\@mkboth\@gobbletwo
- \def\@oddhead{\hbox{}\llap{\raisebox{-24.44cm}[0pt][0pt]{\sffamily\bfseries%
- \color{titlecolor!5}\fontsize{238pt}{0pt}\selectfont\fd@name}%
- \hspace*{-14.72cm}}\hfil\hbox{}\rlap{\raisebox{.2cm}[0pt][0pt]{%
+ \def\@oddhead{\hfil\hbox{}\rlap{\raisebox{.2cm}[0pt][0pt]{%
\hspace*{1.4cm}\sffamily\bfseries\color{titlecolor!35}%
\fontsize{128pt}{0pt}\selectfont\thepage}}}%
\def\@oddfoot{\reset@font}\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot}
-\gdef\@title{\bfseries\pkg{\fd@name}\Uchar"5B8F\Uchar"5305}
+\gdef\@title{\bfseries\pkg{\char"66\char"69\char"78\char"64\char"69\char"66}%
+ \Uchar"5B8F\Uchar"5305}
\gdef\@author{\Uchar"5F20\Uchar"5EAD\Uchar"7444}
\makeatother
\pagestyle{plain}
-
\usepackage{fixdif}
-
\linespread{1.2}
\parskip8pt plus 4pt minus 2pt
\parindent2em
-
\begin{document}
\maketitle
\thispagestyle{plain}
@@ -382,7 +367,8 @@ $\d x$ 和 \d x
\begin{Verbatim}
\letdif{\laplacian}{Delta}
\end{Verbatim}
-如果你比较擅长使用 \pkg{xparse} 宏包的接口,你也可以采用下面的方法:
+如果你比较擅长使用 \pkg{xparse} 宏包(2020 年 10 月后已被集成进 \LaTeXe{} 内核)
+的接口,你也可以采用下面的方法:
\begin{Verbatim}
\letdif{\nabla}{nabla}
\DeclareDocumentCommand{ \laplacian }{ s }{
diff --git a/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf b/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf
index 55f49058db1..c01f1bc78f3 100644
--- a/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf
+++ b/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/fixdif/fixdif.dtx b/Master/texmf-dist/source/latex/fixdif/fixdif.dtx
index 7b525cc67ff..c6dfc5a236e 100644
--- a/Master/texmf-dist/source/latex/fixdif/fixdif.dtx
+++ b/Master/texmf-dist/source/latex/fixdif/fixdif.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>
+% Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -48,7 +48,7 @@ either version 1.3c of this license or (at your option) any later version.
------
-Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
+Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>.
%</readme>
%
%<*internal>
@@ -65,7 +65,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
\preamble
- Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>
+ Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -131,7 +131,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
%</internal>
%
%<*driver>
-\ProvidesFile{fixdif.dtx}[2022/10/27 (c) Copyright 2022 by Zhang Tingxuan]
+\ProvidesFile{fixdif.dtx}[2023/01/27 (c) Copyright 2022-2023 by Zhang Tingxuan]
\documentclass{ltxdoc}
\usepackage{xcolor}
@@ -150,7 +150,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
\title{The \pkg{fixdif} Package}
\author{Zhang Tingxuan}
-\date{2022/10/27\quad Version 1.4b\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
+\date{2023/01/27\quad Version 1.6\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
\usepackage{hyperref}
\hypersetup{
@@ -473,27 +473,27 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
% Check the \TeX{} format and provides the package name.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fixdif}[2022/10/27 Interface for defining differential operators.]
+\ProvidesPackage{fixdif}[2023/01/27 Interface for defining differential operators.]
% \end{macrocode}
%
% \subsection{Control the skip between slashes and differential operator}
% Change the math code of slash ($/$) and backslash ($\backslash$) so that the skip
% between slashes and differential operators can be ignored.
% \begin{macrocode}
-\@ifpackageloaded{unicode-math}{
+\@ifpackageloaded{unicode-math}{\AtBeginDocument{%
% \end{macrocode}
% If the \pkg{unicode-math} package has been loaded, use the \XeTeX/\LuaTeX{} primitive
% \cs{Umathcode} to change the type of slashes. The numeral ``4'' stands for ``open''.
% \begin{macrocode}
- \Umathcode`\/="4 "0 "002F
- \Umathcode"2044="4 "0 "2044
- \Umathcode"2215="4 "0 "2215
- \Umathcode"2F98="4 "0 "2F98
- \Umathcode`\\="4 "0 "005C
- \Umathcode"2216="4 "0 "2216
- \Umathcode"29F5="4 "0 "29F5
- \Umathcode"29F9="4 "0 "29F9
-}{
+ \Umathcode`\/="4 \symoperators "002F
+ \Umathcode"2044="4 \symoperators "2044
+ \Umathcode"2215="4 \symoperators "2215
+ \Umathcode"2F98="4 \symoperators "2F98
+ \Umathcode`\\="4 \symoperators "005C
+ \Umathcode"2216="4 \symoperators "2216
+ \Umathcode"29F5="4 \symoperators "29F5
+ \Umathcode"29F9="4 \symoperators "29F9
+}}{
% \end{macrocode}
% If the \pkg{unicode-math} package has not been loaded, use the \TeX{} primitive
% \cs{mathcode} to change the type of slashes. The \cs{backslash} needs to be redefined
@@ -509,7 +509,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
% \DescribeMacro{\mup@tch}
% The following \cs{mup@tch} patches the skip after the differential operator.
% \begin{macrocode}
-\def\mup@tch{\mathchoice{\mskip-\thinmuskip}{\mskip-\thinmuskip}{}{}}
+\def\mup@tch{\mathchoice{\mskip-\thinmuskip}{\mskip-\thinmuskip}{}{}{}}
% \end{macrocode}
% The \cs{s@beforep@tch} patches the commands with star (\cs{letdif*}, etc).
% \begin{macrocode}
@@ -551,12 +551,12 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
% Restore the \cs{d} command in text by \cs{d@accent} with the \cs{let}
% primitive.
% \begin{macrocode}
-\let\d@accent\d
+\AtBeginDocument{\let\d@accent\d
% \end{macrocode}
% \DescribeMacro{\d}
% Redefine the \cs{d} command. In text, we need to expand the stuffs after \cs{d}
% \begin{macrocode}
-\DeclareRobustCommand\d{\ifmmode\@dif\else\expandafter\d@accent\fi}
+ \DeclareRobustCommand\d{\ifmmode\@dif\else\expandafter\d@accent\fi}}
% \end{macrocode}
%
% \subsection{User's interface for defining new differential operators}
@@ -586,7 +586,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>.
\expandafter\let\csname #2nondif\expandafter\endcsname
\csname #2\endcsname%
\fi%
- \gdef#1{\mathinner{\s@beforep@tch\csname #2nondif\endcsname\mbox{}}\mup@tch}%
+ \gdef#1{\mathinner{\s@beforep@tch\csname #2nondif\endcsname\hbox{}}\mup@tch}%
}}
\def\letdif{\@ifstar\s@letdif\@letdif}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/fixdif/fixdif.ins b/Master/texmf-dist/source/latex/fixdif/fixdif.ins
index 1bea3ed2046..e6e57f27d34 100644
--- a/Master/texmf-dist/source/latex/fixdif/fixdif.ins
+++ b/Master/texmf-dist/source/latex/fixdif/fixdif.ins
@@ -6,7 +6,7 @@
%%
%% fixdif.dtx (with options: `install')
%%
-%% Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>
+%% Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -33,7 +33,7 @@
\preamble
- Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>
+ Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
diff --git a/Master/texmf-dist/tex/latex/fixdif/fixdif.sty b/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
index b0e967b1c94..1ee4651fd98 100644
--- a/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
+++ b/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
@@ -6,7 +6,7 @@
%%
%% fixdif.dtx (with options: `package')
%%
-%% Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>
+%% Copyright (C) 2022-2023 by Zhang Tingxuan <alphaztx@163.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -29,22 +29,22 @@
%% and README.md.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fixdif}[2022/10/27 Interface for defining differential operators.]
-\@ifpackageloaded{unicode-math}{
- \Umathcode`\/="4 "0 "002F
- \Umathcode"2044="4 "0 "2044
- \Umathcode"2215="4 "0 "2215
- \Umathcode"2F98="4 "0 "2F98
- \Umathcode`\\="4 "0 "005C
- \Umathcode"2216="4 "0 "2216
- \Umathcode"29F5="4 "0 "29F5
- \Umathcode"29F9="4 "0 "29F9
-}{
+\ProvidesPackage{fixdif}[2023/01/27 Interface for defining differential operators.]
+\@ifpackageloaded{unicode-math}{\AtBeginDocument{%
+ \Umathcode`\/="4 \symoperators "002F
+ \Umathcode"2044="4 \symoperators "2044
+ \Umathcode"2215="4 \symoperators "2215
+ \Umathcode"2F98="4 \symoperators "2F98
+ \Umathcode`\\="4 \symoperators "005C
+ \Umathcode"2216="4 \symoperators "2216
+ \Umathcode"29F5="4 \symoperators "29F5
+ \Umathcode"29F9="4 \symoperators "29F9
+}}{
\mathcode`\/="413D
\mathcode`\\="426E % \backslash
\def\backslash{\delimiter"426E30F\relax}
}
-\def\mup@tch{\mathchoice{\mskip-\thinmuskip}{\mskip-\thinmuskip}{}{}}
+\def\mup@tch{\mathchoice{\mskip-\thinmuskip}{\mskip-\thinmuskip}{}{}{}}
\def\s@beforep@tch{\mathchoice{}{}{\mbox{}}{\mbox{}}}
\DeclareOption{rm}{\@ifpackageloaded{unicode-math}
{\def\@@dif{\symrm{d}}}{\def\@@dif{\mathrm{d}}}}
@@ -59,8 +59,8 @@
\gdef\resetdfont#1{\let\@@dif\relax%
\def\@@dif{#1{d}}}
\def\@dif{\mathinner{\@@dif}\mup@tch}
-\let\d@accent\d
-\DeclareRobustCommand\d{\ifmmode\@dif\else\expandafter\d@accent\fi}
+\AtBeginDocument{\let\d@accent\d
+ \DeclareRobustCommand\d{\ifmmode\@dif\else\expandafter\d@accent\fi}}
\def\@letdif#1#2{\AtBeginDocument{%
\ifcsname #2nondif\endcsname\else%
\expandafter\let\csname #2nondif\expandafter\endcsname
@@ -73,7 +73,7 @@
\expandafter\let\csname #2nondif\expandafter\endcsname
\csname #2\endcsname%
\fi%
- \gdef#1{\mathinner{\s@beforep@tch\csname #2nondif\endcsname\mbox{}}\mup@tch}%
+ \gdef#1{\mathinner{\s@beforep@tch\csname #2nondif\endcsname\hbox{}}\mup@tch}%
}}
\def\letdif{\@ifstar\s@letdif\@letdif}
\long\def\@newdif#1#2{\AtBeginDocument{%