Before asking my question I have several related issues concerning chemfig and chemmacros packages.
While defining a new scheme environment (link) for chemfig, I keep having Errors if I have chemacros also loaded.
- Are they incompatible?
- While chemmacros is very fine for equations represented by chemical formulas it cannot draw anything and chemfig is suitable doing that. Is there any way to have both of them at the same time? Can chemfig do what chemmacros does and write chemical formulas too?
I'm really confused!
- How can I number each reaction in an scheme environment using chemfig? Example:
Scheme 1 1) Nitration 2) Reduction
MWE:
\documentclass[titlepage, 12pt]{article}
%\documentclass[titlepage, 17pt]{extarticle} for larger font sizes
\usepackage{geometry}
\geometry{
a4paper,
total={8.5 in,11 in},
left=1 in,
top=1 in,
right=1 in,
bottom=1 in,
}
\usepackage{setspace}
\doublespacing
\usepackage{graphicx}
\usepackage[version=4]{mhchem}
\usepackage{cite}
\usepackage{fancyhdr}
%\lhead{Pre-Proposal - Ardalan Hayatifar}
%\rhead{Addendum}
\pagestyle{fancy}
% For ACS citation Style
\usepackage{achemso}
\usepackage{lipsum}
% use other useful chemistry tools, too, e.g. the handy \ch command:
\usepackage{chemmacros}
\usechemmodule{reactions}
\usepackage{chemfig}
%for Scheme float
\usepackage{float}
\newfloat{scheme}{hbp}{los}
\floatname{scheme}{Scheme}
% customize captions, define floating scheme environment:
\usepackage{caption}
\begin{document}
\begin{reaction}
A + B -> C + D
\end{reaction}
\begin{scheme}
\schemestart
\chemfig{C(-[:0]{}|{\color{red}H})(-[:90]H)(-[:180]H)(-[:270]H)}
\+\chemfig{{}|{\color{blue}Cl_2}}
\arrow{->[\( h\nu \)][]}
\chemfig{C(-[:0]{}|{\color{blue}Cl})(-[:90]H)(-[:180]H)(-[:270]H)}
\+\chemfig{{\color{red}H}(-[:0]{}|{\color{blue}Cl})}
\schemestop
\caption{bla bla}
\label{sch1}
\end{scheme}
\end{document}