chemnum v1.0 release candidate

Over the past few months I have been working on version 1.0 of my chemnum package. The version seems to be ready now. However, before I publish it I would appreciate very much some feedback.

There are a number of changes some of which are “breaking changes”. In order to ensure backwards compatibility the package will provide the package option version. Loading the package with

\usepackage[version=0]{chemnum}

will load the last version 0.* so people will be able to still work with the old version.

Some macro names have changed and also option names have changed. Indeed I have re-written the package from scratch. New features include

  • the command \cmpdplain{<id>} that reads label and writes it expandably without formatting. It is not able to parse a list. Its sole purpose is usage in pdfstrings (cf. \texorpdfstring{<tex>}{<pdfstring>}).
  • the command \refcmpd[<options>]{<id>} that only references a label similar to \cmpdplain but unexpandable and able to parse a list. It’s the same as \cmpd+
  • the commands \cmpdproperty and \subcmpdproperty that allow to retrieve specific properties of a label.
  • the command \newcmpdcounterformat with which additional counter formats can be added.
  • detailed logging messages: with the option log=verbose all available information on a label is writen to the log file when a label is declared.
  • the commands \cmpdshowdef, \cmpdshowref, \subcmpdshowdef, and \subcmpdshowref which are used internally to write information on the labels to the document similar to what the showkeys package does for references.
  • strict separation of options in groups depending on what aspect of a label they affect.
  • sub label lists are sorted so it doesn’t matter any more in which order they are written in \cmpd.
  • sub label lists are compressed when option compress=true is used (default). So you’ll get a label 1a-c instead of 1a,b,c automatically.

Now I would like some feedback: is everything working as described? Do the different kinds of options make sense? Anything else? You can get v1.0rc1 on my github page.

Edit 2014/02/06:

Feedback I got so far:

  • Add ordering for main lists, too, ie., for uses like \cmpd{a,b,c.{x,y},d}. — This is a good suggestion and will be added.
  • Common agreement on version 0.* is that everything is allowed to change. That would mean that I don’t need to bother too much with backwards compatibility. — I can see the point. And since the main functionality is the same the troubles probably aren’t too many, anyway. What do others think?

7 Comments

  1. Pingback: LaTeX und Chemie (5) – Nummerieren von Verbindungen: das chemnum Paket | TeXwelt

  2. Vlad

    Dear Clemens,

    I really like this package. I recently thought about an option to make lists of compounds:

    Say that, for example, all compounds are collected in a list (one that is slightly more useful than the one given in the *.cmpd file). This list could look like:

    \cmpd{one}
    \cmpd{two
    }
    ....

    This list could be used by the user to include for example IUPAC names and generate a list of compounds with names, manually

    Alternatively, one could add option to the \cmpd command like (probable better and more useful than the first suggestion):

    \cmpd{one}[name1]
    \cmpd{one
    }[name2]
    ...

    I guess it would be pretty straightforward to make something similar to the nomenclature package to print a list of compounds or compound names via

    \printcompoundlist

    or something like that.

    Cheers,
    Vlad

  3. Emmanuel

    Dear Clemens,

    Thanks for the nice work, I must say my PhD thesis relied quite a lot on your various packages, and saved me a lot of time and effort!

    While writing though, I noticed a nice addition would be to be able to reset the compound numbering at a given part, say every chapter, and automatically add the chapter number as prefix.

    I made a small python script to save me the effort of managing the list myself, but it was a bit of a hassle, since it was basically retrieving every compound, sorting them according to the prefix into two lists (synthesized and computed compounds) then made a huge cmpdlist at the top of the file, with the appropriate cmpdreset and settings.

    It worked quite nicely, but I assume this would be quite easy to add on the main numbering scheme side? I am myself not enough versed in LaTeX programming to check this…

    Another nice addition would be to be able to have several concurrent lists, i.e. 1, 2, 3… and A, B, C…, but this would probably require a bit more work I suppose.

    Anyway, thanks for the heavy work you put here !

    Emmanuel

  4. Vassy

    Hi!
    I updated to the 1.1 version of chemnum in my thesis. I was wondering if there was an updated command for ‘cmpd-suffix=’ when replacing text in schemes. I am trying to get something like “R=Me, ” in the scheme.

    Thanks,

    • I must say that it is not very clear to me what you want to achieve. However, since this is a blog post thread and not a support forum I suggest you ask your question including a minimal working example on TeX.sx or LaTeX community. Chances are I’ll see your question there and will hopefully better be able to answer it.

Leave a Reply

Your email address will not be published. Required fields are marked *