summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty')
-rw-r--r--Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty747
1 files changed, 454 insertions, 293 deletions
diff --git a/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty b/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
index 7fa7d048d33..7fa4babf398 100644
--- a/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
+++ b/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
@@ -5,316 +5,477 @@
%% The original source files were:
%%
%% chemstyle.dtx (with options: `package')
-%% ----------------------------------------------------------------
-%% The chemstyle bundle --- Schemes and style for chemistry
-%% Maintained by Joseph Wright
-%% E-mail: joseph.wright@morningstar2.co.uk
-%% Released under the LaTeX Project Public License v1.3c or later
-%% See http://www.latex-project.org/lppl.txt
-%% ----------------------------------------------------------------
+%% ----------------------------------------------------------------
+%% The chemstyle bundle --- Schemes and style for chemistry
+%% E-mail: joseph.wright@morningstar2.co.uk
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
-\def\cst@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
- \def\cst@ver{#5/#6/#7\space v1.3d\space}}
-\cst@id $Id: chemstyle.dtx 51 2009-01-09 16:21:24Z joseph $
\ProvidesPackage{chemstyle}
- [\cst@ver Writing chemistry with style]
-\RequirePackage{xkeyval}[2005/05/07]
-\RequirePackage{amstext,graphicx,varioref,caption,xspace}
-\newcommand*{\cst@tempa}{}
-\newcommand*{\cst@tempb}{}
-\newcommand*{\cst@boolkey}[1]{
- \define@boolkey[cst]{opt}[cst@]{#1}[true]{}}
-\cst@boolkey{chemcompounds}
-\cst@boolkey{floatrow}
-\cst@boolkey{xspace}
-\cst@boolkey{phrases}
-\cst@boolkey{radprefix}
-\cst@boolkey{rademph}
-\cst@boolkey{radsuper}
-\cst@boolkey{radhyphen}
-\cst@boolkey{abbremph}
-\cst@boolkey{abbrcomma}
-\cst@boolkey{notesbefore}
+ [2009/06/06 v2.0 Schemes and style for chemistry]
+\RequirePackage{amstext,caption,chemscheme,varioref,xspace}
+\SetupKeyvalOptions{
+ family=cst,
+ prefix=cst@
+}
+\newcommand*\cst@tempa{}
+\DeclareBoolOption[false]{abbrcomma}
+\DeclareBoolOption[true]{abbremph}
+\DeclareBoolOption[true]{notesbefore}
+\DeclareBoolOption[true]{phrases}
+\DeclareComplementaryOption{nophrases}{phrases}
+\DeclareBoolOption[true]{rademph}
+\DeclareBoolOption[true]{radhyphen}
+\DeclareBoolOption[true]{radprefix}
+\DeclareBoolOption[false]{radsuper}
+\DeclareBoolOption[true]{xspace}
+\DeclareStringOption{journal}
+\DeclareDefaultOption{%
+ \ifx\CurrentOptionValue\relax
+ \edef\cst@journal{\CurrentOptionKey}%
+ \else
+ \PackageWarning{chemstyle}{%
+ Unknown key option `\CurrentOptionKey'%
+ }%
+ \fi
+}
+\DeclareStringOption{language}
+\setkeys{cst}{%
+ journal = ,
+ language = english
+}
\newif\ifcst@notes
\newif\ifcst@autonotes
-\define@choicekey*[cst]{opt}{notes}[\cst@tempa]
- {true,false,auto}[true]
- {\cst@notesfalse
- \cst@autonotesfalse
- \edef\cst@tempb{auto}
- \ifx\cst@tempa\cst@tempb
- \cst@notestrue
- \cst@autonotestrue
- \fi
- \edef\cst@tempb{true}
- \ifx\cst@tempa\cst@tempb
- \cst@notestrue
- \fi}
-\DeclareOptionX[cst]<opt>{siunits}
- {\PackageInfo{chemstyle}{Option siunits no longer required}}
-\DeclareOptionX[cst]<opt>{SIunits}
- {\PackageInfo{chemstyle}{Option siunits no longer required}}
-\DeclareOptionX[cst]<opt>{nonotes}
- {\ExecuteOptionsX[cst]<opt>{notes=false}}
-\DeclareOptionX[cst]<opt>{nophrases}
- {\ExecuteOptionsX[cst]<opt>{phrases=false}}
-\define@cmdkeys[cst]{opt}[cst@]{journal,language}
-\DeclareOptionX*{\edef\cst@journal{\CurrentOption}}
-\setkeys[cst]{opt}{
- notes=true,
- phrases=true,
- chemcompounds=true,
- xspace=true,
- floatrow=true,
- journal=none,
- radprefix=true,
- rademph=true,
- radsuper=false,
- radhyphen=true,
- abbremph=true,
- abbrcomma=false,
- language=english,
- notesbefore=true}
-\ProcessOptionsX[cst]<opt>
-\ifcst@chemcompounds
- \PassOptionsToPackage{chemcompounds}{chemscheme}
-\fi
-\ifcst@floatrow
- \RequirePackage[floats=floatrow]{chemscheme}
-\else
- \RequirePackage[floats=float]{chemscheme}
-\fi
-\newcommand*{\cst@disablekey}[1]{
- \define@key[cst]{opt}{#1}{\PackageWarning{chemstyle}
- {Option `#1' only valid when loading package}}}
-\AtBeginDocument{
- \cst@disablekey{floatrow}
- \cst@disablekey{journal}
- \cst@disablekey{phrases}
- \cst@disablekey{nophrases}
- \cst@disablekey{notes}
- \cst@disablekey{nonotes}
- \cst@disablekey{chemcompounds}}
-\newcommand*{\cstsetup}[1]{%
- \iffalse{\fi\ifnum0=`}\fi
- \setkeys[cst]{opt}{#1}%
- \ifnum0=`{\fi\iffalse}\fi}
-\@ifpackageloaded{siunitx}
- {\requiresiconfigs{synchem}}
- {\@ifpackageloaded{SIunits}
- {\newcommand*{\cubiccentimeter}{\centi\metre\cubed}
- \newcommand*{\Molar}{\textsc{m}}
- \newcommand*{\molar}{\mole\usk\deci\metre\rpcubed}
- \newcommand*{\mmHg}{\milli\metre Hg}
- \newcommand*{\mol}{\mole}
- \newcommand*{\cmc}{\cubiccentimeter}
- \newcommand*{\Hz}{\hertz}}
- {\@ifpackageloaded{unitsdef}
- {\newunit{\cubiccentimeter}{%
- \cm\unitsuperscript{3}}
- \newunit{\Molar}{\textsc{m}}
- \newunit{\molar}{%
- \mole\unitsep\dm\unitsuperscript{--3}}
- \newunit{\mmHg}{mmHg}
- \newunit{\mol}{\mole}
- \newcommand*{\cmc}{\cubiccentimeter}
- \newcommand*{\Hz}{\hertz}}
- {\RequirePackage[alsoload=synchem]{siunitx}}}}
-\providecommand*{\standardstate}{%
- {\ensuremath{\protect\cst@sstate}}}
-\newcommand*{\cst@sstate}{\mathpalette\cst@s@state\circ}
-\newcommand*{\cst@s@state}[2]{%
- \ooalign{\hfil$#1-$\hfil\cr\hfil$#1#2$\hfil\cr}}
-\newcommand*{\cst@radical}[2]{%
- \expandafter\DeclareRobustCommand\expandafter*\expandafter{%
- \csname #1#2\endcsname}{%
- \text{%
- \ifcst@radhyphen
- \def\cst@hyphen{-}%
- \else
- \let\cst@hyphen\relax
- \fi
- \ifcst@radsuper
- \let\cst@super\textsuperscript
- \else
- \let\cst@super\relax
- \fi
- \ifcst@rademph
- \let\cst@emph\emph
- \else
- \let\cst@emph\relax
- \fi
- \ifcst@radprefix
- \cst@super{\cst@emph{#1}}\cst@hyphen#2%
+\newcommand*\cst@opt@auto{auto}
+\define@key{cst}{notes}[true]{%
+ \edef\KVO@param{#1}%
+ \@onelevel@sanitize\KVO@param
+ \ifx\KVO@param\KVO@true
+ \expandafter\cst@opt@notestrue
+ \else
+ \ifx\KVO@param\KVO@false
+ \expandafter\expandafter\expandafter\cst@opt@notesfalse
+ \else
+ \ifx\KVO@param\cst@opt@auto
+ \expandafter\expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\cst@opt@notesauto
\else
- #2\cst@hyphen\cst@super{\cst@emph{#1}}%
+ \expandafter\expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\cst@opt@noteserror
\fi
- \cst@xspace
- }%
+ \fi
+ \fi
+}
+\newcommand*\cst@opt@notestrue{%
+ \cst@notestrue
+ \cst@autonotesfalse
+}
+\newcommand*\cst@opt@notesfalse{%
+ \cst@notesfalse
+ \cst@autonotesfalse
+}
+\newcommand*\cst@opt@notesauto{%
+ \cst@notestrue
+ \cst@autonotestrue
+}
+\newcommand*\cst@opt@noteserror{%
+ \PackageWarning{chemstyle}{%
+ Value `\KVO@param' is not supported by\MessageBreak
+ option `notes'%
}%
}
-\newcommand*{\cst@xspace}{%
+\DeclareComplementaryOption{nonotes}{notes}
+\newcommand*\cstsetup{%
+ \setkeys{cst}
+}
+\newcommand*\cst@xspace{%
\ifcst@xspace
- \expandafter\xspace%
- \fi}
-\cst@radical{n}{Pr}%
-\cst@radical{i}{Pr}%
-\cst@radical{n}{Bu}%
-\cst@radical{i}{Bu}%
-\cst@radical{s}{Bu}%
-\cst@radical{t}{Bu}%
-\floatstyle{plaintop}
-\restylefloat{table}
-\floatstyle{plain}
-\restylefloat{figure}
-\floatplacement{table}{htbp}
-\floatplacement{figure}{htbp}
-\AtBeginDocument{
- \restylefloat{scheme}
- \floatplacement{scheme}{htbp}}
-\floatcontentscentre
-\labelformat{figure}{\figurename~#1}
-\labelformat{table}{\tablename~#1}
-\AtBeginDocument{\labelformat{scheme}{\schemename~#1}}
-\newcommand*{\cst@latin}{%
+ \expandafter\xspace
+ \fi
+}
+\@ifpackageloaded{siunitx}{
+ \requiresiconfigs{synchem}
+}{%
+ \@ifpackageloaded{SIunits}{}{%
+ \@ifpackageloaded{unitsdef}{}{%
+ \IfFileExists{siunitx.sty}{%
+ \RequirePackage[alsoload=synchem]{siunitx}
+ }{%
+ \IfFileExists{SIunits.sty}{%
+ \RequirePackage{SIunits}
+ }{%
+ \PackageWarning{chemstyle}{%
+ Could not find siunitx or SIunits package:\MessageBreak
+ additional units not defined%
+ }
+ }
+ }
+ }
+ }
+}
+\@ifpackageloaded{SIunits}{%
+ \newcommand*\cubiccentimeter{\centi\metre\cubed}
+ \newcommand*\Molar{\textsc{m}}
+ \newcommand*\molar{\mole\usk\deci\metre\rpcubed}
+ \newcommand*\mmHg{\milli\metre Hg}
+ \newcommand*\mol{\mole}
+ \newcommand*\cmc{\cubiccentimeter}
+ \newcommand*\Hz{\hertz}
+}{%
+ \@ifpackageloaded{unitsdef}{%
+ \newunit{\cubiccentimeter}{\cm\unitsuperscript{3}}
+ \newunit{\Molar}{\textsc{m}}
+ \newunit{\molar}{\mole\unitsep\dm\unitsuperscript{--3}}
+ \newunit{\mmHg}{mmHg}
+ \newunit{\mol}{\mole}
+ \newcommand*\cmc{\cubiccentimeter}
+ \newcommand*\Hz{\hertz}
+ }{}
+}
+\providecommand*\standardstate{%
+ {%
+ \ensuremath{\protect\cst@standardstate}%
+ }%
+}
+\newcommand*\cst@standardstate{%
+ \mathpalette\cst@standardstate@aux\circ
+}
+\newcommand*\cst@standardstate@aux[2]{%
+ \ooalign{%
+ \hfil
+ $#1-$%
+ \hfil
+ \cr
+ \hfil
+ $#1#2$%
+ \hfil
+ \cr
+ }%
+}
+\newcommand*\cst@latin{%
\ifcst@abbremph
- \expandafter\emph%
- \fi}
-\newcommand*{\latinemphon}{\cstsetup{abbremph=true}}
-\newcommand*{\latinemphoff}{\cstsetup{abbremph=false}}
-\AtBeginDocument{\providecommand*\latin{\cst@latin}}
-\ifcst@phrases
- \AtBeginDocument{
- \providecommand*{\etc}
- {\@ifnextchar.{\cst@etc}{\cst@etc.\cst@xspace}}
- \providecommand*{\invacuo}
- {\latin{in vacuo}\cst@xspace}
- \providecommand*{\etal}
- {\@ifnextchar.{\cst@etal}{\cst@etal.\cst@xspace}}
- \providecommand*{\eg}
- {\ifcst@abbrcomma
- \expandafter\cst@commaabbr%
- \else
- \expandafter\cst@nocommaabbr%
- \fi
- {eg}}
- \providecommand*{\ie}
- {\ifcst@abbrcomma
- \expandafter\cst@commaabbr%
- \else
- \expandafter\cst@nocommaabbr%
- \fi
- {ie}}}
-\fi
-\newcommand*{\cst@etal}{\latin{et~al}}
-\newcommand*{\cst@etc}{\latin{etc}}
-\newcommand*{\cst@ie}{\latin{i.e\spacefactor999\relax}}
-\newcommand*{\cst@eg}{\latin{e.g\spacefactor999\relax}}
-\newcommand*{\cst@commaabbr}[1]{%
- \csname cst@#1\endcsname%
- \cst@addpunct}
-\newcommand*{\cst@nocommaabbr}[1]{%
- \@ifnextchar.%
- {\csname cst@#1\endcsname}
- {\csname cst@#1\endcsname.\cst@xspace}}
-\newcommand*{\cst@addpunct}{%
- \cst@add@punct\relax}
-\newcommand*{\cst@add@punct}[1]{%
- \futurelet\cst@tempa\cst@add@punct@}
-\newcommand*{\cst@add@punct@}{%
- \ifx.\cst@tempa
- \let\cst@tempb\cst@add@punct
+ \expandafter\emph
\else
- \ifx,\cst@tempa
- \let\cst@tempb\cst@add@punct
- \else
- \let\cst@tempb\cst@commapunct
+ \expandafter\@firstofone
+ \fi
+}
+\newcommand*{\latinemphon}{%
+ \cstsetup{abbremph=true}%
+}
+\newcommand*{\latinemphoff}{%
+ \cstsetup{abbremph=false}%
+}
+\AtBeginDocument{%
+ \providecommand*\latin{\cst@latin}%
+}
+\newcommand*\cst@phrases@make{%
+ \providecommand*\etal{%
+ \cst@phrase{et~al}%
+ }%
+ \providecommand*\eg{%
+ \cst@phrase@comma{e.g\spacefactor999\relax}%
+ }%
+ \providecommand*\etc{%
+ \cst@phrase{etc}%
+ }%
+ \providecommand*\ie{%
+ \cst@phrase@comma{i.e\spacefactor999\relax}%
+ }%
+ \providecommand*\invacuo{%
+ \latin{in vacuo}%
+ \cst@xspace
+ }%
+}
+\AtBeginDocument{%
+ \ifcst@phrases
+ \expandafter\cst@phrases@make
+ \fi
+}
+\newcommand*\cst@phrase[1]{%
+ \latin{#1}%
+ \@ifnextchar.{}{%
+ .%
+ \cst@xspace
+ }%
+}
+\newcommand*\cst@phrase@comma{%
+ \ifcst@abbrcomma
+ \expandafter\cst@phrase@with@comma
+ \else
+ \expandafter\cst@phrase
+ \fi
+}
+\newcommand*\cst@phrase@with@comma[1]{%
+ \latin{#1}%
+ \cst@phrase@with@comma@aux@i\relax
+}
+\newcommand*\cst@phrase@with@comma@token{}
+\newcommand*\cst@phrase@with@comma@aux@i[1]{%
+ \futurelet\cst@phrase@with@comma@token\cst@phrase@with@comma@aux@ii
+}
+\newcommand*\cst@phrase@with@comma@aux@ii{%
+ \let\cst@phrase@with@comma@next\cst@phrase@with@comma@aux@i
+ \if.\cst@phrase@with@comma@token\else
+ \if,\cst@phrase@with@comma@token\else
+ \let\cst@phrase@with@comma@next\cst@phrase@with@comma@end
\fi
\fi
- \cst@tempb}
-\newcommand*{\cst@commapunct}{.,\cst@xspace}
-\InputIfFileExists{\cst@journal.jdf}
- {\PackageInfo{chemstyle}
- {Loaded \cst@journal.jdf}}
- {\PackageWarning{chemstyle}
- {Requested style `\cst@journal' does not exist\MessageBreak
- Loading default style}
- \InputIfFileExists{none.jdf}{}
- {\PackageError{chemstyle}{Failed to load none.jdf}
- {The default journal definition file was not
- found\MessageBreak This is a core part of
- chemstyle\MessageBreak Something is wrong with
- the installation}}}
-\begingroup
- \@ifundefined{chapter}
- {\@ifundefined{refname}
- {\PackageInfo{chemstyle}
- {No bibliography name command found}
- \cstsetup{notes=false}}
- {\gdef\cst@refsec{\refname}}}
- {\gdef\cst@refsec{\bibname}}
-\endgroup
-\ifcst@autonotes
- \AtBeginDocument{
- \@ifpackageloaded{notes2bib}{}
- {\newcounter{bibnote}}}
+ \cst@phrase@with@comma@next
+}
+\newcommand*\cst@phrase@with@comma@end{%
+ .,%
+ \cst@xspace
+}
+\newcommand*\cst@phrase@with@comma@next{}
+\newcommand*\cst@radical@make[2]{%
+ \expandafter\DeclareRobustCommand\expandafter*\csname #1#2\endcsname{%
+ \text{\cst@radical{#1}{#2}}%
+ \cst@xspace
+ }%
+}
+\cst@radical@make{n}{Pr}
+\cst@radical@make{i}{Pr}
+\cst@radical@make{n}{Bu}
+\cst@radical@make{i}{Bu}
+\cst@radical@make{s}{Bu}
+\cst@radical@make{t}{Bu}
+\newcommand*\cst@radical@emph{}
+\newcommand*\cst@radical@hyphen{}
+\newcommand*\cst@radical@hyphen@true{-}
+\newcommand*\cst@radical@super{}
+\newcommand*\cst@radical{%
+ \let\cst@radical@emph\@firstofone
+ \ifcst@rademph
+ \let\cst@radical@emph\emph
+ \fi
+ \let\cst@radical@hyphen\relax
+ \ifcst@radhyphen
+ \let\cst@radical@hyphen\cst@radical@hyphen@true
+ \fi
+ \let\cst@radical@super\@firstofone
+ \ifcst@radsuper
+ \let\cst@radical@super\textsuperscript
+ \fi
+ \ifcst@radprefix
+ \expandafter\cst@radical@pre
+ \else
+ \expandafter\cst@radical@post
+ \fi
+}
+\newcommand*\cst@radical@pre[2]{%
+ \cst@radical@super{%
+ \cst@radical@emph{#1}%
+ }%
+ \cst@radical@hyphen
+ #2%
+}
+\newcommand*\cst@radical@post[2]{%
+ #2%
+ \cst@radical@hyphen
+ \cst@radical@super{%
+ \cst@radical@emph{#1}%
+ }%
+}
+\labelformat{figure}{\figurename~#1}
+\labelformat{table}{\tablename~#1}
+\AtEndOfPackage{%
+ \AtBeginDocument{%
+ \labelformat{scheme}{\schemename~#1}%
+ }%
+}
+\AtBeginDocument{%
+ \@ifpackageloaded{notes2bib}{}{%
+ \newcounter{bibnote}%
+ }%
+}
+\newcommand*\cst@refsec@name{}
+\newcommand*\cst@refsec@find[1]{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname #1\endcsname\relax
+ \expandafter\cst@refsec@set@name
+ \else
+ \expandafter\@gobble
+ \fi
+ {#1}%
+}
+\newcommand*\cst@refsec@set@name[1]{%
+ \def\cst@refsec@name{#1}%
+}
+\cst@refsec@find{bibname}%
+\cst@refsec@find{refname}%
+\ifx\cst@refsec@name\@empty
+ \expandafter\cst@notesfalse
\fi
-\newcommand*{\cst@refname}{%
- \ifcst@notes
- \ifcst@autonotes
- \ifnum\the\value{bibnote}>\z@
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\cst@ref@name
- \else
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\cst@ref@name@
- \fi
- \else
- \expandafter\expandafter\expandafter\cst@ref@name
- \fi
+\newcommand*\cst@refsec@lang{}
+\newcommand*\cst@refsec@lang@clist{}
+\newcommand*\cst@refsec@lang@define[4]{%
+ \ifx\cst@refsec@lang@clist\@empty
+ \def\cst@refsec@lang@clist{#1}%
\else
- \expandafter\cst@ref@name@%
- \fi}
-\newcommand*{\cst@ref@name}[3]{%
+ \edef\cst@refsec@lang@clist{%
+ \cst@refsec@lang@clist
+ ,#1%
+ }%
+ \fi
+ \@namedef{cst@refsec@lang@#1@references}{#2}%
+ \@namedef{cst@refsec@lang@#1@and}{#3}%
+ \@namedef{cst@refsec@lang@#1@notes}{#4}%
+}
+\cst@refsec@lang@define{english}{References}{and}{Notes}
+\cst@refsec@lang@define{UKenglish}{References}{and}{Notes}
+\cst@refsec@lang@define{ngerman}{Literatur}{und}{Notizen}
+\cst@refsec@lang@define{german}{Literatur}{und}{Notizen}
+\cst@refsec@lang@define{french}{R\'ef\'erences}{et}{Notes}
+\cst@refsec@lang@define{frenchb}{R\'ef\'erences}{et}{Notes}
+\ifcst@notes
+ \AtBeginDocument{\cst@refsec@set}
+\fi
+\newcommand*\cst@refsec@set{%
+ \@ifpackageloded{biblatex}{%
+ \@for\cst@refsec@lang:=\cst@refsec@lang@clist\do{%
+ \cst@refsec@set@biblatex\cst@refsec@lang
+ }%
+ }{%
+ \@ifpackageloded{babel}{%
+ \@for\cst@refsec@lang:=\cst@refsec@lang@clist\do{%
+ \cst@refsec@set@babel\cst@refsec@lang
+ }%
+ \expandafter\selectlanguage\expandafter{\languagename}%
+ }{%
+ \@for\cst@refsec@lang:=\cst@refsec@lang@clist\do{%
+ \cst@refsec@set@language\cst@refsec@lang
+ }%
+ }%
+ }
+}
+\newcommand*\cst@refsec@set@biblatex[1]{%
+ \edef\cst@tempa{%
+ \noexpand\csgappto{bib@strings@#1}{%
+ \noexpand\def\expandafter\noexpand
+ \csname\cst@refsec@name\endcsname{%
+ \noexpand\cst@refsec@make@name{#1}%
+ }%
+ }%
+ }%
+ \cst@tempa
+}
+\newcommand*\cst@refsec@set@babel[1]{%
+ \edef\cst@tempa{%
+ \noexpand\addto{\expandafter\noexpand\csname captions#1\endcsname}{%
+ \noexpand\def\expandafter\noexpand
+ \csname\cst@refsec@name\endcsname{%
+ \noexpand\cst@refsec@make@name{#1}%
+ }%
+ }%
+ }%
+ \cst@tempa
+}
+\newcommand*\cst@refsec@set@language[1]{%
+ \ifx#1\cst@language
+ \edef\cst@tempa{%
+ \noexpand\def\expandafter\noexpand
+ \csname\cst@refsec@name\endcsname{%
+ \noexpand\cst@refsec@make@name{#1}%
+ }%
+ }%
+ \cst@tempa
+ \fi
+}
+\newcommand*\cst@refsec@make@name@fixed[1]{%
\ifcst@notesbefore
- #3\space#2\space#1%
+ \@nameuse{cst@refsec@lang@#1@notes}
+ \@nameuse{cst@refsec@lang@#1@and}
+ \@nameuse{cst@refsec@lang@#1@references}%
\else
- #1\space#2\space#3%
- \fi}
-\newcommand*{\cst@ref@name@}[3]{#1}
-\@ifundefined{cst@refsec}
- {\let\cst@setrefname\@gobblefour}
- {\newcommand*{\cst@setrefname}[4]{
- \edef\cst@tempa{#1}%
- \ifx\cst@tempa\cst@language
- \expandafter\renewcommand\expandafter*\expandafter{%
- \cst@refsec}
- {\cst@refname{#2}{#3}{#4}}
- \fi
- \AtBeginDocument{
- \@ifpackageloaded{biblatex}
- {\def\cst@tempa{\csgappto{bib@strings@#1}}
- \expandafter\cst@tempa\expandafter{\expandafter
- \renewcommand\expandafter*\expandafter{%
- \cst@refsec}{%
- \cst@refname{#2}{#3}{#4}}}}
- {\@ifpackageloaded{babel}
- {\def\cst@tempa{\expandafter\addto\expandafter{%
- \csname captions#1\endcsname}}
- \expandafter\cst@tempa\expandafter
- {\expandafter\renewcommand\expandafter*%
- \expandafter{\cst@refsec}{%
- \cst@refname{#2}{#3}{#4}}}
- \expandafter\selectlanguage\expandafter{%
- \languagename}}
- {}}}}}
-\cst@setrefname{english}{References}{and}{Notes}
-\cst@setrefname{UKenglish}{References}{and}{Notes}
-\cst@setrefname{ngerman}{Literatur}{und}{Notizen}
-\cst@setrefname{german}{Literatur}{und}{Notizen}
-\cst@setrefname{french}{R\'ef\'erences}{et}{Notes}
-\cst@setrefname{frenchb}{R\'ef\'erences}{et}{Notes}
-\endinput
+ \@nameuse{cst@refsec@lang@#1@references}
+ \@nameuse{cst@refsec@lang@#1@and}
+ \@nameuse{cst@refsec@lang@#1@notes}%
+ \fi
+}
+\newcommand*\cst@refsec@make@name@auto{%
+ \ifnum\the\value{bibnote}>\z@\relax
+ \expandafter\cst@refsec@make@name@fixed
+ \else
+ \expandafter\cst@refsec@make@name@nonotes
+ \fi
+}
+\newcommand*\cst@refsec@make@name@nonotes[1]{%
+ \@nameuse{cst@refsec@lang@#1@references}%
+}
+\let\cst@refsec@make@name\cst@refsec@make@name@fixed
+\ifcst@notes
+ \ifcst@autonotes
+ \let\cst@refsec@make@name\cst@refsec@make@name@auto
+ \fi
+\fi
+\ProcessKeyvalOptions{cst}
+\newcommand*\cst@float@memoir@correct{%
+ \let\newfloat\@undefined
+}
+\ifx\cst@float@pkg\cst@opt@memoir
+ \expandafter\cst@float@memoir@correct
+\fi
+\cst@float@load
+\cst@float@execute{\@nameuse{cst@float@make@\cst@float@pkg}}
+\@ifpackageloaded{floatrow}{%
+ \floatsetup{objectset=centering}
+ \floatplacement{figure}{htbp}
+ \floatplacement{scheme}{htbp}
+ \floatplacement{table}{htbp}
+ \floatsetup[table]{style=plaintop}
+}{%
+ \floatstyle{plaintop}
+ \restylefloat{table}
+ \floatstyle{plain}
+ \restylefloat{figure}
+ \floatplacement{table}{htbp}
+ \floatplacement{figure}{htbp}
+ \AtBeginDocument{%
+ \restylefloat{scheme}
+ \floatplacement{scheme}{htbp}
+ }
+}
+\ifx\cst@journal\@empty\else
+ \InputIfFileExists{\cst@journal.chemstyle.cfg}{%
+ \setkeys{cst}{
+ abbrcomma = false,
+ abbremph = true,
+ notesbefore = true,
+ rademph = true,
+ radhyphen = true,
+ radprefix = true,
+ radsuper = false,
+ }
+ }{%
+ \PackageWarning{chemstyle}{%
+ Requested style `\cst@journal' does not exist\MessageBreak
+ }
+ }
+\fi
+\cst@ref@load
+
+%%
+%% Copyright (C) 2006-2009 by
+%% Joseph Wright <joseph.wright@morningstar2.co.uk>
+%%
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version. The latest
+%% version of this license is in the file:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status) by
+%% Joseph Wright.
+%%
+%% This work consists of the file chemstyle.dtx and
+%% chemstyle.cdx,
+%% and the derived files chemstyle.pdf,
+%% chemstyle.ins,
+%% chemstyle.sty,
+%% chemscheme.sty,
+%%
%%
%% End of file `chemstyle.sty'.