5

I have a mathematical symbol that looks good when I use the align-environment. But not when I put the symbol inside $$. This makes the symbol look bad in the glossary, because I can not use align in the glossary. Here is a picture, the first symol is using align, the second is using $$. enter image description here

Here is the code:

\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}

How can I get the first symbol inside the glossary?

Here is how it is in the glossary:

enter image description here

Here is the code for the glossary

\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}
4
  • Well, the code for the glossary is the most important thing. By the way, using \center that way (and any other way, except for \begin{center}...\end{center}) is very wrong.
    – egreg
    Apr 30, 2017 at 16:24
  • The center thing was just for this page to get the symbols aligned, I will add the glossary code.
    – user119615
    Apr 30, 2017 at 16:26
  • Are you trying to have the delta sit on top of the infinity sign?
    – Thruston
    Apr 30, 2017 at 16:29
  • @Thruston Yeah, it was solved by the user below.
    – user119615
    Apr 30, 2017 at 16:33

3 Answers 3

5

You could try \displaystyle which forces the rendering of math output like in display.

You should be cautious because of the line spacing that this causes, which could be ugly.

Anyway here is an example

\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}

with result

enter image description here

Without glossary code it's difficult to know any better though

3
  • @user119615 if you think this has solved your issue, please consider accepting the answer (red button) for future references.
    – Moriambar
    Apr 30, 2017 at 16:35
  • 2
    I will accept it, but it says I have to wait a few minutes.
    – user119615
    Apr 30, 2017 at 16:35
  • @Mico nope, I've seen this kind of comments two or three times today, and I thought it was kind of a standard to make sure the question was "answered".
    – Moriambar
    Apr 30, 2017 at 16:40
10

The amsmath package provides the macro \sideset. I suggest you write

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

rather than the cumbersome

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

To get a large summation symbol, use the \displaystyle directive. Since \sideset works exclusively with large summation symbols, TeX automatically switches to display-style math when it encounters \sideset.

A full MWE:

enter image description here

\documentclass[a4paper]{memoir}
\usepackage{amsmath} % for \sideset macro
\begin{document}
$\sideset{}{_\delta}\sum_{\tau=-\infty}^{T}$
\end{document}
1
  • Thank you very much, that sideset command seems very nice, you don't have to manually put in -25 mu or -30 mu etc. it seems.
    – user119615
    Apr 30, 2017 at 16:38
3

If you are going to use \sideset, you might consider using \overset to put the \delta in the right place anyway:

\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}

enter image description here

2
  • Thank you, but what was meant about having delta above the infinity only made sense in my first picture. I guess a better description is that the delta is supposed to be attached to the summation sign. The meaning is that we sum in a step-length of size delta so the delta is connected to the summation sign, not the infinity sign.
    – user119615
    Apr 30, 2017 at 23:39
  • 1
    You should make that clear at the top of your question. If you move your comment into the body of your question I will remove this answer.
    – Thruston
    May 1, 2017 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.