summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/rsc/rsc.sty
blob: 30d162cfa96f44c0da6b21ea525344676008a44b (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
%%
%% This is file `rsc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% rsc.dtx  (with options: `package')
%%  ----------------------------------------------------------------
%%  The rsc package - BibTeX and macro support for Royal Society
%%  of Chemistry style articles
%%  Maintained by Joseph A. 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}[2006/11/08 v1.0 Useful chemistry functions]
\RequirePackage{unitsdef,graphicx,amssymb,fixltx2e,float,varioref}
\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}
\ProcessOptions
\newunit{\cubiccentimeter}{\cm\unitsuperscript{3}}
\newcommand*{\cmc}{\cubiccentimeter}
\newcommand*{\Hz}{\hertz}
\newunit{\Molar}{\textsc{m}}
\newunit{\molar}{\mole\unitsep\dm\unitsuperscript{--3}}
\newunit{\mmHg}{mm\unitsep{}Hg}
\newcommand*{\standardstate}%
  {\textsuperscript{\rotatebox[origin=c]{140.8}%
  {\ensuremath{\varnothing}}}}
\newcommand*{\iPr}{Pr\textsuperscript{i}}
\newcommand*{\iBu}{Bu\textsuperscript{i}}
\newcommand*{\tBu}{Bu\textsuperscript{t}}
\ifRSC@chapter
  \ifx\chapter\@undefined
     \@latex@warning{No chapters in this document}
     \newfloat{Scheme}{htbp}{los}
     \newfloat{Figure}{htbp}{lof}
     \newfloat{Table}{htbp}{lot}
  \else
     \newfloat{Scheme}{htbp}{los}[chapter]
     \newfloat{Figure}{htbp}{lof}[chapter]
     \newfloat{Table}{htbp}{lot}[chapter]
  \fi
\else
  \newfloat{Scheme}{htbp}{los}
  \newfloat{Figure}{htbp}{lof}
  \newfloat{Table}{htbp}{lot}
\fi
\floatname{Scheme}{Scheme}
\floatname{Table}{Table}
\floatname{Figure}{Fig.}
\ifRSC@captioncentre
  \renewcommand\floatc@plain[2]%
    {\setbox\@tempboxa\hbox{\textbf{{\@fs@cfont #1}}\quad #2}%
    \ifdim\wd\@tempboxa>\hsize {\textbf{\@fs@cfont #1}}\quad #2\par
      \else\hbox to\hsize{\hfil\box\@tempboxa\hfil}\fi}
\else
  \renewcommand\floatc@plain[2]{\textbf{{\@fs@cfont #1}}\quad #2}
\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}}
\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}
\labelformat{Figure}{Fig.~#1}
\labelformat{Table}{Table~#1}
\endinput
%%
%% End of file `rsc.sty'.