summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:52:55 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:52:55 +0000
commitb04e801269693f2d2025761e0e4eb9918b840107 (patch)
tree1f58f6851155f2c18db26d453ab3cbfd8cc86344 /Master
parent0911a28069c130f2db6a4698711e502ced60420b (diff)
chemcompounds
git-svn-id: svn://tug.org/texlive/trunk@750 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty154
1 files changed, 154 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty b/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty
new file mode 100644
index 00000000000..7e1efcb75b1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/chemcompounds/chemcompounds.sty
@@ -0,0 +1,154 @@
+%%
+%% This is file `chemcompounds.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% chemcompounds.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from chemcompounds.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file chemcompounds.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% 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 $
+%%
+%% Stephan Schenk (mail@schenk-stephan.de)
+%%
+%%
+%% To produce the documentation, do the following:
+%%
+%% latex chemcompounds.dtx
+%% latex chemcompounds.dtx
+%% makeindex -s gglo.ist -o chemcompounds.gls chemcompounds.glo
+%% latex chemcompounds.dtx
+%%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{chemcompounds}
+ [2005/10/19 v1.1.2 Dictionary for compound numbering]
+\newif\ifchemcompounds@implicit
+\DeclareOption{implicit}{\chemcompounds@implicittrue}
+\DeclareOption{noimplicit}{\chemcompounds@implicitfalse}
+\ExecuteOptions{implicit}
+\ProcessOptions
+\def\compoundseparator{,\penalty\@m\ }
+\let\compoundglobalprefix\@empty
+\let\compoundglobalsuffix\@empty
+\let\compoundprefix\@empty
+\let\compoundsuffix\@empty
+\def\compoundstyle{\textbf}
+\def\printcompound#1{{\compoundprefix}{\compoundstyle{#1}}{\compoundsuffix}}
+\def\declarecompound{\@ifnextchar[\@ldeclarecompound\@declarecompound}
+\@onlypreamble\declarecompound
+\newif\ifchemcompounds@print
+\DeclareRobustCommand{\compound}{%
+ \@ifstar{\chemcompounds@printfalse\@compound}
+ {\chemcompounds@printtrue\@compound}
+}
+\def\@compound#1{%
+ \ifchemcompounds@print
+ \compoundglobalprefix
+ \fi
+ \let\@compounda\@empty
+ \@for\@compoundb:=#1\do{%
+ \edef\@compoundb{\expandafter\@firstofone\@compoundb}%
+ \ifchemcompounds@print
+ \@compounda
+ \def\@compounda{{\compoundseparator}}%
+ \fi
+ \@ifcompoundundefined{\@compoundb}{%
+ \ifchemcompounds@print
+ \mbox{\reset@font\bfseries ?}%
+ \fi
+ \G@refundefinedtrue
+ \@latex@warning
+ {compound `\@compoundb' on page \thepage\space undefined}%
+ }{%
+ \ifchemcompounds@print
+ \mbox{\printcompound{\@nameuse{comp@\@compoundb}}}%
+ \fi
+ }%
+ \@createcompoundhook{\@compoundb}%
+ }%
+ \ifchemcompounds@print
+ \compoundglobalsuffix
+ \else
+ \unskip
+ \fi
+}
+\newcounter{chemcompounds@counter}
+\def\chemcompounds@label{\@newl@bel {comp}}
+\def\chemcompounds@writelabel#1#2{%
+ \if@filesw
+ \begingroup
+ \def\protect{\noexpand}%
+ \immediate\write\@auxout{
+ \string\chemcompounds@label{#1}{#2}
+ }%
+ \endgroup
+ \fi
+ \ignorespaces
+}
+\def\@ldeclarecompound[#1]#2{%
+ \AtBeginDocument{\@createcompound[#1]{#2}}
+}
+\@onlypreamble\@ldeclarecompound
+\ifchemcompounds@implicit
+ \let\@declarecompound\@gobble
+\else
+ \def\@declarecompound#1{%
+ \AtBeginDocument{\@createcompound{#1}}
+ }
+\fi
+\@onlypreamble\@declarecompound
+\def\@ifcompoundundefined#1{%
+ \@ifundefined{comp@#1}
+}
+\def\@createcompound{%
+ \@ifnextchar[\@@lcreatecompound\@@createcompound
+}
+\def\@@createcompound#1{%
+ \@ifnotcompoundcreated{#1}{%
+ \stepcounter{chemcompounds@counter}%
+ \chemcompounds@writelabel{#1}{\the\value{chemcompounds@counter}}
+ \@compoundcreated{#1}%
+ }%
+}
+\def\@@lcreatecompound[#1]#2{%
+ \chemcompounds@writelabel{#2}{#1}
+ \@compoundcreated{#2}%
+}
+\ifchemcompounds@implicit
+ \def\@compoundcreated#1{%
+ \global\@namedef{compc@#1}{}%
+ }
+\else
+ \let\@compoundcreated\@gobble
+\fi
+\ifchemcompounds@implicit
+ \def\@ifnotcompoundcreated#1#2{%
+ \@ifundefined{compc@#1}{#2}{}%
+ }
+\else
+ \let\@ifnotcompoundcreated\@secondoftwo
+\fi
+\ifchemcompounds@implicit
+ \let\@createcompoundhook\@createcompound
+\else
+ \let\@createcompoundhook\@gobble
+\fi
+\endinput
+%%
+%% End of file `chemcompounds.sty'.