summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-21 00:44:56 +0000
committerKarl Berry <karl@freefriends.org>2007-10-21 00:44:56 +0000
commit6e3aed01a902165bea587b4672d2d8311c5df231 (patch)
treeb1ce7796f58404c3fae794551737a3b013cf0f11 /Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
parent483c8b0ca785f4053541c7d24917178b1f171de0 (diff)
chemstyle update (21oct07)
git-svn-id: svn://tug.org/texlive/trunk@5246 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty')
-rw-r--r--Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty85
1 files changed, 53 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty b/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
index c9419381d96..0e996cd8909 100644
--- a/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
+++ b/Master/texmf-dist/tex/latex/chemstyle/chemstyle.sty
@@ -6,16 +6,17 @@
%%
%% chemstyle.dtx (with options: `package')
%% ----------------------------------------------------------------
-%% chemstyle - Writing chemistry with style
+%% The chemstyle package --- Writing chemistry with style
%% Maintained by Joseph Wright
%% E-mail: joseph.wright@morningstar2.co.uk
%% Released under the LaTeX Project Public License v1.3 or later
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
+%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{chemstyle}
- [2007/09/18 v1.1a Writing chemistry with style]
-\RequirePackage{graphicx,varioref}
+ [2007/10/19 v1.1g Writing chemistry with style]
+\RequirePackage{graphicx,varioref,caption}
\let\cst@emph\relax
\def\cst@hyph{}
\let\cst@super\relax
@@ -50,6 +51,7 @@
\DeclareOption{nonotes}{\cst@notesfalse}
\DeclareOption{nophrases}{\cst@phrasesfalse}
\DeclareOption{siunits}{\cst@sitrue}
+\DeclareOption{SIunits}{\cst@sitrue}
\DeclareOption{xspace}{\cst@xspacetrue}
\let\cst@option\relax
\DeclareOption*{%
@@ -59,18 +61,25 @@
\fi
\edef\cst@option{\CurrentOption}
}
-\@ifpackageloaded{siunits}
+\@ifpackageloaded{SIunits}
{\ExecuteOptions{siunits}}
- {}
+ {\@ifpackageloaded{siunits}
+ {\ExecuteOptions{siunits}}
+ {}}
\ProcessOptions*
\ifcst@si
\@ifpackageloaded{unitsdef}
{\PackageWarning{chemstyle}{%
- You have set the siunits option,\MessageBreak
+ You have set the SIunits option,\MessageBreak
but have already loaded unitsdef!\MessageBreak
unitsdef will be used for extra unit macros}
\cst@sifalse}
- {\RequirePackage{siunits}}
+ {\AtBeginDocument{%
+ \@ifpackageloaded{siunits}%
+ {}
+ {\RequirePackage{SIunits}}%
+ }
+ }
\else
\ifx\fg\@undefined
\else
@@ -109,9 +118,9 @@
\newcommand{\cmc}{\cubiccentimeter}
\newcommand{\Hz}{\hertz}
\DeclareSymbolFont{CSTAMS}{U}{msb}{m}{n}
-\DeclareMathSymbol{\cst@varnothing} {\mathord}{CSTAMS}{"3F}
-\newcommand*{\standardstate}%
- {\textsuperscript{\rotatebox[origin=c]{140.8}%
+\DeclareMathSymbol{\cst@varnothing}{\mathord}{CSTAMS}{"3F}
+\providecommand*{\standardstate}%
+ {\textsuperscript{\rotatebox[origin=c]{138.8}%
{\ensuremath{\cst@varnothing}}}}
\@ifclassloaded{memoir}
{\let\newfloat\@undefined
@@ -126,7 +135,8 @@
\floatplacement{scheme}{htbp}
\floatplacement{figure}{htbp}
\floatcontentscentre
-\labelformat{scheme}{\schemename~#1}
+\AtBeginDocument{%
+ \labelformat{scheme}{\schemename~#1}}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
\let\latinemphon\relax
@@ -162,8 +172,6 @@
\fi
\@tempb%
}
- \else
- \def\cst@addpunct{\@ifnextchar.{}{\spacefactor999.\cst@xspace}}
\fi
}
\ifcst@xspace
@@ -175,17 +183,28 @@
\ifcst@phrases
\AtBeginDocument{
\providecommand{\etc}%
- {\latin{etc}\@ifnextchar.{}{.\cst@xspace}}
+ {\@ifnextchar.{\cst@etc}{\cst@etc.\cst@xspace}}
\providecommand{\invacuo}%
{\latin{in vacuo}\cst@xspace}
\providecommand{\etal}%
- {\latin{et~al}\@ifnextchar.{}{.\cst@xspace}}
- \providecommand{\eg}%
- {\latin{e.g}\cst@addpunct}
- \providecommand{\ie}%
- {\latin{i.e}\cst@addpunct}
+ {\@ifnextchar.{\cst@etal}{\cst@etal.\cst@xspace}}
+ \ifcst@comma
+ \providecommand{\eg}%
+ {\cst@eg\cst@addpunct}
+ \providecommand{\ie}%
+ {\cst@ie\cst@addpunct}
+ \else
+ \providecommand{\eg}%
+ {\@ifnextchar.{\cst@eg}{\cst@eg.\cst@xspace}}
+ \providecommand{\ie}%
+ {\@ifnextchar.{\cst@ie}{\cst@ie.\cst@xspace}}
+ \fi
}
\fi
+\def\cst@etal{\latin{et~al}}
+\def\cst@etc{\latin{etc}}
+\def\cst@ie{\latin{i.e\spacefactor999\relax}}
+\def\cst@eg{\latin{e.g\spacefactor999\relax}}
\newif \ifcst@notesbefore \cst@notesbeforetrue
\def\cst@name@refs#1#2#3{%
\ifcst@notesbefore
@@ -195,18 +214,18 @@
\fi
}
\def\cst@language{english}
-\ifx\refname\@undefined
- \ifx\bibname\@undefined
- \PackageWarning{chemstyle}%
- {No bibliography name command defined in document class}
- \def\cst@namerefs#1#2#3#4{}%
- \else
- \def\cst@refsection{\bibname}
- \fi
- \else
- \def\cst@refsection{\refname}
-\fi
-\ifx\cst@namerefs\@undefined
+\@ifundefined{refname}{%
+ \@ifundefined{bibname}{%
+ \PackageWarning{chemstyle}%
+ {No bibliography name command defined in document class}%
+ \def\cst@namerefs#1#2#3#4{}%
+ }{%
+ \def\cst@refsection{\bibname}%
+ }
+}{%
+ \def\cst@refsection{\refname}%
+}
+\@ifundefined{cst@namerefs}{%
\def\cst@namerefs#1#2#3#4{%
\ifcst@notes%
\def\cst@language@check{#1}
@@ -233,11 +252,13 @@
{}}
\fi%
}
-\fi
+}{}
\cst@namerefs{english}{References}{and}{Notes}
\cst@namerefs{UKenglish}{References}{and}{Notes}
\cst@namerefs{ngerman}{Literatur}{und}{Notizen}
+\cst@namerefs{german}{Literatur}{und}{Notizen}
\cst@namerefs{french}{R\'ef\'erences}{et}{Notes}
+\cst@namerefs{frenchb}{R\'ef\'erences}{et}{Notes}
\ifx\cst@option\relax
\PackageWarning{chemstyle}
{You didn't say which style to use \MessageBreak