2

What are the possible alternatives to move within an environment, the second equation all on the left? Here there is my MWE:

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\begin{document}
\begin{align*}
F_{x}+q\left[\frac{\partial A_{x}}{\partial t}+\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}+\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}+\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= -q\frac{\partial\varphi}{\partial x}+q u_{x}\frac{\partial A_{x}}{\partial x}+q u_{y}\frac{\partial A_{y}}{\partial x}+q u_{z}\frac{\partial A_{z}}{\partial x}& \notag\\
\intertext{cioe'}
F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}+\frac{\partial A_{x}}{\partial t}\right]+u_{y}\left[\frac{\partial A_{y}}{\partial x}-\frac{\partial A_{x}}{\partial y}\right]-u_{z}\left[\frac{\partial A_{x}}{\partial z}-\frac{\partial A_{z}}{\partial x}\right]\right\}&.\notag\\
\end{align*}
\end{document}
  • 1
    You can place the & after both F_{x} i.e. F_{x}&+...\\\intertext{cioe'}\\F_{x}&=.... – manooooh Mar 20 at 21:58
  • 1
    why are you using align with no alignment points? If there is no alignment then you should use multlineor gather etc. – David Carlisle Mar 20 at 23:06
  • Since you're using the starred form of align, there's no need to add \notag. – barbara beeton Mar 20 at 23:26
2

I would place both & alignment points at the very beginning of each row.

Two additional remarks: (a) Placing the & symbols at the very end of each row is equivalent to not providing any alignments points at all which, in turn, means that that the equations will be aligned at the right-hand ends. (b) The \notag directives do nothing but create code clutter when used inside an align* environment.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[italian]{babel}
\usepackage[margin=2.5cm]{geometry} % choose suitable page size parameters
\usepackage{mathtools}

\begin{document}
\begin{align*}
&F_{x}+q\left[\frac{\partial A_{x}}{\partial t}
  +\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}
  +\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}
  +\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= 
  -q\frac{\partial\varphi}{\partial x}
  +q u_{x}\frac{\partial A_{x}}{\partial x}
  +q u_{y}\frac{\partial A_{y}}{\partial x}
  +q u_{z}\frac{\partial A_{z}}{\partial x}\\
\intertext{cio\`e}
&F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}
  +\frac{\partial A_{x}}{\partial t}\right]
  +u_{y}\left[\frac{\partial A_{y}}{\partial x}
  -\frac{\partial A_{x}}{\partial y}\right]
  -u_{z}\left[\frac{\partial A_{x}}{\partial z}
  -\frac{\partial A_{z}}{\partial x}\right]\right\}.
\end{align*}
\end{document}
4

There's no reason for using align without aligning things.

I'd go with a standard

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\begin{document}

\begin{equation*}
F_{x}+q\left[\frac{\partial A_{x}}{\partial t}+\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}+\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}+\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= -q\frac{\partial\varphi}{\partial x}+q u_{x}\frac{\partial A_{x}}{\partial x}+q u_{y}\frac{\partial A_{y}}{\partial x}+q u_{z}\frac{\partial A_{z}}{\partial x}
\end{equation*}
cioè
\begin{equation*}
F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}+\frac{\partial A_{x}}{\partial t}\right]+u_{y}\left[\frac{\partial A_{y}}{\partial x}-\frac{\partial A_{x}}{\partial y}\right]-u_{z}\left[\frac{\partial A_{x}}{\partial z}-\frac{\partial A_{z}}{\partial x}\right]\right\}.
\end{equation*}

\end{document}

If you want to align both F_x, the way is to fix the alignment point at them:

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\begin{document}

\begin{align*}
&F_{x}+q\left[\frac{\partial A_{x}}{\partial t}+\frac{\partial A_{x}}{\partial x}\frac{dx}{dt}+\frac{\partial A_{x}}{\partial y}\frac{dy}{dt}+\frac{\partial A_{x}}{\partial z}\frac{dz}{dt}\right]= -q\frac{\partial\varphi}{\partial x}+q u_{x}\frac{\partial A_{x}}{\partial x}+q u_{y}\frac{\partial A_{y}}{\partial x}+q u_{z}\frac{\partial A_{z}}{\partial x}\\
\intertext{cioè}
&F_{x}=q\left\{ -\left[\frac{\partial\varphi}{\partial x}+\frac{\partial A_{x}}{\partial t}\right]+u_{y}\left[\frac{\partial A_{y}}{\partial x}-\frac{\partial A_{x}}{\partial y}\right]-u_{z}\left[\frac{\partial A_{x}}{\partial z}-\frac{\partial A_{z}}{\partial x}\right]\right\}.
\end{align*}

\end{document}

Note that \notag is superfluous in align* that does not number equations in the first place. Also remember that there must not be a trailing \\, which would cause unwanted vertical space (and a spurious equation number with align).


Here's a polished version, with a macro instead of all those \partial commands, and the two options.

\documentclass[a4paper]{article}
\usepackage{mathtools}

\newcommand{\der}[2]{%
  \frac{d#1}{d#2}%
}
\newcommand{\pder}[2]{%
  \frac{\partial #1}{\partial #2}%
}

\begin{document}

\section{\texttt{align}}

\begin{align*}
&F_{x}+q\left[\pder{A_{x}}{t}+\pder{A_{x}}{x}\der{x}{t}
      +\pder{A_{x}}{y}\frac{dy}{dt}+\pder{A_{x}}{z}\der{z}{t}\right]
     =-q\pder{\varphi}{x}+q u_{x}\pder{A_{x}}{x}+q u_{y}\pder{A_{y}}{x}
      +q u_{z}\pder{A_{z}}{x}
\intertext{cioè}
&F_{x}=
  q\left\{
    -\left[\pder{\varphi}{x}+\pder{A_{x}}{t}\right]
    +u_{y}\left[\pder{A_{y}}{x}-\pder{A_{x}}{y}\right]
    -u_{z}\left[\pder{A_{x}}{z}-\pder{A_{z}}{x}\right]
  \right\}.
\end{align*}

\section{\texttt{equation}}

\begin{equation*}
F_{x}+q\left[\pder{A_{x}}{t}+\pder{A_{x}}{x}\frac{dx}{dt}
     +\pder{A_{x}}{y}\frac{dy}{dt}+\pder{A_{x}}{z}\frac{dz}{dt}\right]
    =-q\pder{\varphi}{x}+q u_{x}\pder{A_{x}}{x}+q u_{y}\pder{A_{y}}{x}
     +q u_{z}\pder{A_{z}}{x}
\end{equation*}
cioè
\begin{equation*}
F_{x}=
  q\left\{
    -\left[\pder{\varphi}{x}+\pder{A_{x}}{t}\right]
    +u_{y}\left[\pder{A_{y}}{x}-\pder{A_{x}}{y}\right]
    -u_{z}\left[\pder{A_{x}}{z}-\pder{A_{z}}{x}\right]
  \right\}.
\end{equation*}

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