diff options
author | Karl Berry <karl@freefriends.org> | 2007-10-06 20:24:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-10-06 20:24:10 +0000 |
commit | dae0497dfdfe53172758b10dcee4bf9c8b026c88 (patch) | |
tree | 18acf45783f2b596aa41f6c0e4d4fa47fb459e07 /Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx | |
parent | f4d85d9971e3c6438ee9ace6699901f2edc31661 (diff) |
chemstyle update (5oct07)
git-svn-id: svn://tug.org/texlive/trunk@5124 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx | 481 |
1 files changed, 374 insertions, 107 deletions
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx index d7f219e11e0..ccede179fad 100644 --- a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx +++ b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx @@ -15,10 +15,94 @@ % % The current maintainer of this work is Joseph Wright. % -% This work consists of the main source files chemstyle.dtx -% and chemstyle.ins and the derived files chemstyle.sty, -% chemstyle.pdf and a number of .jdf files. -% +% This work consists of the source file chemscheme.dtx +% and the derived files chemstyle.ins, +% chemstyle.sty, +% chemstyle.pdf, +% rsc.jdf, +% angew.jdf, +% jacs.jdf, +% ic.jdf, +% jpc.jdf, +% orglett.jdf and +% none.jdf +% Unpacking: +% (a) If chemstyle.ins is present: +% tex chemstyle.ins +% (b) Without chemstyle.ins: +% tex chemstyle.dtx +% (c) If you use LaTeX to generate files: +% latex \let\install=y\input{chemstyle.dtx} +% +% Documentation: +% (a) Without write18 enabled: +% pdflatex chemstyle.dtx +% 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 +% pdflatex chemstyle.dtx +% 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, +% etc.) +% +% Note: +% The jawltxdoc.sty file is not needed for installation, +% only for building the documentation. It may be deleted. +% +%<*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 package --- Writing chemistry with style + 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 chemstyle files:} +\usedir{tex/latex/contib/chemstyle} +\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}} + \file{\jobname.sty}{\from{\jobname.dtx}{package}} + \file{rsc.jdf}{\from{chemstyle.dtx}{rsc}} + \file{angew.jdf}{\from{chemstyle.dtx}{angew}} + \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}} + \file{none.jdf}{\from{chemstyle.dtx}{none}} + \file{jawltxdoc.sty}{\from{\jobname.dtx}{jawltxdoc}} +} +\endbatchfile +%</install> +%<*ignore> +\fi +% Will Robertson's trick +\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx} +\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo} +%</ignore> %<*driver> \PassOptionsToClass{a4paper}{article} \documentclass{ltxdoc} @@ -26,31 +110,16 @@ \CodelineIndex \RecordChanges %\OnlyDescription -\usepackage[T1]{fontenc} -\usepackage[english,UKenglish]{babel} -\usepackage{mathpazo,booktabs,array,url,graphicx,courier,unitsdef} -\usepackage{upgreek,ifpdf} -\usepackage[scaled=0.95]{helvet} -\usepackage[version=3]{mhchem} -\usepackage[final]{microtype} -% Some tricks from Heiko Oberdiek -\ifpdf - \usepackage{embedfile} - \embedfile[% - stringmethod=escape,% - mimetype=plain/text,% - desc={LaTeX docstrip source archive for package `\jobname'}% - ]{\jobname.dtx} -\fi -\usepackage{\jobname} -\usepackage[numbered]{hypdoc} +% The various formatting commands used in this file are collected +% together in |jawltxdoc|. +\usepackage{jawltxdoc} \begin{document} \DocInput{\jobname.dtx} \end{document} %</driver> % \fi % -%\CheckSum{604} +%\CheckSum{611} % % \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 @@ -80,6 +149,9 @@ % \emph{e.g.}~and \emph{i.e.}} %\changes{v1.1a}{2007/09/18}{Fixed error in documentation compilation % under LaTeX} +%\changes{v1.1c}{2007/09/23}{Fixed problems with capitalisation +% of \texttt{SIunits}} +%\changes{v1.1c}{2007/09/23}{Documentation improved} % %\DoNotIndex{\@fs@capt,\@fs@cfont,\@fs@iftopcapt,\@fs@mid,\@fs@post} %\DoNotIndex{\@fs@pre,\@ifclassloaded,\@ifnextchar,\@ifpackageloaded} @@ -105,7 +177,7 @@ %\DoNotIndex{\xspace,\@tempa,\@tempb,\centi,\cubed,\deci} %\DoNotIndex{\DeclareMathSymbol,\DeclareSymbolFont,\dm} %\DoNotIndex{\mathord,\metre,\milli,\mole,\relax,\spacefactor} -%\DoNotIndex{\usk} +%\DoNotIndex{\usk,\futurelet} % % \title{\texttt{chemstyle} --- Writing chemistry with style% % \thanks{This file describes version \fileversion, last revised @@ -159,28 +231,28 @@ % styles listed in Table~\ref{styles}. New styles can be developed % by creating a new file modelled on the existing definitions; % |chemstyle| will automatically search for correctly-named styles. -% \begin{table} -% \begin{tabular}{ll} -% \toprule -% Option & Journals using this style \\ -% \midrule -% none & Not applicable\\ -% angew & \emph{Angew.\ Chem.}, \emph{Chem.\ Eur.\ J.} \\ -% ic & \emph{Inorg.\ Chem.} \\ -% jacs & \emph{J.\ Am.\ Chem.\ Soc.} \\ -% jcp & \emph{J.\ Phys.\ Chem.\ A}, \emph{J.\ Phys.\ Chem.\ B} \\ -% orglett & \emph{Org.~Lett.}\\ -% rsc & \emph{Chem.\ Commun.}, \emph{Org.\ Biomol.\ Chem.} \\ -% & \emph{Dalton Trans.} \\ -% \bottomrule -% \end{tabular} -% \caption{Styles provided by \texttt{chemstyle}}\label{styles} -% \end{table} +%\begin{table} +% \begin{tabular}{ll} +% \toprule +% Option & Journals using this style \\ +% \midrule +% none & Not applicable\\ +% angew & \emph{Angew.\ Chem.}, \emph{Chem.\ Eur.\ J.} \\ +% ic & \emph{Inorg.\ Chem.} \\ +% jacs & \emph{J.\ Am.\ Chem.\ Soc.} \\ +% jcp & \emph{J.\ Phys.\ Chem.\ A}, \emph{J.\ Phys.\ Chem.\ B} \\ +% orglett & \emph{Org.~Lett.}\\ +% rsc & \emph{Chem.\ Commun.}, \emph{Org.\ Biomol.\ Chem.} \\ +% & \emph{Dalton Trans.} \\ +% \bottomrule +% \end{tabular} +% \caption{Styles provided by \texttt{chemstyle}}\label{styles} +%\end{table} % The style files provided with |chemstyle| have been derived from % current practice in the target journals. It is not always easy to % pick the correct stylistic settings from (sometimes inconsistent) -% real-world examples. The package author welcomes feedback on -% the styles provided. +% real-world examples. The package author welcomes feedback on the +% styles provided. % % The |none| style is notable as it is not based on a journal. % Instead this is a minimal style, which provides the additional @@ -188,29 +260,47 @@ % style if no option is given. This document has been compiled % implicity using the |none| option, for example. % -%\subsection{Package options} +%\subsection{Creating styles} +% The process of creating a new styles for |chemstyle| is intended to +% be relatively easy. New styles should be saved as files with the +% extension |.jdf| (standing for for Journal Definition File), and +% should be saved somewhere in the path searched by +% TeX.\footnote{Depending on your TeX distribution, you may need to +% rebuild your file database after creating a new style. For MikTeX +% users, this can be done graphically or by typing \texttt{mpm +% --update-db} at the command line; for TeXLive, run +% \texttt{texhash}.} The definition files included in the package +% should provide a guide to the basic options available for producing +% new styles. Arbitrary TeX commands can be included, if they are +% necessary for a particular style. For example, other packages can +% be loaded in \cmd{\usepackage}. +% +% The maintainer of |chemstyle| is happy to add new styles to the +% package, either by contribution by users or on request (when he has +% sufficient time!). If you have a new style to add (or corrections to +% an existing one), please contact the package author. % +%\subsection{Package options} % As well as the various journal styles provided with the package, a -% number of options are recognised to alter compatibly with other +% number of options are recognised to alter compatibility with other % packages and to give the desired output. |chemstyle| will also pass % options through to the |chemscheme| package, which is used to % provide support for schemes. Users should consult the |chemscheme| % documentation for the options applicable. % % Currently, |chemstyle| has options |nonotes|, |nophrases|, -% |siunits| and |xspace|. These are explained at the appropriate +% |SIunits| and |xspace|. These are explained at the appropriate % places within this document. All are hopefully relatively clearly % named. % %\section{Naming of the references section} -% % |chemstyle| alters the naming of the references section of a % document. By default, |chemstyle| alters the value of % \cmd{\bibname} or \cmd{\refname} (as appropriate) to the form of % words chosen by the target journal for the ``\refname'' section. % -% The ``References'' naming commands are language-aware, \emph{via} -% the |babel| interface. Currently, |chemstyle| includes appropriate +% The `\refname'' naming commands are language-aware, \emph{via} the +% |babel| interface. Currently, |chemstyle| includes appropriate % labels for babel languages |english|, |UKenglish|, |ngerman| and % |french|.\footnote{The \texttt{french} option for \texttt{babel} % causes a clash with \texttt{unitsdef} concerning the command @@ -222,18 +312,18 @@ % appropriate wordings are provided to the author. % % The |chemstyle| packages recognises the |nonotes| option, which -% affects how the References section is headed. With the |nonotes| +% affects how the \refname section is headed. With the |nonotes| % option, the ``Notes'' part of the section name is omitted, and only -% the ``References'' phrase is output. +% the ``\refname'' phrase is output. % %\section{Additional macros} % %\subsection{Additional units} -% Both the |unitsdef| and |siunits| packages provide a great number +% Both the |unitsdef| and |SIunits| packages provide a great number % of easy to use unit commands, and handles spacing between numbers % and units very well. However, a few useful units seem to be % missing, and are provided here. By default, |chemstyle| uses the -% |unitsdef| package to achieve this, but using the |siunits| option +% |unitsdef| package to achieve this, but using the |SIunits| option % will use that package instead. %\DescribeMacro{\Hz} %\DescribeMacro{\mmHg} @@ -247,19 +337,20 @@ % Finally, the command \cmd{\cmc} is provided for generating \cmc. % When using |unitsdef|, all of the new macros space correctly with % numbers, so inputting |10\cmc| gives 10\cmc, with a non-breaking -% space. Users of |siunits| will be familiar with the approach used +% space. Users of |SIunits| will be familiar with the approach used % by that package. % %\subsection{The standard state symbol} %\DescribeMacro{\standardstate} % Related to the above, but not exactly a unit is the -% \cmd{\standardstate} command. This generates the tricky -% \standardstate\ symbol: |$\Delta S\standardstate$| -% generates $\Delta S\standardstate$. Note that this is safe in -% either text or maths mode. +% \cmd{\standardstate} command.\footnote{The \texttt{\textbackslash +% standardstate} macro is only defined if the user does not have +% their own version.} This generates the tricky \standardstate\ +% symbol: |$\Delta S\standardstate$| generates $\Delta +% S\standardstate$. Note that this is safe in either text or maths +% mode. % %\subsection{Alkyl radicals} -% %\DescribeMacro{\iPr} %\DescribeMacro{\iPr} %\DescribeMacro{\nBu} @@ -290,9 +381,9 @@ % available as the obvious commands. By altering the definition of % \cmd{\latin}, this allows ready switching from italic to Roman % typesetting. Notice that \cmd{\etc}, \cmd{\ie} and \cmd{\eg} are -% aware of trailing periods, and so doubling-up should not occur. The -% Once again, these macros use |xspace|, when given as a package -% option, to handle automatic addition of spaces after these phrases. +% aware of trailing periods, and so doubling-up should not occur. +% Once again, these macros use |xspace| when given as a package +% option to handle automatic addition of spaces after these phrases. % For American journals, where it is obligatory to follow ``\eg'' % and ``\ie'' with a comma, the package provides a mechanism for % handling this automatically. Thus, when using an appropriate @@ -306,6 +397,39 @@ % |\etc\ more text|, |\etc~more text|, \etc. If this is a big issue, % the package author may look at it again. % +% The definitions of all of the phrases are designed not to overwrite +% any given by the user \emph{in the preamble}. So, if you have your +% own \cmd{\latin} macro, it will be used even if you load +% |chemstyle|. If you encounter any problems, try loading the package +% with the |nophrases| option; this option prevents the package even +% trying to define any of the phrase macros. +% +%\DescribeMacro{\latinemphon} +%\DescribeMacro{\latinemphoff} +% The formatting of Latin phrases can be altered using the two macros +% \cmd{\latinemphon} and \cmd{\latinemphoff}, which switch the use of +% \cmd{\emph} for Latin phrases on and off. These macros are mainly +% intended for the use in journal style files, but may be more +% generally useful. +% +%\section{Additional information} +%\subsection{Advice for users of \texttt{rsc} and \texttt{achemso}} +% The |chemstyle| package is intended as a replacement for the |rsc| +% package. As such, it covers almost everything the the |rsc| LaTeX +% package does, and more. Users of |rsc| are strongly encouraged to +% update to using |chemstyle|. The bibliography styles provided by +% |achemso| and |rsc| will continue to be required, of course. +% Migration of these styles to |biblatex| is an on-going project. +% +%\subsection{Interactions with other packages} +% The |chemstyle| package has been designed to avoid, as far as +% possible, clashes with other packages. The package requires the +% presence of the standard |graphicx| and |varioref| packages. If +% these packages need to be loaded with explicit options, this should +% be done \emph{before} loading |chemstyle|. The |chemscheme| package +% is also needed, as it provides the floating |scheme| environment +% essential in synthetic chemistry documents. +% % \iffalse %<*template> % \fi @@ -389,14 +513,6 @@ %</template> % \fi % -%\section{Advice for users of \texttt{rsc} and \texttt{achemso}} -% The |chemstyle| package is intended as a replacement for the |rsc| -% package. As such, it covers almost everything the the |rsc| LaTeX -% package does, and more. Users of |rsc| are strongly encouraged to -% update to using |chemstyle|. The bibliography styles provided by -% |achemso| and |rsc| will continue to be required, of course. -% Migration of these styles to |biblatex| is an on-going project. -% % \StopEventually{} % % \iffalse @@ -411,17 +527,17 @@ % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{chemstyle} - [2007/09/18 v1.1a Writing chemistry with style] + [2007/10/04 v1.1d Writing chemistry with style] % \end{macrocode} -% Packages that are needed under all circumstances are loaded here. +%\changes{v1.1d}{2007/10/04}{Require caption in all cases} %\changes{v1.0a}{2007/08/23}{No longer load \texttt{fixltx2e} % package} +% Packages that are needed under all circumstances are loaded here. % \begin{macrocode} -\RequirePackage{graphicx,varioref} +\RequirePackage{graphicx,varioref,caption} % \end{macrocode} % -% \subsection{Alkyl radicals} -% +%\subsection{Alkyl radicals} %\begin{macro}{\cst@emph} %\begin{macro}{\cst@hyph} %\begin{macro}{\cst@super} @@ -478,6 +594,7 @@ %\changes{v1.1}{2007/09/17}{Added \texttt{phrases} option} %\changes{v1.1}{2007/09/17}{Added \texttt{siunits} option} %\changes{v1.1}{2007/09/17}{Added \texttt{xspace} option} +%\changes{v1.1c}{2007/09/23}{Added \texttt{SIunits} option} % \begin{macrocode} \newif \ifcst@notes \cst@notestrue \newif \ifcst@phrases \cst@phrasestrue @@ -491,6 +608,7 @@ \DeclareOption{nonotes}{\cst@notesfalse} \DeclareOption{nophrases}{\cst@phrasesfalse} \DeclareOption{siunits}{\cst@sitrue} +\DeclareOption{SIunits}{\cst@sitrue} \DeclareOption{xspace}{\cst@xspacetrue} % \end{macrocode} % In order to handle the loading of style definitions correctly, a @@ -510,20 +628,27 @@ \edef\cst@option{\CurrentOption} } % \end{macrocode} -% If |siunits| is already loaded, then the option has to be set. +% If |SIunits| is already loaded, then the option has to be set. % \begin{macrocode} -\@ifpackageloaded{siunits} +\@ifpackageloaded{SIunits} {\ExecuteOptions{siunits}} - {} + {\@ifpackageloaded{siunits} + {\ExecuteOptions{siunits}} + {}} \ProcessOptions* \ifcst@si \@ifpackageloaded{unitsdef} {\PackageWarning{chemstyle}{% - You have set the siunits option,\MessageBreak + You have set the SIunits option,\MessageBreak but have already loaded unitsdef!\MessageBreak unitsdef will be used for extra unit macros} \cst@sifalse} - {\RequirePackage{siunits}} + {\AtBeginDocument{% + \@ifpackageloaded{siunits}% + {} + {\RequirePackage{SIunits}}% + } + } \else % \end{macrocode} % The \cmd{\fg} macro is defined in French as a \emph{guillemet} sign, @@ -572,7 +697,7 @@ %\begin{macro}{\mol} %\changes{v1.0b}{2007/09/04}{New macro} % A few additional unit types are provides, which |unitsdef| and -% |siunits| do not provide. Most of these require different set up +% |SIunits| do not provide. Most of these require different set up % for the two supported packages. % \begin{macrocode} \ifcst@si @@ -607,18 +732,21 @@ % carefully checked, but is set by eye. The symbol is loaded directly % here, rather than using the |amssymb| package, to avoid any % clashes. +%\changes{v1.1c}{2007/09/23}{Definition only occurs if user does not +% have own version} +%\changes{v1.1c}{2007/09/23}{Altered angle of rotation for better +% appearance} % \begin{macrocode} \DeclareSymbolFont{CSTAMS}{U}{msb}{m}{n} -\DeclareMathSymbol{\cst@varnothing} {\mathord}{CSTAMS}{"3F} -\newcommand*{\standardstate}% - {\textsuperscript{\rotatebox[origin=c]{140.8}% +\DeclareMathSymbol{\cst@varnothing}{\mathord}{CSTAMS}{"3F} +\providecommand*{\standardstate}% + {\textsuperscript{\rotatebox[origin=c]{138.8}% {\ensuremath{\cst@varnothing}}}} % \end{macrocode} %\end{macro} %\end{macro} % -% \subsection{Float formatting} -% +%\subsection{Float formatting} % The next step is to format the floats correctly. Unfortunately, % |memoir| does not provide all of the commands needed to achieve % this. Thus the |float| package is needed; in order to load it, the @@ -655,8 +783,7 @@ \floatcontentscentre % \end{macrocode} % -% \subsection{Cross-references} -% +%\subsection{Cross-references} % The naming for cross-references is sorted out properly using the % |varioref| package. % \begin{macrocode} @@ -927,11 +1054,17 @@ % \end{macro} % Finally, default names are loaded for a range of languages. Most % journals stick to the same words, with only the order changing. +%\changes{v1.1c}{2007/09/23}{Added \texttt{german} alias for +% \texttt{ngerman}} +%\changes{v1.1c}{2007/09/23}{Added \texttt{frenchb} alias for +% \texttt{french}} % \begin{macrocode} \cst@namerefs{english}{References}{and}{Notes} \cst@namerefs{UKenglish}{References}{and}{Notes} \cst@namerefs{ngerman}{Literatur}{und}{Notizen} +\cst@namerefs{german}{Literatur}{und}{Notizen} \cst@namerefs{french}{R\'ef\'erences}{et}{Notes} +\cst@namerefs{frenchb}{R\'ef\'erences}{et}{Notes} % \end{macrocode} % % \subsection{Loading the style definition} @@ -940,6 +1073,8 @@ % place. A style must be loaded, so a default is provided to be on % the safe side. The journal style file must have extension % |.jdf|. +%\changes{v1.1b}{2007/09/19}{Load \texttt{caption} even when +% journal style does not exist} % \begin{macrocode} \ifx\cst@option\relax \PackageWarning{chemstyle} @@ -972,19 +1107,20 @@ %\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/09/18 v1.1a] +\ProvidesFile{rsc.jdf}[2007/10/04 v1.1d] % \end{macrocode} %\changes{v1.0b}{2007/09/04}{Sorted a problem with \texttt{babel} % and figure name format} % \begin{macrocode} \AtBeginDocument{% \renewcommand{\figurename}{Fig.}} -\RequirePackage[labelsep=quad,labelfont=bf]{caption} +\captionsetup{labelsep=quad,labelfont=bf} \let\cst@emph\emph \def\cst@hyph{-} \let\cst@super\relax \cst@prefixtrue \latinemphon +\cst@commafalse % \end{macrocode} % \iffalse %</rsc> @@ -995,15 +1131,15 @@ %\changes{v1.0a}{2007/08/23}{Fixed incorrect Latin formatting for % \texttt{angew} option} % \begin{macrocode} -\ProvidesFile{cst-angew.def}[2007/09/18 v1.1a] -\RequirePackage[labelsep=period,labelfont={bf,it},font=sf]{caption} +\ProvidesFile{angew.def}[2007/09/2 v1.1c] +\captionsetup{labelsep=period,labelfont={bf,it},font=sf,singlelinecheck=off} \captionsetup[table]{labelsep=colon} -\captionsetup{singlelinecheck=off} \let\cst@emph\emph \def\cst@hyph{} \let\cst@super\relax \cst@prefixtrue \latinemphoff +\cst@commafalse % \end{macrocode} % \iffalse %</angew> @@ -1012,10 +1148,9 @@ % %\subsection{\emph{J.~Am.~Chem.~Soc.}~style} % \begin{macrocode} -\ProvidesFile{jacs.jdf}[2007/09/18 v1.1a] -\RequirePackage[labelfont={bf,it,sf},textfont=sf]{caption} +\ProvidesFile{jacs.jdf}[2007/10/04 v1.1d] \DeclareCaptionLabelSeparator{perquad}{.\quad} -\captionsetup{labelsep=perquad} +\captionsetup{labelfont={bf,it,sf},textfont=sf,labelsep=perquad} \captionsetup[figure]{textfont=rm} \captionsetup{singlelinecheck=off} \let\cst@emph\emph @@ -1038,7 +1173,7 @@ % Almost exactly the same as for \emph{J.~Am.~Chem.~Soc.}, so most of % the work is left to |jacs.jdf|. % \begin{macrocode} -\ProvidesFile{ic.jdf}[2007/09/18 v1.1a] +\ProvidesFile{ic.jdf}[2007/09/2 v1.1c] \input {jacs.jdf} \captionsetup{textfont=rm} % \end{macrocode} @@ -1050,10 +1185,9 @@ %\subsection{\emph{J.~Phys.~Chem.}~style} %\changes{v1.0a}{2007/08/23}{Added \emph{J.~Phys.~Chem.}~style} % \begin{macrocode} -\ProvidesFile{jpc.jdf}[2007/09/18 v1.1a] -\RequirePackage[font=bf,labelsep=colon]{caption} +\ProvidesFile{jpc.jdf}[2007/10/04 v1.1d] \DeclareCaptionFormat{labelcaps}{\MakeUppercase{#1}#2#3} -\captionsetup{format=labelcaps} +\captionsetup{font=bf,labelsep=colon,format=labelcaps} \captionsetup[figure]{format=plain,textfont=md,labelsep=period} \captionsetup{singlelinecheck=off} \let\cst@emph\emph @@ -1075,7 +1209,7 @@ %\subsection{\emph{Org.~Lett.}~style} %\changes{v1.0a}{2007/08/23}{Added \emph{Org.~Lett.}~style} % \begin{macrocode} -\ProvidesFile{orglett.jdf}[2007/09/18 v1.1a] +\ProvidesFile{orglett.jdf}[2007/10/04 v1.1d] \RequirePackage{xcolor} % \end{macrocode} %\begin{macro}{\OrgLettColour} @@ -1127,9 +1261,8 @@ % \end{macrocode} % The more usual style commands now occur. % \begin{macrocode} -\RequirePackage[labelfont=bf]{caption} \DeclareCaptionLabelSeparator{perquad}{.\quad} -\captionsetup{labelsep=perquad} +\captionsetup{labelfont=bf,labelsep=perquad} \let\cst@emph\emph \def\cst@hyph{} \let\cst@super\textsuperscript @@ -1143,17 +1276,16 @@ %<*none> %\fi % -% \subsection{The empty style --- none} -% +%\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 nothing 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. +% % \begin{macrocode} -\ProvidesFile{none.jdf}[2007/09/18 v1.1a] -\RequirePackage{caption} +\ProvidesFile{none.jdf}[2007/10/04 v1.1d] \floatstyle{plain} \restylefloat{table} \labelformat{scheme}{#1} @@ -1169,3 +1301,138 @@ % \PrintChanges % \PrintIndex % \Finale +%\iffalse +%<*jawltxdoc> +% The following is convenient method for collecting together package +% loading, formatting commands and new macros used to format |dtx| +% files written by the current author. It is based on the similar +% files provided by Will Robertson in his packages and Heiko Oberdiek +% as a stand-alone package. Notice that it is not intended for other +% users: there is no error checking! However, it is covered by the +% LPPL in the same way as the rest of this package. +% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{jawltxdoc} + [2007/10/04 v1.0a] +% First of all, a number of support packages are loaded. +\usepackage[T1]{fontenc} +\usepackage[english,UKenglish]{babel} +\usepackage[scaled=0.95]{helvet} +\usepackage[version=3]{mhchem} +\usepackage[final]{microtype} +\usepackage{mathpazo,booktabs,array,url,graphicx,courier,unitsdef} +\usepackage{upgreek,ifpdf,listings} +% If using PDFLaTeX, the source will be attached to the PDF. This +% is basically the system used by Heiko Oberdiek, but with a check +% that PDF mode is enabled. +\ifpdf + \usepackage{embedfile} + \embedfile[% + stringmethod=escape,% + mimetype=plain/text,% + desc={LaTeX docstrip source archive for package `\jobname'}% + ]{\jobname.dtx} +\fi +\usepackage{\jobname} +\usepackage[numbered]{hypdoc} +% +% To typeset examples, a new environment is needed. The code below +% is based on that in used by |listings|, but is modified to get +% better formatting for this context. The formatting of the output +% is basically that in Will Robertson's |dtx-style| file. +\newlength\LaTeXwidth +\newlength\LaTeXoutdent +\newlength\LaTeXgap +\setlength\LaTeXgap{1em} +\setlength\LaTeXoutdent{-0.15\textwidth} +\def\typesetexampleandcode{% + \begin{list}{}{% + \setlength\itemindent{0pt} + \setlength\leftmargin\LaTeXoutdent + \setlength\rightmargin{0pt} + } + \item + \setlength\LaTeXoutdent{-0.15\textwidth} + \begin{minipage}[c]{\textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap} + \lst@sampleInput + \end{minipage}% + \hfill% + \begin{minipage}[c]{\LaTeXwidth}% + \hbox to\linewidth{\box\lst@samplebox\hss}% + \end{minipage}% + \end{list} +} +\def\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} +} +\def\typesetfloatexample{% + \begin{list}{}{% + \setlength\itemindent{0pt} + \setlength\leftmargin{0pt} + \setlength\rightmargin{0pt} + } + \item + \lst@sampleInput + \begin{minipage}[c]{\LaTeXwidth}% + \hbox to\linewidth{\box\lst@samplebox\hss}% + \end{minipage}% + \end{list} +} +\def\typesetcodeonly{% + \begin{list}{}{% + \setlength\itemindent{0pt} + \setlength\leftmargin{0pt} + \setlength\rightmargin{0pt} + } + \item + \begin{minipage}[c]{\LaTeXwidth}% + \hbox to\linewidth{\box\lst@samplebox\hss}% + \end{minipage}% + \end{list} +} +\edef\LaTeXexamplefile{\jobname.tmp} +\lst@RequireAspects{writefile} +\newbox\lst@samplebox +\lstnewenvironment{LaTeXexample}[1][\typesetexampleandcode]{% + \let\typesetexample#1 + \global\let\lst@intname\@empty + \setbox\lst@samplebox=\hbox\bgroup + \setkeys{lst}{language=[LaTeX]{TeX},tabsize=4,gobble=2,% + breakindent=0pt,basicstyle=\small\ttfamily,basewidth=0.51em,% + keywordstyle=\color{blue},% +% Notice that new keywords should be added here. The list is simply +% macro names needed to typeset documentation of the package +% author. + morekeywords={bibnote,citenote,bibnotetext,bibnotemark,% + thebibnote,bibnotename,includegraphics,schemeref,% + floatcontentsleft,floatcontentsright,floatcontentscentre,% + schemerefmarker,compound,schemerefformat,color,% + startchemical,stopchemical,chemical,setupchemical,bottext,% + listofschemes}} + \lst@BeginAlsoWriteFile{\LaTeXexamplefile} +}{% + \lst@EndWriteFile\egroup + \setlength\LaTeXwidth{\wd\lst@samplebox} + \typesetexample% +} +\def\lst@sampleInput{% + \MakePercentComment\catcode`\^^M=10\relax + \small% + {\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}% + {\lst@ProcessTabulator}}% + \leavevmode \input{\LaTeXexamplefile}}% + \MakePercentIgnore% +} +\hyphenation{PDF-LaTeX} +%</jawltxdoc> +%\fi |