summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/chemstyle
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-22 23:29:09 +0000
committerKarl Berry <karl@freefriends.org>2008-03-22 23:29:09 +0000
commitb552fc5adb5017e593f10eeed7bfd18e10e531ac (patch)
treeca68592b075ba2d88a8038d5878d1223f45a0aae /Master/texmf-dist/source/latex/chemstyle
parent91f46c0caf49d9caf86fe497dd6f44fa8d2dbdbb (diff)
chemstyle 1.2a (21mar08)
git-svn-id: svn://tug.org/texlive/trunk@7086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/chemstyle')
-rw-r--r--Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx116
1 files changed, 70 insertions, 46 deletions
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
index 49b5bff4d60..ec1f9107dd6 100644
--- a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
+++ b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
@@ -115,16 +115,16 @@
%</ignore>
%<*driver>
\PassOptionsToClass{a4paper}{article}
-\documentclass{ltxdoc}
+\documentclass[englih,UKenglish]{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
-\usepackage[journal=none,xspace=true]{chemstyle}
%\OnlyDescription
% The various formatting commands used in this file are collected
% together in jawltxdoc.
+\usepackage[journal=none,xspace=true]{chemstyle}
\usepackage{jawltxdoc}
-% To show the features of \eg, \ie and so on, a bit of work is
+% To show the features of \eg, \ie and so on, a bit of work is
% required, as they are defined by jawltxdoc and by chemstyle
\let\eg\undefined
\let\ie\undefined
@@ -178,6 +178,8 @@
%\changes{v1.2}{2008/03/07}{Various internal tweaks}
%\changes{v1.2}{2008/03/07}{Removed obsolete \opt{ch} and
% \opt{chapter} options}
+%\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,%
@@ -324,14 +326,14 @@
% option management. The choice of journal style can therefore be
% given as a normal option or by using the key \opt{journal=}. The
% other package options provided by the package are described as they
-% arise in the documentation.
+% arise in the documentation.
%
%\DescribeMacro{\cstsetup}
% Some of the package options can only be set when loading the
% package. The choice of journal style is one of these. Others can
% be altered anywhere in the document, using the \cs{cstsetup} macro.
% This accepts a \pkg{keyval} list and processes it as needed.
-%
+%
%\DescribeOption{chemcompounds}
% \currpkg loads the \pkg{chemscheme} package, and therefore will
% pass through the opt{chemcompounds} option.
@@ -399,13 +401,13 @@
%\subsection{The standard state symbol}
%\DescribeMacro{\standardstate}
% Related to the above, but not exactly a unit is the
-% \cmd{\standardstate} command.\footnote{The \cs{standardstate} macro
+% \cs{standardstate} command.\footnote{The \cs{standardstate} macro
% is only defined if the user does not have their own version.} This
% generates the tricky \cs{standardstate} symbol.
%\begin{LaTeXexample}
-% \emph{H}\standardstate\\
+% the standard conditions are indicated: \standardstate\\
% $\Delta S\standardstate$
-%\end{LaTeXexample}
+%\end{LaTeXexample}
%
%\subsection{Alkyl radicals}
%\DescribeMacro{\nPr}
@@ -424,7 +426,7 @@
% The alkyl group could be \nPr, \iPr\\
% or \nBu without affecting the selectivity.
%\end{LaTeXexample}
-%
+%
%\DescribeOption{xspace}
% When \currpkg is loaded using the \opt{xspace} option, the
% \pkg{xspace} package is automatically used to add space after the
@@ -463,7 +465,7 @@
% again, these macros use \pkg{xspace} when given as a package option
% to handle automatic addition of spaces after these phrases.
%
-%\DescribeOption{abbremph}
+%\DescribeOption{abbremph}
% The use of italic for these abbreviations is set by altering the
% package option \opt{abbremph}, which takes values \opt{true} and
% \opt{false}.
@@ -491,7 +493,7 @@
% you desire an inter-word space, use the normal methods
%\begin{LaTeXexample}
% \etc\ more text \\
-% \etal\~have shown
+% \etal~have shown
%\end{LaTeXexample}
%
%\DescribeOption{nophrases}
@@ -541,18 +543,19 @@
% This is most usually done with tables.
%\begin{LaTeXexample}[\typesetfloatexample]
% \begin{table}[h]
-% \caption{A caption above the float contents}
% The float contents
+% \caption{A caption below the float contents in the source}
% \end{table}
-% \floatstyle{plaintop}
+% \floatstyle{plain}
% \restylefloat{table}
% \begin{table}[h]
-% \caption{A second caption above the float contents}
-% The second float contents
+% The second float contents, which should be above the caption
+% \caption{A second caption below the float contents
+% in the source}
% \end{table}
%\end{LaTeXexample}
%
-%\section{A template for chemical articles}
+%\section{A template for chemical articles}
% This is a very simple template for chemistry-related documents.
% Hopefully it contains a few extra hints for getting well-formatted
% documents quickly. For simplicity, the template assumes that the
@@ -564,9 +567,9 @@
% run''.
%\edef\LaTeXexamplefile{chemstyle.ltx}
%\begin{LaTeXexample}[\typesetcodeonly]
-% \documentclass[fontsize=10pt,paper=a4]{scrreprt}
-% \usepackage[english,UKenglish]{babel}
-% \usepackage{geometry,upgreek,booktabs}
+% \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}
@@ -586,7 +589,7 @@
% The \pkg{babel} system is loaded to sort out hyphenation and so on,
% and could be useful if there are any foreign-language quotes.
%
-% \pkg{geometry}e allows the users to alter page layout with ease:
+% \pkg{geometry} allows the users to alter page layout with ease:
% much better than trying to hack the raw \LaTeX\ system.
% \pkg{booktabs} gives much nicer looking tables than the \LaTeXe\
% default. \pkg{upgreek} provides non-italic lowercase Greek letters,
@@ -603,7 +606,9 @@
%
% The \pkg{mhchem} package provides the \cs{ce} command for rapidly
% typesetting formulas, so that you can type |\ce{H2SO4}| and get
-% \ce{H2SO4}.
+% $\ce{H2SO4}$.\footnote{There is a slight cheat here, as this
+% document uses lower-case numerals in the text. The example is
+% written as \texttt{\$\textbackslash ce\{H2SO4\}\$}.}
%
% The \pkg{microtype} package improves formatting when used with the
% pdf\TeX\ engine. By giving the \opt{final} option, it is active
@@ -631,7 +636,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{chemstyle}
- [2008/03/08 v1.2 Writing chemistry with style]
+ [2008/03/21 v1.2a Writing chemistry with style]
% \end{macrocode}
%\changes{v1.1d}{2007/10/04}{Require caption in all cases}
%\changes{v1.0a}{2007/08/23}{No longer load \texttt{fixltx2e}
@@ -999,12 +1004,17 @@
\floatstyle{plaintop}
\restylefloat{table}
\floatstyle{plain}
-\restylefloat{scheme}
\restylefloat{figure}
\floatplacement{table}{htbp}
-\floatplacement{scheme}{htbp}
\floatplacement{figure}{htbp}
% \end{macrocode}
+% Work with |schemes| needs to be done after \pkg{hyperref} might be
+% loaded.
+% \begin{macrocode}
+\AtBeginDocument{
+ \restylefloat{scheme}
+ \floatplacement{scheme}{htbp}}
+% \end{macrocode}
% The contents of floats are centred by default, using the hook
% from the \pkg{chemscheme} package.
% \begin{macrocode}
@@ -1017,9 +1027,9 @@
% The naming for cross-references is sorted out properly using the
% \pkg{varioref} package.
% \begin{macrocode}
-\labelformat{scheme}{\schemename~#1}
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
+\AtBeginDocument{\labelformat{scheme}{\schemename~#1}}
% \end{macrocode}
%
% \subsection{Latin phrases}
@@ -1111,7 +1121,7 @@
%\begin{macro}{\cst@ie}
%\changes{v1.1f}{2007/10/14}{New macro}
% Internal macros are used for items ending in a full stop, to allow
-% clean handling of spacing. Notice that \cmd{\ie} and \cmd{\eg}
+% clean handling of spacing. Notice that \cs{ie} and \cs{eg}
% cannot come at the end of a sentence, they are designed to give
% only an inter-word space.
% \begin{macrocode}
@@ -1238,7 +1248,7 @@
% define any reference section at all (for example, minimal does
% not).
% \begin{macrocode}
-\begingroup
+\begingroup
\@ifundefined{chapter}
{\@ifundefined{refname}
{\PackageInfo{chemstyle}
@@ -1381,7 +1391,8 @@
%\changes{v1.0b}{2007/09/04}{Fixed formatting of alkyls}
%\changes{v1.1}{2007/09/17}{Fixed (another) error in alkyl formatting}
% \begin{macrocode}
-\ProvidesFile{rsc.jdf}[2007/10/31 v1.1h]
+\ProvidesFile{rsc.jdf}
+ [2008/03/21 v1.2a RSC journal style]
\AtBeginDocument{%
\renewcommand{\figurename}{Fig.}}
\captionsetup{labelsep=quad,labelfont=bf}
@@ -1402,7 +1413,8 @@
%\changes{v1.0a}{2007/08/23}{Fixed incorrect Latin formatting for
% \texttt{angew} option}
% \begin{macrocode}
-\ProvidesFile{angew.def}[2007/10/31 v1.1h]
+\ProvidesFile{angew.def}
+ [2008/03/21 v1.2a Angew. Chem. journal style]
\captionsetup{labelsep=period,labelfont={bf,it},font=sf,singlelinecheck=off}
\captionsetup[table]{labelsep=colon}
\setkeys[cst]{opt}{
@@ -1421,7 +1433,8 @@
%\subsection{\emph{J.~Organomet.~Chem.}~style}
%\changes{v1.1g}{2007/10/19}{Added \texttt{jomc} style}
% \begin{macrocode}
-\ProvidesFile{jomc.def}[2007/10/31 v1.1h]
+\ProvidesFile{jomc.def}
+ [2008/03/21 v1.2a J. Organomet. Chem. journal style]
\captionsetup{labelsep=period}
\captionsetup[table]{labelsep=newline,singlelinecheck=off}
\AtBeginDocument{%
@@ -1443,7 +1456,8 @@
%\subsection{\emph{Tetrahedron Lett.}~style}
%\changes{v1.1h}{2007/10/31}{Added \texttt{tetlett} style}
% \begin{macrocode}
-\ProvidesFile{tetlett.def}[2007/10/31 v1.1h]
+\ProvidesFile{tetlett.def}
+ [2008/03/21 v1.2a Tetrahedron Lett. journal style]
\captionsetup{labelsep=period,singlelinecheck=off,labelfont=bf}
\setkeys[cst]{opt}{
radprefix=true,
@@ -1461,7 +1475,8 @@
%
%\subsection{\emph{J.~Am.~Chem.~Soc.}~style}
% \begin{macrocode}
-\ProvidesFile{jacs.jdf}[2007/10/31 v1.1h]
+\ProvidesFile{jacs.jdf}
+ [2008/03/21 v1.2a J. Am. Chem. Soc. journal style]
\DeclareCaptionLabelSeparator{perquad}{.\quad}
\captionsetup{labelfont={bf,it,sf},textfont=sf,labelsep=perquad}
\captionsetup[figure]{textfont=rm}
@@ -1486,9 +1501,10 @@
%
%\subsection{\emph{Inorg.~Chem.}~style}
% Almost exactly the same as for \emph{J.~Am.~Chem.~Soc.}, so most of
-% the work is left to |jacs.jdf|.
+% the work is left to \file{jacs.jdf}.
% \begin{macrocode}
-\ProvidesFile{ic.jdf}[2007/10/31 v1.1h]
+\ProvidesFile{ic.jdf}
+ [2008/03/21 v1.2a Inorg. Chem. journal style]
\input {jacs.jdf}
\captionsetup{textfont=rm}
% \end{macrocode}
@@ -1500,7 +1516,8 @@
%\subsection{\emph{J.~Phys.~Chem.}~style}
%\changes{v1.0a}{2007/08/23}{Added \emph{J.~Phys.~Chem.}~style}
% \begin{macrocode}
-\ProvidesFile{jpc.jdf}[2007/10/31 v1.1h]
+\ProvidesFile{jpc.jdf}
+ [2008/03/21 v1.2a 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}
@@ -1526,7 +1543,8 @@
%\subsection{\emph{Org.~Lett.}~style}
%\changes{v1.0a}{2007/08/23}{Added \emph{Org.~Lett.}~style}
% \begin{macrocode}
-\ProvidesFile{orglett.jdf}[2007/10/31 v1.1h]
+\ProvidesFile{orglett.jdf}
+ [2008/03/21 v1.2a Org. Lett. journal style]
\RequirePackage{xcolor}
% \end{macrocode}
%\begin{macro}{\OrgLettColour}
@@ -1603,23 +1621,25 @@
%\subsection{The empty style --- none}
% To allow the user to load the extra macros provided here without
% any style changes, a ``do nothing'' style is provided. It simply
-% makes sure that very little changes compared to the LaTeX kernel.
+% makes sure that very little changes compared to the \LaTeX\ kernel.
% This requires undoing the defaults provided above. For commands
-% where a default is needed (\eg\ the \cmd{\latin} command) the style
-% of the RSC is followed. As the |float| package has been loaded,
+% where a default is needed (\eg the \cs{latin} command) the style
+% of the RSC is followed. As the \pkg{float} package has been loaded,
% notice that captions will be placed below floats even if the
-% \cmd{\caption} command appears above the contents of the floating
+% \cs{caption} command appears above the contents of the floating
% environment.
% \begin{macrocode}
-\ProvidesFile{none.jdf}[2007/10/31 v1.1h]
+\ProvidesFile{none.jdf}
+ [2008/03/21 v1.2a Empty journal style]
\floatstyle{plain}
\restylefloat{table}
-\labelformat{scheme}{#1}
\labelformat{figure}{#1}
\labelformat{table}{#1}
\floatplacement{table}{tbp}
-\floatplacement{scheme}{tbp}
\floatplacement{figure}{tbp}
+\AtBeginDocument{
+ \floatplacement{scheme}{tbp}
+ \labelformat{scheme}{#1}}
% \end{macrocode}
% \iffalse
%</none>
@@ -1632,13 +1652,12 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jawltxdoc}
\usepackage[T1]{fontenc}
-\usepackage[english,UKenglish]{babel}
\usepackage[scaled=0.95]{helvet}
\usepackage[version=3]{mhchem}
\usepackage[final]{microtype}
\usepackage[osf]{mathpazo}
-\usepackage{booktabs,array,url,graphicx,courier,xspace}
-\usepackage{upgreek,ifpdf,listings,float,caption,longtable}
+\usepackage{booktabs,array,url,graphicx,courier,xspace,ifmtarg}
+\usepackage{upgreek,ifpdf,listings,float,caption,longtable,babel}
\floatstyle{plaintop}
\restylefloat{table}
\ifpdf
@@ -1746,9 +1765,14 @@
(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*{\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}}