summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/rsc/jawltxdoc.sty
blob: da4e197b06d8268d51de73e2aaa3edd76a613dd9 (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
%%
%% This is file `jawltxdoc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% rsc.dtx  (with options: `jawltxdoc')
%%  ----------------------------------------------------------------
%%  The rsc package - BibTeX support for Royal Society of Chemistry
%%  and Wiley style article
%%  Maintained by Joseph Wright
%%  E-mail: joseph.wright@morningstar2.co.uk
%%  Released under the LaTeX Project Public License v1.3 or later
%%  See http://www.latex-project.org/lppl.txt
%%  ----------------------------------------------------------------
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jawltxdoc}
\usepackage[T1]{fontenc}
\usepackage[english,UKenglish]{babel}
\usepackage[scaled=0.95]{helvet}
\usepackage[version=3]{mhchem}
\usepackage[final]{microtype}
\usepackage[osf]{mathpazo}
\usepackage{booktabs,array,url,graphicx,courier,xspace}
\usepackage{upgreek,ifpdf,listings}
\ifpdf
  \usepackage{embedfile}
  \embedfile[%
    stringmethod=escape,%
    mimetype=plain/text,%
    desc={LaTeX docstrip source archive for package `\jobname'}%
    ]{\jobname.dtx}
\fi
\IfFileExists{\jobname.sty}
  {\usepackage{\jobname}}{}
\usepackage[numbered]{hypdoc}
\newlength\LaTeXwidth
\newlength\LaTeXoutdent
\newlength\LaTeXgap
\setlength\LaTeXgap{1em}
\setlength\LaTeXoutdent{-0.15\textwidth}
\newcommand*{\typesetexampleandcode}{%
  \begin{list}{}{%
    \setlength\itemindent{0pt}
    \setlength\leftmargin\LaTeXoutdent
    \setlength\rightmargin{0pt}
  }
  \item
    \setlength\LaTeXoutdent{-0.15\textwidth}
    \begin{minipage}[c]{\textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap}
      \lst@sampleInput
    \end{minipage}%
    \hfill%
    \begin{minipage}[c]{\LaTeXwidth}%
      \hbox to\linewidth{\box\lst@samplebox\hss}%
    \end{minipage}%
  \end{list}
}
\newcommand*{\typesetcodeandexample}{%
  \begin{list}{}{%
    \setlength\itemindent{0pt}
    \setlength\leftmargin{0pt}
    \setlength\rightmargin{0pt}
  }
  \item
    \begin{minipage}[c]{\LaTeXwidth}%
      \hbox to\linewidth{\box\lst@samplebox\hss}%
    \end{minipage}%
    \lst@sampleInput
  \end{list}
}
\newcommand*{\typesetfloatexample}{%
  \begin{list}{}{%
    \setlength\itemindent{0pt}
    \setlength\leftmargin{0pt}
    \setlength\rightmargin{0pt}
  }
  \item
    \lst@sampleInput
    \begin{minipage}[c]{\LaTeXwidth}%
      \hbox to\linewidth{\box\lst@samplebox\hss}%
    \end{minipage}%
  \end{list}
}
\newcommand*{\typesetcodeonly}{%
  \begin{list}{}{%
    \setlength\itemindent{0pt}
    \setlength\leftmargin{0pt}
    \setlength\rightmargin{0pt}
  }
  \item
    \begin{minipage}[c]{\LaTeXwidth}%
      \hbox to\linewidth{\box\lst@samplebox\hss}%
    \end{minipage}%
  \end{list}
}
\edef\LaTeXexamplefile{\jobname.tmp}
\lst@RequireAspects{writefile}
\newbox\lst@samplebox
\lstnewenvironment{LaTeXexample}[1][\typesetexampleandcode]{%
  \let\typesetexample#1
  \global\let\lst@intname\@empty
  \setbox\lst@samplebox=\hbox\bgroup
  \setkeys{lst}{language=[LaTeX]{TeX},tabsize=4,gobble=3,%
    breakindent=0pt,basicstyle=\small\ttfamily,basewidth=0.51em,%
    keywordstyle=\color{blue},%
    morekeywords={% notes2bib
      niibsetup,bibnote,bibnotetext,bibnotemark,thebibnote,%
      flushnotestack,citenote,printbibnotes}}
  \lst@BeginAlsoWriteFile{\LaTeXexamplefile}
}{%
  \lst@EndWriteFile\egroup
  \setlength\LaTeXwidth{\wd\lst@samplebox}
  \typesetexample%
}
\newcommand*{\lst@sampleInput}{%
  \MakePercentComment\catcode`\^^M=10\relax
  \small%
  {\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
    {\lst@ProcessTabulator}}%
    \leavevmode \input{\LaTeXexamplefile}}%
  \MakePercentIgnore%
}
\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\currpkg}{\pkg{\jobname}\xspace}
\newcommand*{\opt}[1]{\texttt{#1}}
\newcommand*{\file}[1]{\texttt{#1}}
\newcommand*{\ext}[1]{\file{.#1}}
\newcommand*{\latin}[1]{\emph{#1}}
\newcommand*{\etc}{%
  \@ifnextchar.
    {\latin{etc}}
    {\latin{etc.}}
  \xspace}
\newcommand*{\eg}{%
  \@ifnextchar.
    {\latin{e.g}}
    {\latin{e.g.}}
  \xspace}
\newcommand*{\ie}{%
  \@ifnextchar.
    {\latin{i.e}}
    {\latin{i.e.}}
  \xspace}
\newcommand*{\AMS}{{\protect\usefont{OMS}{cmsy}{m}{n}%
  A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
\providecommand*{\eTeX}{\ensuremath{\varepsilon}-\TeX}
\newcommand*{\XeTeX}
  {X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\kern-.1667em\TeX}
\endinput
%%
%% End of file `jawltxdoc.sty'.