數學符號在詞彙表中看起來很糟糕

數學符號在詞彙表中看起來很糟糕

當我使用對齊環境時,我有一個看起來不錯的數學符號。但當我把符號放在 $$ 裡面時就不是了。這使得符號在術語表中看起來很糟糕,因為我無法在術語表中使用對齊。這是一張圖片,第一個符號使用對齊,第二個符號使用$$。 在此輸入影像描述

這是代碼:

\documentclass[a4paper]{memoir}
\usepackage{amsmath}

\begin{document}
\begin{align*}
\sum\limits_{\tau=-\infty}^{T}\mathop{}_{\mkern -25mu   \delta}


\end{align*}

\center{$\sum\limits_{\tau=-\infty}^{T}\mathop{}_{\mkern -20mu   \delta}$}


\end{document}

如何取得詞彙表中的第一個符號?

術語表中的內容如下:

在此輸入影像描述

這是詞彙表的代碼

\documentclass[a4paper]{memoir}
\usepackage{amsmath}
\usepackage[toc,nonumberlist]{glossaries}
\makeglossaries
\newglossaryentry{g1}{
    name={$\sum\limits_{\tau=-\infty}^{T}\mathop{}_{\mkern -20mu   \delta}$},
    description={description}
}


\begin{document}

\glsaddall
\printglossary
\end{document}

答案1

您可以嘗試\displaystyle強制渲染數學輸出,就像在顯示中一樣。

你應該小心,因為這會導致行距,這可能會很醜。

無論如何,這是一個例子

\documentclass[a4paper]{memoir}
\usepackage{amsmath}

\begin{document}
\begin{align*}
\sum\limits_{\tau=-\infty}^{T}\mathop{}_{\mkern -25mu   \delta}
\end{align*}

$\displaystyle\sum\limits_{\tau=-\infty}^{T}\mathop{}_{\mkern -20mu   \delta}$


\end{document}

有結果

在此輸入影像描述

如果沒有詞彙表代碼,就很難更了解

答案2

amsmath包提供了宏\sideset.我建議你寫

\sideset{}{_\delta}\sum\limits_{\tau=-\infty}^{T}

而不是繁瑣的

\sum\limits_{\tau=-\infty}^{T}\mathop{}_{\mkern -25mu   \delta}

要獲得大的求和符號,請使用該\displaystyle指令。由於\sideset專門處理大型求和符號,TeX 在遇到 時會自動切換到顯示數學\sideset

完整的 MWE:

在此輸入影像描述

\documentclass[a4paper]{memoir}
\usepackage{amsmath} % for \sideset macro
\begin{document}
$\sideset{}{_\delta}\sum_{\tau=-\infty}^{T}$
\end{document}

答案3

如果您要使用\sideset,您可能會考慮使用\overset將 放在\delta正確的位置:

\documentclass{memoir}
\usepackage{amsmath}
\begin{document}
\noindent
If the $\delta$ is supposed to sit on top of the $\infty$ symbol, then it seems to
be semantically `better' to use \verb|\sum_{\tau=-\overset{\delta}{\infty}}^T|
to get:
\[
    \sum_{\tau=-\overset{\delta}{\infty}}^T
\]
And if you really don't like the extra space that the $\delta$ produces you could
get rid of it like this: \verb|\sum_{\tau=-\smash{\overset{\delta}{\infty}}}^T|
\[
    \sum_{\tau=-\smash{\overset{\delta}{\infty}}}^T
\]
Even without the smash, this works nicely in text style too:
$\sum_{\tau=-\overset{\delta}{\infty}}^T$ although you could force it into display
style like this
    $\displaystyle\sum_{\tau=-\smash{\overset{\delta}{\infty}}}^T$
or use the limits controls to get a smaller version:
    $\sum\limits_{\tau=-\smash{\overset{\delta}{\infty}}}^T$
if that's what you prefer.
You pays your money and you takes your choice\dots

\end{document}

在此輸入影像描述

相關內容