I've taken some liberties in interpreting what you're trying to accomplish here. For example, I assume that you will manually create the tag names for the LP blocks. Also, I think my solution lacks a certain elegance: in particular, each such block has to be created separately. I don't really like that.
Here's the general idea: create two adjacent boxes centered on the baseline with one containing a dummy equation to create the label for the entire block. Spacing after the boxes is a bit wonky. So, I add ~
after the last flalign
environment. (Short coming: you also have to manually adjust the width of the first parbox
to get the label to be positioned correctly.)
You seemed to want the first line to somehow align with the LP. I've got two solutions to that. The first puts the first line into a box of zero width. (Short coming: you have to re-enter math mode within this box.) The second puts this first line in its own flalign
environment. (Short coming: you have to adjust the vertical spacing between the two environments.)
\documentclass{article}
\usepackage{amsmath,calc}
\newlength{\LPlhbox}
\begin{document}
\settowidth{\LPlhbox}{(P.1)}%
\noindent%
\parbox{\LPlhbox}{\begin{align}
\tag{P.1}\label{My first LP Block}
\end{align}}%
\hspace*{\fill}%
\begin{minipage}{\linewidth-2cm}
\begin{flalign}\notag
& \makebox[0pt][l]{$\displaystyle{}\max \sum\limits_{v \in V} x_v + \sum\limits_{e \in E} y_e + 10000\gamma$} \\
\label{this line can be referenced}
& \text{s.t.} & x_v + x_w & \geq 0 && \forall \{v,w\} \in E && \\
& & y_3 & \geq 0 && \forall e\in E && \\
& & (\delta(U)) & \geq \frac{1}{2}(|U|-1) && \forall U \subseteq V
\end{flalign}~
\end{minipage}
\settowidth{\LPlhbox}{(P.2)}%
\noindent%
\parbox{\LPlhbox}{\begin{align}
\tag{P.2}\label{My second LP Block}
\end{align}}%
\hspace*{\fill}%
\begin{minipage}{\linewidth-2cm}
\begin{flalign}\notag
\max \sum\limits_{v \in V} x_v + \sum\limits_{e \in E} y_e + 10000\gamma &&
\end{flalign}
\vspace{-1.5\baselineskip}
\begin{flalign}
& \text{s.t.} & x_v + x_w & \geq 0 && \forall \{v,w\} \in E && \\
& & y_3 & \geq 0 && \forall e\in E && \\
& & (\delta(U)) & \geq \frac{1}{2}(|U|-1) && \forall U \subseteq V
\end{flalign}~
\end{minipage}
Notice that we can reference line~\ref{this line can be referenced}
and both block~\ref{My first LP Block} and block~\ref{My second LP Block}
\end{document}
What would be nice is if there were a commands \lefttag
and \righttag
to temporarily override document defaults.
You can also easily create a command to do the work of the left-hand box.
\newcommand{\LPblocktag}[2]{\settowidth{\LPlhbox}{(#1)}%
\parbox{\LPlhbox}{\begin{align}\tag{#1}#2\end{align}}%
\hspace*{\fill}}
I've written the second argument as I have because I don't want to assume you'll be referencing every such block.
So the first block above can be written as
\noindent%
\LPblocktag{P.3}{\label{My third LP Block}}%
\begin{minipage}{\linewidth-2cm}
\begin{flalign}\notag
& \makebox[0pt][l]{$\displaystyle{}\max \sum\limits_{v \in V} x_v + \sum\limits_{e \in E} y_e + 10000\gamma$} \\
\label{this line can be referenced}
& \text{s.t.} & x_v + x_w & \geq 0 && \forall \{v,w\} \in E && \\
& & y_3 & \geq 0 && \forall e\in E && \\
& & (\delta(U)) & \geq \frac{1}{2}(|U|-1) && \forall U \subseteq V
\end{flalign}~
\end{minipage}
I can reference \ref{My third LP Block}
Here are three possibilities; the first two are variants based on the flalign
environment, with a different positioning of the equations w.r.t.the left margin text. The third possibility paves the texts aligned w.r.t. each other, at some distance from the equations. It's based on alignat
:
\documentclass[a4paper, 12pt, default, numbered, print, index]{article}
\usepackage{mathtools}
\usepackage{eqparbox}
\newcommand{\eqmathbox}2[M]{\eqmakebox[#1]{$\displaystyle#2$}}
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<5><6><7><8><9><10>
<10.95><12><14.4><17.28><20.74><24.88>
mathx10
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\widebar}{0}{mathx}{"73}
\begin{document}
We can simplify our analysis by assuming the flow is inviscid ($\tau_{i,j}$ = 0), an ideal gas ($p = ρRT$), and calorically perfect ($c_p$, $c_v$ = constant). Thus, for a homogeneous, steady, uniform gas flow in a straight duct without heat conduction, the linearised governing equations can be written as:
\begin{subequations}
\begin{flalign}
\label{eq:linear_EOM_vector_mass}
& \rlap{Mass} & &\eqmathbox{\frac{\widebar{D}\rho'}{Dt} + \bar{ρ}∇ · \boldsymbol{u}' = \mathbf{0}} & \\[0.8ex]
\label{eq:linear_EOM_vector_mom}
& \rlap{Momentum} & &\eqmathbox{\frac{\widebar{D}\mathbf{u}'}{Dt} + \frac{1}{\bar{ρ}}
∇ p' = \mathbf{0}}
\end{flalign}
\end{subequations}
\begin{subequations}
\begin{flalign}
\label{eq:linear_EOM_vector_mass}
& \text{Mass} & & \frac{\widebar{D}\rho'}{Dt} + \bar{ρ}∇ · \boldsymbol{u}' = \mathbf{0} &\hspace{12em} \\[0.8ex]
\label{eq:linear_EOM_vector_mom}
& \text{Momentum} & & \frac{\widebar{D}\mathbf{u}'}{Dt} + \frac{1}{\bar{ρ}}
∇ p' = \mathbf{0}&&
\end{flalign}
\end{subequations}
\begin{subequations}
\begin{alignat}{2}
\label{eq:linear_EOM_vector_mass}
& \text{Mass} &\hspace{3em} &\frac{\widebar{D}\rho'}{Dt} + \bar{ρ}∇ · \boldsymbol{u}' = \mathbf{0} \\[0.8ex]
\label{eq:linear_EOM_vector_mom}
& \text{Momentum} & & \frac{\widebar{D}\mathbf{u}'}{Dt} + \frac{1}{\bar{ρ}}
∇ p' = \mathbf{0}
\end{alignat}
\end{subequations}
\end{document}
Edit: Here is how to adapt the first solution to the last version of the O.P.'s code (two variants):
\documentclass[a4paper,12pt,default,numbered,print,index]{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{graphicx} % Required for the inclusion of images
\usepackage{setspace} % for use of \singlespacing and \doublespacing
\usepackage{pdfpages}
\usepackage{cite}
\usepackage[section]{placeins}
\usepackage{comment}
\usepackage{siunitx}
\usepackage{color}
\usepackage{ragged2e}
\usepackage{esvect}
\usepackage{mathtools}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{array}
\usepackage{soul}
\usepackage{bm}
\usepackage{url}
\usepackage{xparse}
\usepackage{hyperref}
\newcommand{\myeqlabel}[1]{\rlap{\bfseries#1}}
\usepackage{eqparbox}
\newcommand{\eqmathbox}[2][M]{\eqmakebox[#1]{$\displaystyle#2$}}
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<5><6><7><8><9><10>
<10.95><12><14.4><17.28><20.74><24.88>
mathx10
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\widebar}{0}{mathx}{"73}
\begin{document}
We can simplify our analysis by assuming the flow is inviscid ($\tau_{i,j} = 0$), an ideal gas ($p = \rho RT$), and calorically perfect ($c_p$, $c_v$ = constant). Thus, for a homogeneous, steady, uniform gas flow in a straight duct without heat conduction, the linearised governing equations can be written as:
\begin{subequations}
\begin{flalign}
& \myeqlabel{Mass} &&
\eqmathbox{\frac{\widebar{D}\rho'}{Dt} + \bar{\rho}\,\nabla\cdot\boldsymbol{u}'
= \mathbf{0}} & \label{eq:linear_EOM_vector_mass}\\
& \myeqlabel{Momentum} &&
\eqmathbox{\frac{\widebar{D}\mathbf{u}'}{Dt} + \frac{1}{\bar{\rho}} \nabla p'
= \mathbf{0}} & \label{eq:linear_EOM_vector_mom}\\
& \myeqlabel{Energy} &&
\eqmathbox{c_p\frac{\widebar{D}}{Dt}(\bar{\rho}\,T' + \rho'\widebar{T}) + \nabla \cdot (\boldsymbol{u'}\bar{p} + \bar{\boldsymbol{u}}p')
= \dot{q}'\bar{\rho} + \bar{\dot{q}}\rho' }& \label{eq:linear_EOM_vector_energy}\\
& \myeqlabel{Entropy} &&
\eqmathbox{\frac{\widebar{D}s'}{Dt}
= \frac{\dot{q}'}{\bar{\rho}\,\bar{T}}} & \label{eq:linear_EOM_vector_entropy}\\
& \myeqlabel{Vorticity} &&
\eqmathbox{\frac{\widebar{D}\boldsymbol{\xi}'}{Dt}
= \mathbf{0}} & \label{eq:linear_EOM_vector_vorticity}
\end{flalign}
\end{subequations}
\begin{subequations}
\begin{flalign}
& \myeqlabel{Mass} &&
\eqmathbox{\frac{\widebar{D}\rho'}{Dt} + \bar{\rho}\,\nabla\cdot\boldsymbol{u}'
= \mathbf{0}} & \label{eq:linear_EOM_vector_mass}\\
& \textbf{Momen\rlap{tum}} &&
\eqmathbox{\frac{\widebar{D}\mathbf{u}'}{Dt} + \frac{1}{\bar{\rho}} \nabla p'
= \mathbf{0}} & \label{eq:linear_EOM_vector_mom}\\
& \myeqlabel{Energy} &&
\eqmathbox{c_p\frac{\widebar{D}}{Dt}(\bar{\rho}\,T' + \rho'\widebar{T}) + \nabla \cdot (\boldsymbol{u'}\bar{p} + \bar{\boldsymbol{u}}p')
= \dot{q}'\bar{\rho} + \bar{\dot{q}}\rho' }& \label{eq:linear_EOM_vector_energy}\\
& \myeqlabel{Entropy} &&
\eqmathbox{\frac{\widebar{D}s'}{Dt}
= \frac{\dot{q}'}{\bar{\rho}\,\bar{T}}} & \label{eq:linear_EOM_vector_entropy}\\
& \myeqlabel{Vorticity} &&
\eqmathbox{\frac{\widebar{D}\boldsymbol{\xi}'}{Dt}
= \mathbf{0}} & \label{eq:linear_EOM_vector_vorticity}
\end{flalign}
\end{subequations}
\end{document}
Best Answer
Add an alignment character at the end:
Note that in a regular
align
ment, you only use a single&
around the relation you wish to align with.To have all equations flush left, add the
fleqn
option to your document class (or the packages that use it, likeamsmath
):