5

As you can easily see from the attached image and code, I numbered each equation manually using \textbf. How do you have to proceed to have a correct automatic numbering of this type with a correct alignment?

Looking at the image and the code, each equation is not called by any command of type \eqref or \ref. I was thinking about the subequation package but at the moment I don't know how to make it aesthetically effective. Could you cordially help me out? Thank you.

enter image description here

\documentclass{article}
\usepackage{mathtools,amssymb}
\begin{document}
\begin{equation}\label{M1}
\left\{\begin{aligned}
&\overline \nabla \cdot \overline E=\frac{\rho}{\varepsilon_0},\,\textbf{(i)}& \quad \overline \nabla \times \overline E=-\frac{\partial \overline B}{\partial t},\,\textbf{(iii)}\\
&\overline \nabla \cdot \overline B=0,\,\textbf{(ii)}&\quad  \overline \nabla \times \overline B=\mu_0\overline J+\mu_0\varepsilon_0\frac{\partial \overline E}{\partial t}\,\,\textbf{(iv)}.\\
\end{aligned}\right.
\end{equation}

La \textbf{(i)} si riferisce alla \textit{legge differenziale di Gauss} (e di Coulomb), la \textbf{(ii)} alla \textit{non esistenza di monopoli magnetici}, la \textbf{(iii)} alla \textit{legge differenziale di Faraday} (Henry, Lenz) e la \textbf{(iv)} alla \textit{legge di Ampere generalizzata} o di Ampere--Maxwell.
\end{document}
  • 2
    A very similar question has been asked here (I'm not saying yours is a duplicate!) and, ironically, the equations were also the Maxwell equations. (My preferred solution would be to write dF=0 and d*F=j, which is much easier to number and more concise. ;-) – user121799 Oct 23 '18 at 22:44
  • @marmot I didn't know about this matter at all. It's yours and you certainly remember it :-). The numbering of the formulas I ask for is not based on numbers but on the bold letters i), ii), iii) and iv) with an optimal alignment of the formulas as in your previous question. You are allowed to change anything in my question. – Sebastiano Oct 23 '18 at 22:49
5

Here is an option where you insert the equation numbering manually (using \insertmanualtag{<num>}):

enter image description here

\documentclass{article}

\usepackage{mathtools,amssymb}

\newcounter{manualtag}[equation]
\renewcommand{\themanualtag}{\roman{manualtag}}%
\newcommand{\insertmanualtag}[1]{%
  \setcounter{manualtag}{\numexpr#1-1}%
  \refstepcounter{manualtag}%
  \mbox{\bfseries(\themanualtag)}%
}
\newcommand{\refmanualtag}[1]{\mbox{\bfseries(\ref{#1})}}

\makeatletter
\newcommand{\ltxlabel}{\ltx@label}
\makeatother

\begin{document}

\begin{equation}
  \label{M1}
  \left\{
    \begin{aligned}
      \overline{\nabla} \cdot \overline{E} &= \frac{\rho}{\varepsilon_0}, && \insertmanualtag{1}\ltxlabel{tag1} \qquad
        & \overline{\nabla} \times \overline{E} &= -\frac{\partial \overline{B}}{\partial t}, && \insertmanualtag{3}\ltxlabel{tag3} \\
      \overline{\nabla} \cdot \overline{B} &= 0,                          && \insertmanualtag{2}\ltxlabel{tag2} \qquad
        & \overline{\nabla} \times \overline{B} &= \mu_0 \overline{J} + \mu_0 \varepsilon_0 \frac{\partial \overline{E}}{\partial t}. && \insertmanualtag{4}\ltxlabel{tag4}
    \end{aligned}
  \right.
\end{equation}

La \refmanualtag{tag1} si riferisce alla \textit{legge differenziale di Gauss} (e di Coulomb), 
la \refmanualtag{tag2} alla \textit{non esistenza di monopoli magnetici}, 
la \refmanualtag{tag3} alla \textit{legge differenziale di Faraday} (Henry, Lenz) e 
la \refmanualtag{tag4} alla \textit{legge di Ampere generalizzata} o di Ampere--Maxwell.

\end{document}

I've mostly updated the code to spread things out nicely, also adding alignment to the set of equations within the braced expression.

3

I propose this, with some simplification of the code, and some improvements:

\documentclass{article}
\usepackage{mathtools,amssymb}

\begin{document}

\begin{equation}\label{M1}
\begin{dcases}
  \begin{aligned}
\overline \nabla \cdot \,\overline{\!E} & =\frac{\rho}{\varepsilon_0} & & \textbf{(i)}& \overline \nabla \times\, \overline{\!E} & =-\frac{\partial \,\overline{\! B}}{\partial t}, & & \textbf{(iii)}\\
\overline \nabla \cdot \,\overline{\!B} & =0, & & \textbf{(ii)}&\hspace{3em} \overline \nabla \times\,\overline{\!B} & = \mu_0\,\overline{\!J\,}\!+\mu_0\varepsilon_0\frac{\partial\, \overline{\!E}}{\partial t} & & \textbf{(iv)}.\\
\end{aligned}
\end{dcases}
\end{equation}

La \textbf{(i)} si riferisce alla \textit{legge differenziale di Gauss} (e di Coulomb), la \textbf{(ii)} alla \textit{non esistenza di monopoli magnetici}, la \textbf{(iii)} alla \textit{legge differenziale di Faraday} (Henry, Lenz) e la \textbf{(iv)} alla \textit{legge di Ampere generalizzata} o di Ampere--Maxwell.

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