8

how can I avoid that the following expression

\documentclass[a4paper,fontsize=14pt]{scrbook}  
\usepackage{mathtools}
\usepackage{lmodern}
\begin{document}
\begin{align}
    a = \sqrt[m]{\sum_{i=1}^{n}b_{i}^m}.
\end{align}
\end{document}

is displayed in this form ($m$ is cut by the root symbol):

enter image description here

Thanks for you help.

6
  • 1
    Try to use \sqrt[m\,]{\sum...}.
    – wipet
    Jun 24, 2014 at 10:59
  • 1
    please make a complete document that produces that display and post, the input shown would set the summation in inline style not with the limits above and below. Jun 24, 2014 at 10:59
  • That is not possible with standard LaTeX math mode. So do what David said!
    – user2478
    Jun 24, 2014 at 11:02
  • Sorry for not posting the full code. Now I think, the problem might be the lmodern package in combination with the 14pt fontsize. Jun 24, 2014 at 11:13
  • And the m\, does help! Jun 24, 2014 at 11:14

2 Answers 2

9

It's the usual problem due to the setting of the math extension font done by lmodern.sty, which defines OMX/lmex/m/n for it with this completely wrong font definition file:

\ProvidesFile{omxlmex.fd}[2009/10/30 v1.6 Font defs for Latin Modern]

\DeclareFontFamily{OMX}{lmex}{}
\DeclareFontShape{OMX}{lmex}{m}{n}{%
   <->sfixed*lmex10%
   }{}
\endinput

This means that lmex10 is used no matter what the surrounding font size is. This might seem to work at standard sizes (it doesn't, however, try with \sum in a subscript).

I usually suggest to reinstate the Computer Modern math extension font, but applying the fact that nowadays arbitrary scaling is possible.

\documentclass[a4paper,fontsize=14pt]{scrbook}
\usepackage{mathtools}
\usepackage{lmodern}

\DeclareFontShape{OMX}{cmex}{m}{n}{%
  <-7.5>cmex7
  <7.5-8.5>cmex8
  <8.5-9.5>cmex9
  <9.5->cmex10
}{}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}


\begin{document}
\[
a = \sqrt[m]{\sum_{i=1}^{n}b_{i}^m}.
\]
\end{document}

enter image description here

2
  • Thanks, that solves the problem! If you have some additinal time, would be nice, if you could explain, how you came up with the numbers. Jun 24, 2014 at 12:56
  • @AnkaiosArgo The figures in the \DeclareFontShape command are based on the available optical sizes for cmex; if the requested size is around 7pt (or below, for second level sub/superscripts), use cmex7; if it is around 8pt, use cmex8 and so on; cmex10 is the largest size available, so from 9.5pt up there's no other choice.
    – egreg
    Jun 24, 2014 at 13:00
10

Something strange in the lmodern font metrics it appears.

You can shift the index with \leftroot

\documentclass[a4paper,fontsize=14pt]{scrbook}  
\usepackage{mathtools}
\usepackage{lmodern}
\begin{document}
\begin{align}
    a = \sqrt[\leftroot{2}m]{\sum_{i=1}^{n}b_{i}^m}.
\end{align}
\end{document}

enter image description here


Original computer modern answer:

The input you show would use an inline style unlike the image shown, and display style should not over print the index Please always post a complete document that shows the problem:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$a = \sqrt[m]{\sum_{i=1}^{n}b_{i}^m}$

\[
a = \sqrt[m]{\sum_{i=1}^{n}b_{i}^m}
\]

\end{document}
5
  • Thanks a lot David! The leftroot is a nice workaround. However, it seems to be better to solve the problem at the "root". Thus I think egreg's solutions is the way to go. Jun 24, 2014 at 12:54
  • @AnkaiosArgo you made an old man very happy: chat.stackexchange.com/transcript/message/16249651#16249651 Jun 24, 2014 at 12:56
  • how ones avoid that ugly square sqrt in the centered case?
    – janmarqz
    May 7, 2020 at 20:30
  • @janmarqz a font only has a few fixed sizes of root symbols then has to use an extendible vertical rule, so that is how it is. May 7, 2020 at 20:32
  • sad!... thank you David
    – janmarqz
    May 7, 2020 at 20:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .