# How can I reproduce the chemmacros logo style?

I'd like to reproduce the chemmacros logo style, as seen in chemmacros documentation

I checked the source .tex file, but the logo is loaded from another pdf "chemmacros-logo.pdf" that is nowhere to be found into TeX Live.

Since I'm assuming the logo is drawn with TikZ or something, is its code available somewhere?

-
Why not asking @cgnieder? He can often be found in the chat room? – percusse Aug 15 '14 at 13:41
@percusse Yes, I could, but maybe this may also be of general interest? If not I'll ask him in chat. – RbW Aug 15 '14 at 13:42
Can you be a bit more precise on what you define as logo style? All i see is the name written in bold and a dark red. – Johannes_B Aug 15 '14 at 13:44
@Johannes_B I mean the style of the formula below the email. That formula is the "chemmacros-logo" according to the .tex file. – RbW Aug 15 '14 at 13:46
Just noted it myself, good question ;-) – Johannes_B Aug 15 '14 at 13:47

Here's the code I used to produce the “logo”. The font is Augie, the redox arrows are drawn with chemmacros' own macros, the lines are decorated with @percusse's pencilline decoration (compile two times with xelatex):

% arara: xelatex
% arara: xelatex
\documentclass[margin=1cm]{standalone}
\usepackage{fontspec}
\usepackage{chemmacros}
\usetikzlibrary{calc,positioning,decorations.pathmorphing,patterns}

% credits:
% http://tex.stackexchange.com/a/49961/
\pgfdeclaredecoration{pencilline}{initial}{
\state{initial}[
width=+\pgfdecoratedinputsegmentremainingdistance,
auto corner on length=1mm
]{
\pgfpathcurveto%
{% From
\pgfqpoint
{\pgfdecoratedinputsegmentremainingdistance}
{\pgfdecorationsegmentamplitude}
}
{%  Control 1
\pgfmathrand
{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}
{%
\pgfqpoint
{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}%
{\pgfmathresult\pgfdecorationsegmentamplitude}
}
}
{%TO
{\pgfpointdecoratedinputsegmentlast}
{\pgfpoint{1pt}{1pt}}
}
}
\state{final}{}
}
\tikzset{pencil/.style={decorate,decoration=pencilline}}
\begin{document}
\ch[font-spec={Augie}]{
2 "\OX{o1,\ox{0,Na}}" + "\OX{r1,\ox{0,Cl}}" {}2
->
2 "\OX{o2,\ox{+1,Na}}" {}+ + 2 "\OX{r2,\ox{-1,Cl}}" {}-
}
\redox(o1,o2)[red,pencil,-cf]{%
\small\ch[font-spec={[Color=red]Augie},math-space=.3em]{$-$ 2 e-}}
\redox(r1,r2)[blue,pencil,-cf][-1]{%
\small\ch[font-spec={[Color=blue]Augie},math-space=.3em]{$+$ 2 e-}}
\end{document}


\setchemformula{ arrow-style = pencil }

will also draw the reaction arrow with the pencilline decoration. I might add this to the next version.
@percusse: sir I read penicillin instead of pencilline. :P – Paulo Cereda Aug 15 '14 at 21:59