0

I'm doing a very basic mathematical typesetting homework. I know it won't make any difference to the marks, but it is really annoying me that there is more space before an aligned environment than before an equation in math mode.

\begin{itemize}

%item(i)
\item[(i)] Einstein is constantly being referenced in popular culture, Einstein wrote:

\[
E^2=(mc^2)^2+(pc)^2
\]

The equation we know best is $E=mc^2$, this is for a non-moving object, where $p$, the momentum, is equal to zero, if $p=0$ then

\begin{align*}
E^2&=(mc^2)^2+(pc)^2\\
&=(mc^2)^2+(0)^2\\
&=(mc^2)^2\\
E&=mc^2
\end{align*}





\end{itemize}

image of pdf output demonstrating excess space

Does anyone know why this happens? Is there a better way of doing this than putting the equation in an align environment?

| improve this question | | | | |
3

If I understand your problem right, this happens only because you left a blank line in the code between the text and the align environment. You could add a % on the blank lines, or simply not leave any blank lines.

The following code removes much of the spacing. Does it solve your problem?

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{itemize}

%item(i)
\item[(i)] Einstein is constantly being referenced in popular culture, Einstein wrote:
%
\[
E^2=(mc^2)^2+(pc)^2
\]
%
The equation we know best is $E=mc^2$, this is for a non-moving object, where $p$, the momentum, is equal to zero, if $p=0$ then
%
\begin{align*}
E^2&=(mc^2)^2+(pc)^2\\
&=(mc^2)^2+(0)^2\\
&=(mc^2)^2\\
E&=mc^2
\end{align*}

\end{itemize}

\end{document}

| improve this answer | | | | |
  • Awesome, thanks! Such a simple and silly mistake. – am4ci Dec 1 '19 at 18: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.