Considering my previous question at this link One or more equations (two-by-two on different rows) with an enumerate to the left and the another on the right, I have a strange alignment behavior of two numbered equations on the same line. In other words there is an overhang between the (0.0-3) and (0.0-4) equations.
How can the problem be corrected?
Here there is the MWE and the relative output:
\documentclass{book}
\usepackage[top=2.5cm,bottom=2.2cm,
left=3.2cm,right=1.5cm,headsep=10pt,
a4paper]{geometry}
\usepackage{mathtools,amssymb}
\usepackage[svgnames, dvipsnames, table, x11names]{xcolor}
\usepackage{pifont}
\usepackage{tabularx}
\definecolor{ocre}{RGB}{243,102,25}
\usepackage{lipsum} %%%%%%%%%%% <--------- added
%----------------------------------------------------------------------------------
% Change number equations with sections
%----------------------------------------------------------------------------------
\usepackage{chngcntr}
\counterwithin{equation}{section}
\renewcommand{\theequation}{\thesection-\arabic{equation}}
\newcommand{\eqnnumsymbol}{\textcolor{ocre}{\reflectbox{\ding{228}}}}
\makeatletter
\newtagform{bbrackets}% <name>
[\textbf]% Internal style
{(}% Left bracket
{\ifnum\pdfstrcmp{\@currenvir}{equation}=0
\eqnnumsymbol%
\else
\ifnum\pdfstrcmp{\@currenvir}{align}=0
\eqnnumsymbol%
\fi
\fi
)}% Right bracket
\makeatother
\usetagform{bbrackets}
\begin{document}
\lipsum[5][2-3]
\begin{tabularx}{\textwidth}{@{}XXX@{}}
\begin{equation}
f(x + y) = f(x) + f(y),
\label{eqn:1}
\end{equation} &
\begin{equation}
f(ax) = af(x),\,
x,y\in V, a\in\mathbb{C}
\label{eqn:2}
\end{equation}
\end{tabularx}
\lipsum[6][8-9]
\begin{tabularx}{\textwidth}{@{}XXX@{}}
\begin{equation}
\overline{E}= -\overline \nabla \varphi-\frac{\partial \overline{A}}{\partial t}
\label{eqn:3}
\end{equation} &
\begin{equation}
\overline{B}=\overline \nabla \times\overline{A}
\label{eqn:4}
\end{equation}
\end{tabularx}
\end{document}
Output:
\noindent
before the\begin{tabularx}
(see the 15pt warnings in the log) and you declare three columns but only use two.\noindent
. Into my structure there is no this problem. After I have@{}XXX@{}
used directly the code from Stefan Kottwitz's answer tex.stackexchange.com/questions/33433/…vphantom
:\overline{B}=\overline \nabla \times\overline{A}\vphantom{-\frac{\partial \overline{A}}{\partial t}}
.XXX
as he had three equations per line, so three columns in the table.