summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex')
-rw-r--r--Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex135
1 files changed, 100 insertions, 35 deletions
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 df9fb1a7b58..f54662fffff 100644
--- a/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
+++ b/Master/texmf-dist/doc/latex/fixdif/fixdif-zh-cn.tex
@@ -1,5 +1,11 @@
\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}
@@ -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@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!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@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@font}\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot}
+\gdef\@title{\bfseries\pkg{\fd@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 @@ proper-way-to-typeset-a-differential-operator}{}{}{\TeX.SX}。},比如在下
\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 @@ proper-way-to-typeset-a-differential-operator}{}{}{\TeX.SX}。},比如在下
\[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 @@ proper-way-to-typeset-a-differential-operator}{}{}{\TeX.SX}。},比如在下
\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 @@ $\d x$ 和 \d x
\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 @@ $\d x$ 和 \d x
\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(仅限在导言区使用)