Over the past few months I have been working on version 1.0 of my [cci]chemnum[/cci] 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 [cci]version[/cci]. Loading the package with [cce lang=”latex”]\usepackage[version=0]{chemnum}[/cce] 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 [cce inline=”true” lang=”latex”]\cmpdplain{}[/cce] 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. [cce inline=”true” lang=”latex”]\texorpdfstring{}{}[/cce]).
  • the command [cce inline=”true” lang=”latex”]\refcmpd[]{}[/cce] that only references a label similar to [cce inline=”true” lang=”latex”]\cmpdplain[/cce] but unexpandable and able to parse a list. It’s the same as [cce inline=”true” lang=”latex”]\cmpd+[/cce]
  • the commands [cce inline=”true” lang=”latex”]\cmpdproperty[/cce] and [cce inline=”true” lang=”latex”]\subcmpdproperty[/cce] that allow to retrieve specific properties of a label.
  • the command [cce inline=”true” lang=”latex”]\newcmpdcounterformat[/cce] with which additional counter formats can be added.
  • detailed logging messages: with the option [cci]log=verbose[/cci] all available information on a label is writen to the log file when a label is declared.
  • the commands [cce inline=”true” lang=”latex”]\cmpdshowdef[/cce], [cce inline=”true” lang=”latex”]\cmpdshowref[/cce], [cce inline=”true” lang=”latex”]\subcmpdshowdef[/cce], and [cce inline=”true” lang=”latex”]\subcmpdshowref[/cce] which are used internally to write information on the labels to the document similar to what the [cci]showkeys[/cci] 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 [cce inline=”true” lang=”latex”]\cmpd[/cce].
  • sub label lists are compressed when option [cci]compress=true[/cci] 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 [cce inline=”true” lang=”latex”]\cmpd{a,b,c.{x,y},d}[/cce]. — 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 thoughts on “chemnum v1.0 release candidate

  1. Vlad says:

    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:

    [cce lang=”latex”]\cmpd{one}
    \cmpd{two}
    ….[/cce]

    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 [cce inline=”true” lang=”latex”]\cmpd[/cce] command like (probable better and more useful than the first suggestion):

    [cce lang=”latex”]\cmpd{one}[name1]
    \cmpd{one}[name2]
    …[/cce]

    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

    [cce lang=”latex”]\printcompoundlist[/cce]

    or something like that.

    Cheers,
    Vlad

    1. cgnieder says:

      Hi Vlad,

      this very much reminds me of my substances package. The package very much is in an early development stage but it has some of the features you’re talking about.

      Best regards

  2. Emmanuel says:

    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

  3. cgnieder says:

    Hi Emmanuel.

    For a chapter related numbering see Chemnum: Chapter-related numbering? where it is explained how to achieve it with v1.0 and with earlier versions. With v1.0 it’s quite easy, actually.

    Different sets of labels can easily be obtained using the initiation mechanism, see Two sets of labels in chemnum. Doing it on the fly is not so easy I’m afraid.

    Regards

  4. Vassy says:

    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,

    1. cgnieder says:

      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 *