# Inserting Text inside Equation

I'm trying to insert text inside an equation in a way not properly covered by the amsmath documentation. These solutions cover inserting text between equations, and I'm trying to insert it in the middle of an aligned statement:

\begin{align}
\shortintertext{on F,}
\frac{\partial}{\partial z} (\mathfrak{E}_z^e+\mathfrak{E}_z^b) = 0, \quad \frac{\partial}{\partial z}  (\mathfrak{B}_x^e&+\mathfrak{B}_x^b) = 0,\quad \frac{\partial}{\partial z} (\mathfrak{E}_z^e+\mathfrak{E}_z^b) = 0
\end{align}


Which compiles to this:

I'd like for the two statements to be both numbered (5), that is, that the number 5 appear on the line in the middle (on F,), and that the two other numbers disappear as a result.

• I don't think this will be understandable by your readers. What would the number refer to? – egreg Jun 1 '15 at 16:50

A really dirty trick, as soon as you change the numbering scheme, this will break like glass.

\documentclass{article}
\usepackage{mathtools}
\usepackage{showframe}
\def\mathfrak#1{#1}%<- I simply cannot remember which package is needed, and it is not relevant to the question.
\begin{document}
\begin{align}
\mathfrak{B}_z^e+\mathfrak{B}_z^b = 0
\shortintertext{on F,}
\frac{\partial}{\partial z}
\frac{\partial}{\partial z}
\frac{\partial}{\partial z}
(\mathfrak{E}_z^e+\mathfrak{E}_z^b) = 0
\end{align}
\begin{align*}
\refstepcounter{equation}
\mathfrak{B}_z^e+\mathfrak{B}_z^b = 0
\shortintertext{on F,\hfill(\theequation)}
\frac{\partial}{\partial z}
\frac{\partial}{\partial z}
\frac{\partial}{\partial z}
(\mathfrak{E}_z^e+\mathfrak{E}_z^b) = 0
\end{align*}
\end{document}


here's another dirty trick. (not sure why you used align; gather seems more appropriate to me. but aligned should work as well here.)

\documentclass{article}
\usepackage{mathtools,amsfonts}
\begin{document}
\begin{align}
$$\begin{gathered} \mathfrak{E}_x^e+\mathfrak{E}_x^b = 0, \quad \mathfrak{E}_y^e +\mathfrak{E}_y^b = 0, \quad \mathfrak{B}_z^e+\mathfrak{B}_z^b = 0\\ \makebox[.5\textwidth]{\llap{\kern-.5\textwidth\rlap{on F,}\hfil}\null\hfill}\\ \frac{\partial}{\partial z} (\mathfrak{E}_z^e+\mathfrak{E}_z^b) = 0, \quad \frac{\partial}{\partial z} (\mathfrak{B}_x^e +\mathfrak{B}_x^b) = 0,\quad \frac{\partial}{\partial z} (\mathfrak{E}_z^e+\mathfrak{E}_z^b) = 0 \end{gathered}$$