\cmpd+{}

Issue #9 invalid
Former user created an issue

Hi I am using chemnum to number the chemicals in the scheme as well in the text. So far everything went well...
However when I used the \cmpd+{} command for the titles and the caption the numbering got completly messed up though the whole text and I can not go back... I am really desperated and have no idea how to solve this problem do you have any suggestion? I would be really grateful.. Cheers Michelle

Comments (12)

  1. Clemens Niederberger repo owner

    Can you please provide a minimal working example with which I can reproduce the issue?

    Otherwise I can't even guess. This works as expected:

    \documentclass{article}
    \usepackage{chemnum}
    \begin{document}
    \tableofcontents
    
    \section{Compound \cmpd+{testB}}
    
    Compounds \cmpd{testA} and \cmpd{testB}
    
    \end{document}
    
  2. Clemens Niederberger repo owner

    Moved from issue 10

    The minimal working example works for me also as expected. However the problem arrived suddenly: The number of the compounds in the scheme was not in agreement anymore with the corresponding numbers in the text. And several compounds had the same number even though they were labeled differently... Do you have an idea what I could do to resolve the problem?

  3. Clemens Niederberger repo owner

    Moved from issue 11:

    Now I included several pictures in the Test file and suddenly the numbers do not fit anymore. For example in Figure 1 the scheme number 3 and 4 are wrong, they do not correspond anymore with the text...

  4. Manuela

    sorry that I opened so many new issues, I did not see how I can attach a file when I comment on an issue. Did the zip files help you to recognize my problem? And do you think that you can help me? Until I started using the \cmpd+{} I didn't have any problems with the numbering (I could number around 60 compunds correct like this) this is why I think that the \cmpd+{} command caused the problem... Thank you in advance!

  5. Clemens Niederberger repo owner

    I think you can't attach in a comment but you can edit the original issue. I hadn't had the time to look into it, yet. I'll have a look in a few hours

  6. Clemens Niederberger repo owner

    You have a typo in the section title

    \section{Compound \cmpd+{PProduc}}
    

    The last t is missing. If I correct it (and rearrange the replacement tags) I get a satisfactory result:

    \documentclass{article}
    \usepackage{graphicx}
    \usepackage{caption}
    \usepackage[runs=2]{auto-pst-pdf}
    \usepackage{auto-pst-pdf}
    \usepackage{chemnum}
    \usepackage{chemscheme}
    \begin{document}
    \tableofcontents
    \listofschemes 
    
    \section{Compound \cmpd+{PProduct}}
    
    \begin{scheme}[ht]
      \centering
      \cmpdref{Pimine}% TMP1
      \cmpdref{PAcetone}% TMP2
      \cmpdref[TMP4]{Phos}% TMP4
      \cmpdref[TMP3]{PProduct}% TMP3
      \includegraphics[scale=0.6]{./Figures/Terada1.eps}
      \caption{Aysmmetric Mannich reaction of of N-Boc-protected imine
        \cmpd+{Pimine} and acetyl acetone \cmpd+{PAcetone} in the presence of
        catalytic amounts of \cmpd+{Phos}.}
      \label{Terada}
    \end{scheme}
    
    This two molecules are the starting materials \cmpd{Pimine,PAcetone}
    whereas this is the catalyst \cmpd{Phos} and this is the product
    \cmpd{PProduct}.
    
    \end{document}
    

    http://i.imgur.com/Am0sbfG.png

  7. Manuela

    The problem I meant was in the second file: that the product in the scheme should be labeled with the number 4 but had the number 3, whereas the catalyst (the number above the reaction scheme) is labeled with the number 4 and should have the number 3... Correction of the typo in the title it did not solve this problem...

  8. Clemens Niederberger repo owner

    I did use the second one. Did you notice

      \cmpdref[TMP4]{Phos}% TMP4
      \cmpdref[TMP3]{PProduct}% TMP3
    

    \cmpdref is stupid: it just labels TMP1, TMP2, TMP3, ... in the order it is used. If a label doesn't exist at that point the number is created when \cmpdref is placed, i.e. in the order \cmpdref is used. Your scheme file »Terada1.eps« has TMP3 as product and TMP4 as catalyst. The strange default numbering is not chemnum's fault... hope it helps

  9. Manuela

    Oh sorry, yes I just noticed! Thank you for your fast answer and help! This mistake happened because I exchanged it in my thesis... there I really had this issue and when I exchanged the numbering in the chemdraw file it was correctly numbered... but wrong defined... I just did it to see what happened if I exchange it but I thought I would have exchanged it back... Sorry again..

    But what do I do when I really(!) have this issue in my thesis? Another problem is that several compounds are labeled in the schemes with the same number... I checked again carefully my thesis but I could not find any mistake or explanation... The numbering in the text works fine. It does just not correlate with the numbers in the scheme...

    can I may ask you to have a look at my thesis...? the minimum example file obviously didn't work...

  10. Clemens Niederberger repo owner

    This actually sounds more like an issue with the EPS file than with chemnum. I assume it is one scheme where this happens? Maybe email me (my address is in the documentation of chemnum and probably also somewhere on this site...) rather than comment here because so far this doesn't seem to be a bug with chemnum...

  11. Log in to comment