| 1 |
\documentclass[letterpaper,11pt]{article} |
| 2 |
\usepackage{fixdif} |
| 3 |
\date{2023/03/20\quad Version 2.1% |
| 4 |
\thanks{源代码见~\hyperref{https://github.com/AlphaZTX/fixdif}{}{}{GitHub} |
| 5 |
或~\hyperref{https://www.ctan.org/pkg/fixdif}{}{}{CTAN}。} |
| 6 |
} |
| 7 |
\ifcsname XeTeXversion\endcsname\else\errmessage{本文档需使用 xelatex 编译}\fi |
| 8 |
\usepackage{indentfirst,enumitem,multicol} |
| 9 |
\columnsep20pt\columnseprule.4pt |
| 10 |
\usepackage{manfnt,marginnote} |
| 11 |
\newcounter{fixdifattention} |
| 12 |
\newcommand\attention[1][1]{\setcounter{fixdifattention}{1}% |
| 13 |
\ifnum#1=1 \def\attentiontext{\dbend}\else |
| 14 |
\def\attentiontext{\loop\dbend\kern1pt% |
| 15 |
\addtocounter{fixdifattention}{1}% |
| 16 |
\ifnum \value{fixdifattention}<#1 \repeat\dbend}\fi% |
| 17 |
\marginnote{\hbox to 0pt{\hss\attentiontext}}} |
| 18 |
\usepackage{xcolor} |
| 19 |
\definecolor{titlecolor}{RGB}{0,128,8} |
| 20 |
\definecolor{lnkcolor}{RGB}{0,12,160} |
| 21 |
\usepackage{fontspec} |
| 22 |
\setmainfont{STIX Two Text} |
| 23 |
\setsansfont{Inter}[Scale=MatchLowercase] |
| 24 |
\setmonofont{Noto Sans Mono}[Scale=MatchLowercase] |
| 25 |
\usepackage{xeCJK,xeCJKfntef} |
| 26 |
\setCJKmainfont{Source Han Serif SC} |
| 27 |
\setCJKsansfont{Source Han Sans SC} |
| 28 |
\setCJKmonofont{Source Han Sans SC} |
| 29 |
\renewcommand\abstractname{摘\hskip.8em 要} |
| 30 |
\renewcommand\contentsname{目\hskip.8em 录} |
| 31 |
\DeclareRobustCommand\zhemph{\CJKunderdot} |
| 32 |
\usepackage{unicode-math} |
| 33 |
\setmathfont{STIX Two Math} |
| 34 |
\usepackage{hyperref} |
| 35 |
\hypersetup{pdffitwindow, |
| 36 |
pdftitle = {fixdif 宏包}, |
| 37 |
pdfauthor = {AlphaZTX}, |
| 38 |
pdfcreator = {XeTeX}, |
| 39 |
linkcolor = black, |
| 40 |
urlcolor = lnkcolor} |
| 41 |
\usepackage{doc}% Warning |
| 42 |
\DeclareRobustCommand\marg[1]{\texttt{\{}\meta{#1}\texttt{\}}} |
| 43 |
\usepackage{fancyvrb} |
| 44 |
\fvset{xleftmargin=2em,fontsize=\small} |
| 45 |
\MakeShortVerb| |
| 46 |
\usepackage{hologo} |
| 47 |
\DeclareRobustCommand\pdflatex{\hologo{pdfLaTeX}} |
| 48 |
\DeclareRobustCommand\xelatex{\hologo{XeLaTeX}} |
| 49 |
\DeclareRobustCommand\lualatex{\hologo{LuaLaTeX}} |
| 50 |
\DeclareRobustCommand\pkg{\textsf} |
| 51 |
\DeclareRobustCommand\opt{\texttt} |
| 52 |
\makeatletter |
| 53 |
\renewcommand\section{\@startsection{section}{1}{\z@}% |
| 54 |
{-2.5ex plus -1ex minus -.2ex}% |
| 55 |
{1ex plus .2ex}% |
| 56 |
{\normalfont\Large\bfseries\color{titlecolor}}} |
| 57 |
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}% |
| 58 |
{-2ex plus -1ex minus -.2ex}% |
| 59 |
{.5ex plus .2ex}% |
| 60 |
{\normalfont\normalsize\bfseries\color{titlecolor}}} |
| 61 |
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% |
| 62 |
{.8ex plus .4ex minus .2ex}% |
| 63 |
{-1em}% |
| 64 |
{\indent\normalfont\normalsize\bfseries\color{titlecolor}}} |
| 65 |
\gdef\fd@name{\char"66\char"69\char"78\char"64\char"69\char"66} |
| 66 |
\def\ps@plain{\let\@mkboth\@gobbletwo |
| 67 |
\def\@oddhead{\hfil\hbox{}\rlap{\raisebox{.2cm}[0pt][0pt]{% |
| 68 |
\hspace*{1.4cm}\sffamily\bfseries\color{titlecolor!35}% |
| 69 |
\fontsize{128pt}{0pt}\selectfont\thepage}}}% |
| 70 |
\def\@oddfoot{\reset@font}\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot} |
| 71 |
\gdef\@title{\bfseries\pkg{\char"66\char"69\char"78\char"64\char"69\char"66}% |
| 72 |
\Uchar"5B8F\Uchar"5305} |
| 73 |
\gdef\@author{\Uchar"5F20\Uchar"5EAD\Uchar"7444} |
| 74 |
\makeatother |
| 75 |
\pagestyle{plain} |
| 76 |
\linespread{1.2} |
| 77 |
\parskip8pt plus 4pt minus 2pt |
| 78 |
\parindent2em |
| 79 |
\begin{document} |
| 80 |
\maketitle |
| 81 |
\thispagestyle{plain} |
| 82 |
|
| 83 |
\begin{abstract} |
| 84 |
\pkg{fixdif} 宏包重定义了 \LaTeX{} 中的 \cs{d} 命令,使之在数学模式下可以得到 |
| 85 |
微分算符 $\d{}$,在正文中仍然是原来的重音符号(例如 |\d{o}| 得到 \d o)。 |
| 86 |
|
| 87 |
本宏包支持不同的编译方式,在 \pdflatex、\xelatex{} 和 \lualatex{} 均可使用。 |
| 88 |
本宏包在 \xelatex{} 和 \lualatex{} 下兼容 \pkg{unicode-math} 宏包。 |
| 89 |
\end{abstract} |
| 90 |
|
| 91 |
\section*{\contentsname} |
| 92 |
\begin{multicols}{2} |
| 93 |
\parskip0pt |
| 94 |
\csname @starttoc\endcsname{toc} |
| 95 |
\end{multicols} |
| 96 |
|
| 97 |
\section{背景} |
| 98 |
我们一般更推荐在微分算符与前面的内容之间留出一个比较小的间距\footnote{% |
| 99 |
见 \hyperref{https://tex.stackexchange.com/questions/14821/whats-the-% |
| 100 |
proper-way-to-typeset-a-differential-operator}{}{}{\TeX.SX}。},比如在下面展示的 |
| 101 |
两种情况中,右边的比左边的更好: |
| 102 |
\[f(x)\mathrm{d}x \qquad\hbox{\&}\qquad f(x)\d x.\] |
| 103 |
微分算符 $\d{}$ 与其前面的表达式之间的间距可认为是乘积的一种表示。 |
| 104 |
|
| 105 |
有些用户习惯使用下面的方法定义一个宏: |
| 106 |
\begin{Verbatim} |
| 107 |
\renewcommand\d{\mathop{\mathrm{d}}\!} |
| 108 |
\end{Verbatim} |
| 109 |
这个命令在很多情况下不会产生什么大问题,但是在下面给出的 3 个使用场景下就会出现 |
| 110 |
不容忽略的问题: |
| 111 |
\begin{enumerate} |
| 112 |
\item 当 $\d{}$ 出现在用斜杠表示的分式的分母中时,$\d{}$ 前面会留出多余的间距。 |
| 113 |
例如 |$\d y/\d x$| 得到 $\mathrm{d}y/\,\mathrm{d}x$; |
| 114 |
|
| 115 |
\item 上面定义的 \cs{d} 会覆盖原来的 \cs{d} 命令。在 \LaTeX{} 的原始定义下,\cs{d} |
| 116 |
是一个重音符号命令,用来产生字母下方的点。如果使用了上面的定义,则在正文中 |\d{o}| |
| 117 |
将不会得到“\d{o}”而是得到一条报错。 |
| 118 |
|
| 119 |
\item 前面说到,$\d{}$ 前面的间距可以认为是乘积的一种表示,因此这个间距可被视为 |
| 120 |
一个二元运算符。在上下标中时,二元运算符在两侧的间距应当消失,例如 $a+b$ 放到上标 |
| 121 |
中就会变成 $^{a+b}$。但是通过上面的方法定义的 \cs{d} 在上下标中,其前面的间距不会 |
| 122 |
消失,例如 |$a^{f(x)\d x}$| 会得到 $a^{f(x)\,\mathrm{d}x}$ 而不是 $a^{f(x)\d x}$。 |
| 123 |
\end{enumerate} |
| 124 |
面对以上问题,解决方案是使用本宏包。 |
| 125 |
|
| 126 |
\section{手动安装} |
| 127 |
\pkg{fixdif} 宏包最早于 2022 年上传至 CTAN,从 2023 年起被 \TeX\ Live 默认收录。 |
| 128 |
对于 \TeX\ Live 2018\textasciitilde2022, 如果不能通过 \texttt{tlmgr} 获取 |
| 129 |
\pkg{fixdif},则需手动安装。如果你的 \TeX\ Live 版本低于 2018,则可能无法正常 |
| 130 |
使用 \pkg{fixdif},如需使用本宏包,建议将 \TeX\ Live 更新至最新版。 |
| 131 |
|
| 132 |
手动安装分为以下几步: |
| 133 |
|
| 134 |
\textcolor{titlecolor}{第一步,}点击下面的链接下载 \pkg{fixdif} 宏包的压缩包: |
| 135 |
\begin{center} |
| 136 |
\hyperref{https://mirrors.ctan.org/macros/latex/contrib/fixdif.zip}{}{}% |
| 137 |
{\bfseries Get \pkg{fixdif}.zip on CTAN} |
| 138 |
\end{center} |
| 139 |
下载完成后,解压缩,即可得到: |
| 140 |
\begin{itemize}[itemsep=0pt,parsep=0pt] |
| 141 |
\item \pkg{fixdif}.dtx; |
| 142 |
\item \pkg{fixdif}.ins; |
| 143 |
\item \pkg{fixdif}-zh-cn.tex; |
| 144 |
\item \pkg{fixdif}.pdf; |
| 145 |
\item \pkg{fixdif}-zh-cn.pdf; |
| 146 |
\item README.md。 |
| 147 |
\end{itemize} |
| 148 |
现在你需要获得 \pkg{fixdif}.sty 并将其安装到正确的路径中。 |
| 149 |
|
| 150 |
\textcolor{titlecolor}{第二步,}在解压缩 \pkg{fixdif}.zip 得到的 |
| 151 |
\pkg{fixdif}.dtx 所在的路径下打开命令行 |
| 152 |
(cmd/Powershell/Windows Terminal/Bash/Terminal),执行下面的命令: |
| 153 |
\begin{Verbatim}[formatcom=\bfseries] |
| 154 |
latex fixdif.ins |
| 155 |
\end{Verbatim} |
| 156 |
即可在当前路径下得到 \pkg{fixdif}.sty。这一步得到的 \pkg{fixdif}.log 可以删除。 |
| 157 |
|
| 158 |
\textcolor{titlecolor}{第三步,}将对应的文件移动至对应的路径下。假设 \TeX{} 发行版 |
| 159 |
的 TDS 根目录为 \texttt{TEXMF}(例如 Windows 系统在 \texttt{C:/} 下安装的 |
| 160 |
\TeX\ Live 2021 的 \texttt{TEXMF} 为 \texttt{C:/texlive/2021/texmf-dist}), |
| 161 |
按下面的目录结构复制宏包中的文件: |
| 162 |
\begin{Verbatim} |
| 163 |
TEXMF/tex/latex/fixdif/fixdif.sty |
| 164 |
TEXMF/doc/latex/fixdif/fixdif.pdf |
| 165 |
TEXMF/doc/latex/fixdif/fixdif-zh-cn.pdf |
| 166 |
TEXMF/doc/latex/fixdif/fixdif-zh-cn.tex |
| 167 |
TEXMF/doc/latex/fixdif/README.md |
| 168 |
TEXMF/source/latex/fixdif/fixdif.dtx |
| 169 |
TEXMF/source/latex/fixdif/fixdif.ins |
| 170 |
\end{Verbatim} |
| 171 |
不存在的文件夹需要自行创建。 |
| 172 |
|
| 173 |
\textcolor{titlecolor}{第四步,}在命令行执行下面的命令: |
| 174 |
\begin{Verbatim}[formatcom=\bfseries] |
| 175 |
texhash |
| 176 |
\end{Verbatim} |
| 177 |
刷新文件名数据库。这一步的命令可在任意路径下执行,但可能需要管理员权限(Windows 用户 |
| 178 |
可以以管理员身份运行 cmd/Powershell/Windows Terminal,类 Unix 用户可以使用 |
| 179 |
\texttt{sudo})。 |
| 180 |
|
| 181 |
完成上面四个步骤后,即可在非最新版的 \TeX\ Live 中使用 \pkg{fixdif} 宏包了。 |
| 182 |
\begin{center} |
| 183 |
\color{titlecolor}\itshape Happy \TeX ing! |
| 184 |
\end{center} |
| 185 |
|
| 186 |
\section{宏包简介} |
| 187 |
在导言区添加 |
| 188 |
\begin{Verbatim} |
| 189 |
\usepackage{fixdif} |
| 190 |
\end{Verbatim} |
| 191 |
以使用本宏包。使用了本宏包后,在正文中输入 |
| 192 |
\begin{Verbatim} |
| 193 |
\[ f(x)\d x, \quad \frac{\d y}{\d x}, |
| 194 |
\quad\d y/\d x, \quad a^{y\d x}. \] |
| 195 |
\end{Verbatim} |
| 196 |
会得到 |
| 197 |
\[f(x)\d x,\quad \frac{\d y}{\d x},\quad \d y/\d x,\quad a^{y\d x}.\] |
| 198 |
|
| 199 |
\subsection{基本的 \cs{d} 命令} |
| 200 |
\DescribeMacro{\d}% |
| 201 |
\pkg{fixdif} 宏包提供了 \cs{d} 命令用于在数学模式中得到微分算符“$\d$”。 |
| 202 |
在正文中,\cs{d} 会保留其原有的重音符号的功能。例如: |
| 203 |
\begin{Verbatim} |
| 204 |
$\d x$ 和 \d x |
| 205 |
\end{Verbatim} |
| 206 |
以上代码会得到“$\d x$ 和 \d x”。 |
| 207 |
|
| 208 |
\subsection{设置 \cs{d} 的字体} |
| 209 |
本宏包提供了两个选项来控制 \cs{d} 的字体,分别为 \opt{rm} 和 \opt{normal}。 |
| 210 |
其中,\opt{rm} 为默认值,表示 \cs{d} 的字体为罗马体(\cs{mathrm}); |
| 211 |
\opt{normal} 表示 \cs{d} 的字体为数学模式下的常规体(\cs{mathnormal}), |
| 212 |
效果类似于意大利体。例如在载入宏包时开启 \opt{normal} 选项: |
| 213 |
\begin{Verbatim} |
| 214 |
\usepackage[normal]{fixdif} % 导言区 |
| 215 |
\end{Verbatim} |
| 216 |
正文中的 |$f(x)\d x$| 会得到 $f(x)\,dx$。 |
| 217 |
|
| 218 |
\DescribeMacro{\resetdfont} |
| 219 |
除了上面的两种字体,\pkg{fixdif} 也支持通过在导言区使用 \cs{resetdfont} 命令 |
| 220 |
自定义 \cs{d} 的字体。例如: |
| 221 |
\begin{Verbatim} |
| 222 |
\resetdfont{\mathsf} % 导言区 |
| 223 |
\end{Verbatim} |
| 224 |
在此设置下,正文中的 |\d x| 会得到 $\mathsf{d}x$。 |
| 225 |
|
| 226 |
\subsection{\cs{partial} 的行为} |
| 227 |
\DescribeMacro{\partial}% |
| 228 |
\pkg{fixdif} 宏包将 \cs{partial} 归为微分算符,正文中的 \cs{partial} 前面也会有 |
| 229 |
自动的间距。例如 |$\partial x\partial y$| 会得到 $\partial x\partial y$。 |
| 230 |
若不需要将 \cs{partial} 视为微分算符,可以开启 \opt{nopartial} 选项: |
| 231 |
\begin{Verbatim} |
| 232 |
\usepackage[nopartial]{fixdif} |
| 233 |
\end{Verbatim} |
| 234 |
在默认的设置下,作为普通数学符号的 $\partialnondif$ 可以使用 |
| 235 |
\hypertarget{cs:partialnondif}{\cs{partialnondif}} 输入。 |
| 236 |
|
| 237 |
\section{定义微分算符命令} |
| 238 |
{\attention[6]}注意!本节中的命令只能在\zhemph{导言区}中使用! |
| 239 |
|
| 240 |
\subsection{通过命令名称定义微分算符命令} |
| 241 |
\noindent\textcolor{titlecolor}{\cs{letdif}\marg{cmd}\marg{csname}}% |
| 242 |
\DescribeMacro{\letdif}\hfill(仅限在导言区使用) |
| 243 |
|
| 244 |
\cs{letdif} 命令有两个参数:第一个参数 \meta{cmd} 是新定义的微分算符命令, |
| 245 |
以反斜杠开头;第二个参数 \meta{csname} 是需要设置为微分算符的数学符号的命令名称, |
| 246 |
也就是一个完整的命令去掉最前面的反斜杠。举个例子: |
| 247 |
\begin{Verbatim} |
| 248 |
\letdif{\vr}{delta} |
| 249 |
\end{Verbatim} |
| 250 |
这样定义的 |\vr| 在数学模式中就相当于一个 |\delta|,但是它的前面会加上自动的间距。 |
| 251 |
|
| 252 |
通过 \cs{letdif} 命令,我们可以原封不动地把一个数学符号变成微分算符。例如: |
| 253 |
\begin{Verbatim} |
| 254 |
\letdif{\delta}{delta} |
| 255 |
\end{Verbatim} |
| 256 |
这样 |\delta| 本身就会具备微分算符的属性。 |
| 257 |
|
| 258 |
\cs{letdif} 的第二个参数 \meta{csname} 可以重复使用,也就是说,你可以把同一个符号 |
| 259 |
定义为两个不同的微分算符命令。例如: |
| 260 |
\begin{Verbatim} |
| 261 |
\letdif{\nabla}{nabla} |
| 262 |
\letdif{\grad}{nabla} |
| 263 |
\end{Verbatim} |
| 264 |
这样 |\nabla| 和 |\grad| 都会得到微分算符 $\nabla$。 |
| 265 |
|
| 266 |
{\attention[2]}如需得到原来的普通数学符号 \texttt{\textbackslash}\meta{csname}, |
| 267 |
只需在数学模式中输入 \texttt{\textbackslash}\meta{csname}\texttt{nondif}。 |
| 268 |
例如\hyperlink{cs:partialnondif}{\textcolor{titlecolor!75!black}{前面介绍的 \cs{partialnondif}}}。 |
| 269 |
|
| 270 |
\noindent\textcolor{titlecolor}{\cs{letdif*}\marg{cmd}\marg{csname}}% |
| 271 |
\DescribeMacro{\letdif*}\hfill(仅限在导言区使用) |
| 272 |
|
| 273 |
\cs{letdif*} 与 \cs{letdif} 基本相同,唯一的区别在于 \cs{letdif*} 会在微分算符 |
| 274 |
后面添加额外的矫正。建议在使用了 \pkg{unicode-math} 的文档中使用 \cs{letdif*}。 |
| 275 |
例如: |
| 276 |
\begin{Verbatim} |
| 277 |
\usepackage{unicode-math} |
| 278 |
\setmathfont{TeX Gyre Termes Math} |
| 279 |
\usepackage{fixdif} |
| 280 |
\letdif{\vr}{updelta} |
| 281 |
\end{Verbatim} |
| 282 |
这样定义的 |\vr| 后面就会有负的间距,如果不希望得到这一负间距,可以把上面的最后一行 |
| 283 |
改为: |
| 284 |
\begin{Verbatim} |
| 285 |
\letdif*{\vr}{updelta} |
| 286 |
\end{Verbatim} |
| 287 |
|
| 288 |
\subsection{定义包含多个命令或字符的微分算符命令} |
| 289 |
|
| 290 |
\noindent\textcolor{titlecolor}{\cs{newdif}\marg{cmd}\marg{multi-cmd}}% |
| 291 |
\DescribeMacro{\newdif}\hfill(仅限在导言区使用,后无矫正)\\ |
| 292 |
\noindent\textcolor{titlecolor}{\cs{newdif*}\marg{cmd}\marg{multi-cmd}}% |
| 293 |
\hfill(仅限在导言区使用,后有矫正) |
| 294 |
|
| 295 |
上面两个命令的第一个参数 \meta{cmd} 是新定义的微分算符命令,第二个参数 |
| 296 |
\meta{multi-cmd} 是超过一个字(token)的命令组合或字符串。举个例子,在 |
| 297 |
\pkg{xcolor} 宏包下可以这样使用: |
| 298 |
\begin{Verbatim} |
| 299 |
\newdif{\redsfd}{\textsf{\color{red}d}} |
| 300 |
\end{Verbatim} |
| 301 |
这样就定义了一个 |\redsfd| 命令。再举一个例子: |
| 302 |
\begin{Verbatim} |
| 303 |
\newdif{\D}{\mathrm{D}} |
| 304 |
\end{Verbatim} |
| 305 |
这样,在正文中输入 |$y\D x$| 就会得到 $y\,\mathrm{D}x$。 |
| 306 |
|
| 307 |
{\attention[2]}如果 \cs{newdif}(\texttt{*}) 后面的第二个参数 \meta{multi-cmd} |
| 308 |
仅包含一个字(token),也就是一个命令或字符,请使用 \cs{letdif}(\texttt{*}) 命令 |
| 309 |
而不是 \cs{newdif}(\texttt{*})。 |
| 310 |
|
| 311 |
\cs{newdif}(\texttt{*}) 会检查第一个参数 \meta{cmd} 是否已经被定义,若 \meta{cmd} |
| 312 |
已被定义,则会报错。 |
| 313 |
|
| 314 |
\noindent\textcolor{titlecolor}{\cs{renewdif}\marg{cmd}\marg{multi-cmd}}% |
| 315 |
\DescribeMacro{\renewdif}\hfill(仅限在导言区使用,后无矫正)\\ |
| 316 |
\noindent\textcolor{titlecolor}{\cs{renewdif*}\marg{cmd}\marg{multi-cmd}}% |
| 317 |
\hfill(仅限在导言区使用,后有矫正) |
| 318 |
|
| 319 |
这两个命令用于将 \meta{cmd} 重定义为微分算符命令。 |
| 320 |
若 \meta{cmd} 还未被定义,则会报错。 |
| 321 |
|
| 322 |
\section{正文中临时的微分算符命令} |
| 323 |
\noindent\textcolor{titlecolor}{\cs{mathdif}\marg{symbol}}% |
| 324 |
\DescribeMacro{\mathdif}\hfill(仅限在数学模式使用,后无矫正)\\ |
| 325 |
\noindent\textcolor{titlecolor}{\cs{mathdif*}\marg{symbol}}% |
| 326 |
\hfill(仅限在数学模式使用,后有矫正) |
| 327 |
|
| 328 |
如需在正文中少量使用某一数学符号作为微分算符,可以使用上面的两个命令。 |
| 329 |
例如,\verb|$x\mathdif{\Delta}\psi$| 会得到 $x\mathdif{\Delta}\psi$。 |
| 330 |
|
| 331 |
\section{举例} |
| 332 |
|
| 333 |
本节将告诉你如何在文档中正确使用 \pkg{fixdif} 宏包。 |
| 334 |
|
| 335 |
看以下两行代码: |
| 336 |
\begin{Verbatim} |
| 337 |
\letdif{\Delta}{Delta} |
| 338 |
\letdif{\nabla}{nabla} |
| 339 |
\end{Verbatim} |
| 340 |
哪一行更合理一些?答案是第二行。 |
| 341 |
|
| 342 |
有时,大写的“$\Delta$”会被用作拉普拉斯算符(与 $\nabla^2$ 意义相同); |
| 343 |
另一些时候,大写的“$\Delta$”会被当作变量或函数。所以对 $\Delta$ 作为 |
| 344 |
拉普拉斯算符和变量或函数的情况分别进行定义是更好的做法。我们建议将 |$\Delta$| |
| 345 |
作为 $\Delta$ 的原始定义进行保留,对表示拉普拉斯算符的 $\Delta$ 另加定义。 |
| 346 |
从而我们这样修改上面的第一行: |
| 347 |
\begin{Verbatim} |
| 348 |
\letdif{\laplacian}{Delta} |
| 349 |
\end{Verbatim} |
| 350 |
|
| 351 |
\paragraph{处理正负号与微分算符之间的间距} |
| 352 |
输入 |$-\d x$| 会得到 $-\d x$。如果你不希望在正负号与微分算符之间保留 |
| 353 |
一定的间距,可以输入 |$-{\d x}$|,这样就会得到 $-{\d x}$。 |
| 354 |
不过话说回来,$-\d x$ 的效果也并非不可接受。 |
| 355 |
|
| 356 |
\end{document} |