summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-08 00:14:05 +0000
committerKarl Berry <karl@freefriends.org>2006-12-08 00:14:05 +0000
commit22c5c5491cf9bb363f89c35c3c5a3f6fe1b58655 (patch)
tree7b715246ca55e92b961343dc1cfd0be28372be71 /Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty
parent46b8a6fe6247a9476df0a843a54793d042ac2196 (diff)
chemcompounds update (6dec06)
git-svn-id: svn://tug.org/texlive/trunk@2625 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty')
-rw-r--r--Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty22
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