5

So, essentially I want to do exactly what is shown here. This has worked beautifully for me using miktex under Windows, but now I'm working under Ubuntu and have just installed the 2020 version of TeX Live. Here, I get the error message Package pgf Error: No shape named 'arccenter' is known .... So I would interpret this in a way that some of the internal workings of chemfig have changed so that the center of the ring is no longer called 'arccenter'? Is there a new name for that node that I could specify?

MWE:

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}

\begin{document}

\chemfig[atom sep=.9cm]{**[,,,late options={name=arccenter,label=center:+}]5(-----)}

\end{document}

(I would have preferred to just add a comment to the existing question, however, I don't have enough reputation...

  • @Sebastiano Yes, but not being documented doesn't mean it's not there. This has worked before. And still does, but only on my Windows machine – NoBullsh1t Jul 17 '20 at 22:39
  • Strange situation, but couldn't you make an alert for this bug on Ubuntu on a specific site? +1 for your question. – Sebastiano Jul 17 '20 at 22:41
  • 1
    @Sebastiano I would be very surprised if this was Ubuntu related. Like I said, I think most likely its's the chemfig version – NoBullsh1t Jul 17 '20 at 22:42
  • Btw. in that question https://tex.stackexchange.com/questions/156483/plus-sign-in-the-middle-of-a-ring/156500 you have also answers which do not require arccenter. – pisoir Jul 20 '20 at 20:16

2 Answers2

7
  • Until chemfig v1.55, node arccenter is defined per arced ring.
  • In chemfig v1.56 (updated on 13 July 2020), nodes at the center of rings are named cyclecenter<n>. Here <n> is 1, 2, 3, ... which indicates the center of <n>th ring in one \chemfig.
  • For source code changes, see diff of chemfig.tex between v1.55 and v1.56 (open and search for arccenter), from TeX Live's SVN repository.
  • For official documentation and usage examples about cyclecenter<n>, see manual of chemfig v1.56, section 12.6.

Therefor, with chemfig v1.56, just replace node name arccenter with cyclecenter1.

\documentclass{article}
\usepackage{chemfig}

\begin{document} \chemfig{**[0,-150,dash pattern=on 2pt off 2pt, late options={name=cyclecenter1,label=center:+}]5(-----)} \end{document}

enter image description here

muzimuzhi Z
  • 26,474
  • Very interesting and complete answer. – Sebastiano Jul 18 '20 at 08:02
  • Yes! Thank you very much for the solution and also the pointers on how to approach this in the future! There's an interesting combination of typos in the current docs describing this approach :) – NoBullsh1t Jul 20 '20 at 13:39
  • @NoBullsh1t You can report typos found in package manual to https://framagit.org/unbonpetit/chemfig/-/issues. Or you can mention them here and I can report for you. – muzimuzhi Z Jul 20 '20 at 18:17
  • Stumbled about it after updating to TeXlive 2020, thanks for clarifying ... – Erich Kuester Aug 03 '20 at 21:46
1

I have used TeXLive 2019 (Papeeria) OS W8.1 and this MWE works correctly:

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

\chemfig{**[0,-150,dash pattern=on 2pt off 2pt, late options={name=arccenter,label=center:+}]5(-----)} \end{document}

enter image description here

Sebastiano
  • 54,118