summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/chemstyle
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-17 22:54:25 +0000
committerKarl Berry <karl@freefriends.org>2008-07-17 22:54:25 +0000
commitf92b5dd10f840cfa7f2d1d57a12fc7c8eb1983e1 (patch)
tree528bcf3544e2203a08ab01c115ff63f9bd92398b /Master/texmf-dist/source/latex/chemstyle
parentff7a7bf6f420fc03ff766c5f4a6596b823f5a493 (diff)
chemstyle 1.3 (17jul08)
git-svn-id: svn://tug.org/texlive/trunk@9643 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/chemstyle')
-rw-r--r--Master/texmf-dist/source/latex/chemstyle/chemscheme.dtx1994
-rw-r--r--Master/texmf-dist/source/latex/chemstyle/chemscheme.ins51
-rw-r--r--Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx584
-rw-r--r--Master/texmf-dist/source/latex/chemstyle/chemstyle.ins111
4 files changed, 2434 insertions, 306 deletions
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemscheme.dtx b/Master/texmf-dist/source/latex/chemstyle/chemscheme.dtx
new file mode 100644
index 00000000000..d9a0a2c381d
--- /dev/null
+++ b/Master/texmf-dist/source/latex/chemstyle/chemscheme.dtx
@@ -0,0 +1,1994 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2007-08 by
+% Joseph Wright <joseph.wright@morningstar2.co.uk>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained.'
+%
+% The current maintainer of this work is Joseph Wright.
+%
+% This work consists of the source file chemscheme.dtx and
+% chemscheme.cdx
+% and the derived files chemscheme.ins,
+% chemscheme.sty,
+% chemscheme.pdf,
+% chemscheme-manual.pdf,
+% chemscheme-demo.ltx,
+% scheme-one.eps,
+% scheme-two.eps,
+% jawltxdoc.sty and
+%
+% TDS-ready files:
+% The compressed file chemscheme.tds.zip contains an unpacked
+% version of all of the files included here, and pre-compiled
+% documentation in PDF format. Simply decompress
+% chemscheme.tds.dtx in your local TeX directory, run your hash
+% program (texhash, initexmf --update-fndb, etc.) and everything
+% will be ready to go. The user documentation for the package is
+% called chemscheme-manual.pdf; the file chemscheme.pdf includes
+% the user manual and the fully-indexed source code.
+%
+% Unpacking:
+% (a) If chemscheme.ins is present:
+% tex chemscheme.ins
+% (b) Without chemscheme.ins:
+% tex chemscheme.dtx
+% (c) If you use LaTeX to generate files:
+% latex \let\install=y\input{chemscheme.dtx}
+%
+% Documentation:
+% (a) Without write18 enabled:
+% latex chemscheme.dtx
+% (Comment out "inactive" line in driver where indicated)
+% latex chemscheme.dtx
+% dvips -o chemscheme-pics.ps chemscheme.dvi
+% ps2pdf chemscheme-pics.ps
+% bibtex8 --wolfgang chemscheme.aux
+% makeindex -s gind.ist chemscheme.idx
+% makeindex -s gglo.ist -o chemscheme.gls chemscheme.glo
+% pdflatex chemscheme.dtx
+% pdflatex chemscheme.dtx
+% (b) With write18 enabled:
+% latex chemscheme.dtx
+% (Comment out "inactive" line in driver where indicated)
+% latex chemscheme.dtx
+% pdflatex chemscheme.dtx
+% pdflatex chemscheme.dtx
+% pdflatex chemscheme.dtx
+%
+% Installation:
+% Copy chemscheme.sty and the various .cfg files to a location
+% searched by TeX, and if required by your TeX installation, run
+% the appropriate command to build a hash of files (texhash,
+% initexmf --update-fndb, etc.)
+%
+% Note:
+% The jawltxdoc.sty file is not needed for installation,
+% only for building the documentation; it may be deleted
+% after producing the documentation (if necessary).
+%
+%<*ignore>
+% This is all taken verbatim from Heiko Oberdiek's packages
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+ ----------------------------------------------------------------
+ The chemstyle bundle --- Schemes and style for chemistry
+ 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
+ ----------------------------------------------------------------
+
+\endpreamble
+\Msg{Generating chemscheme files:}
+\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
+}
+\usedir{tex/latex/chemstyle}
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+\usedir{source/latex/chemstyle}
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\nopreamble
+\usedir{doc/latex/chemstyle}
+\generate{\file{\jobname.bib}{\from{\jobname.dtx}{refs}}
+}
+\nopreamble\nopostamble
+\usedir{doc/latex/chemstyle}
+\generate{\file{scheme-one.eps}{\from{\jobname.dtx}{scheme}}
+ \file{scheme-two.eps}{\from{\jobname.dtx}{scheme,labels}}
+ \file{chemscheme-demo.ltx}{\from{\jobname.dtx}{demo}}
+}
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+% Will Robertson's trick
+\immediate\write18{bibtex8 --wolfgang \jobname}
+\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
+\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
+\immediate\write18{dvips -o \jobname-pics.ps \jobname.dvi}
+\immediate\write18{ps2pdf \jobname-pics.ps}
+%</ignore>
+%<*driver>
+\PassOptionsToClass{a4paper}{article}
+\documentclass[german,english,UKenglish]{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+%\OnlyDescription
+\usepackage{jawltxdoc}
+% A bit of one-off trickery for this package
+% Use the method described in the documentation if you
+% want to compile this DTX using PDFLaTeX
+\usepackage[final
+% Comment out the next line when using PDFLaTeX after the initial
+% LaTeX run!
+% ,inactive
+ ]{pst-pdf}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+%\CheckSum{404}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \GetFileInfo{\jobname.sty}
+%
+% \changes{v1.0}{2007/07/21}{Initial public release}
+% \changes{v1.1}{2007/08/05}{Added float centring code}
+% \changes{v1.2}{2007/08/18}{Removed \texttt{chapter} option}
+% \changes{v1.2}{2007/08/18}{Improved emulation of standard float
+% types}
+%\changes{v1.2a}{2007/09/19}{License changed from GPL to LPPL}
+%\changes{v1.2a}{2007/09/19}{Documentation for PDF use added}
+%\changes{v1.3}{2007/10/04}{Improved French and German
+% \texttt{babel} support}
+%\changes{v1.4}{2008/06/24}{Added support for \pkg{floatrow}}
+%
+%\setkeys{lst}{language=[LaTeX]{TeX},moretexcs={}}
+%
+%\DoNotIndex{\@arabic,\@chapter,\@ifclassloaded,\@ifnextchar}
+%\DoNotIndex{\@ifpackageloaded,\@ifundefined,\@ne,\@tempa,\@tempb}
+%\DoNotIndex{\@undefined,\‘,\addto,\addtocontents,\addtodef}
+%\DoNotIndex{\addvspace,\advance,\AtBeginDocument,\backmatter}
+%\DoNotIndex{\begin,\c@chapter,\caption,\captionsfrench}
+%\DoNotIndex{\captionsfrenchb,\captionsgerman,\captionsngerman}
+%\DoNotIndex{\centering,\cftsetindents,\CNlabel,\CNlabelsub}
+%\DoNotIndex{\compound,\counterwithin,\counterwithout,\csname}
+%\DoNotIndex{\DeclareNewFloatType,\DeclareVoidOption,\def}
+%\DoNotIndex{\define@key,\documentclass,\edef,\else,\end,\endcsname}
+%\DoNotIndex{\expandafter,\FB@makecaption,\fi,\floatname,\floatsetup}
+%\DoNotIndex{\ifartopt,\IfLanguageName,\ifnum,\ifx,\includegraphics}
+%\DoNotIndex{\insertchapterspace,\kill@lastcounter,\label}
+%\DoNotIndex{\languagename,\let,\listof,\lowercase,\MessageBreak}
+%\DoNotIndex{\NeedsTeXFormat,\newcommand,\newcount,\newcounter}
+%\DoNotIndex{\newfloat,\newif,\newlistentry,\newlistof,\p@}
+%\DoNotIndex{\PackageError,\PackageInfo,\PackageWarning}
+%\DoNotIndex{\ProcessKeyvalOptions,\protect,\ProvidesPackage}
+%\DoNotIndex{\psfrag,\raggedleft,\relax,\renewcommand}
+%\DoNotIndex{\RequirePackage,\scshape,\selectlanguage,\setcounter}
+%\DoNotIndex{\SetupKeyvalOptions,\space,\string,\textsf,\the}
+%\DoNotIndex{\thechapter,\usepackage,\z@}
+%
+% \title{\texttt{chemscheme} --- Support for chemical schemes%
+% \thanks{This file describes version \fileversion, last revised
+% \filedate.}}
+% \author{Joseph Wright%
+% \thanks{E-mail: joseph.wright@morningstar2.co.uk}}
+% \date{Released \filedate}
+%
+% \maketitle
+%
+%\newcommand*{\flttype}[1]{\texttt{#1}}
+%\begin{abstract}
+% The \currpkg package consists of two parts, both related to
+% chemical schemes. The package adds a \flttype{scheme} float type
+% to the \LaTeX\ default types \flttype{figure} and \flttype{table}.
+% The \flttype{scheme} float type acts in the same way as those
+% defined by the \LaTeX\ kernel, but is intended for chemical
+% schemes. The package also provides a method for adding automatic
+% chemical numbering to schemes.
+%\end{abstract}
+%
+%\begin{multicols}{2}
+%\tableofcontents
+%\end{multicols}
+%
+%\section{Introduction}
+% By default, \LaTeX\ defines two float types, \flttype{figure} and
+% \flttype{table}. Synthetic chemists make heavy use of schemes,
+% which need a \flttype{scheme} float type. This is provided by
+% \currpkg, in a manner consistent with the kernel floats.
+%
+% Synthetic chemists also number compounds for ease of reference.
+% There are a number of \LaTeX\ packages which cover this area, most
+% notably \pkg{bpchem} and \pkg{chemcompounds}. However, adding
+% numbers automatically to schemes is not covered by any existing
+% package. The \currpkg package seeks to rectify this.
+%\floatcontentscentre
+%
+%\section{Floating schemes}
+%\subsection{Basic use}
+%\DescribeEnv{scheme}
+% The package provides a new float type, scheme, accessed in the
+% usual way.
+%\begin{LaTeXexample}[float]
+% \begin{scheme}[ht]
+% \includegraphics{scheme-one}
+% \caption{A scheme with no compound numbers.}
+% \end{scheme}
+%\end{LaTeXexample}
+% The \flttype{scheme} float is designed to behave in the same way as
+% the standard \LaTeX\ float environments \flttype{figure} and
+% \flttype{table}. Thus schemes will be placed at the top of a page,
+% where possible. As shown in the example, the use of positional
+% modifiers is allowed. Labelling and referencing schemes also
+% follows the \LaTeX\ conventions. \currpkg works hard to emulate
+% the document class in use, and so the exact behaviour will depend
+% on whether the standard classes, \textsc{koma}-Script or
+% \pkg{memoir} are being used.
+%
+%\DescribeMacro{\listofschemes}
+%\DescribeMacro{\listschemename}
+% To match the \cs{listoffigures} and \cs{listoftables} macros
+% provided by the \LaTeX\ kernel, \currpkg provides a
+% \cs{listofschemes} command. This works in the same way as the
+% kernel commands, with the default text stored in the macro
+% \cs{listschemename}. Users upgrading from version 1.1 should note
+% the change of macro name (from \cs{listscheme}). This is to bring
+% \currpkg into line with the \LaTeX\ kernel naming convention. Also
+% notice that \cs{listofschemes} no longer accepts an optional
+% argument. The standard output is illustrated below.
+%\begin{LaTeXexample}[resultonly]
+% \listofschemes
+%\end{LaTeXexample}
+%
+%\subsection{Altering the defaults}
+%\DescribeOption{floats}
+% There are a number of methods available to generate new float
+% types. The \pkg{memoir} class can do this internally, or the
+% \pkg{float} or \pkg{floatrow} packages can be loaded to provide the
+% necessary system. When \pkg{memoir} is used, \currpkg uses the
+% internal systems for generating new floats; for the standard
+% classes, \pkg{floatrow} is used by default. The \opt{floats}
+% package option can be used to control which method is employed.
+% This uses the key--value system, can can be given the values
+% \opt{float}, \opt{floatrow} or \opt{memoir}:
+%\begin{LaTeXexample}[noexample]
+% \usepackage[floats=float]{chemscheme}
+%\end{LaTeXexample}
+% or
+%\begin{LaTeXexample}[noexample]
+% \usepackage[floats=floatrow]{chemscheme}
+%\end{LaTeXexample}
+% or
+%\begin{LaTeXexample}[noexample]
+% \usepackage[floats=memoir]{chemescheme}
+%\end{LaTeXexample}
+% The package will use the specified method if available (so
+% \opt{memoir} only works if using the \pkg{memoir} class!). If
+% either \pkg{float} or \pkg{floatrow} is loaded before \currpkg,
+% this forces the choice.
+%
+%\DescribeMacro{\schemename}
+% \cs{schemename} contains the text used in scheme captions (by
+% default \schemename). This is used in the same manner as
+% \cs{figurename} or \cs{tablename} to set up the text used in scheme
+% captions.
+%\begin{LaTeXexample}[float]
+% \renewcommand*{\schemename}{Illustration}
+% \begin{scheme}[ht]
+% \includegraphics{scheme-one}
+% \caption{A scheme that is not a Scheme!}
+% \end{scheme}
+%\end{LaTeXexample}
+%
+%
+%\subsection{\pkg{babel} support}
+% Schemes are provided with some support for \pkg{babel}. Currently,
+% in addition to English, \currpkg provides alternatives for
+% \cs{schemename} and \cs{listschemename} in French and German. Users
+% of other languages are encouraged to supply suitable translations
+% for inclusion in future versions of \currpkg.
+%
+%\section{Horizontal positioning of all floats}
+%\DescribeMacro{\floatcontentscentre}
+%\DescribeMacro{\floatcontentscenter}
+%\DescribeMacro{\floatcontentsleft}
+%\DescribeMacro{\floatcontentsright}
+% The \LaTeX\ default is to position all float contents flush-left.
+% There is no ``hook'' provided to alter this. The \currpkg packages
+% therefore provides commands to align all float contents
+% automatically. As the macro names make clear,
+% \cs{floatcontentscentre} will make all floats centred (for users
+% speaking U.S.~English, the alternative spelling
+% \cs{floatcontentscenter} is also available). The default behaviour
+% is restored using the command \cs{floatcontentsleft}. Finally,
+% \cs{floatcontentsright} is provided for use if needed. Notice that
+% the float positioning commands should be given \emph{outside}
+% floating environments, and apply to all subsequent floats.
+%\begin{LaTeXexample}[float]
+% \floatcontentsleft
+% \begin{scheme}[ht]
+% \includegraphics{scheme-one}
+% \caption{A flush-left scheme.}
+% \end{scheme}
+% \floatcontentsright
+% \begin{scheme}[ht]
+% \includegraphics{scheme-one}
+% \caption{A flush-right scheme.}
+% \end{scheme}
+% \floatcontentscentre
+%\end{LaTeXexample}
+%
+% It is important to note that the positioning mechanism used here
+% relies on a low-level hack of the \LaTeX\ kernel. This has been
+% tested with the standard \LaTeX\ classes, the \pkg{memoir} class
+% and the \textsc{koma}-Script bundled. Other document classes may
+% not give the desired behaviour.
+%
+%\section{Reference numbers in graphics}
+%\subsection{Background}
+% There are a number of packages available on \CTAN\ for tracking
+% compound reference numbers. The two with the most up to date and
+% comprehensive features are \pkg{bpchem} and \pkg{chemcompounds}.
+% Both allow in-text numbering to be handled automatically. However,
+% neither will allow the use of these numbers directly in schemes,
+% figures, \etc. Both leave it to the user to manually adapt schemes
+% to match any changes in numbering.
+%
+% The \currpkg package provides a mechanism for rectifying this
+% issue. The package makes use of the \pkg{psfrag} package, which
+% means that it can only directly produce DVI output (using \LaTeX).
+% However, direct PDF output using PDF\LaTeX\ is possible: see
+% Section~\ref{subsec:pdf}.
+%
+%\DescribeMacro{\chemschemeref}
+%\DescribeMacro{\chemschemerefsub}
+% Users upgrading from v1.2 should note that ``\texttt{chem}'' has
+% been removed from the start of most macro names. The main
+% referencing commands \cs{chemschemeref} and \cs{chemschemerefsub}
+% are retained for backward compatibility.
+%
+%\subsection{Usage}
+% Getting automated numbers into schemes is a two step procedure. In
+% the first step, schemes (or other graphics) should be prepared as
+% normal and saved as encapsulated postscript (EPS) files The most
+% popular chemistry drawing package, \textsc{ChemDraw}, is able to do
+% this from the \texttt{Save As \ldots} dialog.
+%\DescribeMacro{\schemerefmarker}
+% The positions where the auto-labels should be have to be marked in
+% the EPS file. The marker should consist of an ``indicator'' that
+% the text is to be replaced, followed by a reference number or
+% letter. For automated substitution, the ``indicator'' text should
+% be the same in all graphics; the value it is stored in
+% \cs{schemerefmarker}, and has default value
+% \textsf{\schemerefmarker}. Thus the graphics should contain labels
+% \textsf{\schemerefmarker1}, \textsf{\schemerefmarker2}, \etc. A
+% suitable unmodified graphic is shown in in the next example.
+%\begin{LaTeXexample}[float]
+% \begin{scheme}[ht]
+% \includegraphics{scheme-two}
+% \caption{A scheme with temporary compound numbers.}
+% \end{scheme}
+%\end{LaTeXexample}
+% The value of \cs{schemerefmarker} may be altered as normal,
+% so for example to use \textsf{XXX} as the indicator for
+% replacement in all graphics, you would execute:
+%\begin{LaTeXexample}[noexample]
+% \renewcommand*{\chemeschemerefmarker}{XXX}
+%\end{LaTeXexample}
+%
+%\DescribeMacro{\schemeref}
+% In the second step, the command \cs{schemeref} is used to indicate
+% the mapping of the temporary markers to the automatically-managed
+% numbering. The syntax of the command is
+% \cs{chemschemeref}\oarg{temp-marker}\marg{label}, where
+% \meta{temp-marker} is the marker used in the graphic, and
+% \meta{label} is the name assigned to the compound by the user. By
+% default, \currpkg will assume that \meta{temp-marker} consists of
+% the marker plus a number, beginning at 1 and incrementing by 1 for
+% each additional structure inside one float. Each replacement
+% requires a separate \cs{chemschemeref}, all of which should appear
+% before the relevant \cs{includegraphics} command.
+%
+% An example will make usage clearer. In the example used in this
+% document, the starting material is given label \texttt{IMesHCl} and
+% the product is called \texttt{IMes}. As is shown in the next
+% example, in the EPS file these are labelled \textsf{TMP1} and
+% \textsf{TMP2}, respectively. The automated package defaults are
+% used.
+%\begin{LaTeXexample}[float]
+% \begin{scheme}[ht]
+% \schemeref{IMesHCl}
+% \schemeref{IMes}
+% \includegraphics{scheme-two}
+% \caption{A scheme with automated compound numbers.}
+% \end{scheme}
+%\end{LaTeXexample}
+% With user-specified information on the text to be replaced, the
+% entire text to be matched must be given.\footnote{In this example,
+% this is redundant as the automated system will work fine.}
+%\begin{LaTeXexample}[float]
+% \begin{scheme}[ht]
+% \schemeref[TMP1]{IMesHCl}
+% \schemeref[TMP2]{IMes}
+% \includegraphics{scheme-two}
+% \caption{A scheme with explicitly numbered temporary labels.}
+% \end{scheme}
+%\end{LaTeXexample}
+% Notice that the new label is centred on the middle of the temporary
+% marker, with the same baseline. This should allow the user to
+% obtain good alignment of labels and structures.
+%
+%\DescribeMacro{\schemerefsub}
+% As described in Section~\ref{packages}, \currpkg supports
+% \pkg{bpchem}, which allows tracking of sub-labels (\textbf{1a},
+% \textbf{1b}, \etc). To allow use of these in schemes, the
+% \cs{schemerefsub} command is provided. This takes an additional
+% argument \marg{sub-label}, which is used to generate the
+% appropriate text. When used with \pkg{chemcompounds}, this command
+% will gobble its arguments and issue a warning; no substitution will
+% take place.
+%
+%\DescribeMacro{\schemerefformat}
+% The format of chemical references is controlled by the underlying
+% package, \pkg{bpchem} or \pkg{chemcompounds}. However, it is
+% useful to be able to specify additional formatting for schemes. By
+% default, \currpkg formats all reference numbers in a sans serif
+% font. This is controlled by \cs{schemerefformat}.
+%\begin{LaTeXexample}[float]
+% % This needs the color or xcolor package loaded
+% \renewcommand*{\schemerefformat}
+% {\color{magenta}\textit}
+% \begin{scheme}[ht]
+% \schemeref{IMesHCl}
+% \schemeref{IMes}
+% \includegraphics{scheme-two}
+% \caption{A scheme with altered label formatting.}
+% \end{scheme}
+%\end{LaTeXexample}
+% The additional formatting applied within schemes may be altered by
+% redefining \cs{schemerefformat}. By careful choice of the
+% font commands given here, good visual matching should be obtained
+% between the automatically-generated labels and other text in the
+% scheme. In this document, the \textsc{ChemDraw} source uses 10
+% point Arial, with the \LaTeX\ sans serif font provided by the
+% \pkg{helvet} package, loaded scaled to 95\,\%, \ie:
+%\begin{LaTeXexample}[noexample]
+% \usepackage[scaled=0.95]{helvet}
+%\end{LaTeXexample}
+% The \textsc{ChemDraw} file used to generate the example schemes is
+% included with the package as \file{chemscheme.cdx}.
+%
+%\iffalse
+%<*demo>
+%\fi
+%\subsection{\currpkg and
+% \texorpdfstring{PDF\LaTeX}{PDFLaTeX}\label{subsec:pdf}}
+% The automatic substitution of numbers in graphics relies on the the
+% \pkg{psfrag} package. This works with \textsc{PostScript} files,
+% and cannot therefore be used with PDF\LaTeX. However, all is not
+% lost as the \pkg{pst-pdf} package provides a method for including
+% \textsc{PostScript} files in a PDF\LaTeX\ run. However, this is
+% not automatic and some effort is needed by the user.\footnote{The
+% rest of this section is based closely on an example by Stefan
+% Pinnow.} The example below shows a example for using PDF\LaTeX\
+% with \currpkg.
+% \begin{macrocode}
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage{graphicx,chemscheme}
+% Remove `inactive' after the first LaTeX run
+\usepackage[inactive,final]{pst-pdf}
+\begin{document}
+\floatcontentscentre
+An example file for PDFLaTeX use.
+\begin{scheme}
+ \schemeref{IMesHCl}
+ \schemeref{IMes}
+ \includegraphics{scheme-two}
+ \caption{A scheme with automated compound numbers.}
+ \label{sc:scheme-one}
+\end{scheme}
+\end{document}
+% \end{macrocode}
+%\iffalse
+%</demo>
+%\fi
+%
+% First you need to run the file through \LaTeX, so your package can
+% make the replacements in the picture. Then you need another run
+% through \LaTeX\ with the \opt{inactive} option \pkg{pst-pdf}
+% removed so that the modified pictures are extracted.\footnote{You
+% can simply do the first \LaTeX\ run without loading \pkg{pst-pdf}
+% at all, if you prefer.} Do not worry that you end up with a very
+% odd looking DVI! Then you have to convert the extracted pictures to
+% PDF by the following commands
+%\begin{verbatim}
+% dvips -o \jobname-pics.ps \jobname.dvi
+% ps2pdf \jobname-pics.ps
+%\end{verbatim}
+% This converts the modified graphics into PDF format. After this,
+% you can use PDF\LaTeX\ as normal for your schemes. Notice that you
+% will have to repeat the process if you need to modify the schemes
+% or numbering in any way.
+%
+%\subsection{Managing chemical numbering\label{packages}}
+%\DescribeOption{bpchem}
+%\DescribeOption{chemcompounds}
+%\DescribeOption{tracking}
+% The \currpkg package can use one of two packages for management of
+% chemical numbering: \pkg{bpchem} and \pkg{chemcompounds}. As of
+% v1.3, \pkg{chemcompounds} is the default package for managing
+% reference numbers.\footnote{The change from \pkg{bpchem} is due to
+% issues with \pkg{hyperref} support. The method used by
+% \pkg{bpchem} to generate compound labels means that they are made
+% into hyperlinks by \pkg{hyperref}, and therefore end up coloured
+% when using the \opt{colorlinks} option. This is unlikely to be the
+% desired effect, and \pkg{chemcompounds} does not behave in this
+% way.} Both packages have advantages: \pkg{bpchem} allows the
+% tracking of sub-references (very common in organic chemistry),
+% whilst \pkg{chemcompounds} has a very well thought-out interface.
+% It is technically feasible to support both simultaneously, but this
+% is unlikely to have wide application. For this reason, \currpkg
+% loads only one package, and uses this package to provide numbering
+% management. The \currpkg package recognises the \opt{bpchem} and
+% \opt{chemcompounds} to control this; the key--value version
+% \opt{tracking=\ldots} can also be given.
+%
+%\section{Generating chemical schemes}
+%
+%\subsection{Overview}
+% There are a number of ways of generating the graphical content of
+% schemes. The choice of method will depend on what is available to
+% the user, and how complex the schemes desired are. In this section,
+% an overview of several approaches is given.\footnote{Thanks to
+% Norwid-R.\ Behrnd for suggesting this section and giving a number
+% of useful examples and tips.} The package author, who is a
+% research worker in a university, favours using \textsc{ChemDraw} as
+% it is regarded by many synthetic chemists as the best tool for this
+% job. However, this is clearly overkill for users requiring a
+% single diagram on a one-off basis. \textsc{ChemDraw} is also a
+% commercial package running only under Windows and the MacOS. The
+% following is necessarily somewhat brief and selective. For a
+% thorough overview of graphics in \LaTeX, see Goossens
+% \etal~\cite{Goossens2007}.
+%
+%\subsection{Macro-based methods}
+% At the most basic, a chemical scheme is simply a collection of
+% lines and symbols, as with any vector diagram. Hence, it is
+% possible to construct schemes directly using packages such as
+% PSTricks or \pkg{pgf}/Ti\emph{k}z. This is a complex method, and
+% cannot be recommended for anyone except the very experienced and
+% brave.
+%
+% At a more practical level, there are two packages available which
+% allow typesetting of chemical structures in (La)\TeX, using
+% specialised commands: XyM\TeX\ and ppch\TeX. Recent versions of
+% the XyM\TeX\ package have not been made available on \CTAN, and the
+% version held there is therefore considered to be obsolete. On the
+% other hand, the ppch\TeX\ system, developed originally for
+% Con\TeX{}t, is available. Both systems suffer from the lack of
+% chemical logic in the input: it is very hard to tell from the code
+% what is being represented. Drawing items such as ``curly arrows'',
+% or making subtle alterations to positioning, is very challenging in
+% purely macro-based systems. For these reasons, it is usually much
+% more sensible to examine the available graphical methods.
+%
+%\subsection{Graphical methods}
+% Moving to graphical systems, there is no reason that
+% general-purpose vector drawing packages cannot be used for schemes.
+% There are obviously several commercial (\textsc{CorelDraw},
+% \textsc{Adobe Illustrator}, \etc) and freeware (for example
+% the \textsc{gimp}) drawing packages that can be used in this way.
+% Simply rings and lines can easily be constructed, although in
+% general-purpose programs the user has to watch that all bonds
+% are the same length.
+%
+% For producing a large number of complex schemes, the particular
+% abilities of dedicated software become a necessity. As well as the
+% already-mentioned \textsc{ChemDraw}, programs such as \textsc{ISIS
+% Draw} and \textsc{ChemSketch} are available free for personal
+% use;\footnote{``Free'' as in without charge, not as in open
+% source.} these programs are all Windows specific. In the
+% open-source arena, there are a number of packages such as
+% \textsc{XDrawChem} and \textsc{BKchem}, which offer cross-platform
+% functionality. The differences between the various packages are in
+% the ease of use, and ability to generate well-formattd output (for
+% example, aligning structures).
+%
+% One which deserves mention for the \TeX\ user is TpX. This is a
+% general purpose Windows graphics program specifically aimed at
+% producing \TeX-friendly output (such as PSTricks and \pkg{tikz}
+% code) from a graphical interface. TpX can accept clipboard data
+% from other programs, so can be used to produce EPS files from
+% programs which do not have native export facilities (such as
+% \textsc{ISIS Draw}).
+%
+%\section{Known issues}
+%
+% The interaction of the different document classes, with options,
+% plus the \pkg{babel} system means ensuring every possibility is
+% covered is impossible. Users are asked to report any problems with
+% compatibility with other packages or emulation of the standard
+% float types. Additional \pkg{babel} stings are also welcome, as
+% are improvements to those already provided.
+%
+% \StopEventually{\bibliographystyle{unsrt}\bibliography{chemscheme}}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \section{Implementation}
+%
+% \subsection{Setup code}
+%\begin{macro}{\csh@id}
+% The initial code goes through the usual steps of identifying the
+% package.
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\def\csh@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
+ #5/#6/#7\space v1.4\space}
+\ProvidesPackage{chemscheme}
+ [\csh@id $Id: chemscheme.dtx 36 2008-07-17 07:39:53Z joseph $
+ Support for chemical schemes]
+% \end{macrocode}
+%\end{macro}
+%\changes{v1.4}{2008/06/19}{Option handling completely re-written}
+%\begin{macro}{\ifcsh@bpchem}
+% Package options are handled using the key--value method, with
+% \pkg{kvoptions} providing the back-end. Most of the code here is
+% pretty basic; the aim is to set up the correct handling of
+% float-creation and compound tracking.
+% \begin{macrocode}
+\RequirePackage{kvoptions,psfrag,iflang}
+\SetupKeyvalOptions{
+ family=csh,
+ prefix=csh@}
+\newif\ifcsh@bpchem
+\define@key{csh}{tracking}
+ {\csh@bpchemtrue
+ \lowercase{\edef\@tempa{#1}}%
+ \def\@tempb{bpchem}%
+ \ifx\@tempa\@tempb\else
+ \def\@tempb{chemcompounds}%
+ \ifx\@tempa\@tempb
+ \csh@bpchemfalse
+ \else
+ \PackageError{chemscheme}
+ {Unknown value `#1' for option numbers}
+ {The `tracking' option accepts values `bpchem'
+ and `chemcompounds'}%
+ \fi
+ \fi}
+\DeclareVoidOption{chemcompounds}{\csh@bpchemfalse}
+\DeclareVoidOption{bpchem}{\csh@bpchemtrue}
+\DeclareVoidOption{chapter}
+ {\PackageInfo{chemscheme}
+ {Ignoring obsolete option `chapter'}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\csh@fltpkg}
+% The provision of floats can be handled by \pkg{floatrow},
+% \pkg{float} or \pkg{memoir}. The user is given an option, but if
+% one of the packages is already loaded then this has to be taken
+% into account.
+% \begin{macrocode}
+\define@key{csh}{floats}
+ {\lowercase{\renewcommand*{\csh@fltpkg}{#1}}%
+ \def\@tempa{floatrow}%
+ \ifx\csh@fltpkg\@tempa\else
+ \def\@tempa{float}%
+ \ifx\csh@fltpkg\@tempa\else
+ \def\@tempa{memoir}%
+ \ifx\csh@fltpkg\@tempa
+ \@ifclassloaded{memoir}{}
+ {\PackageWarning{chemscheme}
+ {You asked for floats to be created using memoir,
+ \MessageBreak but have used a different document
+ class\MessageBreak Using floatrow instead}%
+ \renewcommand*{\csh@fltpkg}{floatrow}}%
+ \else
+ \PackageError{chemscheme}
+ {Unknown value `#1' for option numbers}
+ {The `floats' option accepts values `float',
+ `floatrow' and `memoir'}%
+ \fi
+ \fi
+ \fi}
+\@ifpackageloaded{floatrow}
+ {\newcommand*{\csh@fltpkg}{floatrow}%
+ \define@key{csh}{floats}
+ {\PackageInfo{chemscheme}{Package floatrow already
+ loaded\MessageBreak Option `floats' disabled}}}
+ {\@ifpackageloaded{float}
+ {\newcommand*{\csh@fltpkg}{float}%
+ \define@key{csh}{floats}
+ {\PackageInfo{chemscheme}{Package float already
+ loaded\MessageBreak Option `floats' disabled}}}
+ {\@ifclassloaded{memoir}
+ {\newcommand*{\csh@fltpkg}{memoir}}
+ {\newcommand*{\csh@fltpkg}{floatrow}}}}
+\ProcessKeyvalOptions{csh}
+% \end{macrocode}
+%\end{macro}
+%\changes{v1.4}{2008/06/20}{Float creation rewritten}
+%\begin{macro}{\csh@load@memoir}
+%\begin{macro}{\csh@load@float}
+%\begin{macro}{\csh@load@floatrow}
+% The necessary support is loaded by using an appropriately-named
+% macro. For \pkg{memoir}, nothing actually has to be done.
+% \begin{macrocode}
+\newcommand*{\csh@load@memoir}{}
+\newcommand*{\csh@load@float}{%
+ \@ifpackageloaded{float}{}
+ {\let\newfloat\@undefined}
+ \RequirePackage{float,caption}}
+\newcommand*{\csh@load@floatrow}{%
+ \@ifpackageloaded{floatrow}{}
+ {\let\newfloat\@undefined}
+ \RequirePackage{floatrow,caption}}
+\csname csh@load@\csh@fltpkg\endcsname
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\subsection{Support for schemes}
+%\begin{macro}{\schemename}
+%\begin{macro}{\listschemename}
+%\changes{v1.2}{2007/08/18}{Replaces \cs{listschemes}}
+% The default name for a scheme, and the default title for the list
+% of schemes, are provided. Both command names follow the kernel
+% conventions for figures and tables; unlike the kernel versions,
+% however, these macros are not \cs{long}.
+% \begin{macrocode}
+\newcommand*{\schemename}{Scheme}
+\newcommand*{\listschemename}{List of Schemes}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\begin{environment}{scheme}
+%\begin{macro}{\listofschemes}
+%\begin{macro}{\csh@makesch@memoir}
+%\begin{macro}{\csh@mksch@memoir}
+%\begin{macro}{\csh@makesch@float}
+%\begin{macro}{\csh@mksch@float}
+%\begin{macro}{\csh@makesch@floatrow}
+% As with package loading, three different macros are defined here to
+% create the new float type. As well as the basics of creating the
+% float, some work is needed as adjustments must be made to match the
+% style of the kernel floats. For the \pkg{floatrow} package, things
+% have to be done in the preamble, whereas for the others everything
+% happens later.
+% \begin{macrocode}
+\newcommand*{\csh@makesch@memoir}{%
+ \AtBeginDocument{\csh@mksch@memoir}}
+\newcommand*{\csh@mksch@memoir}{%
+ \newfloat[chapter]{scheme}{los}{\schemename}
+ \kill@lastcounter{losdepth}
+ \renewcommand*{\thescheme}{\thechapter.\@arabic\c@scheme}
+ \addtodef{\@smemfront}{}{\counterwithout{scheme}{chapter}}
+ \addtodef{\@smemmain}{}{%
+ \ifartopt\else
+ \counterwithin{scheme}{chapter}
+ \fi}
+ \addtodef{\backmatter}{}{%
+ \ifartopt\else
+ \counterwithout{scheme}{chapter}%
+ \setcounter{scheme}{0}%
+ \fi}
+ \ifartopt
+ \counterwithout{scheme}{chapter}%
+ \fi
+ \newlistof{listofschemes}{los}{\listschemename}
+ \kill@lastcounter{losdepth}
+ \newlistentry[chapter]{scheme}{los}{0}
+ \cftsetindents{scheme}{0em}{2.3em}
+ \addtodef{\insertchapterspace}{}%
+ {\addtocontents{los}{\protect\addvspace{10pt}}}
+ \@ifundefined{c@losdepth}%
+ {\newcounter{losdepth}\setcounter{losdepth}{1}}{}}
+\newcommand*{\csh@makesch@float}{%
+ \AtBeginDocument{\csh@mksch@float}}
+\newcommand*{\csh@mksch@float}{%
+ \@ifundefined{chapter}
+ {\newfloat{scheme}{tbp}{los}}
+ {\newfloat{scheme}{tbp}{los}[chapter]%
+ \csh@fixchapter}%
+ \floatname{scheme}{\schemename}
+ \newcommand*{\listofschemes}{%
+ \listof{scheme}{\listschemename}}}
+\newcommand*{\csh@makesch@floatrow}{%
+ \DeclareNewFloatType{scheme}
+ {fileext=los,placement=tbp,name=Scheme}
+ \@ifundefined{chapter}{}
+ {\floatsetup[scheme]{within=chapter}%
+ \csh@fixchapter}%
+ \newcommand*{\listofschemes}{%
+ \listof{scheme}{\listschemename}}}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\csh@fixchapter}
+%\begin{macro}{\csh@chapter}
+%\begin{macro}{\@chapter}
+% When not using \pkg{memoir}, chapters may or may not be defined.
+% This means a little extra work.
+% \begin{macrocode}
+\newcommand*{\csh@fixchapter}{%
+ \@ifundefined{KOMAScriptVersion}
+ {\renewcommand*{\thescheme}{%
+ \ifnum\c@chapter>\z@ \thechapter.\fi \@arabic\c@scheme}}
+ {}%
+ \let\csh@chapter\@chapter
+ \renewcommand{\@chapter}{%
+ \addtocontents{los}{\protect\addvspace{10\p@}}%
+ \csh@chapter}}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+% The appropriate creation macro is now called.
+% \begin{macrocode}
+\csname csh@makesch@\csh@fltpkg\endcsname
+% \end{macrocode}
+%\end{macro}
+%\end{environment}
+%
+%\subsection{Positioning float contents}
+%\begin{macro}{\floatcontentscentre}
+%\begin{macro}{\floatcontentscenter}
+%\begin{macro}{\floatcontentsleft}
+%\begin{macro}{\floatcontentsright}
+% When using \pkg{floatrow}, centring all floats is easy. This is
+% not the case for other methods, and so some macros are provided.
+% The definitions depend on whether \pkg{floatrow} is in use.
+% \begin{macrocode}
+\def\@tempa{floatrow}
+\ifx\@tempa\csh@fltpkg
+ \newcommand*{\floatcontentscentre}{%
+ \floatsetup{objectset=centering}}
+ \newcommand*{\floatcontentscenter}{%
+ \floatsetup{objectset=centering}}
+ \newcommand*{\floatcontentsright}{%
+ \floatsetup{objectset=raggedleft}}
+ \newcommand*{\floatcontentsleft}{%
+ \floatsetup{objectset=raggedright}}
+% \end{macrocode}
+%\begin{macro}{\csh@floatboxreset}
+%\begin{macro}{\@floatboxreset}
+%\begin{macro}{\csh@everyfloat}
+% When \pkg{floatrow} is not in use, then a low-level hack of
+% \cs{@floatboxtreset} is used.
+% \begin{macrocode}
+\else
+ \let\csh@floatboxreset\@floatboxreset
+ \renewcommand*{\@floatboxreset}{%
+ \csh@everyfloat
+ \csh@floatboxreset}
+ \newcommand*{\floatcontentscentre}{%
+ \let\csh@everyfloat\centering}
+ \newcommand*{\floatcontentscenter}{%
+ \let\csh@everyfloat\centering}
+ \newcommand*{\floatcontentsleft}{%
+ \let\csh@everyfloat\relax}
+ \newcommand*{\floatcontentsright}{%
+ \let\csh@everyfloat\raggedleft}
+\fi
+\floatcontentsleft
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\subsection{\pkg{babel} support}
+%\begin{macro}{\ifcsh@babel}
+% To make the new float type work with \pkg{babel}, some alternative
+% text is provided for non-English users. First, we need to know if
+% \pkg{babel} is loaded \emph{before} \currpkg or after, as this
+% affects one if the hacks needed for French.
+% \begin{macrocode}
+\newif\ifcsh@babel
+\@ifpackageloaded{babel}
+ {\csh@babeltrue}
+ {}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\floatc@plain}
+% There is then one hack to be made for French which has to be made
+% before the beginning of the document \emph{if} \pkg{babel} is
+% loaded before \currpkg. This is only needed when \pkg{memoir} is
+% not in use. So there is a run of tests to see if the conditions
+% for the hack are met. \pkg{babel} support for French needs two
+% name checks, \emph{zut alors}!
+% \begin{macrocode}
+\@ifclassloaded{memoir}{}
+ {\@ifpackageloaded{babel}
+ {\IfLanguageName{french}
+ {\let\floatc@plain\FB@makecaption}
+ {\IfLanguageName{frenchb}
+ {\let\floatc@plain\FB@makecaption}
+ {}}}
+ {}}
+% \end{macrocode}
+%\end{macro}
+% The definition of new stings is delayed until the beginning of the
+% document, so that things work if \pkg{babel} is loaded after
+% \currpkg. The multiple language names mean quite a bit of
+% repetition here.
+% \begin{macrocode}
+\AtBeginDocument{
+ \@ifpackageloaded{babel}
+ {\addto{\captionsngerman}{%
+ \renewcommand*{\schemename}{Schema}}
+ \addto{\captionsngerman}{%
+ \renewcommand*{\listschemename}{Schemenverzeichnis}}
+ \addto{\captionsgerman}{%
+ \renewcommand*{\schemename}{Schema}}
+ \addto{\captionsgerman}{%
+ \renewcommand*{\listschemename}{Schemenverzeichnis}}
+% \end{macrocode}
+% French settings. \pkg{babel} also changes some style parameters here,
+% so \currpkg tries to match this.
+% \begin{macrocode}
+ \addto{\captionsfrench}{%
+ \renewcommand*{\schemename}{\scshape Sch\`eme}}
+ \addto{\captionsfrench}{%
+ \renewcommand*{\listschemename}{Table des sch\`emes}}
+ \addto{\captionsfrenchb}{%
+ \renewcommand*{\schemename}{\scshape Sch\`eme}}
+ \addto{\captionsfrenchb}{%
+ \renewcommand*{\listschemename}{Table des sch\`emes}}
+% \end{macrocode}
+% To make these changes, \pkg{babel} has to be instructed to reload the current
+% language.
+% \begin{macrocode}
+ \expandafter\selectlanguage\expandafter{\languagename}
+% \end{macrocode}
+% If \pkg{babel} was loaded after \currpkg, and the document is in
+% French, then the non-\pkg{memoir} patch for floats is needed here.
+% This is the same one described earlier, which cannot be delayed to
+% here if \pkg{babel} is loaded first.
+% \begin{macrocode}
+ \@ifclassloaded{memoir}{}
+ {\IfLanguageName{french}
+ {\ifcsh@babel\else
+ \let\floatc@plain\FB@makecaption
+ \fi}
+ {\IfLanguageName{frenchb}
+ {\ifcsh@babel\else
+ \let\floatc@plain\FB@makecaption
+ \fi}
+ {}}}
+ {}}{}}
+% \end{macrocode}
+%
+%\subsection{Reference numbers in graphics}
+%\begin{macro}{\schemerefmarker}
+%\changes{v1.3}{2007/10/04}{Name change}
+%\begin{macro}{\schemerefformat}
+%\changes{v1.3}{2007/10/04}{Name change}
+% The two macros \cs{schemerefmarker} and \cs{schemerefformat}
+% are used to allow customisation of the behaviour of the package.
+% Here defaults are provided.
+% \begin{macrocode}
+\newcommand*{\schemerefmarker}{TMP}
+\newcommand*{\schemerefformat}{\textsf}
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+%\begin{macro}{\csh@label}
+% Depending on the user options provided, either \pkg{bpchem} or
+% \pkg{chemcompounds} is loaded to manage chemical citations. The macro
+% \cs{chemsch@label} is defined as the labelling command of the
+% appropriate package.
+% \begin{macrocode}
+\ifcsh@bpchem
+ \RequirePackage{bpchem}
+ \let\csh@label\CNlabel
+\else
+ \RequirePackage{chemcompounds}
+ \let\csh@label\compound
+\fi
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\csh@num}
+% A counter is needed for automatic substitution of reference
+% numbers. This has to be a \TeX\ count, rather than a \LaTeX\
+% counter, as it has to be local.
+% \begin{macrocode}
+\newcount\csh@num
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\schemeref}
+%\changes{v1.3}{2007/10/04}{New macro}
+% The user macro for referencing a compound in a graphic. First the
+% automatic counter is incremented.
+% \begin{macrocode}
+\newcommand*{\schemeref}{%
+ \advance\csh@num\@ne
+% \end{macrocode}
+% Now the presence of an optional argument is tested for. If there
+% is not one, the value of the automatic counter is used.
+% \begin{macrocode}
+ \@ifnextchar[%]
+ {\csh@schemeref}
+ {\csh@schemeref[\schemerefmarker\the\csh@num]}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\csh@schemeref}
+% The internal command to substitute the temporary marker by
+% the automatic label text. The use of |[b][b]| ensures that
+% the new text is centred on the position of the marker.
+% \begin{macrocode}
+\def\csh@schemeref[#1]#2{%
+ \psfrag{#1}[b][b]
+ {\schemerefformat{\csh@label{#2}}}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\csh@schemerefsub}
+% For sub-referencing using \pkg{bpchem}, a similar macro is needed
+% using the \cs{CNlabelsub} command. This is defined here, with the
+% user macro later.
+% \begin{macrocode}
+\def\csh@schemerefsub[#1]#2#3{%
+ \psfrag{#1}[b][b]
+ {\schemerefformat{\CNlabelsub{#2}{#3}}}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\chemschemeref}
+%\changes{v1.3}{2007/10/04}{Converted to a wrapper for
+% \cs{schemeref}}
+% The \cs{chemschemeref} is now a backward-compatibility wrapper for
+% \cs{schemeref}.
+% \begin{macrocode}
+\newcommand*{\chemschemeref}[1]{\schemeref[#1]}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\schemerefsub}
+%\changes{v1.3}{2007/10/04}{New macro}
+%\begin{macro}{\chemschemerefsub}
+%\changes{v1.3}{2007/10/04}{Now a wrapper for \cs{schemerefsub}}
+% The user sub-referencing macro is defined in a package-dependent
+% manner. If \pkg{bpchem} is loaded, then \cs{schemerefsub} works in
+% the same way as \cs{schemeref}, but calling the |sub| version of
+% the internal macro.
+% \begin{macrocode}
+\ifcsh@bpchem
+ \newcommand*{\schemerefsub}{%
+ \advance\csh@num\@ne
+ \@ifnextchar[%]
+ {\csh@schemerefsub}
+ {\csh@schemerefsub[\schemerefmarker\the\csh@num]}}
+ \newcommand*{\chemschemerefsub}[1]{\schemerefsub[#1]}
+% \end{macrocode}
+% If \pkg{chemcompounds} is in use, then the sub-reference commands
+% gobble the arguments given. The automatic counter is still
+% incremented, so that things stay (reasonably) logical.
+% \begin{macrocode}
+\else
+ \newcommand*{\schemerefsub}[3][]{%
+ \advance\csh@num\@ne
+ \PackageWarning{chemscheme}
+ {`chemcompound' option active\MessageBreak
+ Command \string\chemschemerefsub\space not used
+ \MessageBreak Please alter your source to \MessageBreak
+ \string\chemschemeref}}
+ \newcommand*{\chemschemerefsub}{\schemerefsub}
+\fi
+% \end{macrocode}
+%\end{macro}
+%\end{macro}
+% \iffalse
+%</package>
+% \fi
+% \PrintChanges
+% \PrintIndex
+% \Finale
+%\iffalse
+%<*scheme>
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: ChemDraw Std(tm) 10.0
+%<!labels>%%Title: scheme-one.eps
+%<labels>%%Title: scheme-two.eps
+%%CreationDate: 21/07/2007 12:00
+%%DocumentSuppliedProcSets: chemdict30 24 13
+%%DocumentFonts: Helvetica Helvetica-Oblique
+%%BoundingBox: 30 78 288 144
+%%EndComments
+%%BeginProcSet: chemdict30 24 13
+% ChemDraw Laser Prep
+% Copyright © 1985-2005 CambridgeSoft Corp., All Rights Reserved
+userdict/chemdict30 210 dict put
+chemdict30 begin/version 24 def/sv 13 def
+/b{bind def}bind def/L{load def}b/R{null def}b/d/def L/a/add L/al/aload L
+/as/astore L/at/atan L/cp/closepath L/cv/curveto L/cw/currentlinewidth L
+/cpt/currentpoint L/dv/div L/D/dup L/e/exch L/F/false L/f/fill L/fa/forall L
+/g/get L/gi/getinterval L/gr/grestore L/gs/gsave L/ie/ifelse L/ix/index L
+/l/lineto L/mt/matrix L/M/moveto L/m/mul L/n/neg L/np/newpath L/pb/pathbbox L
+/P/pop L/r/roll L/rl/rlineto L/rm/rmoveto L/ro/rotate L/rp/repeat L
+/ru/round L/sc/scale L/sl/setlinewidth L/sm/setmatrix L/st/stroke L
+/sp/strokepath L/sq/sqrt L/s/sub L/T/true L/tr/transform L/xl/translate L
+/xc/exec L/A R/N R/St R/X R/Y R/aL R/bL R/bS R/bd R/bs R/cX R/cY R/ch R/co R
+/fB R/fI R/fS R/fZ R/fl R/ft R/iX R/iY R/idx R/lh R/llx R/lly R/lp R/nH R
+/nSq R/newdict R/ps R/rad R/rev R/sL R/sba R/sbl R/sbs R/sn R/spa R/tB R
+/typ R/urx R/ury R/w R/wF R/xX R/xY R/rBg R/gBg R/bBg R/gry R/rDst R/gDst R
+/bDst R/cpd R/Aeq R/Ath R/Aos R/Ach R/ed R/sf 20 d/cW 20 d/lW 20 d/bW 75 d
+/wF 1.5 d/aF 11.875 d/aR 0.263 d/aA 50 d/hS 54 d/pA 32 d/sh F d/S{sf m}b
+/dL{[hS] 0 setdash}b/o{1 ix}b/rot{3 -1 r}b/x{e d}b/CMT mt d/TM mt d
+/SM{CMT sm}b/XY{X D m Y D m a sq}b/s1 1 string d/fp{T charpath flattenpath}b
+/p{tr ru 0.25 a e ru 0.25 a e itransform}b/Wd{65536. dv}b
+/C{Wd rot Wd rot Wd rot setrgbcolor}b
+/setcmykcolor where{P/sk/setcmykcolor L}{/sk{4 1 r 3{3 ix a D 0 lt{P 0}if D 1\
+ gt{P 1}if 1 e s 3 1 r}rp setrgbcolor P}b}ie/sg{D currenthsbcolor P rot seths\
+bcolor currenthsbcolor e P e P o s D m .001 gt{setgray}{P}ie}b
+/sBg{65535 dv/bBg x 65535 dv/gBg x 65535 dv/rBg
+x}b
+/sRmp{currentrgbcolor bBg e s/bDst x gBg e s/gDst x rBg e s/rDst x}b
+/dD{np 2 1 r 4 2 r xl 2 dv D sc -1 0 M 0 -1 l 1 0 l 0 1 l cp SM 0 ne{f}{lW 0.\
+8 m sl st}ie}b
+/dM{gs np 3 1 r xl D sc 0 4 M 0 -8 rl 3.5 2 rm -7 4 rl 0 -4 rm 7 4 rl SM st g\
+r}b/dQ{gs np 0 360 arc 0.5 sg f gr}b
+/dR{lW 0.8 m sl 2 ix s/Y x 2 ix s/X x xl Rr SM st}b
+/dT{fp pb 3 1 r s 3 2 r s 2 1 r rm f}b/N 0 d/db{array/bs x/N 0 d}b
+/B{bs N rot put/N N 1 a d}b
+/SpA{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+aR aL m n D aL a 0 M 0 o n aA n aA arc cp f gr}b
+/SpH{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+0 cw 2 dv xl
+aR aL m n D aL a 0 M 0 o n aA n 0 arc cp f gr}b/Sp{/St x 0.316/aR x gs
+aF lW m 0.8 m St 4 and 0 ne{bW m lW dv bW sl}if/aL x
+St 8 and 0 ne{8 ix 8 ix 3 ix 3 ix SpA}if
+St 16 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpA}if
+St 32 and 0 ne{8 ix 8 ix 3 ix 3 ix SpH}if
+St 64 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpH}if
+St 2 and 0 ne{St 4 and 0 ne{[hS bW m lW dv] 0 setdash}{dL}ie}if
+np M{cv}rp St 128 and 0 ne{f}{st}ie gr}b/Ha{gs np 3 1 r
+xl D sc -.7 1.4 M 0.7 1.4 l -.7 2.4 M 0.7 2.4 l SM st gr}b
+/OP{3 ix 3 ix xl 3 -1 r s 3 1 r
+e s o o at ro D m e D m a sq}b
+/OB{/bS x OP D bS dv D lW 2 m lt{P lW 2 m}if/bd x}b
+/DA{np 0 0 M aL 0 aR aL m 180 aA s 180 aA a arc cp f}b
+/OA{np 0 cw -2 dv M aL 0 aR aL m 180 aA s
+180 arc 0 cw -2 dv rl cp f}b
+/Ast{SM cw 0.8 m sl st}b/SA{aF m lW m/aL x 0.263/aR x aL 1 aR s m np 0 M
+ rad 0 l gs Ast gr}b
+/CA{aF lW m 0.8 m/aL x 0.316/aR x aL 1 aR s m 2 dv rad D m o D m s D 0 le{P
+P P}{sq at 2
+m np rad 0 rad 180 6 -1 r s 180 6 -1 r s arc gs Ast gr cpt
+e at ro}ie}b/AA{np rad 0 rad 180 180 6 -1 r a arc gs SM st gr}b
+/RA{lW m/w x np rad w M w .7 dv w l rad w n M w .7 dv w n l w
+ .35 dv w 2 m M 0 0
+l w .35 dv w -2 m l st}b
+/HA{lW m/w x np 0 0 M w 2 m D l w 2 m w l rad w l rad w n l w 2 m
+w n l w 2 m D n l cp st}b
+/Ar1{gs 5 1 r OP/rad x{{2.25 SA DA}{1.5 SA DA}{1 SA DA}{lW 4 m sl 4.5 SA DA}
+{lW 4 m sl 3 SA DA}{lW 4 m sl 2 SA
+DA}{270 CA DA}{180 CA DA}{120 CA DA}{90 CA DA}{2.5 RA}{2.5
+HA}{1 -1 sc 270 CA DA}{1 -1 sc 180 CA DA}{1 -1 sc 120 CA DA}{1 -1 sc 90 CA
+DA}{5 RA}{5 HA}{dL 2.25 SA DA}{dL 1.5 SA DA}{dL 1 SA DA}{2.25 SA OA}{1.5 SA
+OA}{1 SA OA}{1 -1 sc 2.25 SA OA}{1 -1 sc 1.5 SA OA}
+{1 -1 sc 1 SA OA}{270 CA OA}{180 CA OA}{120 CA OA}{90 CA OA}{1 -1 sc 270 CA
+OA}{1 -1 sc 180 CA OA}{1 -1 sc 120 CA OA}{1 -1 sc 90 CA OA}{1 -1 sc 270
+AA}{1 -1 sc 180 AA}{1 -1 sc 120 AA}{1 -1 sc 90 AA}}e g xc
+gr}b/ac{arcto 4{P}rp}b/rO{4 cw m}b/Cr{0 0 1 0 360 arc}b/Ac{XY D sc Cr SM}b
+/OrA{Y X at ro XY D rev{neg}if sc}b/Ov{OrA 1 0.4 sc Cr SM}b
+/Asc{OrA 1 27 dv D sc}b/LB{9 -6 M
+21 -10 27 -8 27 0 cv
+27 8 21 10 9 6 cv
+-3 2 -3 -2 9 -6 cv
+cp}b/DLB{0 0 M
+0 0 -9.51 9.65 -9.51 18.02 cv
+-9.51 23.22 -6.75 27 0 27 cv
+6.75 27 9.51 23.22 9.51 18.02 cv
+9.51 9.65 0 0 0 0 cv
+cp}b/ZLB{LB}b
+/dt{gs np M SM cpt np rot 4.5 dv 0 360 arc f gr}b
+/whf{gs 1 setgray f gr SM st}b/blf{gs f gr SM st}b/Rr{0 rO M
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+0 0 0 Y rO ac
+cp}b/Rc{0 0 M
+0 Y l
+X Y l
+X 0 l
+cp}b/grf{gs 0.5 sg f gr SM st}b/gG{D 32 dv D m 1 e s/gry x
+currentrgbcolor bDst gry m a 3 1 r gDst gry m a 3 1 r rDst gry m a 3 1 r
+setrgbcolor}b/gS{dtransform CMT idtransform
+m D 0 lt{n}if sq n D
+CMT dtransform idtransform
+e 2 m e
+xl
+7 m 32 a 256 dv D sc}b/gLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+13.5 0 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv
+gS
+-13.5 0 xl
+LB f
+gr}for
+LB SM st}{LB grf}ie}b/gOv{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv 0.65 m D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b/gAc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b
+/gDLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+0 13.5 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv e
+gS
+0 -13.5 xl
+DLB f
+gr}for
+DLB SM st}{DLB grf}ie}b/gRr{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rr f
+gr}for
+Rr SM st}{Rr grf}ie}b/gRc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rc f
+gr}for
+Rc SM st}{Rc grf}ie}b/gZLB{gLB}b/Ath{Y X at ro XY 2 dv/rad x gs D SA DA gr
+ rad 2 m 0 xl 180 ro SA DA}b/Aeq{Y X at ro XY/rad x
+rev{1 -1 sc}if
+gs
+0 lW 2 m xl
+D SA OA
+gr
+rad 0 xl
+180 ro
+0 lW 2 m xl
+SA OA}b/Aos{X Y M SM cpt xl XY e dv lW 1.667 m o o lt{e}if P D sc}b/Ach{5 Aos
+gs/Helvetica findfont[1 0 0 -1 0 0]makefont 5.5 scalefont setfont
+D stringwidth P 2 dv D 1 a/rad x
+n 0 M show gr
+rad 2 s -5 M
+rad n -5 rad n 1 2 ac
+rad n 1 rad 1 2 ac
+rad 1 rad -5 2 ac
+rad -5 rad n -5 2 ac
+cp Ast}b/Ar{D 39 lt{Ar1}
+{gs 5 1 r o o xl 3 -1 r e s 3 1 r s e
+o 0 lt o 0 lt ne/rev x
+D 0 lt{1 -1 sc neg}if/Y x D 0 lt{-1 1 sc neg}
+if/X x np{{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M 0 0 l 0 Y l lp Y l
+X lp s 0 M X 0 l X Y l X lp s Y l SM st}{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M
+0 0 0 Y lp ac
+0 Y 2 dv lp neg o lp ac
+0 Y 2 dv 0 Y lp ac
+0 Y lp Y lp ac
+X lp s 0 M
+X 0 X Y lp ac
+X Y 2 dv X lp a o lp ac
+X Y 2 dv X Y lp ac
+X Y X lp s Y lp ac SM st}{Y D 2 dv Y 180 pA s 180 pA a arc st
+np X Y s Y 2 dv
+Y pA D neg arcn st}{Rc SM st}{X lW 2 dv a lW -2 dv M
+rO D rl
+X lW 2 dv a rO a Y lW 2 dv a rO a l
+rO lW -2 dv a Y lW 2 dv a rO a l
+lW -2 dv Y lW 2 dv a l
+0 Y l X Y l X 0 l cp f
+0 0 M
+0 Y l
+X Y l
+X 0 l cp
+SM st}{Rr SM st}{rO Y M rO rO xl
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+rO neg D xl X Y 0 Y rO ac
+cp f
+Rr st}{Ac st}{OrA gAc}{Ov st}{OrA 1 .4 sc gOv}{Asc LB whf}{Asc gLB}
+{Asc gs gLB gr
+-1 -1 sc LB whf}{Asc gs gLB gr
+-0.4 -0.4 sc LB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc gLB}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro gs gDLB gr -1 -1 sc gDLB}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc gOv gr
+ZLB whf}{Asc gs -1 -1 sc gZLB gr
+gs 3.6 12 sc Cr whf gr
+gZLB}{0 0 M X Y l SM st}{bW sl 0 0 M X Y l SM st}
+{dL 0 0 M X Y l SM st}{OrA 1 16 dv D sc
+0 -1 M
+0 0 1 0 1 ac
+8 0 8 1 1 ac
+8 0 16 0 1 ac
+16 0 16 -1 1 ac
+SM st}{XY D 0 0 dt X Y dt}{XY 2 dv X Y dt}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+2 0 M 0 0 2 0 360 arc
+Ast}{4.5 Aos
+1 0 M -1 0 l
+2 0 M 0 0 2 0 360 arc
+Ast}{2.25 Ath}{1.5 Ath}{1 Ath}{2.25 Aeq}{1.5 Aeq}{1 Aeq}{OrA 1 16 dv D sc
+0 -1 M 0 0 l 16 0 l 16 -1 l SM st}{5 Aos
+1 -1 M -1 -1 l
+0 2 M 0 -2 l
+Ast}{5 Aos
+1 -1 M -1 -1 l
+1 1 M -1 1 l
+0 2 M 0 -2 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+Ast}{gRc}{gRr}{Rc blf}{Rr blf}{Ac blf}{Ov blf}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro DLB -1 -1 sc DLB blf}{Asc gs -1 -1 sc ZLB blf gr
+gs 3.6 12 sc Cr whf gr
+ZLB blf}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc Cr blf gr
+ZLB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc LB blf}{Asc LB gs f gr gs SM st gr
+np -0.4 -0.4 sc LB whf}{Asc LB blf}{Asc LB gs f gr gs SM st gr
+np -1 -1 sc LB whf}{Ac whf}{OrA gAc}{Ac blf}{Ov whf}
+{OrA 1 .4 sc gOv}{Ov blf}{(Rac)Ach}{(Abs)Ach}{(Rel)Ach}
+}e 39 s g xc gr}ie}b/DS{np M l st}b
+/DD{gs dL DS gr}b/DB{gs 12 OB bW sl np 0 0 M 0 l st gr}b/ap{e 3 ix a
+e 2 ix a}b/PT{D 2 4 gi al P OP D 1 sc
+o length 6 gt{P 6 g}{e P 8 dv}ie
+D lW 2 m lt{P lW 2 m}if
+0 e
+0 0
+3 -1 r s 3 1 r e s e
+0 0 M 1 0 l
+0 0 ap M 1 0 ap l
+e n e n
+0 0 ap M 1 0 ap l
+P P}b/DT{gs np PT SM st gr}b
+/NH{lW s D hS dv ru
+cvi D 0 eq{P 1}if/nH x
+D hS nH m s
+D 0 lt{P .1 s nH dv}{nH 2 a dv D 0 xl 2 m s nH dv}ie}b
+/Bd{D type/arraytype ne{bs e g}if{{P}{{{DS}{DD}{gs 12 OB np
+bW 2 dv/bd x
+lW 2 dv e D NH e{D bd M bd n l}for
+st gr}{gs 12 OB np
+lW 2 dv 0 xl NH 1 sc
+bW 2 dv wF m nH 1 a dv/bd x
+0 1 nH
+{D 1 a bd m o o M n l}for SM st gr}{P}{DB}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp f gr}{P}{gs 12 OB/bL x
+bW 2 dv D lW lt{P lW}if/bd x np 0 0 M
+bL bd 4 m dv ru 2 o o lt{e}if P cvi/nSq x
+bL nSq 2 m dv D sc
+nSq{.135 .667 .865 .667 1 0 rcurveto
+.135 -.667 .865 -.667 1 0 rcurveto}rp SM st gr}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp SM lW 0.8 m sl st gr}{P}{4 2 r gs OP/rad x 1 SA DA gr}{P}
+}o 1 g 1 s g e 2 4 gi al P
+5 -1 r xc}{al P 8 ix 1 eq{DD}{DS}ie 5 -1 r 2 eq{DB}{DS}ie P}{DT}}o 0 g g xc}b
+/ed{gs cpt np cw 2 dv 0 360 arc f gr}b
+/SPe{gs 0 e xl 1 1 S dv D n sc CMT currentmatrix P lW sl 4.0 setmiterlimit
+np}b/ws{Wd 0 32 4 -1 roll widthshow}b/blank/Times-Roman findfont/CharStrings
+g/space g d/mv 256 array d/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT
+/FF/CR/SO/SI
+/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US
+mv 0 32 gi as P
+mv 32/Times-Roman findfont/Encoding get
+32 96 gi putinterval
+mv 39/quotesingle put
+mv 96/grave put/unknown/unknown/quotesinglbase/florin/quotedblbase/ellipsis
+/dagger/daggerdbl
+/circumflex/perthousand/Scaron/guilsinglleft/OE/unknown/unknown/unknown
+/unknown/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash
+/emdash
+/tilde/trademark/scaron/guilsinglright/oe/unknown/unknown/Ydieresis
+/blank/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered
+/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph
+/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf
+/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+mv 128 128 gi as P/fSt 50 string d(ChemDraw)fSt copy P/fD{D/Symbol eq{
+findfont[1 0 0 -1 0 0]makefont}{D {findfont}stopped{/Helvetica findfont}if
+D length dict/newdict x{
+1 index/FID ne{1 index/FontMatrix eq{[1 0 0 -1 0 0]matrix concatmatrix}if
+newdict 3 1 r put}{P P}ie}forall
+newdict/Encoding mv put
+fSt 8 fSt length 8 sub gi cvs length 8 add
+fSt 0 rot gi cvn newdict definefont}ie}b/ts{gs xl ro 0 0 M}b
+/nl{0 e xl 0 0 M}b/tx{ft e g e sf m rot D 96 and 0 ne{
+64 and 0 ne{-0.5}{0.25}ie e 0.75 m}{P 0 e}ie
+D 4 -1 r e scalefont setfont m cpt P e M}b
+end
+%%EndProcSet
+%%EndProlog
+
+chemdict30 begin
+/cW 24 def
+/bW 48 def
+/lW 12 def
+/hS 32 def
+/sh true def
+222 SPe[
+/Helvetica
+fD
+/Helvetica-Oblique
+fD]/ft x
+600 1560 M
+5760 1560 l
+5760 2880 l
+600 2880 l
+cp clip np
+65535 65535
+65535 sBg
+0 1640 2178 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(N)show
+gr
+0 1182 2178 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(N)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1619 2364 M
+1627 2376 l
+1335 2376 l
+1344 2364 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1598 2330 M
+1598 2342 l
+1364 2342 l
+1364 2330 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1669 2208 M
+1681 2212 l
+1627 2376 l
+1619 2364 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1481 1941 M
+1481 1926 l
+1629 2034 l
+1622 2043 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1343 2041 M
+1336 2032 l
+1481 1926 l
+1481 1941 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1363 2069 M
+1356 2059 l
+1478 1971 l
+1485 1981 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1344 2364 M
+1335 2376 l
+1282 2212 l
+1293 2209 l
+cp
+f
+gr
+0 1033 2091 ts
+0.0000 0.0000 0.0000 1.0000 sk
+-377
+0 M
+0 10 0 tx
+(Mes)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1055 2043 M
+1059 2031
+l
+1167 2066 l
+1163 2078 l
+cp
+f
+gr
+0 1897 2091 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(Mes)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1878 2040 M
+1882 2051
+l
+1802 2077 l
+1798 2066 l
+cp
+f
+gr
+gs
+12 D sl/lW x
+24 /cW x
+48 /bW x
+32 /hS x
+0.0000 0.0000 0.0000 1.0000 sk
+10 D sl/lW x
+1228 1973 M
+1295
+1973 l st
+1261 1940 M
+1261 2006 l st
+gr
+0 2085 2400 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(Br)show
+64 10 0 tx
+(\226)show
+gr
+0 5084 2247 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(N)show
+gr
+0 4625 2247 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(N)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5062 2433 M
+5071 2445 l
+4778 2445 l
+4787 2433 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5042 2399 M
+5042 2411 l
+4808 2411 l
+4808 2399 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5113 2277 M
+5124 2281 l
+5071 2445 l
+5062 2433 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4925 2010 M
+4925 1995 l
+5072 2102 l
+5065 2112 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4787 2110 M
+4779 2101 l
+4925 1995 l
+4925 2010 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4787 2433 M
+4778 2445 l
+4725 2281 l
+4737 2278 l
+cp
+f
+gr
+0 4476 2160 ts
+0.0000 0.0000 0.0000 1.0000 sk
+-377 0 M
+0 10 0 tx
+(Mes)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4498 2112 M
+4502 2100
+l
+4610 2135 l
+4606 2147 l
+cp
+f
+gr
+0 5340 2160 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+(Mes)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5321 2109 M
+5325 2120
+l
+5246 2146 l
+5243 2134 l
+cp
+f
+gr
+gs
+12 D sl/lW x
+24 /cW x
+48 /bW x
+32 /hS x
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4962 1946 17 0 360 arc
+cp
+f
+np
+4887 1946 17 0 360 arc
+cp
+f
+gr
+0 3236 1785 ts
+0.0000 0.0000 0.0000 1.0000 sk
+-364.5 0 M
+0 10 0 tx
+(KO-)show
+2 10 1 tx
+(t)show
+0 10 0 tx
+(-Bu)show
+201 nl
+-114.5 0 M
+0 10 0 tx
+(thf)show
+gr
+gs
+12 D sl/lW x
+24 /cW x
+48 /bW x
+32 /hS x
+0.0000 0.0000 0.0000 1.0000 sk
+10 D sl/lW x
+3597 2130 M
+2771 2130 l st
+gs
+3581 2161 3701 2130 3701 2130 3596 2143 3581 2161 3581 2161 3581 2098
+3596 2116 3596 2130 3701 2130 3581 2098 3581 2098 4 3701 2130 0 Sp
+gr
+gr
+0
+1215 2805 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+%<labels>(TMP1)show
+gr
+0 4642 2805 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10 0 tx
+%<labels>(TMP2)show
+gr
+gr end
+%%Trailer
+showpage
+%</scheme>
+%<*refs>
+@book{Goossens2007,
+ author = {Michel Goossens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel},
+ title = {The LaTeX Graphics Companion},
+ subtitle = {Illustrating Documents with TeX and Postscript},
+ publisher = {Addison Wesley},
+ year = {2007},
+ series = {Tools and Techniques for Computer Typesetting},
+ edition = {2},
+}
+%</refs>
+%<*jawltxdoc>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{jawltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+\usepackage[final]{listings,graphicx,microtype}
+\usepackage[scaled=0.95]{helvet}
+\usepackage[version=3]{mhchem}
+\usepackage[osf]{mathpazo}
+\usepackage{booktabs,array,url,courier,xspace,etoolbox,varioref}
+\usepackage{upgreek,ifpdf,float,caption,longtable,babel}
+\floatstyle{plaintop}
+\restylefloat{table}
+\labelformat{figure}{\figurename~#1}
+\labelformat{table}{\tablename~#1}
+\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}
+\setcounter{IndexColumns}{2}
+\newlength\LaTeXwidth
+\newlength\LaTeXoutdent
+\newlength\LaTeXgap
+\setlength\LaTeXgap{1em}
+\setlength\LaTeXoutdent{-0.15\textwidth}
+\newbox\lst@samplebox
+\edef\LaTeXexamplefile{\jobname.tmp}
+\lst@RequireAspects{writefile}
+\lstnewenvironment{LaTeXexample}[1][example]{%
+ \global\let\lst@intname\@empty
+ \ifcsname LaTeXcode#1\endcsname
+ \expandafter\let\expandafter\LaTeXcode
+ \csname LaTeXcode#1\endcsname
+ \expandafter\let\expandafter\LaTeXcodeend
+ \csname LaTeXcode#1end\endcsname
+ \else
+ \PackageError{jawltxdoc}
+ {Undefined example type `#1'}
+ \@ehd
+ \let\LaTeXcode\relax
+ \let\LaTeXcodeend\relax
+ \fi
+ \LaTeXcode}
+ {\lst@EndWriteFile
+ \LaTeXcodeend}
+\newcommand*{\LaTeXcodeexample}{%
+ \setbox\lst@samplebox=\hbox\bgroup
+ \LaTeXcodefloat}
+\let\LaTeXcoderesultonly\LaTeXcodeexample
+\newcommand*{\LaTeXcodeexampleend}{%
+ \egroup
+ \setlength\LaTeXwidth{\wd\lst@samplebox}%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin\LaTeXoutdent
+ \setlength\rightmargin{0pt}}%
+ \item
+ \setlength\LaTeXoutdent{-0.15\textwidth}
+ \begin{minipage}[c]{%
+ \textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap}
+ \LaTeXcodefloatend
+ \end{minipage}%
+ \hfill
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}}
+\let\LaTeXcodenoexample\LaTeXcodeexample
+\newcommand*{\LaTeXcodenoexampleend}{%
+ \egroup
+ \setlength\LaTeXwidth{\wd\lst@samplebox}%
+ \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}}
+\newcommand*{\LaTeXcodefloat}{%
+ \setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,
+ basicstyle=\small\ttfamily,basewidth=0.51em,
+ keywordstyle=\color{blue}}%
+ \lst@BeginAlsoWriteFile{\LaTeXexamplefile}}
+\newcommand*{\LaTeXcodefloatend}{%
+ \MakePercentComment\catcode`\^^M=10\relax
+ \small
+ {\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
+ {\lst@ProcessTabulator}}%
+ \leavevmode \input{\LaTeXexamplefile}}%
+ \MakePercentIgnore}
+\newcommand*{\LaTeXcoderesultonlyend}{\egroup\LaTeXcodefloatend}
+\lstnewenvironment{BibTeXexample}{%
+ \global\let\lst@intname\@empty
+ \setbox\lst@samplebox=\hbox\bgroup
+ \setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,
+ basicstyle=\small\ttfamily,basewidth=0.51em,
+ keywordstyle=\color{black}}
+ \lst@BeginAlsoWriteFile{\LaTeXexamplefile}}
+ {\lst@EndWriteFile
+ \LaTeXcodeexampleend}
+\newcommand*{\DescribeOption}{%
+ \leavevmode\@bsphack\begingroup\MakePrivateLetters
+ \Describe@Option}
+\newcommand*{\Describe@Option}[1]{\endgroup
+ \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
+ \SpecialOptionIndex{#1}\@esphack\ignorespaces}
+\newcommand*{\SpecialOptionIndex}[1]{\@bsphack
+ \index{#1\actualchar{\protect\ttfamily#1}
+ (option)\encapchar usage}%
+ \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}%
+ \encapchar usage}\@esphack}
+\newcommand*{\indexopt}[1]{\DescribeOption{#1}\opt{#1}}
+\newcommand*{\DescribeOptionInfo}[2]{%
+ \DescribeOption{#1}%
+ \opt{#1=\meta{#2}}\xspace}
+\newcommand*{\ofixarg}[1]{%
+ {\ttfamily[}%
+ \ifmmode \expandafter \nfss@text \fi
+ {%
+ \meta@font@select
+ \edef\meta@hyphen@restore{%
+ \hyphenchar\the\font\the\hyphenchar\font}%
+ \hyphenchar\font\m@ne
+ \language\l@nohyphenation
+ #1\/%
+ \meta@hyphen@restore
+ }%
+ {\ttfamily]}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\currpkg}{\pkg{\jobname}\xspace}
+\newcommand*{\opt}[1]{\texttt{#1}}
+\newcommand*{\defaultopt}[1]{\opt{\textbf{#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*{\etal}{%
+ \@ifnextchar.
+ {\latin{et~al.}}
+ {\latin{et~al}.\xspace}}
+\newcommand*{\AMS}{{\protect\usefont{OMS}{cmsy}{m}{n}%
+ A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
+\providecommand*{\eTeX}{\ensuremath{\varepsilon}-\TeX}
+\DeclareRobustCommand*{\XeTeX}
+ {X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\kern-.1667em\TeX}
+\providecommand*{\CTAN}{\textsc{ctan}}
+\patchcmd{\@addmarginpar}
+ {\@latex@warning@no@line {Marginpar on page \thepage\space moved}}
+ {\relax}{}{}
+\newcounter{argument}
+\g@addto@macro\endmacro{\setcounter{argument}{0}}
+\newcommand*\darg[1]{%
+ \stepcounter{argument}%
+ {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces}
+\newcommand*\doarg[1]{%
+ \stepcounter{argument}%
+ {\ttfamily\makebox[0pt][r]{[}%
+ \char`\#\theargument]:~}#1\par\noindent\ignorespaces}
+%</jawltxdoc>
+%\fi
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemscheme.ins b/Master/texmf-dist/source/latex/chemstyle/chemscheme.ins
new file mode 100644
index 00000000000..d46ada87cf6
--- /dev/null
+++ b/Master/texmf-dist/source/latex/chemstyle/chemscheme.ins
@@ -0,0 +1,51 @@
+%%
+%% This is file `chemscheme.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% chemscheme.dtx (with options: `install')
+%% ----------------------------------------------------------------
+%% The chemstyle bundle --- Schemes and style for chemistry
+%% 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
+%% ----------------------------------------------------------------
+%%
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+ ----------------------------------------------------------------
+ The chemstyle bundle --- Schemes and style for chemistry
+ 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
+ ----------------------------------------------------------------
+
+\endpreamble
+\Msg{Generating chemscheme files:}
+\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
+}
+\usedir{tex/latex/chemstyle}
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}
+}
+\usedir{source/latex/chemstyle}
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\nopreamble
+\usedir{doc/latex/chemstyle}
+\generate{\file{\jobname.bib}{\from{\jobname.dtx}{refs}}
+}
+\nopreamble\nopostamble
+\usedir{doc/latex/chemstyle}
+\generate{\file{scheme-one.eps}{\from{\jobname.dtx}{scheme}}
+ \file{scheme-two.eps}{\from{\jobname.dtx}{scheme,labels}}
+ \file{chemscheme-demo.ltx}{\from{\jobname.dtx}{demo}}
+}
+\endbatchfile
+\endinput
+%%
+%% End of file `chemscheme.ins'.
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
index e4f5ee549dd..2fc5a3c8253 100644
--- a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
+++ b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
@@ -11,7 +11,7 @@
% and version 1.3c or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
-% This work has the LPPL maintenance status ``maintained.''
+% This work has the LPPL maintenance status `maintained.'
%
% The current maintainer of this work is Joseph Wright.
%
@@ -19,7 +19,8 @@
% and the derived files chemstyle.ins,
% chemstyle.sty,
% chemstyle.pdf,
-% chemstyle.ltx,
+% chemstyle-manual.pdf,
+% chemstyle-demo.ltx,
% rsc.jdf,
% angew.jdf,
% tetlett.jdf,
@@ -27,8 +28,21 @@
% jacs.jdf,
% ic.jdf,
% jpc.jdf,
-% orglett.jdf and
-% none.jdf
+% orglett.jdf,
+% none.jdf,
+% jawltxdoc.sty and
+% README
+%
+% TDS-ready files:
+% The compressed file chemstyle.tds.zip contains an unpacked
+% version of all of the files included here, and pre-compiled
+% documentation in PDF format. Simply decompress
+% chemstyle.tds.dtx in your local TeX directory, run your hash
+% program (texhash, initexmf --update-fndb, etc.) and everything
+% will be ready to go. The user documentation for the package is
+% called chemstyle-manual.pdf; the file chemstyle.pdf includes the
+% user manual and the fully-indexed source code.
+%
% Unpacking:
% (a) If chemstyle.ins is present:
% tex chemstyle.ins
@@ -43,8 +57,6 @@
% makeindex -s gind.ist chemstyle.idx
% makeindex -s gglo.ist -o chemstyle.gls chemstyle.glo
% pdflatex chemstyle.dtx
-% makeindex -s gind.ist chemstyle.idx
-% makeindex -s gglo.ist -o chemstyle.gls chemstyle.glo
% pdflatex chemstyle.dtx
% (b) With write18 enabled:
% pdflatex chemstyle.dtx
@@ -52,14 +64,15 @@
% pdflatex chemstyle.dtx
%
% Installation:
-% Copy chemstyle.sty to a location searched by TeX, and
-% if required by your TeX installation, run the appropriate
-% command to build a hash of files (texhash, mpm --update-db,
+% Copy chemstyle.sty to a location searched by TeX, and if
+% required by your TeX installation, run the appropriate command
+% to build a hash of files (texhash, initexmf --update-fndb,
% etc.)
%
% Note:
% The jawltxdoc.sty file is not needed for installation,
-% only for building the documentation. It may be deleted.
+% only for building the documentation; it may be deleted
+% after producing the documentation (if necessary).
%
%<*ignore>
% This is all taken verbatim from Heiko Oberdiek's packages
@@ -77,7 +90,7 @@
\askforoverwritefalse
\preamble
----------------------------------------------------------------
- The chemstyle package --- Writing chemistry with style
+ The chemstyle bundle --- Schemes and style for chemistry
Maintained by Joseph Wright
E-mail: joseph.wright@morningstar2.co.uk
Released under the LaTeX Project Public License v1.3c or later
@@ -86,9 +99,14 @@
\endpreamble
\Msg{Generating chemstyle files:}
+\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
+}
\usedir{tex/latex/chemstyle}
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}
+ \file{chemscheme.sty}{\from{chemscheme.dtx}{package}}
+}
+\usedir{source/latex/chemstyle}
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}
- \file{\jobname.sty}{\from{\jobname.dtx}{package}}
}
\usedir{tex/latex/chemstyle/config}
\generate{\file{rsc.jdf}{\from{chemstyle.dtx}{rsc}}
@@ -102,11 +120,39 @@
}
\generate{\file{none.jdf}{\from{chemstyle.dtx}{none}}
}
+\nopreamble\nopostamble
\usedir{doc/latex/chemstyle}
-\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
+\generate{\file{chemstyle-demo.ltx}{\from{\jobname.dtx}{demo}}
+ \file{README.txt}{\from{\jobname.dtx}{readme}}
}
\endbatchfile
%</install>
+%<*readme>
+----------------------------------------------------------------
+The chemstyle bundle --- Schemes and style for chemistry
+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
+----------------------------------------------------------------
+
+The chemstyle bundle provides two packages: chemstyle and
+chemscheme. Both are intended to help chemists create floating
+graphics and match published styles.
+
+The chemscheme package consists of two parts, both related to
+chemical schemes. The package adds a scheme float type to the
+LaTeX default types figure and table. The scheme float type
+acts in the same way as those defined by the LaTeX kernel, but
+is intended for chemical schemes. The package also provides a
+method for adding automatic chemical numbering to schemes.
+
+The chemstyle package provides a "one-stop shop" for setting up
+formatting of LaTeX documents following the editorial policies
+of various chemical journals. It provides a number of handy
+chemistry-related commands, and loads several support packages
+to aid the chemist.
+%</readme>
%<*ignore>
\fi
% Will Robertson's trick
@@ -115,13 +161,12 @@
%</ignore>
%<*driver>
\PassOptionsToClass{a4paper}{article}
-\documentclass[englih,UKenglish]{ltxdoc}
+\documentclass[german,english,UKenglish]{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%\OnlyDescription
-% The various formatting commands used in this file are collected
-% together in jawltxdoc.
+\usepackage[final]{graphicx}
\usepackage[journal=none,xspace=true]{chemstyle}
\usepackage{jawltxdoc}
% To show the features of \eg, \ie and so on, a bit of work is
@@ -136,7 +181,7 @@
%</driver>
% \fi
%
-%\CheckSum{0}
+%\CheckSum{636}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -181,9 +226,9 @@
%\changes{v1.2a}{2008/03/21}{Fixed error with restyling
% \texttt{scheme} floats, caused by change in \pkg{chemscheme}}
%
-%\setkeys{lst}{language=[LaTeX]{TeX},moretexcs={mmHg,Molar,%
-% molar,cmc,Hz,unit,standardstate,iPr,nPr,nBu,sBu,tBu,iBu,%
-% cstsetup,latin,eg,ie,etc,invacuo,etal,floatstyle,restylefloat,%
+%\setkeys{lst}{language=[LaTeX]{TeX},moretexcs={mmHg,Molar,
+% molar,cmc,Hz,SI,standardstate,iPr,nPr,nBu,sBu,tBu,iBu,
+% cstsetup,latin,eg,ie,etc,invacuo,etal,floatstyle,restylefloat,
% upsigma,uppi}}
%
%\DoNotIndex{\@fs@capt,\@fs@cfont,\@fs@iftopcapt,\@fs@mid,\@fs@post}
@@ -212,10 +257,12 @@
%\DoNotIndex{\ProvidesFile,\ProvidesPackage,\quad,\refname,\relax}
%\DoNotIndex{\renewcommand,\RequirePackage,\restylefloat,\rotatebox}
%\DoNotIndex{\rpcubed,\schemename,\selectlanguage,\setkeys}
-%\DoNotIndex{\si@requirecfgs,\space,\spacefactor,\tablename,\textsc}
+%\DoNotIndex{\requiresiconfigs,\space,\spacefactor,\tablename,\textsc}
%\DoNotIndex{\textsuperscript,\the,\unitsep,\unitsuperscript,\usk}
%\DoNotIndex{\value,\vspace,\xspace,\z@}
%
+%\DoNotIndex{\',\begin,\end,\documentclass,\usepackage}
+%
% \title{\currpkg\ --- Writing chemistry with style^^A
% \thanks{This file describes version \fileversion, last revised
% \filedate.}}
@@ -335,8 +382,13 @@
% This accepts a \pkg{keyval} list and processes it as needed.
%
%\DescribeOption{chemcompounds}
+%\DescribeOption{floatrow}
% \currpkg loads the \pkg{chemscheme} package, and therefore will
-% pass through the opt{chemcompounds} option.
+% pass through the opt{chemcompounds} option. It can also request
+% floats are created either by \pkg{float} or \pkg{floatrow}; this is
+% controlled by the \opt{floatrow} option. Setting
+% \opt{floatrow=false} means that \pkg{float} is used to generate
+% floats; the default value is \defaultopt{true}.
%
%\section{Naming of the references section}
% \currpkg alters the naming of the references section of a document.
@@ -378,26 +430,19 @@
%\DescribeMacro{\cmc}
% Both the \pkg{SIunits} and \pkg{unitsdef} packages provide methods
% for handling a range of units, but do not include a small number of
-% unit macros useful to chemists. The package therefore provides
-% these, using \pkg{SIunits} by default.\footnote{This is a change in
-% v1.2: previous versions used \pkg{unitsdef}.} The definitions
-% follow the pattern of the appropriate package.
+% unit macros useful to chemists. In contrast, the \pkg{siunitx}
+% package provides all of these using the \opt{synchem} module. If
+% \pkg{SIunits} or \pkg{unitsdef} are loaded, \currpkg provides the
+% missing units. On the other hand, if no unit package is loaded,
+% \pkg{siunitx} is loaded and provides the units itself.
%\begin{LaTeXexample}
-% \unit{10}{\Hz}\\
-% \unit{20}{\mmHg}\\
-% \unit{30}{\molar}\\
-% \unit{40}{\Molar}\\
-% \unit{50}{\cmc}
+% \SI{10}{\Hz}\\
+% \SI{20}{\mmHg}\\
+% \SI{30}{\molar}\\
+% \SI{40}{\Molar}\\
+% \SI{50}{\cmc}
%\end{LaTeXexample}
%
-% The \pkg{siunitx} package is currently under development as a
-% replacement for \pkg{SIunits} and \pkg{unitsdef}.\footnote{By the
-% maintainer of \currpkg.} \pkg{siunitx} includes definitions for
-% the above units, and so if it is loaded the definitions are taken
-% from there, rather than provided by \currpkg. Looking to the
-% future, once \pkg{siunitx} reaches version 1.0, it will become the
-% default support package for \currpkg.
-%
%\subsection{The standard state symbol}
%\DescribeMacro{\standardstate}
% Related to the above, but not exactly a unit is the
@@ -532,23 +577,27 @@
% chemistry documents.
%
%\subsection{Captions above floats}
-% The \texttt{scheme} float type is generated using the \pkg{float}
-% package. This has the side-effect that the placement of captions
-% for floats does not depended on where the \cs{caption} command
-% comes inside the floating environment.\footnote{Normally this is a
-% good thing.} If you wish to alter the placement of captions, the
-% mechanism of the underlying \pkg{float} package will be needed.
-% This requires the use of \cs{floatstyle} to load the desired
-% settings, followed by \cs{restylefloat} to apply the settings.
-% This is most usually done with tables.
-%\begin{LaTeXexample}[\typesetfloatexample]
-% \begin{table}[h]
+% The \texttt{scheme} float type is generated using either the
+% \pkg{float} or \pkg{floatrow} package. This has the side-effect
+% that the placement of captions for floats does not depended on
+% where the \cs{caption} command comes inside the floating
+% environment.\footnote{Normally this is a good thing.} If you wish
+% to alter the placement of captions, the mechanism of the underlying
+% package will be needed. There are some subtle differences between
+% the two: altough \pkg{floatrow} provides the \pkg{float} macros,
+% they are not all 100\% compatible. This document is compiled using
+% \pkg{floatrow}, and so to fix the position of captions the
+% following code is appropriate.
+%
+%\begin{LaTeXexample}[float]
+% \begin{table}[ht]
% The float contents
% \caption{A caption below the float contents in the source}
% \end{table}
-% \floatstyle{plain}
-% \restylefloat{table}
-% \begin{table}[h]
+% \floatsetup[table]{style=plain} % When using floatrow
+% % \floatstyle{plain}
+% % \restylefloat{table} When using float
+% \begin{table}[ht]
% The second float contents, which should be above the caption
% \caption{A second caption below the float contents
% in the source}
@@ -562,24 +611,27 @@
% user is writing a thesis for a U.K.~university. Hence it uses
% U.K.~defaults and RSC-based styling. Most of the packages used have
% good documentation, but a brief summary of why they are recommend
-% follows. The file \file{chemstyle.ltx} will be generated by
-% compiling this documentation, and contains the example ``ready to
-% run''.
-%\edef\LaTeXexamplefile{chemstyle.ltx}
-%\begin{LaTeXexample}[\typesetcodeonly]
-% \documentclass[fontsize=10pt,paper=a4,english,UKenglish]
-% {scrreprt}
-% \usepackage{geometry,upgreek,booktabs,babel}
-% \usepackage[journal=rsc,xspace=true]{chemstyle}
-% \usepackage[version=3]{mhchem}
-% \usepackage[footnotes]{notes2bib}
-% \usepackage[final]{microtype}
-% \usepackage[colorlinks]{hyperref}
-% \begin{document}
-% Document contents go here
-% \end{document}
-%\end{LaTeXexample}
-%\edef\LaTeXexamplefile{\jobname.tmp}
+% follows.
+%\iffalse
+%<*demo>
+%\fi
+% \begin{macrocode}
+\documentclass[fontsize=10pt,paper=a4,english,UKenglish]
+ {scrreprt}
+\usepackage{geometry,upgreek,booktabs,babel}
+\usepackage[journal=rsc,xspace=true]{chemstyle}
+\usepackage[version=3]{mhchem}
+\usepackage[footnotes]{notes2bib}
+\usepackage[final]{microtype}
+\usepackage[extrarun=on]{auto-pst-pdf}
+\usepackage[colorlinks]{hyperref}
+\begin{document}
+ Document contents go here
+\end{document}
+% \end{macrocode}
+%\iffalse
+%</demo>
+%\fi
%
% The versatile \textsc{koma}-script bundle provides more advanced
% versions of the standard document classes. If you want paragraphs
@@ -630,14 +682,21 @@
%\fi
%\section{The package code}
%\subsection{Setup code}
+%\begin{macro}{\cst@id}
+%\begin{macro}{\cst@ver}
% First of all, the package identifies itself and loads other
% packages needed to function. Loading \pkg{chemscheme} is deferred
% until later, to allow processing of options at the correct point.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
+\def\cst@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
+ \def\cst@ver{#5/#6/#7\space v1.3\space}}
+\cst@id $Id: chemstyle.dtx 36 2008-07-17 07:39:53Z joseph $
\ProvidesPackage{chemstyle}
- [2008/04/14 v1.2b Writing chemistry with style]
+ [\cst@ver Writing chemistry with style]
% \end{macrocode}
+%\end{macro}
+%\end{macro}
%\changes{v1.1d}{2007/10/04}{Require caption in all cases}
%\changes{v1.0a}{2007/08/23}{No longer load \texttt{fixltx2e}
% package}
@@ -645,16 +704,7 @@
% Packages that are needed under all circumstances are loaded here.
% There are some limitations on the age of \pkg{xkeyval}.
% \begin{macrocode}
-\RequirePackage{xkeyval}
-\@ifpackagelater{xkeyval}{2005/05/07}
- {}
- {\PackageError{chemstyle}
- {xkeyval >= 2.5 required}
- {chemstyle requires the `xkeyval' package, version 2.5
- or later.\MessageBreak The version loaded is:
- `\@nameuse{ver@xkeyval.sty}'.\MessageBreak
- This is a fatal error: loading will abort.}
- \endinput}
+\RequirePackage{xkeyval}[2005/05/07]
\RequirePackage{graphicx,varioref,caption,xspace}
% \end{macrocode}
%\begin{macro}{\cst@tempa}
@@ -679,6 +729,7 @@
% \end{macrocode}
%\end{macro}
%\begin{macro}{\ifcst@chemcompounds}
+%\begin{macro}{\ifcst@floatrow}
%\begin{macro}{\ifcst@xspace}
%\begin{macro}{\ifcst@phrases}
%\begin{macro}{\ifcst@radprefix}
@@ -691,6 +742,7 @@
% The Boolean keys are now defined.
% \begin{macrocode}
\cst@boolkey{chemcompounds}
+\cst@boolkey{floatrow}
\cst@boolkey{xspace}
\cst@boolkey{phrases}
\cst@boolkey{radprefix}
@@ -711,6 +763,7 @@
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
%\begin{macro}{\ifcst@notes}
%\begin{macro}{\ifcst@autonotes}
%\begin{macro}{\cst@tempa}
@@ -767,6 +820,7 @@
phrases=true,
chemcompounds=true,
xspace=true,
+ floatrow=true,
journal=none,
radprefix=true,
rademph=true,
@@ -784,7 +838,11 @@
\ifcst@chemcompounds
\PassOptionsToPackage{chemcompounds}{chemscheme}
\fi
-\RequirePackage{chemscheme}
+\ifcst@floatrow
+ \RequirePackage[floats=floatrow]{chemscheme}
+\else
+ \RequirePackage[floats=float]{chemscheme}
+\fi
% \end{macrocode}
%\begin{macro}{\cst@disablekey}
% Some of the options are no longer relevant once the package is
@@ -794,6 +852,7 @@
\define@key[cst]{opt}{#1}{\PackageWarning{chemstyle}
{Option `#1' only valid when loading package}}}
\AtBeginDocument{
+ \cst@disablekey{floatrow}
\cst@disablekey{journal}
\cst@disablekey{phrases}
\cst@disablekey{nophrases}
@@ -817,64 +876,52 @@
%\changes{v1.2}{2008/03/06}{Re-write of units section}
%\changes{v1.2b}{2008/04/14}{Change due to name change of \pkg{si}
% package to \pkg{siunitx}}
-% The upcoming \pkg{siunitx} package\footnote{An improved replacement
-% for all of the existing unit packages.} will include the extra
-% chemistry units as a loadable modules (\opt{alsoload=synchem}). A
-% series of checks are therefore made before any definitions are
-% given. If \pkg{siunitx} is loaded, the necessary part of that
-% package is loaded; the \cs{si@requirecfgs} macro from that package
-% is used. The \cs{makeatletter} macro is needed here as otherwise
-% the configuration file is loaded with the wrong category codes.
-% \begin{macrocode}
-\AtBeginDocument{
- \@ifpackageloaded{siunitx}
- {\makeatletter
- \si@requirecfgs{synchem}
- \makeatother}
-% \end{macrocode}
+%\changes{v1.2c}{2008/06/10}{Altered call to \pkg{siunitx}
+% function}
+%\changes{v1.4}{2008/06/24}{Default to loading \pkg{siunitx}}
%\begin{macro}{\cmc}
%\begin{macro}{\Hz}
-% Neither \pkg{unitsdef} nor \pkg{SIunits} define these two macros.
-% \begin{macrocode}
- {\newcommand*{\cmc}{\cubiccentimeter}
- \newcommand*{\Hz}{\hertz}
-% \end{macrocode}
-%\end{macro}
-%\end{macro}
%\begin{macro}{\cubiccentimeter}
%\begin{macro}{\Molar}
%\begin{macro}{\molar}
%\begin{macro}{\mmHg}
%\begin{macro}{\mol}
-% A check is for the \pkg{unitsdef} package, so that the
-% package-dependant definitions can be given.
+% The \pkg{siunitx} package provides all of the units desired here.
+% So if it is loaded, the module \opt{synchem} is all that needs to
+% be loaded. Otherwise, a series of tests are needed for
+% \pkg{SIunits} and \pkg{unitsdef}. If either of these are loaded,
+% they are used; if not, then \pkg{siunitx} is loaded in any case.
% \begin{macrocode}
- \@ifpackageloaded{unitsdef}
- {\newunit{\cubiccentimeter}{\cm\unitsuperscript{3}}
- \newunit{\Molar}{\textsc{m}}
- \newunit{\molar}{\mole\unitsep\dm\unitsuperscript{--3}}
- \newunit{\mmHg}{mmHg}
- \newunit{\mol}{\mole}}
-% \end{macrocode}
-% Two checks are made for \pkg{SIunits} to allow for odd
-% capitalisation. If it is not found, then the package is
-% loaded.\footnote{This will change when \pkg{siunitx} reaches
-% version 1.0.}
-% \begin{macrocode}
- {\@ifpackageloaded{SIunits}{}
- {\@ifpackageloaded{siunits}{}
- {\RequirePackage{SIunits}}}
- \newcommand*{\cubiccentimeter}{\centi\metre\cubed}
+\AtBeginDocument{
+ \@ifpackageloaded{siunitx}
+ {\requiresiconfigs{synchem}}
+ {\@ifpackageloaded{SIunits}
+ {\newcommand*{\cubiccentimeter}{\centi\metre\cubed}
\newcommand*{\Molar}{\textsc{m}}
\newcommand*{\molar}{\mole\usk\deci\metre\rpcubed}
\newcommand*{\mmHg}{\milli\metre Hg}
- \newcommand*{\mol}{\mole}}}}
+ \newcommand*{\mol}{\mole}
+ \newcommand*{\cmc}{\cubiccentimeter}
+ \newcommand*{\Hz}{\hertz}}
+ {\@ifpackageloaded{unitsdef}
+ {\newunit{\cubiccentimeter}{%
+ \cm\unitsuperscript{3}}
+ \newunit{\Molar}{\textsc{m}}
+ \newunit{\molar}{%
+ \mole\unitsep\dm\unitsuperscript{--3}}
+ \newunit{\mmHg}{mmHg}
+ \newunit{\mol}{\mole}
+ \newcommand*{\cmc}{\cubiccentimeter}
+ \newcommand*{\Hz}{\hertz}}
+ {\RequirePackage[alsoload=synchem]{siunitx}}}}}
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
%\end{macro}
+%\end{macro}
+%\end{macro}
%
%\subsection{Standard state symbol}
%\begin{macro}{\cst@varnothing}
@@ -981,27 +1028,11 @@
%\end{macro}
%
%\subsection{Float formatting}
-% The next step is to format the floats correctly. Unfortunately,
-% \pkg{memoir} does not provide all of the commands needed to achieve
-% this. Thus the \pkg{float} package is needed; in order to load it,
-% the \cs{newfloat} command in \pkg{memoir} is killed off. The
-% \pkg{chemscheme} package does not load \pkg{float} when
-% \pkg{memoir} is being used, because creating a new float type is
-% catered for directly by \pkg{memoir}. Unfortunately, the
-% \pkg{memoir} system isn't flexible enough for what is needed by
-% \currpkg, so the hard work of \pkg{chemscheme} is undone here! For
-% other document classes, \pkg{float} will already have been loaded
-% by \pkg{chemscheme}.
-% \begin{macrocode}
-\@ifclassloaded{memoir}
- {\let\newfloat\@undefined
- \RequirePackage{float}}
- {}
-% \end{macrocode}
-% The standard float types are now restyled to place the captions
-% correctly (for most journals). Normally in chemical documents
-% the author expects the float to be ``here'' if possible; this is
-% therefore set as the default.
+% The next step is to format the floats correctly. The standard float
+% types are now restyled to place the captions correctly (for most
+% journals). Normally in chemical documents the author expects the
+% float to be ``here'' if possible; this is therefore set as the
+% default.
% \begin{macrocode}
\floatstyle{plaintop}
\restylefloat{table}
@@ -1010,7 +1041,7 @@
\floatplacement{table}{htbp}
\floatplacement{figure}{htbp}
% \end{macrocode}
-% Work with |schemes| needs to be done after \pkg{hyperref} might be
+% Work with |scheme|s needs to be done after \pkg{hyperref} might be
% loaded.
% \begin{macrocode}
\AtBeginDocument{
@@ -1227,8 +1258,9 @@
\InputIfFileExists{none.jdf}{}
{\PackageError{chemstyle}{Failed to load none.jdf}
{The default journal definition file was not
- found\MessageBreak This is a core part of chemstyle
- \MessageBreak Something is wrong with the installation}}}
+ found\MessageBreak This is a core part of
+ chemstyle\MessageBreak Something is wrong with
+ the installation}}}
% \end{macrocode}
%
% \subsection{Handling reference section naming}
@@ -1290,14 +1322,14 @@
\ifcst@notes
\ifcst@autonotes
\ifnum\the\value{bibnote}>\z@
- \expandafter\expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\cst@ref@name%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\cst@ref@name
\else
- \expandafter\expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\cst@ref@name@%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\cst@ref@name@
\fi
\else
- \expandafter\expandafter\expandafter\cst@ref@name%
+ \expandafter\expandafter\expandafter\cst@ref@name
\fi
\else
\expandafter\cst@ref@name@%
@@ -1339,21 +1371,24 @@
\AtBeginDocument{
\@ifpackageloaded{biblatex}
{\def\cst@tempa{\csgappto{bib@strings@#1}}
- \expandafter\cst@tempa\expandafter{\expandafter\renewcommand%
- \expandafter*\expandafter{\cst@refsec}{%
- \cst@refname{#2}{#3}{#4}}}}
+ \expandafter\cst@tempa\expandafter{\expandafter
+ \renewcommand\expandafter*\expandafter{%
+ \cst@refsec}{%
+ \cst@refname{#2}{#3}{#4}}}}
{\@ifpackageloaded{babel}
{\def\cst@tempa{\expandafter\addto\expandafter{%
\csname captions#1\endcsname}}
\expandafter\cst@tempa\expandafter
- {\expandafter\renewcommand\expandafter*\expandafter%
- {\cst@refsec}{\cst@refname{#2}{#3}{#4}}}
+ {\expandafter\renewcommand\expandafter*%
+ \expandafter{\cst@refsec}{%
+ \cst@refname{#2}{#3}{#4}}}
% \end{macrocode}
%\end{macro}
% To make sure the changes are applied \emph{now}, the current
% language is re-selected.
% \begin{macrocode}
- \expandafter\selectlanguage\expandafter{\languagename}}
+ \expandafter\selectlanguage\expandafter{%
+ \languagename}}
{}}}}}
% \end{macrocode}
%\end{macro}
@@ -1394,7 +1429,7 @@
%\changes{v1.1}{2007/09/17}{Fixed (another) error in alkyl formatting}
% \begin{macrocode}
\ProvidesFile{rsc.jdf}
- [2008/04/14 v1.2b RSC journal style]
+ [\cst@ver RSC journal style]
\AtBeginDocument{%
\renewcommand{\figurename}{Fig.}}
\captionsetup{labelsep=quad,labelfont=bf}
@@ -1416,8 +1451,9 @@
% \texttt{angew} option}
% \begin{macrocode}
\ProvidesFile{angew.def}
- [2008/04/14 v1.2b Angew. Chem. journal style]
-\captionsetup{labelsep=period,labelfont={bf,it},font=sf,singlelinecheck=off}
+ [\cst@ver Angew. Chem. journal style]
+\captionsetup{labelsep=period,labelfont={bf,it},font=sf,
+ singlelinecheck=off}
\captionsetup[table]{labelsep=colon}
\setkeys[cst]{opt}{
radprefix=true,
@@ -1436,7 +1472,7 @@
%\changes{v1.1g}{2007/10/19}{Added \texttt{jomc} style}
% \begin{macrocode}
\ProvidesFile{jomc.def}
- [2008/04/14 v1.2b J. Organomet. Chem. journal style]
+ [\cst@ver J. Organomet. Chem. journal style]
\captionsetup{labelsep=period}
\captionsetup[table]{labelsep=newline,singlelinecheck=off}
\AtBeginDocument{%
@@ -1459,7 +1495,7 @@
%\changes{v1.1h}{2007/10/31}{Added \texttt{tetlett} style}
% \begin{macrocode}
\ProvidesFile{tetlett.def}
- [2008/04/14 v1.2b Tetrahedron Lett. journal style]
+ [\cst@ver Tetrahedron Lett. journal style]
\captionsetup{labelsep=period,singlelinecheck=off,labelfont=bf}
\setkeys[cst]{opt}{
radprefix=true,
@@ -1478,9 +1514,10 @@
%\subsection{\emph{J.~Am.~Chem.~Soc.}~style}
% \begin{macrocode}
\ProvidesFile{jacs.jdf}
- [2008/04/14 v1.2b J. Am. Chem. Soc. journal style]
+ [\cst@ver J. Am. Chem. Soc. journal style]
\DeclareCaptionLabelSeparator{perquad}{.\quad}
-\captionsetup{labelfont={bf,it,sf},textfont=sf,labelsep=perquad}
+\captionsetup{labelfont={bf,it,sf},textfont=sf,
+ labelsep=perquad}
\captionsetup[figure]{textfont=rm}
\captionsetup{singlelinecheck=off}
\setkeys[cst]{opt}{
@@ -1506,7 +1543,7 @@
% the work is left to \file{jacs.jdf}.
% \begin{macrocode}
\ProvidesFile{ic.jdf}
- [2008/04/14 v1.2b Inorg. Chem. journal style]
+ [\cst@ver Inorg. Chem. journal style]
\input {jacs.jdf}
\captionsetup{textfont=rm}
% \end{macrocode}
@@ -1519,7 +1556,7 @@
%\changes{v1.0a}{2007/08/23}{Added \emph{J.~Phys.~Chem.}~style}
% \begin{macrocode}
\ProvidesFile{jpc.jdf}
- [2008/04/14 v1.2b J. Phys. Chem. journal style]
+ [\cst@ver J. Phys. Chem. journal style]
\DeclareCaptionFormat{labelcaps}{\MakeUppercase{#1}#2#3}
\captionsetup{font=bf,labelsep=colon,format=labelcaps}
\captionsetup[figure]{format=plain,textfont=md,labelsep=period}
@@ -1546,9 +1583,18 @@
%\changes{v1.0a}{2007/08/23}{Added \emph{Org.~Lett.}~style}
% \begin{macrocode}
\ProvidesFile{orglett.jdf}
- [2008/04/14 v1.2b Org. Lett. journal style]
+ [\cst@ver Org. Lett. journal style]
\RequirePackage{xcolor}
% \end{macrocode}
+% Currently, this style only works with \pkg{float}.
+% \begin{macrocode}
+\@ifpackageloaded{floatrow}
+ {\PackageError{chemstyle}
+ {Org. Lett. style only works with float}
+ {Load chemstyle with the floatrow=false option
+ to\MessageBreak use the orglett style}}
+ {}
+% \end{macrocode}
%\begin{macro}{\OrgLettColour}
% To allow the user to control the colour of the ``bars'' in this
% style, an additional macro is provided. The purple colour looks
@@ -1632,7 +1678,7 @@
% environment.
% \begin{macrocode}
\ProvidesFile{none.jdf}
- [2008/04/14 v1.2b Empty journal style]
+ [\cst@ver Empty journal style]
\floatstyle{plain}
\restylefloat{table}
\labelformat{figure}{#1}
@@ -1654,14 +1700,17 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jawltxdoc}
\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+\usepackage[final]{listings,graphicx,microtype}
\usepackage[scaled=0.95]{helvet}
\usepackage[version=3]{mhchem}
-\usepackage[final]{microtype}
\usepackage[osf]{mathpazo}
-\usepackage{booktabs,array,url,graphicx,courier,xspace,ifmtarg}
-\usepackage{upgreek,ifpdf,listings,float,caption,longtable,babel}
+\usepackage{booktabs,array,url,courier,xspace,etoolbox,varioref}
+\usepackage{upgreek,ifpdf,float,caption,longtable,babel}
\floatstyle{plaintop}
\restylefloat{table}
+\labelformat{figure}{\figurename~#1}
+\labelformat{table}{\tablename~#1}
\ifpdf
\usepackage{embedfile}
\embedfile[%
@@ -1673,104 +1722,117 @@
\IfFileExists{\jobname.sty}
{\usepackage{\jobname}}{}
\usepackage[numbered]{hypdoc}
+\setcounter{IndexColumns}{2}
\newlength\LaTeXwidth
\newlength\LaTeXoutdent
\newlength\LaTeXgap
\setlength\LaTeXgap{1em}
\setlength\LaTeXoutdent{-0.15\textwidth}
-\newcommand*{\typesetexampleandcode}{%
+\newbox\lst@samplebox
+\edef\LaTeXexamplefile{\jobname.tmp}
+\lst@RequireAspects{writefile}
+\lstnewenvironment{LaTeXexample}[1][example]{%
+ \global\let\lst@intname\@empty
+ \ifcsname LaTeXcode#1\endcsname
+ \expandafter\let\expandafter\LaTeXcode
+ \csname LaTeXcode#1\endcsname
+ \expandafter\let\expandafter\LaTeXcodeend
+ \csname LaTeXcode#1end\endcsname
+ \else
+ \PackageError{jawltxdoc}
+ {Undefined example type `#1'}
+ \@ehd
+ \let\LaTeXcode\relax
+ \let\LaTeXcodeend\relax
+ \fi
+ \LaTeXcode}
+ {\lst@EndWriteFile
+ \LaTeXcodeend}
+\newcommand*{\LaTeXcodeexample}{%
+ \setbox\lst@samplebox=\hbox\bgroup
+ \LaTeXcodefloat}
+\let\LaTeXcoderesultonly\LaTeXcodeexample
+\newcommand*{\LaTeXcodeexampleend}{%
+ \egroup
+ \setlength\LaTeXwidth{\wd\lst@samplebox}%
\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}{%
+ \setlength\rightmargin{0pt}}%
+ \item
+ \setlength\LaTeXoutdent{-0.15\textwidth}
+ \begin{minipage}[c]{%
+ \textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap}
+ \LaTeXcodefloatend
+ \end{minipage}%
+ \hfill
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}}
+\let\LaTeXcodenoexample\LaTeXcodeexample
+\newcommand*{\LaTeXcodenoexampleend}{%
+ \egroup
+ \setlength\LaTeXwidth{\wd\lst@samplebox}%
\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}{tabsize=4,gobble=3,breakindent=0pt,%
- basicstyle=\small\ttfamily,basewidth=0.51em,%
- keywordstyle=\color{blue}}
- \lst@BeginAlsoWriteFile{\LaTeXexamplefile}
-}{%
- \lst@EndWriteFile\egroup
- \setlength\LaTeXwidth{\wd\lst@samplebox}
- \typesetexample%
-}
-\newcommand*{\lst@sampleInput}{%
+ \setlength\rightmargin{0pt}}%
+ \item
+ \begin{minipage}[c]{\LaTeXwidth}
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}}
+\newcommand*{\LaTeXcodefloat}{%
+ \setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,
+ basicstyle=\small\ttfamily,basewidth=0.51em,
+ keywordstyle=\color{blue}}%
+ \lst@BeginAlsoWriteFile{\LaTeXexamplefile}}
+\newcommand*{\LaTeXcodefloatend}{%
\MakePercentComment\catcode`\^^M=10\relax
- \small%
+ \small
{\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
{\lst@ProcessTabulator}}%
\leavevmode \input{\LaTeXexamplefile}}%
- \MakePercentIgnore%
-}
-\def\DescribeOption{\leavevmode\@bsphack\begingroup\MakePrivateLetters
+ \MakePercentIgnore}
+\newcommand*{\LaTeXcoderesultonlyend}{\egroup\LaTeXcodefloatend}
+\lstnewenvironment{BibTeXexample}{%
+ \global\let\lst@intname\@empty
+ \setbox\lst@samplebox=\hbox\bgroup
+ \setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,
+ basicstyle=\small\ttfamily,basewidth=0.51em,
+ keywordstyle=\color{black}}
+ \lst@BeginAlsoWriteFile{\LaTeXexamplefile}}
+ {\lst@EndWriteFile
+ \LaTeXcodeexampleend}
+\newcommand*{\DescribeOption}{%
+ \leavevmode\@bsphack\begingroup\MakePrivateLetters
\Describe@Option}
-\def\Describe@Option#1{\endgroup
+\newcommand*{\Describe@Option}[1]{\endgroup
\marginpar{\raggedleft\PrintDescribeEnv{#1}}%
\SpecialOptionIndex{#1}\@esphack\ignorespaces}
-\def\SpecialOptionIndex#1{\@bsphack
+\newcommand*{\SpecialOptionIndex}[1]{\@bsphack
\index{#1\actualchar{\protect\ttfamily#1}
(option)\encapchar usage}%
- \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
- usage}\@esphack}
+ \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}%
+ \encapchar usage}\@esphack}
\newcommand*{\indexopt}[1]{\DescribeOption{#1}\opt{#1}}
\newcommand*{\DescribeOptionInfo}[2]{%
\DescribeOption{#1}%
\opt{#1=\meta{#2}}\xspace}
+\newcommand*{\ofixarg}[1]{%
+ {\ttfamily[}%
+ \ifmmode \expandafter \nfss@text \fi
+ {%
+ \meta@font@select
+ \edef\meta@hyphen@restore{%
+ \hyphenchar\the\font\the\hyphenchar\font}%
+ \hyphenchar\font\m@ne
+ \language\l@nohyphenation
+ #1\/%
+ \meta@hyphen@restore
+ }%
+ {\ttfamily]}}
\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\currpkg}{\pkg{\jobname}\xspace}
\newcommand*{\opt}[1]{\texttt{#1}}
@@ -1781,22 +1843,36 @@
\newcommand*{\etc}{%
\@ifnextchar.
{\latin{etc}}
- {\latin{etc.}}
- \xspace}
+ {\latin{etc}.\xspace}}
\newcommand*{\eg}{%
\@ifnextchar.
{\latin{e.g}}
- {\latin{e.g.}}
- \xspace}
+ {\latin{e.g}.\xspace}}
\newcommand*{\ie}{%
\@ifnextchar.
{\latin{i.e}}
- {\latin{i.e.}}
- \xspace}
+ {\latin{i.e}.\xspace}}
+\newcommand*{\etal}{%
+ \@ifnextchar.
+ {\latin{et~al.}}
+ {\latin{et~al}.\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}
+\DeclareRobustCommand*{\XeTeX}
{X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\kern-.1667em\TeX}
+\providecommand*{\CTAN}{\textsc{ctan}}
+\patchcmd{\@addmarginpar}
+ {\@latex@warning@no@line {Marginpar on page \thepage\space moved}}
+ {\relax}{}{}
+\newcounter{argument}
+\g@addto@macro\endmacro{\setcounter{argument}{0}}
+\newcommand*\darg[1]{%
+ \stepcounter{argument}%
+ {\ttfamily\char`\#\theargument~:~}#1\par\noindent\ignorespaces}
+\newcommand*\doarg[1]{%
+ \stepcounter{argument}%
+ {\ttfamily\makebox[0pt][r]{[}%
+ \char`\#\theargument]:~}#1\par\noindent\ignorespaces}
%</jawltxdoc>
%\fi
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemstyle.ins b/Master/texmf-dist/source/latex/chemstyle/chemstyle.ins
index 49063a4b317..c26a19db90e 100644
--- a/Master/texmf-dist/source/latex/chemstyle/chemstyle.ins
+++ b/Master/texmf-dist/source/latex/chemstyle/chemstyle.ins
@@ -1,52 +1,59 @@
-%%
-%% This is file `chemstyle.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% chemstyle.dtx (with options: `install')
-%% ----------------------------------------------------------------
-%% The chemstyle package --- Writing chemistry with style
-%% 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
-%% ----------------------------------------------------------------
-%%
-\input docstrip.tex
-\keepsilent
-\askforoverwritefalse
-\preamble
- ----------------------------------------------------------------
- The chemstyle package --- Writing chemistry with style
- 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
- ----------------------------------------------------------------
-
-\endpreamble
-\Msg{Generating chemstyle files:}
-\usedir{tex/latex/chemstyle}
-\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}
- \file{\jobname.sty}{\from{\jobname.dtx}{package}}
-}
-\usedir{tex/latex/chemstyle/config}
-\generate{\file{rsc.jdf}{\from{chemstyle.dtx}{rsc}}
- \file{angew.jdf}{\from{chemstyle.dtx}{angew}}
- \file{tetlett.jdf}{\from{chemstyle.dtx}{tetlett}}
- \file{jomc.jdf}{\from{chemstyle.dtx}{jomc}}
- \file{jacs.jdf}{\from{chemstyle.dtx}{jacs}}
- \file{ic.jdf}{\from{chemstyle.dtx}{ic}}
- \file{jpc.jdf}{\from{chemstyle.dtx}{jpc}}
- \file{orglett.jdf}{\from{chemstyle.dtx}{orglett}}
-}
-\generate{\file{none.jdf}{\from{chemstyle.dtx}{none}}
-}
-\usedir{doc/latex/chemstyle}
-\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
-}
-\endbatchfile
-\endinput
-%%
-%% End of file `chemstyle.ins'.
+%%
+%% This is file `chemstyle.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% chemstyle.dtx (with options: `install')
+%% ----------------------------------------------------------------
+%% The chemstyle bundle --- Schemes and style for chemistry
+%% 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
+%% ----------------------------------------------------------------
+%%
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\preamble
+ ----------------------------------------------------------------
+ The chemstyle bundle --- Schemes and style for chemistry
+ 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
+ ----------------------------------------------------------------
+
+\endpreamble
+\Msg{Generating chemstyle files:}
+\generate{\file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}}
+}
+\usedir{tex/latex/chemstyle}
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}
+ \file{chemscheme.sty}{\from{chemscheme.dtx}{package}}
+}
+\usedir{source/latex/chemstyle}
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}
+}
+\usedir{tex/latex/chemstyle/config}
+\generate{\file{rsc.jdf}{\from{chemstyle.dtx}{rsc}}
+ \file{angew.jdf}{\from{chemstyle.dtx}{angew}}
+ \file{tetlett.jdf}{\from{chemstyle.dtx}{tetlett}}
+ \file{jomc.jdf}{\from{chemstyle.dtx}{jomc}}
+ \file{jacs.jdf}{\from{chemstyle.dtx}{jacs}}
+ \file{ic.jdf}{\from{chemstyle.dtx}{ic}}
+ \file{jpc.jdf}{\from{chemstyle.dtx}{jpc}}
+ \file{orglett.jdf}{\from{chemstyle.dtx}{orglett}}
+}
+\generate{\file{none.jdf}{\from{chemstyle.dtx}{none}}
+}
+\nopreamble\nopostamble
+\usedir{doc/latex/chemstyle}
+\generate{\file{chemstyle-demo.ltx}{\from{\jobname.dtx}{demo}}
+ \file{README.txt}{\from{\jobname.dtx}{readme}}
+}
+\endbatchfile
+\endinput
+%%
+%% End of file `chemstyle.ins'.