diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemcompounds')
-rw-r--r-- | Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty b/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty index 7e1efcb75b1..80aefcf7372 100644 --- a/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty +++ b/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% -%% File: chemcompounds.dtx Copyright (C) 2005 Stephan Schenk -%% $Id: chemcompounds.dtx,v 1.6 2005/10/24 10:16:21 schenk Exp $ +%% File: chemcompounds.dtx Copyright (C) 2005-2007 Stephan Schenk +%% $Id: chemcompounds.dtx,v 1.8 2006/12/01 15:21:58 schenk Exp $ %% %% Stephan Schenk (mail@schenk-stephan.de) %% @@ -37,7 +37,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{chemcompounds} - [2005/10/19 v1.1.2 Dictionary for compound numbering] + [2006/12/01 v1.1.3 Dictionary for compound numbering] \newif\ifchemcompounds@implicit \DeclareOption{implicit}{\chemcompounds@implicittrue} \DeclareOption{noimplicit}{\chemcompounds@implicitfalse} @@ -53,9 +53,15 @@ \def\declarecompound{\@ifnextchar[\@ldeclarecompound\@declarecompound} \@onlypreamble\declarecompound \newif\ifchemcompounds@print +\newif\ifchemcompounds@create \DeclareRobustCommand{\compound}{% - \@ifstar{\chemcompounds@printfalse\@compound} - {\chemcompounds@printtrue\@compound} + \chemcompounds@createtrue + \chemcompounds@printtrue + \@ifnextchar *{\chemcompounds@printfalse\@firstoftwo\@compound} + {% + \@ifnextchar +{\chemcompounds@createfalse\@firstoftwo\@compound} + {\@compound} + } } \def\@compound#1{% \ifchemcompounds@print @@ -145,7 +151,11 @@ \let\@ifnotcompoundcreated\@secondoftwo \fi \ifchemcompounds@implicit - \let\@createcompoundhook\@createcompound + \def\@createcompoundhook#1{% + \ifchemcompounds@create + \@createcompound{#1}% + \fi + } \else \let\@createcompoundhook\@gobble \fi |