OK. the code I want if on page 11 and not 10. This is the source to my misunderstanding. This part start with explaining how to create a mhchem costume command in the equation environment so I skipped the end of this part. My mistake.
As for your code. I don't understand it completely. Is there a latex commands database to understand it? what does the @ or the $$ stand for?
Thanks.
LaTeX forum ⇒ General ⇒ chemical equation numbering
- localghost
- Site Moderator
- Posts: 9204
- Joined: Fri Feb 02, 2007 12:06 pm
yotama9 wrote:OK. the code I want if on page 11 and not 10. This is the source to my misunderstanding. This part start with explaining how to create a mhchem costume command in the equation environment so I skipped the end of this part. My mistake. […]
References are mostly to the current version of a manual available on CTAN.
yotama9 wrote:[…] As for your code. I don't understand it completely. Is there a latex commands database to understand it? what does the @ or the $$ stand for? […]
For the documentation of the LaTeX2e sources you can take a look at source2e (or a web search for source2e.pdf). The »at« sign protects important internal LaTeX commands and registers. It should be used very careful. The double dollar signs are a TeX command and enclose a displayed equation environment (not to be used in LaTeX syntax, see l2tabu).
Supplement:
In the meantime I was able to work out a more general solution that works with the standard classes. The relevant part of the code has to be modified as shown below.
\makeatletter \@definecounter{reaction} \def\reaction{$$\refstepcounter{reaction}} \def\endreaction{\eqno \hbox{\@reacnum}$$\@ignoretrue} \def\@reacnum{{\normalfont \normalcolor (\thereaction)}} \@ifundefined{chapter}% {\renewcommand\thereaction{C\,\@arabic\c@reaction}} {\@addtoreset{reaction}{chapter} \renewcommand\thereaction{C\,\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@reaction}} \makeatother
At the moment a starred version of the reaction environment is missing.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Thanks @localghost! Your method solved my problem
Who is online
Users browsing this forum: Bing [Bot] and 11 guests