I'm trying to create a delocalized double bond, similar to the example given in the chemfig documentation. They suggest using the tikz library package {decorations} to implement this. Before running the actual chemfig code for the molecule, the documentation suggests this setup code:
\pgfdeclaredecoration{ddbond}{initial}
{
\state{initial}[width=4pt]
{
\pgfpathlineto{\pgfpoint{4pt}{0pt}}
\pgfpathmoveto{\pgfpoint{2pt}{2pt}}
\pgfpathlineto{\pgfpoint{4pt}{2pt}}
\pgfpathmoveto{\pgfpoint{4pt}{0pt}}
}
\state{final}
{
\pgfpathlineto{\pgfpointdecoratedpathlast}
}
}
\tikzset{lddbond/ .style={decorate, decoration=ddbond}}
\tikzset{rddbond/ .style={decorate, decoration={ddbond, mirror}}}
\setatomsep{4em}
After which, the standard chemfig syntax comes in:
\chemfig{[:-30]R-C-[::60]C(-[::60,,,,,rddbond]O)-[,,,,lddbond]N(-[::-60]C-R}
My problem: I Have no idea how to use tikz, or even what it is. I run this above code and get errors from my compiler saying ! Package pgfkeys Error: I do not know the key /tikz/lddbond/ .style' and I am
going to ignore it. Perhaps you misspelled it. How do I implement tikz to create these delocalized double bonds; or, how do I create a double bond without tikz?

/and.? – Claudio Fiandrino Jan 22 '14 at 14:57\usetikzlibrary{decorations}at the preamble. – pisoir Jan 29 '14 at 17:08