summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/rsc/rsc.sty
blob: 9be55898478778ddf12643fe47c8f933ac792f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
%%
%% This is file `rsc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% rsc.dtx  (with options: `package')
%% ----------------------------------------------------------------
%% 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}
  [2016/08/22 v31.f Support for RSC and Wiley journals]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
  family = rsc,
  prefix = rsc@
}
\DeclareBoolOption{linkdoi}
\DeclareBoolOption{mciteplus}
\DeclareBoolOption{super}
\DeclareBoolOption{usetitle}
\DeclareBoolOption{usedoi}
\DeclareStringOption{maxauthors}
\setkeys{rsc}{
  linkdoi    = false,
  mciteplus  = true,
  maxauthors = 0,
  usetitle   = false,
  usedoi     = false,
  super      = true
}
\ProcessKeyvalOptions{rsc}
\ifrsc@super
  \RequirePackage[sort&compress,numbers,super]{natbib}
  \IfFileExists{natmove.sty}{%
    \RequirePackage{natmove}}{}
\else
  \RequirePackage[sort&compress,numbers]{natbib}
\fi
\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-link-doi}{%
        \ifrsc@linkdoi 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}{%
  \ifrsc@mciteplus
    \RequirePackage{mciteplus}
  \fi
}{}
\AtBeginDocument{%
  \let\rsc@bibliography\bibliography
  \renewcommand*{\bibliography}[1]{%
    \rsc@bibliography{rsc-\jobname,#1}%
  }%
}
%% 
%% Copyright (C) 2006-2009,2011,2013,2016 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'.