我正在使用重新设计的箭头(用于地图、限制等),与默认字体相比,使用 Lucida Bright 字体看起来更好。
对于\tendsto
命令,对于限制,似乎我必须明确使用\raisebox{
负数额}{\to}
在命令中
\newcommand{\tendsto}{\mathrel{\raisebox{-0.5pt}{\to}}}
但虽然这在普通数学中看起来没问题,但当它出现在下标中时,箭头不够低。
\to
我怎样才能使箭头降低的量\tendsto
适应下标内的情况,而不是在普通数学中的情况——没有在下标情况下是否必须调用单独的命令?
\documentclass[10pt]{article}
\usepackage[left=2in,right=0.75in]{geometry}
\usepackage{amsmath}
\usepackage[lucidasmallscale]{lucidabr}
\linespread{1.04}
\newcommand{\N}{\mathbb{N}}
\newcommand{\from}{\protect\colon}
\usepackage{scalerel}
\usepackage{tikz-cd}
\usetikzlibrary{arrows.meta}
\tikzcdset{every arrow/.append style = -{Stealth[scale=1]}}
\tikzcdset{arrows={line width=0.4pt}}
%% SAVE OLD DEFS
\mathchardef\oldrightarrowchar=\numexpr\rightarrow-"3000\relax
\mathchardef\oldmapstochar=\numexpr\mapsto-"3000\relax
\newcommand{\oldrightarrow}{\mathrel{\oldrightarrowchar}}
\newcommand{\oldto}{\mathrel{\oldrightarrowchar}}
\newcommand{\oldmapsto}{\mathrel{\oldmapstochar}}
\newcommand{\oldtendsto}{\mathrel{\oldrightarrowchar}}
\newcommand{\oldrightinf}{\mathord{\oldrightarrowchar}}
%% MY NEW
\newcommand{\basicrightarrow}{\mathrel{\,\tikz[baseline,line width=0.4pt]\draw[arrows=-{Stealth[scale=0.75]},yshift=0.75ex] (0,0) -- (1em,0);\,}}
\renewcommand{\rightarrow}{\scalerel*{\basicrightarrow}{\oldrightarrow}}
\renewcommand{\to}{\scalerel*{\basicrightarrow}{\oldrightarrow}}
\newcommand{\barredrightarrow}{\mathrel{\,\tikz[baseline,line width=0.425pt]\draw[arrows={Bar[line width=0.85pt,scale=1]}-{Stealth[scale=0.75]},yshift=0.75ex] (0,0) -- (1em,0);\,}}
\renewcommand{\mapsto}{\scalerel*{\barredrightarrow}{\oldrightarrow}}
%% the issue is in following command:
\newcommand{\tendsto}{\mathrel{\raisebox{-0.5pt}{\to}}}
\newcommand{\shortrightarrow}{\mathord{\tikz[baseline,line width=0.4pt]\draw[arrows=-{Stealth[scale=0.5]},yshift=0.75ex] (0,0) -- (0.65em,0);}}
\newcommand{\rightinf}{\scalerel*{\shortrightarrow}{\raisebox{-0.25ex}{$\infty$}}}
% test command for the math with arrows:
\newcommand*{\test}[4]{% params: tendsto, to, mapsto, right-infinite %
\texttt{\textbackslash#1}, \texttt{\textbackslash#2}, \texttt{\textbackslash#3}, and \texttt{\textbackslash#4}:\\[6pt]
Let $(x_n)_{n \in \N} \csname#1\endcsname x$ in~$X$ where $f \from X \csname#2\endcsname Y$ \& $x \csname#3\endcsname y$;
that is, $\lim_{n \csname#1\endcsname \infty} x_n = x$%
\begin{gather*}%
\lim_{n \csname#1\endcsname \infty} x_n = x \text{ where } f \from X \csname#2\endcsname Y \text{ and } x \csname#3\endcsname y \text{ on } [x, \csname#4\endcsname).\\%
\lim_{t \csname#1\endcsname x} f(t) = y, \text{ that is,} \quad t \tendsto x \, \implies \, f(t) \tendsto y.%
\end{gather*}
}
\begin{document}
\noindent%
\test{oldtendsto}{oldto}{oldmapsto}{oldrightinf}
\test{tendsto}{to}{mapsto}{rightinf}
\end{document}
答案1
您应该根据当前的数学样式使用可变的金额。金额应以ex
单位而不是为单位pt
,以便适应当前的字体大小。
\makeatletter
\newcommand{\tendsto}{%
\mathrel{\fix@height\oldrightarrow{-0.0625ex}{-0.03ex}{-0.01ex}}%
}
\newcommand{\fix@height}[4]{%
\mathchoice
{\fix@@height{#1}\textstyle{#2}}
{\fix@@height{#1}\textstyle{#2}}
{\fix@@height{#1}\scriptstyle{#3}}
{\fix@@height{#1}\scriptscriptstyle{#4}}%
}
\newcommand{\fix@@height}[3]{\raisebox{#3}{$\m@th#2#1$}}
\makeatother
根据这个定义,我们得到
\noindent
\test{tendsto}{to}{mapsto}{rightinf}
\noindent
$x\tendsto\infty$\qquad
$\scriptstyle x\tendsto\infty$\qquad
$\scriptscriptstyle x\tendsto\infty$
\Large\noindent
\test{tendsto}{to}{mapsto}{rightinf}
\noindent
$x\tendsto\infty$\qquad
$\scriptstyle x\tendsto\infty$\qquad
$\scriptscriptstyle x\tendsto\infty$
以下输出
微调数量以适合您的口味。