Personally, I wanted to have "Eq." in front of the equation numbering. Also, I wanted to have the section numbering in front of the equation, so that the equations are numbered as (Eq. 3.1) instead of (1).
Anyone knows whether this is possible?
Personally, I wanted to have "Eq." in front of the equation numbering. Also, I wanted to have the section numbering in front of the equation, so that the equations are numbered as (Eq. 3.1) instead of (1).
Anyone knows whether this is possible?
You should look into loading the mathtools package (which, incidentally, automatically loads the amsmath package) and use its \newtagform and \usetagform macros.
\documentclass{article}
\usepackage{mathtools}
\numberwithin{equation}{section} % how the equation numbers are formed
\newtagform{show_eq}{(Eq.\ }{)} % how the equation numbers are displayed
\usetagform{show_eq}
\begin{document}
\section{Introduction}
\begin{equation}
1+1=3?
\end{equation}
\begin{equation}
1+1\neq3
\end{equation}
\section{Some section or chapter without content...}
\section{Content!}
\begin{equation}
1+1=2
\end{equation}
\begin{equation}
1+2=3
\end{equation}
\end{document}
It is possible!
I started from How to change equation numbering style, but this MWE should be sufficient to help you out.
\documentclass{article}
\usepackage{amsmath} % \numberwithin{equation} doesn't exist without this package.
\numberwithin{equation}{section} % This line resets equation numbering when starting a new section.
\renewcommand{\theequation}{Eq. \thesection.\arabic{equation}} % This line ads "Eq." in front of your equation numbering.
\begin{document}
\section{Introduction}
\begin{equation}
1+1=3?
\end{equation}
\begin{equation}
1+1\neq3
\end{equation}
\section{Some section or chapter without content...}
\section{Content!}
\begin{equation}
1+1=2
\end{equation}
\begin{equation}
1+2=3
\end{equation}
\end{document}
Unfortunately, the order of lines is crucial, because it is possible to override \renewcommand{\theequation}{Eq. \thesection.\arabic{equation}} with \numberwithin{equation}{section}, and you only get (1.1).
Note that if \numberwithin{equation}{section} is left out, equation numbering continues after opening a new section, so it numbers like (Eq. 1.1), (Eq. 1.2), (Eq. 3.3), (Eq. 3.4), which is awkward.
\newtagform-\settagformroute is slightly more robust, as these instructions may be run either before of after\numberwithin{equation}{section}; your solution, in contrast, requires a specific loading sequence. – Mico Nov 29 '17 at 10:35