summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/rsc/rsc.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-07 14:11:20 +0000
committerKarl Berry <karl@freefriends.org>2009-05-07 14:11:20 +0000
commit47a56b5dc7f17f502aee404c912490f135ca3c52 (patch)
tree7a2e51b382a1c23a02edbea14be935fe453343ab /Master/texmf-dist/tex/latex/rsc/rsc.sty
parenta4f87700e8526eea8269d63d945f357ad10cc2bb (diff)
rsc update
git-svn-id: svn://tug.org/texlive/trunk@12985 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/rsc/rsc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/rsc/rsc.sty131
1 files changed, 86 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/rsc/rsc.sty b/Master/texmf-dist/tex/latex/rsc/rsc.sty
index 2b31377782a..837993cc98f 100644
--- a/Master/texmf-dist/tex/latex/rsc/rsc.sty
+++ b/Master/texmf-dist/tex/latex/rsc/rsc.sty
@@ -5,67 +5,108 @@
%% The original source files were:
%%
%% rsc.dtx (with options: `package')
-%% ----------------------------------------------------------------
-%% The rsc package --- BibTeX styles for Royal Society of Chemistry
-%% and Wiley journals
-%% 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
-%% ----------------------------------------------------------------
+%% ----------------------------------------------------------------
+%% rsc --- BibTeX styles for Royal Society of Chemistry and Wiley
+%% journals
+%% 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}
\ProvidesPackage{rsc}
- [2008/08/27 v3.0 Support for RSC and Wiley journals]
-\RequirePackage{mciteplus,kvoptions}
+ [2009/05/06 v3.1a Support for RSC and Wiley journals]
+\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family = rsc,
- prefix = rsc@}
+ prefix = rsc@
+}
\DeclareBoolOption{super}
\DeclareBoolOption{usetitle}
\DeclareBoolOption{usedoi}
\DeclareStringOption{maxauthors}
\setkeys{rsc}{
maxauthors = 0,
- usetitle = false,
- usedoi = false,
- super = true}
+ usetitle = false,
+ usedoi = false,
+ super = true
+}
\ProcessKeyvalOptions{rsc}
-\newcommand*{\rsc@prefix}{rsc-}
-\edef\rsc@msg{%
- This is an auxiliary file used by the `rsc' package.^^J%
- This file may safely be deleted. It will be recreated as
- required.^^J}
-\if@filesw
- \newwrite\rsc@out
- \newcommand*\rsc@stream{\rsc@prefix\jobname.bib}%
- \immediate\openout\rsc@out\rsc@stream\relax
- \immediate\write\rsc@out{\rsc@msg}%
- \edef\@tempa#1#2{\space\space#1\space=\space"#2",^^J}%
- \immediate\write\rsc@out{%
- @Control\string{rsc-control,^^J%
- \@tempa{ctrl-use-title}{\ifrsc@usetitle yes\else no\fi}%
- \@tempa{ctrl-etal-number}{\rsc@maxauthors}%
- \@tempa{ctrl-use-doi-all}{\ifrsc@usedoi yes\else no\fi}%
- \string}^^J}%
-\fi
-\AtBeginDocument{
- \let\rsc@bibliography\bibliography
- \renewcommand*{\bibliography}[1]{%
- \rsc@bibliography{\rsc@prefix\jobname,#1}}}
-\g@addto@macro{\document}{%
- \if@filesw
- \immediate\write\@auxout{%
- \string\citation\string{rsc-control\string}}%
- \fi}
\ifrsc@super
\RequirePackage[sort&compress,numbers,super]{natbib}
- \IfFileExists{natmove.sty}
- {\RequirePackage{natmove}}
- {}
+ \IfFileExists{natmove.sty}{%
+ \RequirePackage{natmove}}{}
\else
\RequirePackage[sort&compress,numbers]{natbib}
\fi
-\endinput
+\newwrite\rsc@bib@file
+\newcommand*{\rsc@bib@message}{%
+ This is an auxiliary file used by the `rsc' package.^^J%
+ This file may safely be deleted. It will be recreated as
+ required.^^J
+}
+\newcommand*{\rsc@bib@name}{rsc-\jobname.bib}
+\newcommand*{\rsc@bib@write}{%
+ \if@filesw
+ \expandafter\rsc@bib@write@aux
+ \fi
+}
+\AtBeginDocument{\rsc@bib@write}
+\newcommand*{\rsc@bib@write@aux}{%
+ \immediate\openout\rsc@bib@file\rsc@bib@name\relax
+ \immediate\write\rsc@bib@file{\rsc@bib@message}%
+ \edef\@tempa##1##2{%
+ \space\space##1\space = \space"##2",^^J%
+ }%
+ \immediate\write\rsc@bib@file{%
+ @Control\string{%
+ rsc-control,^^J%
+ \@tempa{ctrl-use-title}{%
+ \ifrsc@usetitle yes\else no\fi
+ }%
+ \@tempa{ctrl-use-doi-all}{%
+ \ifrsc@usedoi yes\else no\fi
+ }%
+ \@tempa{ctrl-etal-number}{\rsc@maxauthors}%
+ \string}^^J%
+ }%
+ \immediate\write\@auxout{%
+ \string\citation\string{rsc-control\string}%
+ }%
+ \AtEndDocument{%
+ \immediate\closeout\rsc@bib@file\relax
+ }%
+}
+\IfFileExists{mciteplus.sty}{%
+ \RequirePackage{mciteplus}
+}{}
+\AtBeginDocument{%
+ \let\rsc@bibliography\bibliography
+ \renewcommand*{\bibliography}[1]{%
+ \rsc@bibliography{rsc-\jobname,#1}%
+ }%
+}
+%%
+%% 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 rsc.dtx
+%% and the derived files rsc.pdf,
+%% rsc.ins,
+%% rsc.sty,
+%% rsc.bib and
+%% rsc-demo.tex.
+%%
+%%
%%
%% End of file `rsc.sty'.