I've just installed TeX Live 2015 vanilla and I tried to compile some old sources just to be sure that everything worked. TeX Live works, but I have problems with some code that I've unashamedly stolen from a couple of sources on the net. I get a
! Package PGF Math Error: You've asked me to divide `18.70836' by `0.0', but I cannot divide any number by `0.0' (in ' 18.70836pt/ int(18.70836pt/\pgfdecorationsegmentlength )')
for something related to the wavy bond part. No wavy bonds in the document, no error. This is the WE, as minimal as it could get (not much):
\documentclass{article}
\usepackage{chemfig}
\usetikzlibrary{calc,decorations.pathmorphing}
% From https://tex.stackexchange.com/questions/134259/custom-decoration-along-curved-paths
\pgfdeclaredecoration{complete sines}{initial}{% tex.stackexchange.com/questions/25678/nicer-wavy-line-with-tikz/
\state{initial}[
width=+0pt,
next state=sine,
persistent precomputation={\pgfmathsetmacro\matchinglength{
\pgfdecoratedinputsegmentlength / int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)}
\setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
}] {}
\state{sine}[width=\pgfdecorationsegmentlength]{
\pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
\pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
\pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
\pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
}
\state{final}{}
}
% From http://www.texdev.net/2012/08/25/exploring-chemfig-customising-appearance/
% and http://www.texdev.net/2012/08/26/exploring-chemfig-going-further/
\newcommand{\bondwidth}{0.06642 em} % 'Line Width'
\setbondstyle{line width = \bondwidth}
\newcommand*{\bondboldwidth}{0.22832 em} %'Bold Width'
\newcommand*{\bondhashlength}{0.25737 em} % 'Hash Spacing'
\tikzset{
wavy bond/.style =
{
decorate,
decoration =
{
complete sines,
amplitude = \bondboldwidth,
post length = 0 pt,
pre length = 0 pt,
% Use the atom spacing: saved
segment length =
\the\dimexpr\csname CF@atom@sep\endcsname/5\relax
}
}
}
\begin{document}
\chemfig{A-[,,,,wavy bond]B}
\end{document}
Versions of the defendants:
chemfig.sty 2015/11/20 v1.2c Draw molecule with an easy syntax
tikz.sty 2015/08/07 v3.0.1a (rcs-revision 1.151)
pgf.sty 2015/08/07 v3.0.1a (rcs-revision 1.15)
Previously I was on TeX Live 2014 from the Ubuntu repos.
segment lengthwithout\dimexpr:segment length = \csname CF@atom@sep\endcsname/5– cgnieder Nov 30 '15 at 10:27