From 88c3cc5581852fce4c08c3d1494dbe90acb3ac87 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 10 Aug 2014 22:22:37 +0000 Subject: chemnum (9aug14) git-svn-id: svn://tug.org/texlive/trunk@34894 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/chemnum/chemnum_en.pdf | Bin 549093 -> 546907 bytes Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex | 24 ++++++--- Master/texmf-dist/tex/latex/chemnum/chemnum.sty | 54 ++++++++++++++++----- 3 files changed, 59 insertions(+), 19 deletions(-) diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.pdf b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.pdf index be6c27faaa4..b4708c4d74f 100644 Binary files a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.pdf and b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.pdf differ diff --git a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex index 704876de8e6..e696933cd2b 100644 --- a/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex +++ b/Master/texmf-dist/doc/latex/chemnum/chemnum_en.tex @@ -1,6 +1,6 @@ +% arara: pdflatex: { shell: on } %! arara: pdflatex: { shell: on } -%! arara: pdflatex: { shell: on } -%! arara: biber +% arara: biber % arara: pdflatex % arara: pdflatex \documentclass[load-preamble+,babel-options={ngerman,british,american}]{cnltx-doc} @@ -106,9 +106,9 @@ \chemnum\ requires the bundles \bnd{l3kernel}~\cite{bnd:l3kernel} and \bnd{l3packages}~\cite{bnd:l3packages}. It also requires the -\pkg{translations} package~\cite{pkg:translations}, \pkg{chemgreek} from the -\bnd{chemmacros} bundle~\cite{bnd:chemmacros} and the -\pkg{psfrag}~\cite{pkg:psfrag} package. +\pkg{translations} package~\cite{pkg:translations}, +\pkg{chemgreek}~\cite{pkg:chemgreek} and the \pkg{psfrag}~\cite{pkg:psfrag} +package. \section{News}\label{sec:news} The \chemnum\ package has been my first attempt to create a comprehensive @@ -649,9 +649,13 @@ command. They are marked with \module{replace}. When set to true this adds an incremented integer to the replacement tag. \keyval{replace-tag}{text}\Module{general}\Default{TMP} The default replacement tag. + \keyval{replace-tag-nr}{int}\Module{general}\Default{1} + The\sinceversion{1.1} next number used by \cs{replacecmpd} when the + default tag is used. \keyval{tag}{text}\Module{replace}\Default{TMP\meta{number}} The local replacement tag. \meta{number} is incremented by one at each - use and starts with \code{1}. The increment happens locally. + use and starts with \code{1}. The starting number can be changed with the + option \option{replace-tag-nr}. The increment happens locally. \keyval{replace-style}{code}\Module{general}\Default{\cs*{sffamily}} Additional \TeX\ code that it placed before the \cs{cmpd} command in the replacement. @@ -896,9 +900,13 @@ be changed. The complete list of options is this: When set to true this adds an incremented integer to the replacement tag. \keyval{replace-tag}{text}\Module{general}\Default{TMP} The default replacement tag. + \keyval{replace-tag-nr}{int}\Module{general}\Default{1} + The\sinceversion{1.1} next number used by \cs{replacecmpd} when the + default tag is used. \keyval{tag}{text}\Module{replace}\Default{TMP\meta{number}} - The local replacement tag. \meta{number} is incremented by one at each - use and starts with \code{1}. The increment happens locally. + The local replacement tag. \meta{number} is incremented by one at each + use and starts with \code{1}. The starting number can be changed with the + option \option{replace-tag-nr}. The increment happens locally. \keyval{replace-style}{code}\Module{general}\Default{\cs*{sffamily}} Additional \TeX\ code that it placed before the \cs{cmpd} command in the replacement. diff --git a/Master/texmf-dist/tex/latex/chemnum/chemnum.sty b/Master/texmf-dist/tex/latex/chemnum/chemnum.sty index 608c9142bf9..a6cb73cb3f7 100644 --- a/Master/texmf-dist/tex/latex/chemnum/chemnum.sty +++ b/Master/texmf-dist/tex/latex/chemnum/chemnum.sty @@ -1,6 +1,33 @@ -% ---------------------------------------------------------------------------- -\def\chemnumdate{2014/06/02} -\def\chemnumversion{1.0b} +% -------------------------------------------------------------------------- +% the CHEMNUM package +% +% a comprehensive approach for the numbering of chemical compounds +% +% -------------------------------------------------------------------------- +% Clemens Niederberger +% -------------------------------------------------------------------------- +% https://github.org/cgnieder/chemnum/ +% contact@mychemistry.eu +% -------------------------------------------------------------------------- +% If you have any ideas, questions, suggestions or bugs to report, please +% feel free to contact me. +% -------------------------------------------------------------------------- +% Copyright 2011-2014 Clemens Niederberger +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Clemens Niederberger. +% -------------------------------------------------------------------------- +\def\chemnumdate{2014/08/08} +\def\chemnumversion{1.1} \def\chemnuminfo{a comprehensive approach for the numbering of chemical compounds} \RequirePackage{expl3}[2013/07/14] @@ -53,8 +80,8 @@ ................................................. \\ . ~ \msg_info_text:n {chemnum}: ~ defined~ new~ compound~ `#1'~with~output~ - \chemnum_expandable_get_compound_property:nn {#1} - {counter-representation} . \\ + `\chemnum_expandable_get_compound_property:nn {#1} + {counter-representation}' . \\ ................................................. } @@ -279,12 +306,12 @@ { \chemnum_add_label_format:nn {#1} {#2} } \newcmpdcounterformat {arabic} { \int_to_arabic:n } -\newcmpdcounterformat {alph } { \int_to_alph:n } -\newcmpdcounterformat {Alph } { \int_to_Alph:n } -\newcmpdcounterformat {roman } { \int_to_roman:n } -\newcmpdcounterformat {Roman } { \int_to_Roman:n } -\newcmpdcounterformat {greek } { \chemgreek_int_to_greek:n } -\newcmpdcounterformat {Greek } { \chemgreek_int_to_Greek:n } +\newcmpdcounterformat {alph} { \int_to_alph:n } +\newcmpdcounterformat {Alph} { \int_to_Alph:n } +\newcmpdcounterformat {roman} { \int_to_roman:n } +\newcmpdcounterformat {Roman} { \int_to_Roman:n } +\newcmpdcounterformat {greek} { \chemgreek_int_to_greek:n } +\newcmpdcounterformat {Greek} { \chemgreek_int_to_Greek:n } % ---------------------------------------------------------------------------- %%% options @@ -436,6 +463,10 @@ \tl_set:Nn \l__chemnum_compound_replace_tag_tl {#1} \bool_set_false:N \l__chemnum_compound_replace_auto_this_bool , tag .groups:n = {replace} , + replace-tag-nr .code:n = + \int_set:Nn \l__chemnum_compound_replace_int { (#1) - 1 } , + replace-tag-nr .groups:n = {general} , + replace-tag-nr .initial:n = {1} , replace-style .tl_set:N = \l__chemnum_compound_replace_format_tl , replace-style .groups:n = {general} , style .code:n = @@ -1907,4 +1938,5 @@ HISTORY: before they're defined 2014/06/02 v1.0b - bug fix: list of sublabels can now correctly be sorted and compressed if referenced before they're defined +2014/08/08 v1.1 - new option `replace-tag-nr' -- cgit v1.2.3