1

Hi i keep having a double superscript in this part of mi latex document, may some of you help me finding it?

$K=\sum_{i}\frac{1}{2}m_{i}v_{i}^{2}=\sum_{i}\frac{1}{2}m_{i}(\vec{v'}_{i}+\vec{v_{cm}})
 (\vec{v'}_{i}+\vec{v_{cm}})=\sum_{i}\frac{1}{2}m_{i}v'_{i}^{2}+
\frac{1}{2}(\sum_{i}m_{i}v'_{i})(\vec{v_{cm}})+
+\frac{1}{2}\vec{v_{cm}}(\sum_{i}m_{i}v'_{i})+\frac{1}{2}
(\sum_{i}m_{i})\vec{v}_{cm}^{2}=
=K'+\frac{1}{2}M\vec{v}_{cm}^{2}$
\\\textbf{Secondo}: $\vec{p}_{tot}=m\vec{v_{cm}}\quad\vec{p'}_{tot}=0\quad\vec{L}_{i}=
=\vec{r}_{i}\times\vec{p}_{i}=
=(\vec{r}'_{i}+\vec{r}_{cm})\times m_{i}(\vec{v'}_{i}+
+\vec{v_{cm}})\quad\vec{L}_{tot}=\sum\vec{L}_{i}=\sum\vec{r}'_{i}\times m_{i}\vec{v'}_{i}+
+\sum\vec{r}_{cm}\times m_{i}\vec{v'}_{i}+\sum\vec{r}'_{i}\times m_{i}\vec{v}_{cm}+
\vec{r}_{cm}\times\sum m_{i}\vec{v}_{cm}$
  • 1
    Welcome to TeX SX! Could you post a full compilable code? – Bernard Sep 11 '17 at 10:44
0

The prime is a superscript; you can just move the subscript earlier

v_{i}'^{2}

because LaTeX will not run in the problem, since it knows how to manage this kind of construction.

With the input v'_{i}^{2}, the superscripts are separated by the subscript and so the error ensues.

Having \vec{v}'_{i}^{2} is immaterial and the solution is the same, but see How to typeset a primed vector for help in priming arrowed vectors.

2

The log file points to the fatal error...

Since ' is a superscripted quantity, v'^{} is a double superscript. This problem can be alleviated by grouping the v' in braces:

\documentclass{article}
\begin{document}
%$v'_{i}^{2}$ % DOUBLE SUPERSCRIPT
${v'}_{i}^{2}$
\end{document}

enter image description here

Fixing that one construction allows the, dare I say, unsightly result to compile in its full g[l]ory.

enter image description here

  • \smash[t]{v'}_{i}^{2} would look nicer, in my opinion. – Bernard Sep 11 '17 at 11:52
  • @Bernard that's a nice variant, though I see your esvect solution looks rather more like my own attempt. – Steven B. Segletes Sep 11 '17 at 11:58
  • Do you mean the displayed equations rather than inline maths? – Bernard Sep 11 '17 at 12:17
  • I mean the first v'^2 near the beginning of the 2nd line of your output. By the way, egreg of course can get the same result with his sleight of hand, just by switching the order of the scripts. – Steven B. Segletes Sep 11 '17 at 12:20
  • Well I thought of this looking at your solution (it's always easier to see how to improve other people's solutions ;o)). But I've fixed it now. In the place of using \smash[t], one also may code v_{i}^{\prime 2}. – Bernard Sep 11 '17 at 12:27
0

In TeX, in math mode prime symbol is considered as in superscript position by default, so this error was produced, please use the updated code below:

$K=\sum_{i}\frac{1}{2}m_{i}v_{i}^{2}=\sum_{i}\frac{1}{2}m_{i}(\vec{v'}_{i}+\vec{v_{cm}})
 (\vec{v'}_{i}+\vec{v_{cm}})=\sum_{i}\frac{1}{2}m_{i}v^{\prime2}_{i}+
\frac{1}{2}(\sum_{i}m_{i}v'_{i})(\vec{v_{cm}})+
+\frac{1}{2}\vec{v_{cm}}(\sum_{i}m_{i}v'_{i})+\frac{1}{2}
(\sum_{i}m_{i})\vec{v}_{cm}^{2}=
=K'+\frac{1}{2}M\vec{v}_{cm}^{2}$
\\\textbf{Secondo}: $\vec{p}_{tot}=m\vec{v_{cm}}\quad\vec{p'}_{tot}=0\quad\vec{L}_{i}=
=\vec{r}_{i}\times\vec{p}_{i}=
=(\vec{r}'_{i}+\vec{r}_{cm})\times m_{i}(\vec{v'}_{i}+
+\vec{v_{cm}})\quad\vec{L}_{tot}=\sum\vec{L}_{i}=\sum\vec{r}'_{i}\times m_{i}\vec{v'}_{i}+
+\sum\vec{r}_{cm}\times m_{i}\vec{v'}_{i}+\sum\vec{r}'_{i}\times m_{i}\vec{v}_{cm}+
\vec{r}_{cm}\times\sum m_{i}\vec{v}_{cm}
$

Here, I modified v'_{i}^{2} to v^{\prime2}_{i}

0

This is due to v'_{i}^{2}.

I can propose this, using the vector arrows from esvect:

\documentclass{article}
\usepackage{geometry}%
\usepackage{mathtools, nccmath}
\usepackage[b]{esvect}

\begin{document}

\begin{align*} K & =∑_{i}\mfrac{1}{2}m_{i}v_{i}^{2}=∑_{i}\mfrac{1}{2}m_{i}(\vv*{v}{\!i}'+\vv*{v}{\!cm})
  (\vv*{v}{\!i}'+\vv*{v}{\!cm}) \\
    & = ∑_{i}\mfrac{1}{2}m_{i}{v'_{i}}^{2}+
  \mfrac{1}{2}\bigl(∑_{i}m_{i}v'_{i}\bigr)(\vv*{v}{\!cm})
  +\mfrac{1}{2}\vv*{v}{\!cm}(∑_{i}m_{i}v'_{i})+\mfrac{1}{2}
  \bigl(∑_{i}m_{i}\bigr)\vv*{v}{\!cm}^{2}
  =K'+\mfrac{1}{2}M\vv*{v}{\!cm}^{2}
\end{align*}
\textbf{Secondo}: \begin{align*}
  \vv*{p}{\!_\mathrm{\scriptstyle{}tot}} & =m\vv*{v}{\!cm} \qquad \vv*{p}{\!\mathrm{tot}}' =0 \qquad \vv*{L}{i}
  = \vv*{r}{\!i} × \vv*{p}{\!i} = (\vv*{r}{\!i}' + \vv*{r}{\!cm}) × m_{i}(\vv*{v}{\!i}' + \vv*{v}{\!cm})
  \\%
  \vv*{L}{\mathrm{tot}} & =\sum\vv*{L}{i}=\sum\vv*{r}{\!i}' × m_{i}\vv*{v}{\!i}'+ \sum\vv*{r}{\!cm} × m_{i}\vv*{v}{\!i}' +
  \sum\vv*{r}{\!i}' × m_{i}\vv*{v}{\!cm} + \vv*{r}{\!cm} × ∑ m_{i}\vv*{v}{\!cm}
\end{align*}

\end{document} 

enter image description here

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.