General ⇒ question on equation numbering
question on equation numbering
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
question on equation numbering
Code: Select all
...
\newcounter{SchemeCounter} \renewcommand\theSchemeCounter{\thechapter.\Roman{SchemeCounter}}
\newenvironment{scheme}%
{\stepcounter{SchemeCounter}\begin{center}\hspace{\fill}$\phantom{(\theSchemeCounter)}}%
{$\hspace*{\fill}\nolinebreak[3](\theSchemeCounter)\end{center}}
...
\begin{document}
...
\chapter{Test Chapter}
...
\begin{scheme}
Insert equation here
\end{scheme}
Before starting the environment, step the counter, start centering, and put a rubber space on the left hand side, puts things into math mode, and adds an invisible counter on the left to get the spacing right.
After the environment is over, fill the right with a rubber space, don't allow a line break unless really necessary, and then put the counter in parenthesis.
Hope this helps...
Enjoy!
question on equation numbering
Replace the previous newenvironment with:
Code: Select all
\newenvironment{scheme}%
{\stepcounter{SchemeCounter}\[}%
{\tag{\theSchemeCounter}\]}
For anyone else reading this, in the interest of full disclosure, I share an office with mollyc, but I'm just posting what we figured out after going meticulously through LaTeX Companion 2nd ed. by Mittlebach & Goosens and LaTeX by Leslie Lampoort. I figured that someone else might be interested in our code fu.