summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-01-14 00:14:59 +0000
committerKarl Berry <karl@freefriends.org>2009-01-14 00:14:59 +0000
commit1cf000674b16b9f15f3c5112f70c07a08e8bb5de (patch)
tree596418ba5a8a1d2c92c836a6a1aeb9945fed6be7 /Master/texmf-dist/source
parentc49b4326cde7ef42ae8571be9f7e12dbdf1ec6ac (diff)
chemstyle 1.3d (10jan09)
git-svn-id: svn://tug.org/texlive/trunk@11860 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx62
1 files changed, 37 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
index 90159332723..3bead4da261 100644
--- a/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
+++ b/Master/texmf-dist/source/latex/chemstyle/chemstyle.dtx
@@ -1,4 +1,5 @@
% \iffalse meta-comment
+% !TEX encoding = ISO-8859-1
%
% Copyright (C) 2007-08 by
% Joseph Wright <joseph.wright@morningstar2.co.uk>
@@ -181,7 +182,7 @@ to aid the chemist.
%</driver>
% \fi
%
-%\CheckSum{645}
+%\CheckSum{646}
%
% \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
@@ -462,6 +463,7 @@ to aid the chemist.
%\end{LaTeXexample}
%
%\subsection{Alkyl radicals}
+%\changes{v1.3d}{2009/01/09}{Alkyl radicals work in \cs{ce} macro}
%\DescribeMacro{\nPr}
%\DescribeMacro{\iPr}
%\DescribeMacro{\nBu}
@@ -478,6 +480,11 @@ to aid the chemist.
% The alkyl group could be \nPr, \iPr\\
% or \nBu without affecting the selectivity.
%\end{LaTeXexample}
+% These should also work inside the \cs{ce} macro of \pkg{mhchem} when
+% if escaped mode:
+%\begin{LaTeXexample}
+% \ce{$\nBu$2CH-C($\iPr$)3}
+%\end{LaTeXexample}
%
%\DescribeOption{xspace}
% When \currpkg is loaded using the \opt{xspace} option, the
@@ -697,8 +704,8 @@ to aid the chemist.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\def\cst@id$#1: #2.#3 #4 #5-#6-#7 #8 #9${%
- \def\cst@ver{#5/#6/#7\space v1.3c\space}}
-\cst@id $Id: chemstyle.dtx 50 2008-08-18 16:21:24Z joseph $
+ \def\cst@ver{#5/#6/#7\space v1.3d\space}}
+\cst@id $Id: chemstyle.dtx 51 2009-01-09 16:21:24Z joseph $
\ProvidesPackage{chemstyle}
[\cst@ver Writing chemistry with style]
% \end{macrocode}
@@ -708,11 +715,12 @@ to aid the chemist.
%\changes{v1.0a}{2007/08/23}{No longer load \texttt{fixltx2e}
% package}
%\changes{v1.2}{2008/03/05}{Added \pkg{xkeyval} interface}
+%\changes{v1.3d}{2009/01/09}{Require \pkg{amstext}}
% Packages that are needed under all circumstances are loaded here.
% There are some limitations on the age of \pkg{xkeyval}.
% \begin{macrocode}
\RequirePackage{xkeyval}[2005/05/07]
-\RequirePackage{graphicx,varioref,caption,xspace}
+\RequirePackage{amstext,graphicx,varioref,caption,xspace}
% \end{macrocode}
%\begin{macro}{\cst@tempa}
%\changes{v1.2}{2008/03/05}{New macro}
@@ -959,6 +967,7 @@ to aid the chemist.
\newcommand*{\cst@radical}[2]{%
\expandafter\DeclareRobustCommand\expandafter*\expandafter{%
\csname #1#2\endcsname}{%
+ \text{%
% \end{macrocode}
%\begin{macro}{\cst@emph}
%\begin{macro}{\cst@hyphen}
@@ -966,33 +975,36 @@ to aid the chemist.
% To allow redefinition while running, the various component parts of
% the system are defined each time an abbreviation is used.
% \begin{macrocode}
- \ifcst@radhyphen
- \def\cst@hyphen{-}%
- \else
- \let\cst@hyphen\relax
- \fi
- \ifcst@radsuper
- \let\cst@super\textsuperscript
- \else
- \let\cst@super\relax
- \fi
- \ifcst@rademph
- \let\cst@emph\emph
- \else
- \let\cst@emph\relax
- \fi
+ \ifcst@radhyphen
+ \def\cst@hyphen{-}%
+ \else
+ \let\cst@hyphen\relax
+ \fi
+ \ifcst@radsuper
+ \let\cst@super\textsuperscript
+ \else
+ \let\cst@super\relax
+ \fi
+ \ifcst@rademph
+ \let\cst@emph\emph
+ \else
+ \let\cst@emph\relax
+ \fi
% \end{macrocode}
%\end{macro}
%\end{macro}
%\end{macro}
% The final check is for a prefix, which is easiest to do here.
% \begin{macrocode}
- \ifcst@radprefix
- \cst@super{\cst@emph{#1}}\cst@hyphen#2%
- \else
- #2\cst@hyphen\cst@super{\cst@emph{#1}}%
- \fi
- \cst@xspace}}
+ \ifcst@radprefix
+ \cst@super{\cst@emph{#1}}\cst@hyphen#2%
+ \else
+ #2\cst@hyphen\cst@super{\cst@emph{#1}}%
+ \fi
+ \cst@xspace
+ }%
+ }%
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\cst@xspace}