在数学模式下调整产品符号周围的水平间距

在数学模式下调整产品符号周围的水平间距

这个问题在大多数人眼里可能不存在,但是目前却刺痛了我的审美眼光!

我想调整常用产品标志周围的间距(标量积矢量和张量积, ...), 以便在向量和张量具有索引或指数时获得更平衡的输出。以下是显示该问题的 MWE 代码:

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage{tensor}
\newcommand*{\bvec}[1]{\mathbf{#1}}
\newcommand*{\ssp}{\mskip1mu} % mu = "math unit". Simple space \, = 3mu.
\newcommand*{\psp}{\mskip2mu} % 2mu ; approx 1.2pt.

\begin{document}

Default spacing around product signs:
    \begin{gather}
        \tensor{\bvec{e}}{_i} \cdot \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \times \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \wedge \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \otimes \tensor{\bvec{e}}{_j}. \\[1ex]
        \bvec{a} \cdot \bvec{b} \ne \bvec{a} \times \bvec{b} \ne \bvec{a} \wedge \bvec{b} \ne \bvec{a} \otimes \bvec{b}.
    \end{gather}
More space on right of the product signs:
    \begin{gather}
        \tensor{\bvec{e}}{_i} \cdot \ssp \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \times \ssp \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \wedge \ssp \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \otimes \ssp \tensor{\bvec{e}}{_j}.
    \end{gather}
    Less space on left of product sides:
    \begin{gather}
        \tensor{\bvec{e}}{_i} \!\psp \cdot \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \!\psp \times \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \!\psp \wedge \tensor{\bvec{e}}{_j}
        \ne \tensor{\bvec{e}}{_i} \!\psp \otimes \tensor{\bvec{e}}{_j}.
    \end{gather}

\end{document}

预览(间距问题很微妙,乍一看可能看不出来):

在此处输入图片描述

在默认情况下(前两条方程式),由于索引的原因,乘积符号周围的间距不太平衡(见方程式 (1))。左侧的空间似乎比右侧的空间大。当向量没有任何索引时(行 (2)),间距感觉很完美。目前,我可以在右侧手动添加一个小空格,就像行 (3) 那样。但结果并不理想。

我还可以稍微减少左侧的空间,就像第 (4) 行那样。结果在我看来几乎是正确的。但我想知道是否有更好的方法可以做到这一点,也许不必在每种情况下都手动操作。我还必须用眼睛来破解产品,使用任意小的空间(常规空间的三分之一\,

那么,我们如何调整乘积符号周围的间距/字距以在所有情况下(有或没有任何下限或上限指数)获得平衡的数学表达式?

重要的: 请注意,我不想创建新的宏来将所有产品重新定义为两个输入函数:我不想将产品定义为“带插槽的机器”。不过,我可能不得不重新定义产品而不向其添加条目,但我更喜欢最简单的方法。


编辑:也许最好的方法是重新定义产品命令(\times\cdot\otimes\wedge\odot)以添加可选的间距参数,但我需要您的建议来实现这个想法。因此,让新命令在未添加任何参数时\times与旧命令保持一致,并且(或??)是带有\times\times[?]\times{?}左侧添加了负空间. 如何正确做到这一点?

我想将默认值替换\times为类似于的东西\!\ssp \times,或者可能是\!\psp \times,从一个新的\times带有可选参数(负空间的三分之一或三分之二)的东西。

相关内容