chemmacros update

I’ve been working on chemmacros for a while now and finally have submitted v2.0 to CTAN. There have been quite some changes. The most notable one: chemmacros v2.0 is not backwards compatible, unfortunately. However, a package option \usepackage[version=1]{chemmacros} is provided, which restores all deleted commands, so that you can still compile your documents set with v1.*.

What’s new?

  • customization via a key-value system
  • a better handling of real charges vs. formal charges
  • a far more flexible handling of oxidation numbers
  • displaying of orbitals
  • a few new macros
  • bug fixes

Some examples:

\documentclass{article}
\usepackage{chemmacros}
\begin{document}

\ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}

{
\chemsetup[ox]{explicit-sign}
\ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}
}

{
\chemsetup[ox]{pos=super}
\ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}
}

{
\chemsetup[ox]{roman=false}
\ox{+1,Na}, \ox{2,Ca}, \ox{-2,S}, \ox{-1,F}
}

\ox{1/3,I3+}
\end{document
}

\documentclass{article}
\usepackage{chemmacros,chemfig}
\begin{document}

\orbital{s} \orbital{p} \orbital{sp} \orbital{sp2} \orbital{sp3}

\vspace{2cm}\hspace{2cm}
\setbondoffset{0pt}
\chemsetup[orbital]{
overlay ,
opacity = .75 ,
p/scale = 1.6 ,
s/color = blue!50 ,
s/scale = 1.6
}
\chemfig{\orbital{s}-[:-20]{\orbital[scale=2]{p}}{\orbital[half,angle=0]{p}}{\orbital[angle=170,half]{p}}{\orbital[angle=-150,half]{p}}(-[:-150]\orbital{s})-\orbital{s}}

\end{document
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>