texlive[64096] Master/texmf-dist: fixdif (11aug22)
commits+karl at tug.org
commits+karl at tug.org
Thu Aug 11 22:44:56 CEST 2022
Revision: 64096
http://tug.org/svn/texlive?view=revision&revision=64096
Author: karl
Date: 2022-08-11 22:44:56 +0200 (Thu, 11 Aug 2022)
Log Message:
-----------
fixdif (11aug22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdf
trunk/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
trunk/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf
trunk/Master/texmf-dist/source/latex/fixdif/fixdif.dtx
trunk/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
Modified: trunk/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex 2022-08-10 23:49:21 UTC (rev 64095)
+++ trunk/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex 2022-08-11 20:44:56 UTC (rev 64096)
@@ -1,6 +1,12 @@
\documentclass[letterpaper,11pt]{article}
-\usepackage{indentfirst}
+\date{2022/08/11\quad Version 1.4%
+ \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}%
@@ -12,6 +18,7 @@
\usepackage{xcolor}
\definecolor{titlecolor}{RGB}{0,128,8}
+\definecolor{lnkcolor}{RGB}{0,12,160}
\usepackage{fontspec}
\setmainfont{STIX Two Text}
@@ -27,6 +34,15 @@
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
+\usepackage{hyperref}
+\hypersetup{pdffitwindow,
+ pdftitle = {fixdif 宏包(中文文档)},
+ pdfauthor = {AlphaZTX},
+ pdfcreator = {pdfLaTeX/XeLaTeX/LuaLaTeX},
+ linkcolor = black,
+ urlcolor = lnkcolor,
+}
+
\usepackage{doc}
\DeclareRobustCommand\marg[1]{\texttt{\{}\meta{#1}\texttt{\}}}
@@ -35,21 +51,13 @@
\MakeShortVerb|
\usepackage{hologo}
-\DeclareRobustCommand\XeTeX{\hologo{XeTeX}}
-\DeclareRobustCommand\LuaTeX{\hologo{LuaTeX}}
+\DeclareRobustCommand\pdflatex{\hologo{pdfLaTeX}}
+\DeclareRobustCommand\xelatex{\hologo{XeLaTeX}}
+\DeclareRobustCommand\lualatex{\hologo{LuaLaTeX}}
\DeclareRobustCommand\pkg{\textsf}
\DeclareRobustCommand\opt{\texttt}
-\usepackage{hyperref}
-\hypersetup{pdffitwindow,
- pdftitle = {fixdif 宏包(中文文档)},
- pdfauthor = {AlphaZTX},
- pdfcreator = {pdfLaTeX/XeLaTeX/LuaLaTeX},
- linkcolor = black,
- urlcolor = titlecolor!75!black,
-}
-
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-2.5ex plus -1ex minus -.2ex}%
@@ -63,14 +71,16 @@
{.8ex plus .4ex minus .2ex}%
{-1em}%
{\indent\normalfont\normalsize\bfseries\color{titlecolor}}}
+\gdef\fd at name{\char"66\char"69\char"78\char"64\char"69\char"66}
\def\ps at plain{\let\@mkboth\@gobbletwo
- \def\@oddhead{\hbox{}\llap{\raisebox{-24.44cm}[0pt][0pt]{%
- \sffamily\bfseries\color{titlecolor!10}\fontsize{238pt}{0pt}\selectfont%
- \char"66\char"69\char"78\char"64\char"69\char"66}%
+ \def\@oddhead{\hbox{}\llap{\raisebox{-24.44cm}[0pt][0pt]{\sffamily\bfseries%
+ \color{titlecolor!5}\fontsize{238pt}{0pt}\selectfont\fd at name}%
\hspace*{-14.72cm}}\hfil\hbox{}\rlap{\raisebox{.2cm}[0pt][0pt]{%
\hspace*{1.4cm}\sffamily\bfseries\color{titlecolor!35}%
\fontsize{128pt}{0pt}\selectfont\thepage}}}%
\def\@oddfoot{\reset at font}\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot}
+\gdef\@title{\bfseries\pkg{\fd at name}\Uchar"5B8F\Uchar"5305}
+\gdef\@author{\Uchar"5F20\Uchar"5EAD\Uchar"7444}
\makeatother
\pagestyle{plain}
@@ -80,14 +90,6 @@
\parskip8pt plus 4pt minus 2pt
\parindent2em
-\title{\bfseries\pkg{fixdif} 宏包}
-\author{AlphaZTX}
-\date{2022/7/27\quad Version 1.3b%
- \thanks{源代码见~\hyperref{https://github.com/AlphaZTX/fixdif}{}{}{GitHub}
- 或~\hyperref{https://www.ctan.org/pkg/fixdif}{}{}{CTAN},或~\texttt{texdoc
- fixdif}。}
-}
-
\begin{document}
\maketitle
\thispagestyle{plain}
@@ -96,13 +98,11 @@
\pkg{fixdif} 宏包重定义了 \LaTeX{} 中的 \cs{d} 命令,使之在数学模式下可以得到
微分算符 $\d{}$,在正文中仍然是原来的重音符号(例如 |\d{o}| 得到 \d o)。
-本宏包支持不同的编译方式,在 pdf\TeX、\XeTeX{} 和 \LuaTeX{} 均可使用。本宏包在
-\XeTeX{} 和 \LuaTeX{} 下兼容 \pkg{unicode-math} 宏包。
+本宏包支持不同的编译方式,在 \pdflatex、\xelatex{} 和 \lualatex{} 均可使用。
+本宏包在 \xelatex{} 和 \lualatex{} 下兼容 \pkg{unicode-math} 宏包。
\end{abstract}
-{\parskip0pt
-\tableofcontents
-}
+{\parskip0pt\tableofcontents}
\section{背景}
我们一般更推荐在微分算符与前面的内容之间留出一个比较小的间距\footnote{%
@@ -133,6 +133,66 @@
\end{enumerate}
面对以上问题,解决方案是使用本宏包。
+\section{手动安装}
+\pkg{fixdif} 宏包最早于 2022 年上传至 CTAN,从 2023 年起被 \TeX\ Live 默认收录。
+对于 \TeX\ Live 2018\textasciitilde2022, 如果不能通过 \texttt{tlmgr} 获取
+\pkg{fixdif},则需手动安装。如果你的 \TeX\ Live 版本低于 2018,则可能无法正常
+使用 \pkg{fixdif},如需使用本宏包,建议将 \TeX\ Live 更新至最新版。
+
+手动安装分为以下几步:
+
+\textcolor{titlecolor}{第一步,}点击下面的链接下载 \pkg{fixdif} 宏包的压缩包:
+\begin{center}
+\hyperref{https://mirrors.ctan.org/macros/latex/contrib/fixdif.zip}{}{}%
+ {\bfseries Get \pkg{fixdif}.zip on CTAN}
+\end{center}
+下载完成后,解压缩,即可得到:
+\begin{itemize}[itemsep=0pt,parsep=0pt]
+\item \pkg{fixdif}.dtx;
+\item \pkg{fixdif}.ins;
+\item \pkg{fixdif}-zh-cn.tex;
+\item \pkg{fixdif}.pdf;
+\item \pkg{fixdif}-zh-cn.pdf;
+\item README.md。
+\end{itemize}
+现在你需要获得 \pkg{fixdif}.sty 并将其安装到正确的路径中。
+
+\textcolor{titlecolor}{第二步,}在解压缩 \pkg{fixdif}.zip 得到的
+\pkg{fixdif}.dtx 所在的路径下打开命令行
+(cmd/Powershell/Windows Terminal/Bash/Terminal),执行下面的命令:
+\begin{Verbatim}[formatcom=\bfseries]
+latex fixdif.ins
+\end{Verbatim}
+即可在当前路径下得到 \pkg{fixdif}.sty。这一步得到的 \pkg{fixdif}.log 可以删除。
+
+\textcolor{titlecolor}{第三步,}将对应的文件移动至对应的路径下。假设 \TeX{} 发行版
+的 TDS 根目录为 \texttt{TEXMF}(例如 Windows 系统在 \texttt{C:/} 下安装的
+\TeX\ Live 2021 的 \texttt{TEXMF} 为 \texttt{C:/texlive/2021/texmf-dist}),
+按下面的目录结构复制宏包中的文件:
+\begin{Verbatim}
+TEXMF/tex/latex/fixdif/fixdif.sty
+TEXMF/doc/latex/fixdif/fixdif.pdf
+TEXMF/doc/latex/fixdif/fixdif-zh-cn.pdf
+TEXMF/doc/latex/fixdif/fixdif-zh-cn.tex
+TEXMF/doc/latex/fixdif/README.md
+TEXMF/source/latex/fixdif/fixdif.dtx
+TEXMF/source/latex/fixdif/fixdif.ins
+\end{Verbatim}
+不存在的文件夹需要自行创建。
+
+\textcolor{titlecolor}{第四步,}在命令行执行下面的命令:
+\begin{Verbatim}[formatcom=\bfseries]
+texhash
+\end{Verbatim}
+刷新文件名数据库。这一步的命令可在任意路径下执行,但可能需要管理员权限(Windows 用户
+可以以管理员身份运行 cmd/Powershell/Windows Terminal,类 Unix 用户可以使用
+\texttt{sudo})。
+
+完成上面四个步骤后,即可在非最新版的 \TeX\ Live 中使用 \pkg{fixdif} 宏包了。
+\begin{center}
+\color{titlecolor}\itshape Happy \TeX ing!
+\end{center}
+
\section{宏包简介}
在导言区添加
\begin{Verbatim}
@@ -147,8 +207,8 @@
\[f(x)\d x,\quad \frac{\d y}{\d x},\quad \d y/\d x,\quad a^{y\d x}.\]
\subsection{对 \pkg{unicode-math} 宏包的兼容}
-如果你在文档中使用了 \pkg{unicode-math} 宏包(编译方式为 \XeTeX{} 或 \LuaTeX{}),
-需注意以下几点:
+如果你在文档中使用了 \pkg{unicode-math} 宏包(编译方式为 \xelatex{} 或
+\lualatex{}),需注意以下几点:
\begin{itemize}
\item 如需使用 \pkg{amsmath} 宏包,请在 \pkg{unicode-math} \zhemph{之前}%
载入 \pkg{amsmath}。
@@ -159,10 +219,10 @@
\item \pkg{fixdif} 宏包需要在 \pkg{unicode-math} 宏包\zhemph{后}载入。
\end{itemize}
-从而,引入宏包的正确顺序是:
+从而,导言区正确的顺序是:
\begin{Verbatim}
-\usepackage{amsmath}
-\usepackage{unicode-math}
+\usepackage[..]{amsmath}
+\usepackage[..]{unicode-math}
\setmathfont{...}[...]
\usepackage{fixdif}
\end{Verbatim}
@@ -206,11 +266,12 @@
\begin{Verbatim}
\usepackage[nopartial]{fixdif}
\end{Verbatim}
+在默认的设置下,作为普通数学符号的 $\partialnondif$ 可以使用
+\hypertarget{cs:partialnondif}{\cs{partialnondif}} 输入。
-\section{通过 \pkg{fixdif} 定义微分算符命令}
+\section{定义微分算符命令}
{\attention[6]}注意!本节中的命令只能在\zhemph{导言区}中使用!
-
\subsection{通过命令名称定义微分算符命令}
\noindent\textcolor{titlecolor}{\cs{letdif}\marg{cmd}\marg{csname}}%
\DescribeMacro{\letdif}\hfill(仅限在导言区使用)
@@ -237,6 +298,10 @@
\end{Verbatim}
这样 |\nabla| 和 |\grad| 都会得到微分算符 $\nabla$。
+{\attention[2]}如需得到原来的普通数学符号 \cs{\meta{csname}},只需在数学模式中输入
+\cs{\meta{csname}nondif}。例如\hyperlink{cs:partialnondif}{%
+\textcolor{titlecolor!75!black}{前面介绍的 \cs{partialnondif}}}。
+
\noindent\textcolor{titlecolor}{\cs{letdif*}\marg{cmd}\marg{csname}}%
\DescribeMacro{\letdif*}\hfill(仅限在导言区使用)
Modified: trunk/Master/texmf-dist/doc/latex/fixdif/fixdif.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/fixdif/fixdif.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fixdif/fixdif.dtx 2022-08-10 23:49:21 UTC (rev 64095)
+++ trunk/Master/texmf-dist/source/latex/fixdif/fixdif.dtx 2022-08-11 20:44:56 UTC (rev 64096)
@@ -131,7 +131,7 @@
%</internal>
%
%<*driver>
-\ProvidesFile{fixdif.dtx}[2022/7/27 (c) Copyright 2022 by Zhang Tingxuan]
+\ProvidesFile{fixdif.dtx}[2022/8/11 (c) Copyright 2022 by Zhang Tingxuan]
\documentclass{ltxdoc}
\usepackage{xcolor}
@@ -150,7 +150,7 @@
\title{The \pkg{fixdif} Package}
\author{Zhang Tingxuan}
-\date{2022/7/27\quad Version 1.3b\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
+\date{2022/8/11\quad Version 1.4\thanks{\url{https://github.com/AlphaZTX/fixdif}}}
\usepackage{hyperref}
\hypersetup{
@@ -175,12 +175,6 @@
{.8ex plus .4ex minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries\color{titlecolor}}}
-\def\ps at fixdif{\let\@mkboth\@gobbletwo
- \def\@oddhead{\hbox{}\hfil\hbox{}%
- \rlap{\raisebox{-.1cm}[0pt][0pt]{%
- \hspace*{.6cm}\sffamily\bfseries\color{titlecolor!35}%
- \fontsize{128pt}{0pt}\selectfont\thepage}}}%
- \def\@oddfoot{\reset at font}\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot}
\def\UrlAlphabet{%
\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j%
\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t%
@@ -197,7 +191,6 @@
\setmathfont{Latin Modern Math}
\fi
\makeatother
-\pagestyle{fixdif}
\usepackage{fixdif}
@@ -335,6 +328,8 @@
% \begin{Verbatim}
% \usepackage[nopartial]{fixdif}
% \end{Verbatim}
+% If you use the default setting, \cs{partialnondif} yields the ordinary
+% symbol $\partialnondif$.
%
% \section{Define commands for differential operators}
% \noindent\emph{Attention! The commands in this section
@@ -361,7 +356,11 @@
% then |\delta| itself will be a differential operator.
%
% The second argument \meta{csname} of \cs{letdif} command can be used
-% repeatedly.
+% repeatedly. If you want to get the ordinary symbol of
+% \texttt{\char`\\\textnormal{\meta{csname}}}, you can input
+% \texttt{\char`\\\textnormal{\meta{csname}}nondif} in math mode.
+% For example, in default, \DescribeMacro{\partialnondif}\cs{partialnondif}
+% yields the old partial symbol ``$\partialnondif$''.
%
% \noindent\textcolor{titlecolor}{\cs{letdif*}\marg{cmd}\marg{csname}}\DescribeMacro{\letdif*}
% \hfill(preamble only)
@@ -474,7 +473,7 @@
% Check the \TeX{} format and provides the package name.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fixdif}[2022/7/27 Interface for defining differential operators.]
+\ProvidesPackage{fixdif}[2022/8/11 Interface for defining differential operators.]
% \end{macrocode}
%
% \subsection{Control the skip between slashes and differential operator}
@@ -530,8 +529,7 @@
% \end{macrocode}
% Control the behavior of \cs{partial}.
% \begin{macrocode}
-\def\fixdif at partial@true{1}
-\ifx\fixdif at partial@bool\fixdif at partial@true
+\ifnum\fixdif at partial@bool=1
\AtEndOfPackage{\letdif{\partial}{partial}}
\fi
% \end{macrocode}
@@ -569,26 +567,26 @@
\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 at old|\cs{endcsname}) to restore |#2|.
+% Here we create a command (\cs{csname}|#2nonfif|\cs{endcsname}) to restore |#2|.
% \begin{macrocode}
- \ifcsname #2 at old\endcsname\else%
- \expandafter\let\csname #2 at old\expandafter\endcsname
+ \ifcsname #2nondif\endcsname\else%
+ \expandafter\let\csname #2nondif\expandafter\endcsname
\csname #2\endcsname%
\fi%
% \end{macrocode}
% Finally let |#1| be the new command.
% \begin{macrocode}
- \gdef#1{\mathinner{\csname #2 at old\endcsname}\mup at tch}%
+ \gdef#1{\mathinner{\csname #2nondif\endcsname}\mup at tch}%
}}
% \end{macrocode}
% The definition of \cs{s at letdif} is similar, but with the patch for negative skips.
% \begin{macrocode}
\def\s at letdif#1#2{\AtBeginDocument{%
- \ifcsname #2 at old\endcsname\else%
- \expandafter\let\csname #2 at old\expandafter\endcsname
+ \ifcsname #2nondif\endcsname\else%
+ \expandafter\let\csname #2nondif\expandafter\endcsname
\csname #2\endcsname%
\fi%
- \gdef#1{\mathinner{\s at beforep@tch\csname #2 at old\endcsname\mbox{}}\mup at tch}%
+ \gdef#1{\mathinner{\s at beforep@tch\csname #2nondif\endcsname\mbox{}}\mup at tch}%
}}
\def\letdif{\@ifstar\s at letdif\@letdif}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fixdif/fixdif.sty 2022-08-10 23:49:21 UTC (rev 64095)
+++ trunk/Master/texmf-dist/tex/latex/fixdif/fixdif.sty 2022-08-11 20:44:56 UTC (rev 64096)
@@ -29,7 +29,7 @@
%% and README.md.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fixdif}[2022/7/27 Interface for defining differential operators.]
+\ProvidesPackage{fixdif}[2022/8/11 Interface for defining differential operators.]
\@ifpackageloaded{unicode-math}{
\Umathcode`\/="4 "0 "002F
\Umathcode"2044="4 "0 "2044
@@ -53,8 +53,7 @@
\DeclareOption{nopartial}{\def\fixdif at partial@bool{0}}
\ExecuteOptions{rm,partial}
\ProcessOptions\relax
-\def\fixdif at partial@true{1}
-\ifx\fixdif at partial@bool\fixdif at partial@true
+\ifnum\fixdif at partial@bool=1
\AtEndOfPackage{\letdif{\partial}{partial}}
\fi
\gdef\resetdfont#1{\let\@@dif\relax%
@@ -63,18 +62,18 @@
\let\d at accent\d
\DeclareRobustCommand\d{\ifmmode\@dif\else\expandafter\d at accent\fi}
\def\@letdif#1#2{\AtBeginDocument{%
- \ifcsname #2 at old\endcsname\else%
- \expandafter\let\csname #2 at old\expandafter\endcsname
+ \ifcsname #2nondif\endcsname\else%
+ \expandafter\let\csname #2nondif\expandafter\endcsname
\csname #2\endcsname%
\fi%
- \gdef#1{\mathinner{\csname #2 at old\endcsname}\mup at tch}%
+ \gdef#1{\mathinner{\csname #2nondif\endcsname}\mup at tch}%
}}
\def\s at letdif#1#2{\AtBeginDocument{%
- \ifcsname #2 at old\endcsname\else%
- \expandafter\let\csname #2 at old\expandafter\endcsname
+ \ifcsname #2nondif\endcsname\else%
+ \expandafter\let\csname #2nondif\expandafter\endcsname
\csname #2\endcsname%
\fi%
- \gdef#1{\mathinner{\s at beforep@tch\csname #2 at old\endcsname\mbox{}}\mup at tch}%
+ \gdef#1{\mathinner{\s at beforep@tch\csname #2nondif\endcsname\mbox{}}\mup at tch}%
}}
\def\letdif{\@ifstar\s at letdif\@letdif}
\long\def\@newdif#1#2{\AtBeginDocument{%
More information about the tex-live-commits
mailing list.