From 88bf879fc17cc3d52eafa0c4667732bbfa3bc6a7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 26 Jul 2007 18:17:15 +0000 Subject: rsc update (22jul07) git-svn-id: svn://tug.org/texlive/trunk@4661 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/rsc/rsc.sty | 146 ++++++++++++++++---------------- 1 file changed, 73 insertions(+), 73 deletions(-) (limited to 'Master/texmf-dist/tex/latex/rsc') diff --git a/Master/texmf-dist/tex/latex/rsc/rsc.sty b/Master/texmf-dist/tex/latex/rsc/rsc.sty index 08ae5897ad9..658239f8701 100644 --- a/Master/texmf-dist/tex/latex/rsc/rsc.sty +++ b/Master/texmf-dist/tex/latex/rsc/rsc.sty @@ -8,30 +8,41 @@ %% ---------------------------------------------------------------- %% The rsc package - BibTeX and macro support for Royal Society %% of Chemistry and Wiley chemistry articles -%% Maintained by Joseph A. Wright +%% Maintained by Joseph Wright %% E-mail: joseph.wright@morningstar2.co.uk %% Released under the GNU General Public License %% See http://www.gnu.org/licenses/gpl.txt %% ---------------------------------------------------------------- + \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{rsc}[2007/01/01 v1.1 -Useful chemistry functions] -\RequirePackage{unitsdef,graphicx,amssymb,fixltx2e,float,varioref} -\RequirePackage[super]{cite} -\RequirePackage[labelsep=quad,labelfont=bf]{caption} -\newif\ifRSC@floatcentre\RSC@floatcentretrue -\DeclareOption{floatleft}{\global\RSC@floatcentrefalse} -\DeclareOption{fl}{\global\RSC@floatcentrefalse} -\newif\ifRSC@captioncentre\RSC@captioncentretrue -\DeclareOption{captionleft}{\global\RSC@captioncentrefalse} -\DeclareOption{cl}{\global\RSC@captioncentrefalse} -\newif\ifRSC@chapter\RSC@chapterfalse -\DeclareOption{chapter}{\global\RSC@chaptertrue} -\DeclareOption{ch}{\global\RSC@chaptertrue} -\newif\ifRSC@angew\RSC@angewfalse +\ProvidesPackage{rsc}[2007/07/21 v2.0 + Useful chemistry functions] +\RequirePackage{unitsdef,graphicx,amssymb,fixltx2e,varioref} +\newif \ifRSC@fl \RSC@flfalse +\newif \ifRSC@cl \RSC@clfalse +\newif \ifRSC@chapter \RSC@chapterfalse +\newif \ifRSC@angew \RSC@angewfalse +\newif \ifRSC@natbib \RSC@natbibfalse +\DeclareOption{floatleft}{\global\RSC@fltrue} +\DeclareOption{fl}{\global\RSC@fltrue} +\DeclareOption{captionleft}{\global\RSC@cltrue} +\DeclareOption{cl}{\global\RSC@cltrue} +\DeclareOption{chapter}{\global\RSC@chaptertrue% + \PassOptionsToPackage{chapter}{chemscheme}} +\DeclareOption{ch}{\global\RSC@chaptertrue% + \PassOptionsToPackage{chapter}{chemscheme}} \DeclareOption{angew}{\global\RSC@angewtrue% -\global\RSC@captioncentrefalse} + \global\RSC@cltrue} +\DeclareOption{natbib}{\global\RSC@natbibtrue} +\DeclareOption{chemcompounds}% + {\PassOptionsToPackage{chemcompounds}{chemscheme}} \ProcessOptions +\RequirePackage{chemscheme} +\ifRSC@natbib + \RequirePackage[numbers,sort&compress,super]{natbib} +\else + \RequirePackage[super]{cite} +\fi \newunit{\cubiccentimeter}{\cm\unitsuperscript{3}} \newcommand*{\cmc}{\cubiccentimeter} \newcommand*{\Hz}{\hertz} @@ -41,74 +52,63 @@ Useful chemistry functions] \newcommand*{\standardstate}% {\textsuperscript{\rotatebox[origin=c]{140.8}% {\ensuremath{\varnothing}}}} -\newcommand*{\iPr}{\ifRSC@angew\emph{i}Pr\else Pr\textsuperscript{i}\fi} -\newcommand*{\iBu}{\ifRSC@angew\emph{i}Bu\else Bu\textsuperscript{i}\fi} -\newcommand*{\tBu}{\ifRSC@angew\emph{t}Pr\else Bu\textsuperscript{t}\fi} -\ifRSC@angew - \def\@citess#1{\textsuperscript{[#1]}} -\fi +\newcommand*{\iPr}% + {\ifRSC@angew\emph{i}Pr\else Pr\textsuperscript{i}\fi} +\newcommand*{\iBu}% + {\ifRSC@angew\emph{i}Bu\else Bu\textsuperscript{i}\fi} +\newcommand*{\sBu}% + {\ifRSC@angew\emph{s}Bu\else Bu\textsuperscript{s}\fi} +\newcommand*{\tBu}% + {\ifRSC@angew\emph{t}Bu\else Bu\textsuperscript{t}\fi} \ifRSC@angew - \floatstyle{plaintop} - \captionsetup[Table]{labelsep=colon} - \captionsetup[Scheme]{labelsep=period} - \captionsetup[Figure]{labelsep=period} -\fi -\ifRSC@captioncentre - \relax -\else - \captionsetup{singlelinecheck=off} -\fi -\ifRSC@chapter - \ifx\chapter\@undefined - \PackageError{rsc}{No chapters in this document}\@eha - \newfloat{Scheme}{htbp}{los} - \newfloat{Figure}{htbp}{lof} - \newfloat{Table}{htbp}{lot} + \ifRSC@natbib + \renewcommand\NAT@open{[}\renewcommand\NAT@close{]} \else - \newfloat{Scheme}{htbp}{los}[chapter] - \newfloat{Figure}{htbp}{lof}[chapter] - \newfloat{Table}{htbp}{lot}[chapter] + \def\@citess#1{\textsuperscript{[#1]}} \fi -\else - \newfloat{Scheme}{htbp}{los} - \newfloat{Figure}{htbp}{lof} - \newfloat{Table}{htbp}{lot} + \else + \def\@biblabel#1{#1} \fi -\floatname{Scheme}{Scheme} -\floatname{Table}{Table} \ifRSC@angew - \floatname{Figure}{Figure} + \RequirePackage[labelsep=period,labelfont=bf]{caption} + \captionsetup[table]{labelsep=colon} \else - \floatname{Figure}{Fig.} + \RequirePackage[labelsep=quad,labelfont=bf]{caption} \fi -\ifRSC@floatcentre - \newenvironment{scheme}[1][htbp]{\begin{Scheme}[#1]\centering} - {\end{Scheme}} - \renewenvironment{figure}[1][htbp]{\begin{Figure}[#1]\centering} - {\end{Figure}} - \renewenvironment{table}[1][htbp]{\begin{Table}[#1]\centering} - {\end{Table}} +\ifRSC@cl + \captionsetup{singlelinecheck=off} \else - \newenvironment{scheme}[1][htbp]{\begin{Scheme}[#1]\flushleft} - {\end{Scheme}} - \renewenvironment{figure}[1][htbp]{\begin{Figure}[#1]\flushleft} - {\end{Figure}} - \renewenvironment{table}[1][htbp]{\begin{Table}[#1]\flushleft} - {\end{Table}} \fi -\newcommand*{\listofschemes}[1][List of Schemes]% - {\listof{Scheme}{#1}} -\renewcommand*{\listoffigures}[1][List of Figures]% - {\listof{Figure}{#1}} -\renewcommand*{\listoftables}[1][List of Tables]% - {\listof{Table}{#1}} -\labelformat{Scheme}{Scheme~#1} \ifRSC@angew - \labelformat{Figure}{Figure~#1} \else - \labelformat{Figure}{Fig.~#1} + \renewcommand{\figurename}{Fig.} +\fi +\@ifclassloaded{memoir} + {\let\newfloat\@undefined + \RequirePackage{float}} + {} +\floatstyle{plaintop} +\restylefloat{table} +\floatstyle{plain} +\restylefloat{scheme} +\restylefloat{figure} +\floatplacement{table}{htbp} +\floatplacement{scheme}{htbp} +\floatplacement{figure}{htbp} +\newcommand*{\floatcontentscentre}% + {\let\RSC@everyfloat\centering} +\newcommand*{\floatcontentsleft}% + {\let\RSC@everyfloat\relax} +\let\RSC@floatboxreset\@floatboxreset +\def\@floatboxreset{\RSC@everyfloat\RSC@floatboxreset} +\ifRSC@fl + \floatcontentsleft +\else + \floatcontentscentre \fi -\labelformat{Table}{Table~#1} +\labelformat{scheme}{\schemename~#1} +\labelformat{figure}{\figurename~#1} +\labelformat{table}{\tablename~#1} \endinput %% %% End of file `rsc.sty'. -- cgit v1.2.3