3

I'm looking for a way to replicate this "well enumerated equation": enter image description here

In particular, I want to be able to enumerate (i), (ii), ... the equations easily. I know I can somehow replicate this using (align + aligned)'s environments but it's hard to align everything correctlye (like this).

For now, I managed to do this (text in spanish but doesn't matter)

enter image description here

but the equations aren't centered and the space between these it's too much. The code for the image above is this:

\begin{multicols}{2}
    \begin{enumerate}[align = right, label = {(\roman{*})}]
    \item \Emph{Ley de Gauss:} $\dps\div\vE 
    = \frac{\rho}{\eps_0}$

    \item \Emph{Ecuaci\'on de Faraday-Lenz:}
    \begin{gather*}
        \rot\vE = -\pdv{\vB}{t}
    \end{gather*}

    \item $\div\vB = 0$
    
    \item \Emph{Ecuaci\'on de Amp\`ere-Maxwell:}
    \begin{gather*}
        \rot\vB = \mu_0 \vJ + \mu_0\eps_0 \pdv{\vE}{t}
    \end{gather*}
    \end{enumerate}
\end{multicols}

The big {} at the right of the first image is not needed. Some of the preamble I'm using in the document is the following:

\documentclass[12pt, openany]{book}

\renewcommand\sfdefault{cmss}
\renewcommand{\familydefault}{\sfdefault}

\usepackage{geometry}
\usepackage{fancyhdr}

\usepackage[italic = false]{derivative}
\usepackage{mathtools}

\newcommand{\dps}{\displaystyle}
\newcommand{\vB}{\vb{\barra{B}}}
\newcommand{\vE}{\vb{\barra{E}}}
\newcommand{\vJ}{\vb{\barra{J}}}
\newcommand{\vnulo}{\vb{\barra{0}}}

\RenewDocumentCommand{\div}{som}{%
    \IfBooleanTF{#1}{\nabla\IfValueT{#2}{#2}\vdot\qty#3}{\nabla\IfValueT{#2}{#2}\vdot#3}%
}
\NewDocumentCommand{\rot}{som}{%
    \IfBooleanTF{#1}{\nabla\IfValueT{#2}{#2}\times\qty#3}{\nabla\IfValueT{#2}{#2}\times#3}%
}

The answers doesn't have to fit the margins of any image. My ideal answer would have a mandatory argument (the equations) and an optional argument to modify the width (\textwidth or \linewidth, I'm not sure which one) of the equations. Thanks for reading and helping.

1
  • Without the answers given below, that would be me an idea but wouldn't answer my question complety (the equations are centered, far away the (i), (ii), ...
    – Peluche
    Nov 30, 2023 at 21:45

2 Answers 2

3

I'd avoid juggling with enumerate: it's just four items that you can safely number by hand.

My idea is to set a tabular and the bottom row parts enclosed in varwidth so the maximum width is only used. This exploits the symmetries in the equations, so the alignment is automatically right.

Next time, please, add the necessary definitions so as to make the example compilable. I couldn't make my head around the meaning of \dps.

\documentclass[a4paper,12pt]{book}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage[italic = false]{derivative}
\usepackage{geometry}
\usepackage{varwidth}

\geometry{margin=2cm}

\newcommand{\Emph}[1]{\textsf{\textbf{#1}}}
\newcommand{\vB}{\overline{\mathbf{B}}}
\newcommand{\vE}{\overline{\mathbf{E}}}
\newcommand{\vJ}{\overline{\mathbf{J}}}
\newcommand{\eps}{\varepsilon}
\newcommand{\rot}{\nabla\times}
\renewcommand{\div}{\nabla\cdot}
\newcommand{\dps}{}%<---- ???

\begin{document}

\begin{equation}
\left.
\begin{tabular}{@{}rl@{\qquad}rl}
(i)   & \Emph{Ley de Gauss:} $\dps\div\vE = \dfrac{\rho}{\eps_0}$ &
(iii) & $\div\vB = 0$ \\[3ex]
(ii)  & \begin{varwidth}[t]{0.5\displaywidth}\setlength{\abovedisplayskip}{1ex}
        \Emph{Ecuación de Faraday-Lenz:}
        \begin{equation*}
          \rot\vE = -\pdv{\vB}{t}
        \end{equation*}
        \end{varwidth} &
(iv)  & \begin{varwidth}[t]{0.5\displaywidth}\setlength{\abovedisplayskip}{1ex}
        \Emph{Ecuación de Ampère-Maxwell:}
        \begin{equation*}
          \rot\vB = \mu_0 \vJ + \mu_0\eps_0 \pdv{\vE}{t}
        \end{equation*}
        \end{varwidth}
\end{tabular}
\right\}
\end{equation}

\end{document}

enter image description here

2
  • Wild, wild guess: Given the output shown by the OP, \dps is an abbreviation for \displaystyle.
    – campa
    Nov 30, 2023 at 21:32
  • 1
    @campa Bingo! Well, completely unnecessary.
    – egreg
    Nov 30, 2023 at 21:39
4

Employing the machinery of the multicols package seems like overkill for the material at hand. Here's a solution that employs side-by-side minipage environments, each containing a two-item enumerate environment, inside an equation environment.

enter image description here

\documentclass{article}
\usepackage{enumitem,mathtools,bm}

\begin{document}

\begin{equation}
\begin{minipage}{0.3\textwidth}
\begin{enumerate}[label=(\roman*)]
\item $\displaystyle 
       \bm{\nabla}\cdot\mathbf{E} = \frac{1}{\epsilon_0}\rho$\,,
\item $\displaystyle
       \bm{\nabla}\cdot\mathbf{B}=0\,,
       \vphantom{\frac{\partial\mathbf{E}}{\partial t}}$
\end{enumerate}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{enumerate}[start=3,label=(\roman*)]
\item $\displaystyle
       \bm{\nabla}\times\mathbf{E}+\frac{\partial\mathbf{B}}{\partial t\vphantom{_0}} = \bm{0}\,,$
\item $\displaystyle
       \bm{\nabla}\times\mathbf{B}-\mu_0\epsilon_0\frac{\partial\mathbf{E}}{\partial t} = \mu_0\mathbf{J}\,.$
\end{enumerate}
\end{minipage}
\end{equation}

\end{document} 

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