summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/chemschemex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-23 22:07:28 +0000
committerKarl Berry <karl@freefriends.org>2018-02-23 22:07:28 +0000
commitfc5c9edd95a17a5ca54c6a9c8d6a5348afa5f6e5 (patch)
tree48aa98255e0785c0b21501ce196def31fab390a5 /Master/texmf-dist/source/latex/chemschemex
parent01c5905c541381e74672a48e4750a6be0b5da8ee (diff)
chemschemex (23feb18)
git-svn-id: svn://tug.org/texlive/trunk@46723 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/chemschemex')
-rw-r--r--Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx126
-rw-r--r--Master/texmf-dist/source/latex/chemschemex/chemschemex.ins4
2 files changed, 72 insertions, 58 deletions
diff --git a/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx b/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx
index fa5fda7a42a..e6560320433 100644
--- a/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx
+++ b/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2014 by Dominik Siegel
+% Copyright (C) 2014-2018 by Dominik Siegel
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -18,7 +18,7 @@
%
% <package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
% <package>\ProvidesPackage{chemschemex}
-% <package>[2017/04/03 v1.1.1]
+% <package>[2018/01/20 v1.2]
%
%<*driver>
\documentclass{ltxdoc}
@@ -28,7 +28,6 @@
\newfloat{example}{htbp}{los}%
\floatname{example}{Example}%
\captionsetup{font={footnotesize},textfont={sf},labelfont={sf,bf}}
-%\captionsetup[example]{singlelinecheck=false}
\usepackage{sectsty}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyvrb}
@@ -41,7 +40,7 @@
\newstruct[{R=H},{R=Me},{R=Ph}]{maleimid}{maleimid}{Maleimid}{}
\newstruct{cp}{cyclopentadiene}{Cyclopentadiene}{cp}
\newstruct[{R=H},{R=Me},{R=Ph}]{product}{}{}{}
-\date{2017/04/03}
+\date{2018/01/20}
\begin{document}
\DocInput{chemschemex.dtx}
\end{document}
@@ -69,6 +68,7 @@
% \changes{v1.0}{2014/07/15}{Initial version}
% \changes{v1.1}{2017/04/02}{Bug within the \textbackslash Struct command fixed}
% \changes{v1.1.1}{2017/04/03}{No code changes, documentation attached}
+% \changes{v1.2}{2018/01/20}{Dependency on etextools (causes some compatibility issues) removed}
%
% \GetFileInfo{chemschemex.sty}
%
@@ -947,6 +947,7 @@
% \begin{itemize}
% \item[2014/07/15] Initial version
% \item[2017/04/03] Bug within the \textbackslash Struct command fixed
+% \item[2018/01/20] Dependencies changed (\textsf{xifthen} instead of \textsf{ifthen}, \textsf{etoolbox} instead of \textsf{etextools}). Loading \textsf{etextools} caused compatibility issues with some other packages.
% \end{itemize}
%
% \StopEventually{}
@@ -955,24 +956,26 @@
% \subsection{Identification}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{chemschemex}[2017/04/03 v1.1.1 Typeset chemical schemes]
+\ProvidesPackage{chemschemex}[2018/01/20 v1.2 Typeset chemical schemes]
% \end{macrocode}
%
% \subsection{Loading packages and define counter formats}
% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{chemschemex}[2017/04/03 v1.1.1 Typeset chemical schemes]
\RequirePackage{xkeyval}
-\RequirePackage{etextools}
+\RequirePackage{etoolbox}
\RequirePackage{xargs}
-\RequirePackage{ifthen}
+\RequirePackage{xifthen}
\RequirePackage{suffix}
\RequirePackage{fancylabel}
\fancyref@DefineFamily{}{CSX}
-\def\fancylabelformatCSX{\arabic{fancylabel}}%
-\def\fancysublabelformatCSX{\arabic{fancylabel}\alph{fancysublabel}}%
-\def\fancyonlysublabelformatCSX{\alph{fancysublabel}}%
+\def\fancylabelformatCSX{\arabic{fancylabel}}
+\def\fancysublabelformatCSX{\arabic{fancylabel}\alph{fancysublabel}}
+\def\fancyonlysublabelformatCSX{\alph{fancysublabel}}
\RequirePackage{graphicx}
\RequirePackage{tikz}
-\usetikzlibrary{%
+\usetikzlibrary{%
shapes.multipart,%
decorations,%
decorations.markings,%
@@ -989,7 +992,7 @@
% #2=filename of the image
\newcommand{\CSXimage}[2][]{%
\includegraphics[#1,##1]{##2}%
- }
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -1291,8 +1294,8 @@
% \begin{macrocode}
% Booleans
\newif\ifCSX@scheme\CSX@schemefalse % Is true, if the struct appears in a Chemscheme environment
-\newif\ifCSX@generate@@@caption@% Is needed to get label and text out of the caption passed to customstruct
-\newif\ifCSX@generate@@@caption@LastEntryWasTextOnly% Is needed to detect text-only caption entries
+\newif\ifCSX@generate@@@caption@ % Is needed to get label and text out of the caption passed to customstruct
+\newif\ifCSX@generate@@@caption@LastEntryWasTextOnly % Is needed to detect text-only caption entries
% Lengths
\newlength{\CSXimagewidth}\setlength{\CSXimagewidth}{0pt}
\newlength{\CSXlabelwidth}\setlength{\CSXlabelwidth}{0pt}
@@ -1326,7 +1329,7 @@
}%
\AtBeginDocument{%
\immediate\write\@auxout{%
- \string\fancyref@addtolist
+ \string\fancyref@addtolist%
{\string{#2\string}}%
{\string\CSX@structlist@filenamesorted}%
}%
@@ -1411,7 +1414,7 @@
% #5=TikZ option for image
% #6=filename
\@struct{#1}{#2}{#6}%
- \expandnext{\customstruct[#4][#5]}{\@@struct}{\CSXimage[#3]{#6}}%
+ \customstruct[#4][#5]{\@@struct}{\CSXimage[#3]{#6}}%
}
% \end{macrocode}
% \end{macro}
@@ -1426,7 +1429,7 @@
% #6=filename of the referenced image
% #7=filename of the image shown instead of #6
\@struct{#1}{#2}{#6}%
- \expandnext{\customstruct[#4][#5]}{\@@struct}{\CSXimage[#3]{#7}}%
+ \customstruct[#4][#5]{\@@struct}{\CSXimage[#3]{#7}}%
}
% \end{macrocode}
% \end{macro}
@@ -1440,7 +1443,7 @@
% #5=TikZ option for image
% #6=filename
\@struct*{#1}{#2}{#6}%
- \expandnext{\customstruct[#4][#5]}{\@@struct}{\CSXimage[#3]{#6}}%
+ \customstruct[#4][#5]{\@@struct}{\CSXimage[#3]{#6}}%
}
% \end{macrocode}
% \end{macro}
@@ -1455,7 +1458,7 @@
% #6=filename of the referenced image
% #7=filename of the image shown instead of #6
\@struct*{#1}{#2}{#6}%
- \expandnext{\customstruct[#4][#5]}{\@@struct}{\CSXimage[#3]{#7}}%
+ \customstruct[#4][#5]{\@@struct}{\CSXimage[#3]{#7}}%
}
% \end{macrocode}
% \end{macro}
@@ -1467,7 +1470,7 @@
% #3=TikZ option for caption
% #4=TikZ option for image
% #5=filename
- \expandnext{\customstruct[#3][#4]}{{{},{#1}}}{\CSXimage[#2]{#5}}%
+ \customstruct[#3][#4]{{{},{#1}}}{\CSXimage[#2]{#5}}%
}
% \end{macrocode}
% \end{macro}
@@ -1481,7 +1484,7 @@
% #5=list of sublabels previously defined with \newstruct
% #6=filename
\@Struct{#1}{#5}{#6}%
- \expandnext{\customstruct[#3][#4]}{\@@struct}{\CSXimage[#2]{#6}}%
+ \customstruct[#3][#4]{\@@struct}{\CSXimage[#2]{#6}}%
}
% \end{macrocode}
% \end{macro}
@@ -1496,7 +1499,7 @@
% #6=filename of the referenced image
% #7=filename of the image shown instead of #6
\@Struct{#1}{#5}{#6}%
- \expandnext{\customstruct[#3][#4]}{\@@struct}{\CSXimage[#2]{#7}}%
+ \customstruct[#3][#4]{\@@struct}{\CSXimage[#2]{#7}}%
}
% \end{macrocode}
% \end{macro}
@@ -1510,7 +1513,7 @@
% #5=list of sublabels previously defined with \newstruct
% #6=filename
\@Struct*{#1}{#5}{#6}%
- \expandnext{\customstruct[#3][#4]}{\@@struct}{\CSXimage[#2]{#6}}%
+ \customstruct[#3][#4]{\@@struct}{\CSXimage[#2]{#6}}%
}
% \end{macrocode}
% \end{macro}
@@ -1525,7 +1528,7 @@
% #6=filename of the referenced image
% #7=filename of the image shown instead of #6
\@Struct*{#1}{#5}{#6}%
- \expandnext{\customstruct[#3][#4]}{\@@struct}{\CSXimage[#2]{#7}}%
+ \customstruct[#3][#4]{\@@struct}{\CSXimage[#2]{#7}}%
}
% \end{macrocode}
% \end{macro}
@@ -1547,7 +1550,9 @@
% \begin{macrocode}
\def\ChemschemeNextRow@list{}%
\newcommand{\ChemschemeNextRow}[1][]{%
- \ExpandNext{\fancyref@addtolist}{\theCSXstruct}{\ChemschemeNextRow@list}%
+ % #1=vertical margin
+ \edef\ChemschemeNextRow@helper{\noexpand\fancyref@addtolist{\theCSXstruct}{\noexpand\ChemschemeNextRow@list}}%
+ \ChemschemeNextRow@helper%
\expandafter\def\csname ChemschemeNextRow@\theCSXstruct\endcsname{#1}%
\ignorespaces%
}
@@ -1668,10 +1673,10 @@
% #1=boxname
% #2=box content
\@ifundefined{#1}{%
- \expandnext{\newsavebox}{\csname #1\endcsname}%
+ \edef\CSX@savebox@set@helper{\noexpand\newsavebox{\csname #1\endcsname}}\CSX@savebox@set@helper%
}{}
- \expandnext{\global\sbox}{\csname #1\endcsname}{#2}%
- \expandnext{\usebox}{\csname #1\endcsname}%
+ \global\sbox{\csname #1\endcsname}{#2}%
+ \usebox{\csname #1\endcsname}%
}%
% \end{macrocode}
% \end{macro}
@@ -1680,7 +1685,7 @@
\def\CSX@savebox@show#1#2{%
% #1=boxname
% #2=box content
- \expandnext{\usebox}{\csname #1\endcsname}%
+ \usebox{\@nameuse{#1}}%
}%
% \end{macrocode}
% \end{macro}
@@ -1733,9 +1738,11 @@
([CSXshiftB]\noexpand\CSXnodename .east);%
}%
}%
- \expandnext{\expandafter\gdef\csname CSX@list@image@\theCSXstruct\endcsname}{%
- \customarrow@temp%
- }%
+ \edef\customarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX@list@image@\theCSXstruct\endcsname{%
+ \expandonce\customarrow@temp%
+ }%
+ }\customarrow@helper%
\expandafter\gdef\csname CSX@list@caption@\theCSXstruct\endcsname{%
\node(Scheme\theCSXscheme Caption\theCSXstruct){};%
}%
@@ -1780,14 +1787,16 @@
\newcommand{\CSX@declarearrowbundle}[2]{%
% #1=macro name
% #2=TikZ style
- % normal arrow
- \expandnext{\CSXdeclarearrow}{\csname #1\endcsname}{#2}%
- % crossed out arrow
- \expandnext{\CSXdeclarearrow}{\csname C#1\endcsname}{#2,CSXCrossArrow}%
- % striked out arrow
- \expandnext{\CSXdeclarearrow}{\csname S#1\endcsname}{#2,CSXStrikeArrow}%
- % Double striked out arrow
- \expandnext{\CSXdeclarearrow}{\csname DS#1\endcsname}{#2,CSXDStrikeArrow}%
+ \edef\CSX@declarearrowbundle@helper{%
+ % normal arrow
+ \noexpand\CSXdeclarearrow{\csname #1\endcsname}{#2}%
+ % crossed out arrow
+ \noexpand\CSXdeclarearrow{\csname C#1\endcsname}{#2,CSXCrossArrow}%
+ % striked out arrow
+ \noexpand\CSXdeclarearrow{\csname S#1\endcsname}{#2,CSXStrikeArrow}%
+ % Double striked out arrow
+ \noexpand\CSXdeclarearrow{\csname DS#1\endcsname}{#2,CSXDStrikeArrow}%
+ }\CSX@declarearrowbundle@helper%
}
% Normal arrows
\CSXdeclarearrowbundle{RightArrow}{CSXallarrows,CSXRightArrow}
@@ -1833,7 +1842,7 @@
\ifthenelse{\equal{#1}{}}{%
\def\@@struct{{{\fancylabel[#2]{#3}},{}}}%
}{%
- \def\@@struct{{{\def\fancylabelShowLabelEvent{\CSXlabelsep}\fancylabel[#2]{#3}},{#1}}}%
+ \def\@@struct{{{\protecting{\def\fancylabelShowLabelEvent{\CSXlabelsep}}\fancylabel[#2]{#3}},{#1}}}%
}%
}
% \end{macrocode}
@@ -1860,9 +1869,9 @@
\def\fancyref@sort@list{}%
\def\fancyref@sort@labellist@unsorted{}%
\fancyref@sort{#2}%
- \expandnext{\fancyref@addtolist}%
- {\fancyref@sort@labellist@unsorted}%
- {\fancyref@sort@list}%
+ \edef\@Struct@helper{%
+ \noexpand\fancyref@addtolist{\fancyref@sort@labellist@unsorted}{\noexpand\fancyref@sort@list}%
+ }\@Struct@helper%
\edef\CSX@sorted@list{\fancyref@sort@list}%
% Generate the caption
\edef\@@Struct##1##2{%
@@ -1875,13 +1884,15 @@
use the command \string\newstruct.}{}%
}{%
\noexpand\fancyref@addtolist{%
- {{\noexpand\def\noexpand\fancylabelShowLabelEvent{\noexpand\CSXlabelsep}%
+ {{\noexpand\protecting{\noexpand\def\noexpand\fancylabelShowLabelEvent{\noexpand\CSXlabelsep}}%
\noexpand\fancysublabel[#1]{#3}{##2}},%
{\noexpand\@nameuse{CSX@newstruct@#3@subcaption@##2}}}}%
{\noexpand\@@struct}%
}%
}%
- \expandnext{\fancyref@foreach{\@@Struct}{}}{\CSX@sorted@list}%
+ \edef\@Struct@helper{%
+ \noexpand\fancyref@foreach{\noexpand\@@Struct}{}{\CSX@sorted@list}%
+ }\@Struct@helper%
}
% \end{macrocode}
% \end{macro}
@@ -1907,9 +1918,11 @@
\edef\customstruct@outarrow@temp{%
\noexpand\node[\expandonce{#2}](Scheme\theCSXscheme Image\theCSXstruct){\expandonce{#4}};%
}%
- \expandnext{\expandafter\gdef\csname CSX@list@image@\theCSXstruct\endcsname}{%
- \customstruct@outarrow@temp%
- }%
+ \edef\customstruct@outarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX@list@image@\theCSXstruct\endcsname{%
+ \expandonce\customstruct@outarrow@temp%
+ }%
+ }\customstruct@outarrow@helper%
% Generate caption
\CSXgeneratecaption{#3}{#4}{Scheme\theCSXscheme Caption\theCSXstruct}{#1}%
% Set caption
@@ -1919,10 +1932,12 @@
\expandonce\CSXcaption%
}%
};%
- }%
- \expandnext{\expandafter\gdef\csname CSX@list@caption@\theCSXstruct\endcsname}{%
- \customstruct@outarrow@temp%
}%
+ \edef\customstruct@outarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX@list@caption@\theCSXstruct\endcsname{%
+ \expandonce\customstruct@outarrow@temp%
+ }%
+ }\customstruct@outarrow@helper%
\ifCSX@scheme%
% Inside Chemscheme environment
\else%
@@ -1963,7 +1978,7 @@
}%
}%
}%
- \expandnext{\CSX@savebox{CSX@savebox@\theCSXstructinarrow}}{%
+ \CSX@savebox{CSX@savebox@\theCSXstructinarrow}{%
\customstruct@inarrow@temp%
}%
\ignorespaces%
@@ -1986,9 +2001,8 @@
\def\CSX@generate@caption@captionstyle{CSXcaption,#4}%
\CSX@generate@@@caption@true%
\ifthenelse{\equal{#1}{}}{}{%
- \expandnext\expandnext\expandnext{%
- \fancyref@foreach{\CSX@generate@@caption}{}%
- }{#1}%
+ \protected@edef\CSXgeneratecaption@helper{\noexpand\fancyref@foreach{\noexpand\CSX@generate@@caption}{}{#1}}%
+ \CSXgeneratecaption@helper%
}%
}
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins b/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins
index 2c44c134fd0..94f1bfda208 100644
--- a/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins
+++ b/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 by Dominik Siegel
+%% Copyright (C) 2014-2018 by Dominik Siegel
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -16,7 +16,7 @@
This is a generated file.
- Copyright (C) 2014 by Dominik Siegel
+ Copyright (C) 2014-2018 by Dominik Siegel
This file may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either