# Align equations separated by paragraphs

I would like to align equations separated by paragraphs while retaining there auto-generated label and \listof label for after the toc. How would I align these equations and keep the \listofmyequations and \label intact?

\documentclass[11pt,a4paper,twoside,openright,fleqn,%
numbers=noenddot,cleardoublepage=empty]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[notlof,notlot,notbib]{tocbibind}
\usepackage{tocloft}
\usepackage{amsmath,amssymb,amsthm}
%\usepackage[ruled,vlined,algochapter,linesnumbered]{algorithm2e}
\usepackage{pdfpages}
%-- colours for the hyperlinks
%\usepackage[usenames,dvipsnames]{xcolor}

\newcommand{\listequationsname}{List of Equations}

\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%

\begin{document}

\listofmyequations

\chapter{Precision and Accuracy}

The precision, or repeatability, and a paragraph of words here:

$$\label{eq:std} \sigma = \sqrt{\frac{\sum_{i=1}^{n}(x_{i,j} - \bar{x})^{2}}{n-1}}$$
\myequations{Standard Deviation}
where $$i$$ is the epoch number, $$j$$ is the $$x$$,$$y$$ and $$z$$ component, $$x_{i,j}$$ is the measurement at the epoch of observation, $$\bar{x}$$ is the mean of $$j$$ measurements and $$n$$ is the total number of epochs.

Then some words about Accuracy for a paragraph or so:
$$\label{eq:rms} RMS_{x,\,y \,or\, z} = \sqrt{\frac{\sum_{i=1}^{n}(P_{i}-O)^{2}}{n}}$$
\myequations{Root Mean Square}

Furthermore; some words about 2-dimensional RMS or 2DRMS:
$$\label{eq:2drms} 2DRMS = 2 * \sqrt{ RMS_{x}^{2} + RMS_{y}^{2}}$$
\myequations{Distance Root Mean Square}

where $$RMS_{x}$$ and $$RMS_{y}$$ are the RMS for the $$x$$ and $$y$$  components respectively.

Lastly; a paragraph or so about Mean Radial Spherical Error:
$$\label{eq:mrse} MRSE = \sqrt{ RMS_{x}^{2} + RMS_{y}^{2} + RMS_{u}^{2}}$$
\myequations{Mean Radial Spherical Error}

where $$RMS_{x}$$, $$RMS_{y}$$ and $$RMS_{z}$$ are the RMS for the $$x$$, $$y$$ and $$z$$ components respectively.

\end{document}


I have tried \intertext and \shortintertext but failed. Perhaps I am placing these incorrectly. I don't know.

In your MWE replace

\usepackage{amsmath,amssymb,amsthm}


with

\usepackage[fleqn,reqno]{amsmath}
\setlength{\mathindent}{3pc} % or another length to suit you
\usepackage{amssymb,amsthm}

• your answer indents the equations. I would like to align the equations please. Apr 26, 2022 at 20:21
• @arkriger I took "align" to mean that the start of each equation was the same distance from the lefthand margin' which is what my answer provided. I had no idea, as shown in the other answer, that you wanted the "=" signs to be vertically aligned. Apr 27, 2022 at 18:21

The solution was to remove the equation and go with align and \intertext{ with \myequations{name of the equation} inside the intertext}.

This might be a bit long-winded but keeps the \listofmyequations intact and references the auto-generated \label correctly.

\documentclass[11pt,a4paper,twoside,openright,fleqn,%
numbers=noenddot,cleardoublepage=empty]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[left=15mm,top=10mm]{geometry}
\usepackage[notlof,notlot,notbib]{tocbibind}
\usepackage{tocloft}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{pdfpages}

%-- colours for the hyperlinks
\setlength{\parindent}{2pc}

\newcommand{\listequationsname}{List of Equations}

\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%

\begin{document}

\listofmyequations

\chapter{Precision and Accuracy}

The precision, or repeatability, and a paragraph of words here:

\begin{align}
STD &= \sqrt{\frac{\sum_{i=1}^{n}(x_{i,j} - \bar{x})^{2}}{n-1}}    \label{eq:std}
\intertext{\myequations{Standard Deviation} \noindent where $$i$$ is the epoch number, $$j$$ is the $$x$$,$$y$$ and $$z$$ component, $$x_{i,j}$$ is the measurement at the epoch of observation, $$\bar{x}$$ is the mean of $$j$$ measurements and $$n$$ is the total number of epochs.}
\intertext{\indent Then some words about Accuracy for a paragraph or so:}
RMS_{x,\,y \,or\, z} &= \sqrt{\frac{\sum_{i=1}^{n}(P_{i}-O)^{2}}{n}}  \label{eq:rms}
\intertext{ \myequations{Root Mean Square}  \noindent where $$x$$,$$y$$ and $$z$$ are the horizontal and vertical coordinate components, $$P$$ is the measured Real-Time ppp value, $$O$$ the \emph{true} reference value, $$i$$ is the epoch of observation and $$n$$ is the total number of epochs.}
\intertext{\indent Furthermore; some words about 2-dimensional RMS or 2DRMS:}
2DRMS &= 2 * \sqrt{ RMS_{x}^{2} + RMS_{y}^{2}} \label{eq:2drms}
\intertext{\myequations{Distance Root Mean Square}  \noindent where $$RMS_{x}$$ and $$RMS_{y}$$ are the RMS for the $$x$$ and $$y$$  components respectively.}
\intertext{\indent Lastly; a paragraph or so about Mean Radial Spherical Error:}
MRSE &= \sqrt{ RMS_{x}^{2} + RMS_{y}^{2} + RMS_{u}^{2}} \label{eq:mrse}
\end{align}
\myequations{Mean Radial Spherical Error}
\noindent where $$RMS_{x}$$, $$RMS_{y}$$ and $$RMS_{z}$$ are the RMS for the $$x$$, $$y$$ and $$z$$ components respectively.
\end{document}


• where should not be indented. Apr 27, 2022 at 17:50
• @Sigur You are right. thank you. \noindent added. Apr 29, 2022 at 15:20
• The problem is the vertical spaces between equations and texts. It is not natural, IMO. Apr 29, 2022 at 15:42
• @Sigur you could try \vspace{some value} before the \indent or \noindent. Apr 30, 2022 at 8:57

A small variation of OP answer (+1), which result (to my opinion) in better looking page. You may find the following suggestions useful:

• redefined is \myequations
• successive intertext are merged in one
• defined is new command for simulating paragraphs in \intertext
\documentclass[11pt,a4paper,twoside,openright,fleqn,%
numbers=noenddot,cleardoublepage=empty]{scrbook}
\usepackage{geometry}
\usepackage[notlof,notlot,notbib]{tocbibind}
\usepackage{tocloft}
\usepackage{amsmath,amssymb,amsthm}

\usepackage{lipsum}

\usepackage{pdfpages}

\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\newcommand\inl{
\setlength{\parindent}{2pc}

\begin{document}
\listofmyequations

\chapter{Precision and Accuracy}
The precision, or repeatability, and a paragraph of words here:
\begin{align}
STD &= \sqrt{\frac{\sum_{i=1}^{n}(x_{i,j} - \bar{x})^{2}}{n-1}}     \label{eq:std}
\intertext{\myequations{Standard Deviation}
where $$i$$ is the epoch number, $$j$$ is the $$x$$,$$y$$ and $$z$$ component, $$x_{i,j}$$ is the measurement at the epoch of observation, $$\bar{x}$$ is the mean of $$j$$ measurements and $$n$$ is the total number of epochs.
\newline\indent
Then some words about Accuracy for a paragraph or so:}
\mathrm{RMS}_{x,\,y \,\mathrm{or}\, z}
& = \sqrt{\frac{\sum_{i=1}^{n}(P_{i}-O)^{2}}{n}}                \label{eq:rms}
\intertext{\myequations{Root Mean Square}
where $$x$$,$$y$$ and $$z$$ are the horizontal and vertical coordinate components, $$P$$ is the measured Real-Time ppp value, $$O$$ the \emph{true} reference value, $$i$$ is the epoch of observation and $$n$$ is the total number of epochs.
\newline\indent
Furthermore; some words about 2-dimensional RMS or 2DRMS:}
2\mathrm{DRMS}
& = 2 * \sqrt{ RMS_{x}^{2} + RMS_{y}^{2}}                       \label{eq:2drms}
\intertext{\myequations{Distance Root Mean Square}
\noindent where $$RMS_{x}$$ and $$RMS_{y}$$ are the RMS for the $$x$$ and $$y$$  components respectively.
\newline\indent
Lastly; a paragraph or so about Mean Radial Spherical Error:}
\mathrm{MRSE}
& = \sqrt{ RMS_{x}^{2} + RMS_{y}^{2} + RMS_{u}^{2}}             \label{eq:mrse}
\end{align}\myequations{Mean Radial Spherical Error}
where $$\mathrm{RMS}_{i},\; i\in\{x,y,z\}$$ are the RMS for the $$x$$, $$y$$ and $$z$$ components respectively.

\lipsum[66]
\end{document}


Edit: However, it is not clear, why is needed such complicated structure of this equation. That equation on this page are aligned at =?

Well, this is mater of personal taste. I do not see any advantages. More usual way of writing text at least is much simpler and consequently less error prone:

\documentclass[11pt,a4paper,twoside,openright,fleqn,%
numbers=noenddot,cleardoublepage=empty]{scrbook}
\usepackage{geometry}
\usepackage[notlof,notlot,notbib]{tocbibind}
\usepackage{tocloft}
\usepackage{amsmath,amssymb,amsthm}

\usepackage{lipsum}

\usepackage{pdfpages}

\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\setlength{\parindent}{2pc}

\begin{document}
\listofmyequations

\chapter{Precision and Accuracy}
The precision, or repeatability, and a paragraph of words here:
$$\label{eq:std} STD = \sqrt{\frac{\sum_{i=1}^{n}(x_{i,j} - \bar{x})^{2}}{n-1}}$$\myequations{Standard Deviation}
where $$i$$ is the epoch number, $$j$$ is the $$x$$,$$y$$ and $$z$$ component, $$x_{i,j}$$ is the measurement at the epoch of observation, $$\bar{x}$$ is the mean of $$j$$ measurements and $$n$$ is the total number of epochs.

Then some words about Accuracy for a paragraph or so:
$$\label{eq:rms} \mathrm{RMS}_{x,\,y \,\mathrm{or}\, z} = \sqrt{\frac{\sum_{i=1}^{n}(P_{i}-O)^{2}}{n}}$$\myequations{Root Mean Square}
where $$x$$,$$y$$ and $$z$$ are the horizontal and vertical coordinate components, $$P$$ is the measured Real-Time ppp value, $$O$$ the \emph{true} reference value, $$i$$ is the epoch of observation and $$n$$ is the total number of epochs.

Furthermore; some words about 2-dimensional RMS or 2DRMS:
$$\label{eq:2drms} 2\mathrm{DRMS}= 2 * \sqrt{ RMS_{x}^{2} + RMS_{y}^{2}}$$\myequations{Distance Root Mean Square}
where $$RMS_{x}$$ and $$RMS_{y}$$ are the RMS for the $$x$$ and $$y$$  components respectively.

Lastly; a paragraph or so about Mean Radial Spherical Error:
$$\label{eq:mrse} \mathrm{MRSE} = \sqrt{ RMS_{x}^{2} + RMS_{y}^{2} + RMS_{u}^{2}}$$\myequations{Mean Radial Spherical Error}
where $$\mathrm{RMS}_{i},\; i\in\{x,y,z\}$$ are the RMS for the $$x$$, $$y$$ and $$z$$ components respectively.

\lipsum[66]
\end{document}
`