我想在数学模式下写入“条件极限”,其中包含一个向右箭头、一个向下箭头和三个参数(表达式趋向于 A,而 B 趋向于 C)。我曾尝试用 解决它\mkern
,但它不是最好的。
梅威瑟:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\def\limdownarrow{\qopname\relax m{\downarrow}}
\begin{document}
The expression goes to zero, while $\epsilon$ goes to zero:
$$\lim\limits_{\epsilon\to0} \left( F(x+\epsilon) - F(x-\epsilon) \right) = 0$$
Which could be written as:
$$F(x+\epsilon) - F(x-\epsilon) \to \mkern-19mu\limdownarrow_0^{\epsilon} 0 $$
\end{document}
创建:
这个任务有内置操作员吗?
答案1
从来没见过这样的符号。
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\tendstoas}[2]{\mathrel{\tendstoas@{#1}{#2}}}
\newcommand{\tendstoas@}[2]{%
\mathop{%
\vphantom{\big\downarrow}%
\ooalign{$\m@th\longrightarrow$\cr\hfil$\m@th\big\downarrow$\hfil}%
}\limits^{#1}_{#2}%
}
\makeatother
\begin{document}
The expression goes to zero, while $\epsilon$ goes to zero:
\[
\lim_{\epsilon\to0} \left( F(x+\epsilon) - F(x-\epsilon) \right) = 0
\]
Which could be written as:
\[
F(x+\epsilon) - F(x-\epsilon) \tendstoas{\epsilon}{0} 0
\]
\end{document}
注意:\limits
在显示数学模式下是多余的;$$
永远不应该在 LaTeX 中使用。
备择方案:
Which could be written as:
\[
F(x+\epsilon) - F(x-\epsilon) \xrightarrow[\epsilon\to0]{} 0
\]
Which could be written as:
\[
F(x+\epsilon) - F(x-\epsilon) \xrightarrow{\epsilon\to0} 0
\]
按照 Sebastiano 的建议,使用 STIX2 字体中的符号\tosa
⤩,但将其旋转 45 度,这是一个变体:
\DeclareFontFamily{U}{stix2sf}{}
\DeclareFontShape{U}{stix2sf}{m}{it}{<-> stix2-mathsfit}{}
\newcommand{\tendstoas}[2]{%
\mathrel{%
\mathop{%
\rotatebox[origin=c]{45}{\usefont{U}{stix2sf}{m}{it}\symbol{"C2}}%
}\limits^{#1}_{#2}%
}%
}
答案2
答案3
替代解决方案:
\newbox\xtobox
\setbox\xtobox=\hbox{\mathsurround=0pt$\longrightarrow$}
\setbox\xtobox=\hbox to\wd\xtobox{\rlap{\box\xtobox}\hss\lower.2ex\hbox{$\downarrow$}\hss}
\def\xto#1#2{\mathop{\copy\xtobox}\limits_{#1}^{#2}}
test:
$F(x+\epsilon) - F(x-\epsilon) \xto{\epsilon}{0} 0$
与 egregs 解决方案的区别:(1)垂直箭头不是,\big
但更小且更低。这在数学公式中占用的垂直空间更少。(2)运算符框是在文档的前言中预先计算的,而不是在每次使用时都计算。