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.sty94
1 files changed, 48 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty b/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
index 87fe0b2aa1f..34322e56d7d 100644
--- a/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
+++ b/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
@@ -6,7 +6,7 @@
%%
%% chemstyle.dtx (with options: `package')
%% ----------------------------------------------------------------
-%% The chemstyle package --- Writing chemistry with style
+%% 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
@@ -14,24 +14,19 @@
%% ----------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}
+\def\cst@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
+ \def\cst@ver{#5/#6/#7\space v1.3\space}}
+\cst@id $Id: chemstyle.dtx 36 2008-07-17 07:39:53Z joseph $
\ProvidesPackage{chemstyle}
- [2008/04/14 v1.2b Writing chemistry with style]
-\RequirePackage{xkeyval}
-\@ifpackagelater{xkeyval}{2005/05/07}
- {}
- {\PackageError{chemstyle}
- {xkeyval >= 2.5 required}
- {chemstyle requires the `xkeyval' package, version 2.5
- or later.\MessageBreak The version loaded is:
- `\@nameuse{ver@xkeyval.sty}'.\MessageBreak
- This is a fatal error: loading will abort.}
- \endinput}
+ [\cst@ver Writing chemistry with style]
+\RequirePackage{xkeyval}[2005/05/07]
\RequirePackage{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}
@@ -71,6 +66,7 @@
phrases=true,
chemcompounds=true,
xspace=true,
+ floatrow=true,
journal=none,
radprefix=true,
rademph=true,
@@ -84,11 +80,16 @@
\ifcst@chemcompounds
\PassOptionsToPackage{chemcompounds}{chemscheme}
\fi
-\RequirePackage{chemscheme}
+\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}
@@ -101,25 +102,26 @@
\ifnum0=`{\fi\iffalse}\fi}
\AtBeginDocument{
\@ifpackageloaded{siunitx}
- {\makeatletter
- \si@requirecfgs{synchem}
- \makeatother}
- {\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}}
- {\@ifpackageloaded{SIunits}{}
- {\@ifpackageloaded{siunits}{}
- {\RequirePackage{SIunits}}}
- \newcommand*{\cubiccentimeter}{\centi\metre\cubed}
+ {\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*{\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}}}}}
\DeclareSymbolFont{CSTAMS}{U}{msb}{m}{n}
\DeclareMathSymbol{\cst@varnothing}{\mathord}{CSTAMS}{"3F}
\providecommand*{\standardstate}%
@@ -159,10 +161,6 @@
\cst@radical{i}{Bu}%
\cst@radical{s}{Bu}%
\cst@radical{t}{Bu}%
-\@ifclassloaded{memoir}
- {\let\newfloat\@undefined
- \RequirePackage{float}}
- {}
\floatstyle{plaintop}
\restylefloat{table}
\floatstyle{plain}
@@ -241,8 +239,9 @@
\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}}}
+ found\MessageBreak This is a core part of
+ chemstyle\MessageBreak Something is wrong with
+ the installation}}}
\begingroup
\@ifundefined{chapter}
{\@ifundefined{refname}
@@ -261,14 +260,14 @@
\ifcst@notes
\ifcst@autonotes
\ifnum\the\value{bibnote}>\z@
- \expandafter\expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\cst@ref@name%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\cst@ref@name
\else
- \expandafter\expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\cst@ref@name@%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\cst@ref@name@
\fi
\else
- \expandafter\expandafter\expandafter\cst@ref@name%
+ \expandafter\expandafter\expandafter\cst@ref@name
\fi
\else
\expandafter\cst@ref@name@%
@@ -292,16 +291,19 @@
\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}}}}
+ \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}}
+ {\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}