1

I would like the subscript of my sum to look better:

$$
\sum_{d \mid p_j^{m_j}} f(d)
$$

creates the output

enter image description here

but i would like the exponent m_j to be further down and closer p_j.

2
  • Welcome to TeX.SE.
    – Mico
    Nov 21 '21 at 12:01
  • Off-topic: Please see the posting Why is \[ ... \] preferable to $$ ... $$ for an in-depth discussion of why one shouldn't use $$ to initiate and terminate display math mode in LaTeX documents.
    – Mico
    Nov 21 '21 at 12:26
2

I'd like to suggest that you \smash the subscript term j in p_j. Alternatively, you could \smash the j subscript term in m_j. Optionally, to remove any ambiguity as to where j in p_j belongs, snug it up to the p term via a \! ("negative thinspace") directive.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \smash[t] macro
\begin{document}
\[
\sum_{d \mid p_{j}^{m_j}} 
\quad\mbox{vs.}\quad
\sum_{d \mid p_{\smash[t]{\!j}}^{m_j}} 
\quad\mbox{vs.}\quad
\sum_{d \mid p_{\!j}^{m_{\smash{j}}}}
\]
\end{document}
0

You can use the commands \left and \right to force something before and after a certain text. If you just want to use something to one side, use . to avoid the unwanted side.

\documentclass{article}
   
\usepackage{amsmath}

\begin{document}
    
\begin{equation}
\sum_{\left.{d}\right|_{p_j}^{m_j}}f(d)
\end{equation}

\end{document}

Here you go!

enter image description here

2
  • 1
    Sorry, but {p_j} should not be placed on a line below d. Your notation also fails to treat m_j as a modifier of p_j.
    – Mico
    Nov 21 '21 at 12:08
  • Very sorry, I misread it.
    – L Mascolo
    Nov 21 '21 at 12:09

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.