summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/chemscheme/chemscheme.sty
blob: 9a21fa96f67cac38dd07f10619cd67a4ee6509c0 (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
%%
%% This is file `chemscheme.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chemscheme.dtx  (with options: `package')
%%  ----------------------------------------------------------------
%%  The chemscheme package - Support for chemical schemes
%%  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{chemscheme}%
  [2007/07/21 v1.0 Support for chemical schemes]
\RequirePackage{psfrag}
\@ifclassloaded{memoir}{}
  {\RequirePackage{float}}
\newif  \ifCHEMSCH@chapter   \CHEMSCH@chapterfalse
\newif  \ifCHEMSCH@bpchem    \CHEMSCH@bpchemtrue
\DeclareOption{chapter}{\global\CHEMSCH@chaptertrue}
\DeclareOption{chemcompounds}{\global\CHEMSCH@bpchemfalse}
\DeclareOption{bpchem}{}
\ProcessOptions
\newcommand*{\schemename}{Scheme}
\newcommand*{\listschemes}{List of Schemes}
\ifCHEMSCH@chapter
  \ifx\chapter\@undefined
    \PackageWarning{chemscheme}%
      {No chapters in this document \MessageBreak%
       Ignoring `chapter' option}
       \@ifclassloaded{memoir}
         {\newfloat{scheme}{los}{\schemename}}
         {\newfloat{scheme}{tbp}{los}}
  \else
    \@ifclassloaded{memoir}
      {\newfloat[chapter]{scheme}{los}{\schemename}}
      {\newfloat{scheme}{tbp}{los}[chapter]}
  \fi
\else
  \@ifclassloaded{memoir}
    {\newfloat{scheme}{los}{\schemename}}
    {\newfloat{scheme}{tbp}{los}}
\fi
\@ifclassloaded{memoir}
  {\newlistof{listofschemes}{los}{\listschemes}}
  {\floatname{scheme}{\schemename}
    \newcommand*{\listofschemes}[1][\listschemes]%
      {\listof{scheme}{#1}}}
\newcommand{\chemschemerefmarker}{TMP}
\newcommand{\chemschemerefformat}{\textsf}
\ifCHEMSCH@bpchem
  \RequirePackage{bpchem}
  \let\CHEMSCH@label\CNlabel
\else
  \RequirePackage{chemcompounds}
  \let\CHEMSCH@label\compound
\fi
\newcommand{\chemschemeref}[2]{%
  \psfrag{\chemschemerefmarker#1}[b][b]%
  {\chemschemerefformat{\CHEMSCH@label{#2}}}%
}
\ifCHEMSCH@bpchem
  \newcommand{\chemschemerefsub}[3]{%
    \psfrag{\chemschemerefmarker#1}[b][b]%
    {\chemschemerefformat{\CNlabelsub{#2}{#3}}}%
  }
\else
  \newcommand{\chemschemerefsub}[3]{%
    \PackageWarning{chemscheme}%
    {`chemcompound' option active\MessageBreak
      Command \protect\chemschemerefsub\space not used \MessageBreak
      Please alter your source to \MessageBreak
      \protect\chemschemeref}}
\fi
\endinput
%%
%% End of file `chemscheme.sty'.