0

I find the show-keys feature from chemnum super handy, as it allows me to keep track of all the plenty compounds I use throughout my document. But I ran into a hiccup, which I could not resolve: If I replace keys in .eps schemes generated by ChemDraw, the document crashes, when I use the option true or def. It does work with the option ref, but shows me the keys I declare in the scheme itself, not the referenced ones as indicated by the name. Plus, I need to use \replacecmpd+{key} to not crash the compilation. Outside the scheme, everything works fine and as intended. Is there a way to show all the keys in the scheme?

I just noticed while playing around, that the keys are being put into margin, when having them defined, could that be the cause for the crash? If yes, i would be fine with all the keys being put inside the scheme, similar to the refversion. I have no idea though, how to do it :D

\documentclass[english,
10pt,
]{scrreprt}

\usepackage{chemmacros} \usechemmodule{ spectroscopy, scheme, nomenclature, mechanisms, isotopes, }

\setchemnum{ replace-tag={X},%X<#> used as template tag, better visualization in chemdraw file than TMP<#> show-keys=ref, }

\usepackage[runs=2]{auto-pst-pdf}

\begin{document}

Here the numbers are defined: \cmpd{Garner_02} and \cmpd{Garner_04}

\begin{scheme}[htb] \centering \replacecmpd{Boc-ser-OMe} \replacecmpd+{Garner_02} \replacecmpd+{Garner_04} \replacecmpd{Garner_22} \includegraphics[scale=0.7]{garner_rxn} \caption{Synthesis of Garner's aldehyde~\cmpd+{Garner_04} and the corresponding Weinrebamide~\cmpd+{Garner_22}.} \end{scheme}

Here they are referenced: \cmpd{Garner_02} and \cmpd{Garner_04}

\end{document}

with the eps here (hopefully)

cgnieder
  • 66,645
  • If a package setup lets the compilation crash it is worth a report on the issue tracker: https://github.com/cgnieder/chemnum/issues – cgnieder Feb 12 '21 at 16:59
  • got it, submitted the report on github just now :) thx for letting me know. – danleich Feb 15 '21 at 15:34

0 Answers0