diff options
author | Karl Berry <karl@freefriends.org> | 2022-07-09 20:11:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-07-09 20:11:06 +0000 |
commit | 6c9373df6ccca6628d9c9d2603e1e929bdb2cfda (patch) | |
tree | fc9df6c1af6ae0219d961d510ac782109082f7bd /Master | |
parent | 0bc467b2fe6735f21a5f8d9d3ec5ceaf6c4d3be2 (diff) |
fixdif (9jul22)
git-svn-id: svn://tug.org/texlive/trunk@63851 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/fixdif/fixdif.pdf | bin | 324100 -> 314029 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/fixdif/fixdif.dtx | 78 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fixdif/fixdif.sty | 58 |
3 files changed, 68 insertions, 68 deletions
diff --git a/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf b/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf Binary files differindex dd066756f06..e83fd2d10d7 100644 --- a/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf +++ b/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf diff --git a/Master/texmf-dist/source/latex/fixdif/fixdif.dtx b/Master/texmf-dist/source/latex/fixdif/fixdif.dtx index 9e06f1067ab..bced2e43bf9 100644 --- a/Master/texmf-dist/source/latex/fixdif/fixdif.dtx +++ b/Master/texmf-dist/source/latex/fixdif/fixdif.dtx @@ -126,7 +126,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. %</internal> % %<*driver> -\ProvidesFile{fixdif.dtx}[2022/05/29 (c) Copyright 2022 by Zhang Tingxuan] +\ProvidesFile{fixdif.dtx}[2022/07/09 (c) Copyright 2022 by Zhang Tingxuan] \documentclass{ltxdoc} \usepackage{xcolor} @@ -145,7 +145,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. \title{The \pkg{fixdif} Package} \author{Zhang Tingxuan} -\date{2022/05/29\quad Version 1.1\thanks{\url{https://github.com/AlphaZTX/fixdif}}} +\date{2022/07/09\quad Version 1.2\thanks{\url{https://github.com/AlphaZTX/fixdif}}} \usepackage{hyperref} \hypersetup{ @@ -329,7 +329,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. % can be used in preamble only!} % % \subsection{Define commands with a single command name} -% \noindent\textbf{\cs{letdif}\marg{cmd}\marg{csname}}\DescribeMacro{\letdif} +% \noindent\textcolor{titlecolor}{\cs{letdif}\marg{cmd}\marg{csname}}\DescribeMacro{\letdif} % \hfill(preamble only) % % The \cs{letdif} command has two arguments~--- the first is the newly-defined @@ -351,7 +351,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. % The second argument \meta{csname} of \cs{letdif} command can be used % repeatedly. % -% \noindent\textbf{\cs{letdif*}\marg{cmd}\marg{csname}}\DescribeMacro{\letdif*} +% \noindent\textcolor{titlecolor}{\cs{letdif*}\marg{cmd}\marg{csname}}\DescribeMacro{\letdif*} % \hfill(preamble only) % % This command is basically the same as \cs{letdif}, but this command will @@ -372,14 +372,14 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. % % \subsection{Define commands with multi commands or a string} % -% \noindent\textbf{\cs{newdif}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif} +% \noindent\textcolor{titlecolor}{\cs{newdif}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif} % \hfill(without correction, preamble only)\\ -% \noindent\textbf{\cs{newdif*}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif*} +% \noindent\textcolor{titlecolor}{\cs{newdif*}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif*} % \hfill(with correction, preamble only) % % The first argument of these commands is the newly-defined command; and the -% second argument should contain \emph{more than one commands} or -% \emph{a string}. For example, if you have loaded the \pkg{xcolor} package, +% second argument should contain \emph{more than one} tokens. +% For example, if you have loaded the \pkg{xcolor} package, % you can use the following line: % \begin{Verbatim} % \newdif{\redsfd}{\textsf{\color{red}d}} @@ -396,9 +396,9 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. % These two commands will check whether \meta{cmd} has been defined already. % If so, an error message will be given. % -% \noindent\textbf{\cs{renewdif}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif} +% \noindent\textcolor{titlecolor}{\cs{renewdif}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif} % \hfill(without correction, preamble only)\\ -% \noindent\textbf{\cs{renewdif*}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif*} +% \noindent\textcolor{titlecolor}{\cs{renewdif*}\marg{cmd}\marg{multi-cmd}}\DescribeMacro{\newdif*} % \hfill(with correction, preamble only) % % These two commands are basically the same as \cs{newdif} and \cs{newdif*}. @@ -497,7 +497,7 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. % \DescribeMacro{\d} % Redefine the \cs{d} command. In text, we need to expand the stuffs after \cs{d} % \begin{macrocode} -\gdef\d{\relax\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} @@ -505,71 +505,71 @@ Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>. % Define the \cs{letdif} and \cs{letdif*} command. The internal version of \cs{letdif} % is \cs{@letdif}, of \cs{letdif*} is \cs{s@letdif}. % \begin{macrocode} -\def\@letdif#1#2{\AtBeginDocument{ +\def\@letdif#1#2{\AtBeginDocument{% % \end{macrocode} % |#1| is the final command; |#2| is the ``control sequence name'' of |#1|'s initial definition. % Here we create a command (\cs{csname}|#2@old|\cs{endcsname}) to restore |#2|. % \begin{macrocode} - \ifcsname #2@old\endcsname\else - \expandafter\let\csname #2@old\expandafter\endcsname% - \csname #2\endcsname - \fi + \ifcsname #2@old\endcsname\else% + \expandafter\let\csname #2@old\expandafter\endcsname + \csname #2\endcsname% + \fi% % \end{macrocode} % Finally let |#1| be the new command. % \begin{macrocode} - \gdef#1{\mathinner{\csname #2@old\endcsname}\mup@tch} + \gdef#1{\mathinner{\csname #2@old\endcsname}\mup@tch}% }} % \end{macrocode} % The definition of \cs{s@letdif} is similar, but with the patch for negative skips. % \begin{macrocode} -\def\s@letdif#1#2{\AtBeginDocument{ - \ifcsname #2@old\endcsname\else - \expandafter\let\csname #2@old\expandafter\endcsname% - \csname #2\endcsname - \fi - \gdef#1{\mathinner{\s@beforep@tch\csname #2@old\endcsname\mbox{}}\mup@tch} +\def\s@letdif#1#2{\AtBeginDocument{% + \ifcsname #2@old\endcsname\else% + \expandafter\let\csname #2@old\expandafter\endcsname + \csname #2\endcsname% + \fi% + \gdef#1{\mathinner{\s@beforep@tch\csname #2@old\endcsname\mbox{}}\mup@tch}% }} \def\letdif{\@ifstar\s@letdif\@letdif} % \end{macrocode} % \DescribeMacro{\newdif}\DescribeMacro{\newdif*} % Define the \cs{newdif} and \cs{newdif*} commands. |#1| is the final command; |#2| is the ``long'' argument. % \begin{macrocode} -\long\def\@newdif#1#2{\AtBeginDocument{ +\long\def\@newdif#1#2{\AtBeginDocument{% \ifdefined#1 \PackageError{fixdif}{\string#1 is already defined.} - {Try another command instead of \string#1.} + {Try another command instead of \string#1.}% \else - \long\gdef#1{\mathinner{#2}\mup@tch} - \fi + \long\gdef#1{\mathinner{#2}\mup@tch}% + \fi% }} -\long\def\s@newdif#1#2{\AtBeginDocument{ +\long\def\s@newdif#1#2{\AtBeginDocument{% \ifdefined#1 \PackageError{fixdif}{\string#1 is already defined.} - {Try another command instead of \string#1.} + {Try another command instead of \string#1.}% \else - \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch} - \fi + \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch}% + \fi% }} \def\newdif{\@ifstar\s@newdif\@newdif} % \end{macrocode} % \DescribeMacro{\renewdif}\DescribeMacro{\renewdif*} % Define the \cs{renewdif} and \cs{renewdif*} commands. % \begin{macrocode} -\long\def\@renewdif#1#2{\AtBeginDocument{ +\long\def\@renewdif#1#2{\AtBeginDocument{% \ifdefined#1 - \long\gdef#1{\mathinner{#2}\mup@tch} + \long\gdef#1{\mathinner{#2}\mup@tch}% \else \PackageError{fixdif}{\string#1 has not been defined yet.} - {You should use \string\newdif instead of \string\renewdif.} - \fi + {You should use \string\newdif instead of \string\renewdif.}% + \fi% }} -\long\def\s@renewdif#1#2{\AtBeginDocument{ +\long\def\s@renewdif#1#2{\AtBeginDocument{% \ifdefined#1 - \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch} + \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch}% \else \PackageError{fixdif}{\string#1 has not been defined yet.} - {You should use \string\newdif instead of \string\renewdif.} - \fi + {You should use \string\newdif instead of \string\renewdif.}% + \fi% }} \def\renewdif{\@ifstar\s@renewdif\@renewdif} %</package> diff --git a/Master/texmf-dist/tex/latex/fixdif/fixdif.sty b/Master/texmf-dist/tex/latex/fixdif/fixdif.sty index bcea188cb8e..10572213e4a 100644 --- a/Master/texmf-dist/tex/latex/fixdif/fixdif.sty +++ b/Master/texmf-dist/tex/latex/fixdif/fixdif.sty @@ -61,54 +61,54 @@ \def\@@dif{#1{d}}} \def\@dif{\mathinner{\@@dif}\mup@tch} \let\d@accent\d -\gdef\d{\relax\ifmmode\@dif\else\expandafter\d@accent\fi} -\def\@letdif#1#2{\AtBeginDocument{ - \ifcsname #2@old\endcsname\else - \expandafter\let\csname #2@old\expandafter\endcsname% - \csname #2\endcsname - \fi - \gdef#1{\mathinner{\csname #2@old\endcsname}\mup@tch} +\DeclareRobustCommand\d{\ifmmode\@dif\else\expandafter\d@accent\fi} +\def\@letdif#1#2{\AtBeginDocument{% + \ifcsname #2@old\endcsname\else% + \expandafter\let\csname #2@old\expandafter\endcsname + \csname #2\endcsname% + \fi% + \gdef#1{\mathinner{\csname #2@old\endcsname}\mup@tch}% }} -\def\s@letdif#1#2{\AtBeginDocument{ - \ifcsname #2@old\endcsname\else - \expandafter\let\csname #2@old\expandafter\endcsname% - \csname #2\endcsname - \fi - \gdef#1{\mathinner{\s@beforep@tch\csname #2@old\endcsname\mbox{}}\mup@tch} +\def\s@letdif#1#2{\AtBeginDocument{% + \ifcsname #2@old\endcsname\else% + \expandafter\let\csname #2@old\expandafter\endcsname + \csname #2\endcsname% + \fi% + \gdef#1{\mathinner{\s@beforep@tch\csname #2@old\endcsname\mbox{}}\mup@tch}% }} \def\letdif{\@ifstar\s@letdif\@letdif} -\long\def\@newdif#1#2{\AtBeginDocument{ +\long\def\@newdif#1#2{\AtBeginDocument{% \ifdefined#1 \PackageError{fixdif}{\string#1 is already defined.} - {Try another command instead of \string#1.} + {Try another command instead of \string#1.}% \else - \long\gdef#1{\mathinner{#2}\mup@tch} - \fi + \long\gdef#1{\mathinner{#2}\mup@tch}% + \fi% }} -\long\def\s@newdif#1#2{\AtBeginDocument{ +\long\def\s@newdif#1#2{\AtBeginDocument{% \ifdefined#1 \PackageError{fixdif}{\string#1 is already defined.} - {Try another command instead of \string#1.} + {Try another command instead of \string#1.}% \else - \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch} - \fi + \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch}% + \fi% }} \def\newdif{\@ifstar\s@newdif\@newdif} -\long\def\@renewdif#1#2{\AtBeginDocument{ +\long\def\@renewdif#1#2{\AtBeginDocument{% \ifdefined#1 - \long\gdef#1{\mathinner{#2}\mup@tch} + \long\gdef#1{\mathinner{#2}\mup@tch}% \else \PackageError{fixdif}{\string#1 has not been defined yet.} - {You should use \string\newdif instead of \string\renewdif.} - \fi + {You should use \string\newdif instead of \string\renewdif.}% + \fi% }} -\long\def\s@renewdif#1#2{\AtBeginDocument{ +\long\def\s@renewdif#1#2{\AtBeginDocument{% \ifdefined#1 - \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch} + \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch}% \else \PackageError{fixdif}{\string#1 has not been defined yet.} - {You should use \string\newdif instead of \string\renewdif.} - \fi + {You should use \string\newdif instead of \string\renewdif.}% + \fi% }} \def\renewdif{\@ifstar\s@renewdif\@renewdif} \endinput |