3

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}
\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
\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:

enter image description here

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.

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

2 Answers 2

3

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

nimrodNumberAlign

\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{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
    \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}
\begin{align*}
    \refstepcounter{equation}
    \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
    \shortintertext{on F,\hfill(\theequation)}
    \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*}
\end{document}
0
3

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}
\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
\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}
some text
\begin{equation}
\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}
\end{equation}
\end{document}

output of example code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .