texlive[46723] Master/texmf-dist: chemschemex (23feb18)
commits+karl at tug.org
commits+karl at tug.org
Fri Feb 23 23:07:28 CET 2018
Revision: 46723
http://tug.org/svn/texlive?view=revision&revision=46723
Author: karl
Date: 2018-02-23 23:07:28 +0100 (Fri, 23 Feb 2018)
Log Message:
-----------
chemschemex (23feb18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/chemschemex/README
trunk/Master/texmf-dist/doc/latex/chemschemex/chemschemex.pdf
trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx
trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins
trunk/Master/texmf-dist/tex/latex/chemschemex/chemschemex.sty
Modified: trunk/Master/texmf-dist/doc/latex/chemschemex/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/chemschemex/README 2018-02-23 22:07:15 UTC (rev 46722)
+++ trunk/Master/texmf-dist/doc/latex/chemschemex/README 2018-02-23 22:07:28 UTC (rev 46723)
@@ -1,5 +1,5 @@
---------------------------------------------------------
-chemschemex v1.1 2017/04/02
+chemschemex v1.2 2018/01/20
Chemical schemes including complex labeling and
referencing
@@ -11,7 +11,7 @@
---------------------------------------------------------
-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
Modified: trunk/Master/texmf-dist/doc/latex/chemschemex/chemschemex.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx 2018-02-23 22:07:15 UTC (rev 46722)
+++ trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.dtx 2018-02-23 22:07:28 UTC (rev 46723)
@@ -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 at 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 at scheme\CSX at schemefalse % Is true, if the struct appears in a Chemscheme environment
-\newif\ifCSX at generate@@@caption@% Is needed to get label and text out of the caption passed to customstruct
-\newif\ifCSX at generate@@@caption at LastEntryWasTextOnly% Is needed to detect text-only caption entries
+\newif\ifCSX at generate@@@caption@ % Is needed to get label and text out of the caption passed to customstruct
+\newif\ifCSX at generate@@@caption at 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 at addtolist
+ \string\fancyref at addtolist%
{\string{#2\string}}%
{\string\CSX at 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 at list{}%
\newcommand{\ChemschemeNextRow}[1][]{%
- \ExpandNext{\fancyref at addtolist}{\theCSXstruct}{\ChemschemeNextRow at list}%
+ % #1=vertical margin
+ \edef\ChemschemeNextRow at helper{\noexpand\fancyref at addtolist{\theCSXstruct}{\noexpand\ChemschemeNextRow at list}}%
+ \ChemschemeNextRow at 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 at savebox@set at helper{\noexpand\newsavebox{\csname #1\endcsname}}\CSX at savebox@set at 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 at 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 at list@image@\theCSXstruct\endcsname}{%
- \customarrow at temp%
- }%
+ \edef\customarrow at helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX at list@image@\theCSXstruct\endcsname{%
+ \expandonce\customarrow at temp%
+ }%
+ }\customarrow at helper%
\expandafter\gdef\csname CSX at list@caption@\theCSXstruct\endcsname{%
\node(Scheme\theCSXscheme Caption\theCSXstruct){};%
}%
@@ -1780,14 +1787,16 @@
\newcommand{\CSX at 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 at 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 at 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 at sort@list{}%
\def\fancyref at sort@labellist at unsorted{}%
\fancyref at sort{#2}%
- \expandnext{\fancyref at addtolist}%
- {\fancyref at sort@labellist at unsorted}%
- {\fancyref at sort@list}%
+ \edef\@Struct at helper{%
+ \noexpand\fancyref at addtolist{\fancyref at sort@labellist at unsorted}{\noexpand\fancyref at sort@list}%
+ }\@Struct at helper%
\edef\CSX at sorted@list{\fancyref at sort@list}%
% Generate the caption
\edef\@@Struct##1##2{%
@@ -1875,13 +1884,15 @@
use the command \string\newstruct.}{}%
}{%
\noexpand\fancyref at addtolist{%
- {{\noexpand\def\noexpand\fancylabelShowLabelEvent{\noexpand\CSXlabelsep}%
+ {{\noexpand\protecting{\noexpand\def\noexpand\fancylabelShowLabelEvent{\noexpand\CSXlabelsep}}%
\noexpand\fancysublabel[#1]{#3}{##2}},%
{\noexpand\@nameuse{CSX at newstruct@#3 at subcaption@##2}}}}%
{\noexpand\@@struct}%
}%
}%
- \expandnext{\fancyref at foreach{\@@Struct}{}}{\CSX at sorted@list}%
+ \edef\@Struct at helper{%
+ \noexpand\fancyref at foreach{\noexpand\@@Struct}{}{\CSX at sorted@list}%
+ }\@Struct at helper%
}
% \end{macrocode}
% \end{macro}
@@ -1907,9 +1918,11 @@
\edef\customstruct at outarrow@temp{%
\noexpand\node[\expandonce{#2}](Scheme\theCSXscheme Image\theCSXstruct){\expandonce{#4}};%
}%
- \expandnext{\expandafter\gdef\csname CSX at list@image@\theCSXstruct\endcsname}{%
- \customstruct at outarrow@temp%
- }%
+ \edef\customstruct at outarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX at list@image@\theCSXstruct\endcsname{%
+ \expandonce\customstruct at outarrow@temp%
+ }%
+ }\customstruct at 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 at list@caption@\theCSXstruct\endcsname}{%
- \customstruct at outarrow@temp%
}%
+ \edef\customstruct at outarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX at list@caption@\theCSXstruct\endcsname{%
+ \expandonce\customstruct at outarrow@temp%
+ }%
+ }\customstruct at outarrow@helper%
\ifCSX at scheme%
% Inside Chemscheme environment
\else%
@@ -1963,7 +1978,7 @@
}%
}%
}%
- \expandnext{\CSX at savebox{CSX at savebox@\theCSXstructinarrow}}{%
+ \CSX at savebox{CSX at savebox@\theCSXstructinarrow}{%
\customstruct at inarrow@temp%
}%
\ignorespaces%
@@ -1986,9 +2001,8 @@
\def\CSX at generate@caption at captionstyle{CSXcaption,#4}%
\CSX at generate@@@caption at true%
\ifthenelse{\equal{#1}{}}{}{%
- \expandnext\expandnext\expandnext{%
- \fancyref at foreach{\CSX at generate@@caption}{}%
- }{#1}%
+ \protected at edef\CSXgeneratecaption at helper{\noexpand\fancyref at foreach{\noexpand\CSX at generate@@caption}{}{#1}}%
+ \CSXgeneratecaption at helper%
}%
}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins 2018-02-23 22:07:15 UTC (rev 46722)
+++ trunk/Master/texmf-dist/source/latex/chemschemex/chemschemex.ins 2018-02-23 22:07:28 UTC (rev 46723)
@@ -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
Modified: trunk/Master/texmf-dist/tex/latex/chemschemex/chemschemex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/chemschemex/chemschemex.sty 2018-02-23 22:07:15 UTC (rev 46722)
+++ trunk/Master/texmf-dist/tex/latex/chemschemex/chemschemex.sty 2018-02-23 22:07:28 UTC (rev 46723)
@@ -8,7 +8,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
@@ -25,17 +25,19 @@
%%
%% latex chemschemex.dtx
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
+\ProvidesPackage{chemschemex}[2018/01/20 v1.2 Typeset chemical schemes]
+\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 at 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{%
@@ -50,7 +52,7 @@
% #2=filename of the image
\newcommand{\CSXimage}[2][]{%
\includegraphics[#1,##1]{##2}%
- }
+ }%
}
\define at key{chemschemex}{labelseparator}{%
\def\CSXlabelsep{#1}%
@@ -332,8 +334,8 @@
}%
}
\newif\ifCSX at scheme\CSX at schemefalse % Is true, if the struct appears in a Chemscheme environment
-\newif\ifCSX at generate@@@caption@% Is needed to get label and text out of the caption passed to customstruct
-\newif\ifCSX at generate@@@caption at LastEntryWasTextOnly% Is needed to detect text-only caption entries
+\newif\ifCSX at generate@@@caption@ % Is needed to get label and text out of the caption passed to customstruct
+\newif\ifCSX at generate@@@caption at LastEntryWasTextOnly % Is needed to detect text-only caption entries
\newlength{\CSXimagewidth}\setlength{\CSXimagewidth}{0pt}
\newlength{\CSXlabelwidth}\setlength{\CSXlabelwidth}{0pt}
\newlength{\CSXmaxlabelwidth}\setlength{\CSXmaxlabelwidth}{0pt}
@@ -361,7 +363,7 @@
}%
\AtBeginDocument{%
\immediate\write\@auxout{%
- \string\fancyref at addtolist
+ \string\fancyref at addtolist%
{\string{#2\string}}%
{\string\CSX at structlist@filenamesorted}%
}%
@@ -426,7 +428,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}}%
}
\newcommandx\structalt[7][1={},2=CSX,3={},4={},5={},usedefault]{%
% #1=caption
@@ -437,7 +439,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}}%
}
\WithSuffix\newcommandx\struct*[6][1={},2=CSX,3={},4={},5={},usedefault]{%
% #1=caption
@@ -447,7 +449,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}}%
}
\WithSuffix\newcommandx\structalt*[7][1={},2=CSX,3={},4={},5={},usedefault]{%
% #1=caption
@@ -458,7 +460,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}}%
}
\WithSuffix\newcommandx\struct-[5][1={},2={},3={},4={},usedefault]{%
% #1=caption
@@ -466,7 +468,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}}%
}
\newcommandx\Struct[6][1=CSX,2={},3={},4={},usedefault]{%
% #1=family
@@ -476,7 +478,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}}%
}
\newcommandx\Structalt[7][1=CSX,2={},3={},4={},usedefault]{%
% #1=family
@@ -487,7 +489,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}}%
}
\WithSuffix\newcommandx\Struct*[6][1=CSX,2={},3={},4={},usedefault]{%
% #1=family
@@ -497,7 +499,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}}%
}
\WithSuffix\newcommandx\Structalt*[7][1=CSX,2={},3={},4={},usedefault]{%
% #1=family
@@ -508,7 +510,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}}%
}
\newcommand{\structplus}{%
\customstruct{}{\tikz[CSXsimple]{\draw[-](1,0)to(-1,0);\draw[-](0,1)to(0,-1);}}%
@@ -518,7 +520,9 @@
}
\def\ChemschemeNextRow at list{}%
\newcommand{\ChemschemeNextRow}[1][]{%
- \ExpandNext{\fancyref at addtolist}{\theCSXstruct}{\ChemschemeNextRow at list}%
+ % #1=vertical margin
+ \edef\ChemschemeNextRow at helper{\noexpand\fancyref at addtolist{\theCSXstruct}{\noexpand\ChemschemeNextRow at list}}%
+ \ChemschemeNextRow at helper%
\expandafter\def\csname ChemschemeNextRow@\theCSXstruct\endcsname{#1}%
\ignorespaces%
}
@@ -594,15 +598,15 @@
% #1=boxname
% #2=box content
\@ifundefined{#1}{%
- \expandnext{\newsavebox}{\csname #1\endcsname}%
+ \edef\CSX at savebox@set at helper{\noexpand\newsavebox{\csname #1\endcsname}}\CSX at savebox@set at helper%
}{}
- \expandnext{\global\sbox}{\csname #1\endcsname}{#2}%
- \expandnext{\usebox}{\csname #1\endcsname}%
+ \global\sbox{\csname #1\endcsname}{#2}%
+ \usebox{\csname #1\endcsname}%
}%
\def\CSX at savebox@show#1#2{%
% #1=boxname
% #2=box content
- \expandnext{\usebox}{\csname #1\endcsname}%
+ \usebox{\@nameuse{#1}}%
}%
\newcommand{\customarrow}[4][\the\CSXarrowlength]{%
% #1=length
@@ -651,9 +655,11 @@
([CSXshiftB]\noexpand\CSXnodename .east);%
}%
}%
- \expandnext{\expandafter\gdef\csname CSX at list@image@\theCSXstruct\endcsname}{%
- \customarrow at temp%
- }%
+ \edef\customarrow at helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX at list@image@\theCSXstruct\endcsname{%
+ \expandonce\customarrow at temp%
+ }%
+ }\customarrow at helper%
\expandafter\gdef\csname CSX at list@caption@\theCSXstruct\endcsname{%
\node(Scheme\theCSXscheme Caption\theCSXstruct){};%
}%
@@ -686,14 +692,16 @@
\newcommand{\CSX at 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 at 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 at declarearrowbundle@helper%
}
\CSXdeclarearrowbundle{RightArrow}{CSXallarrows,CSXRightArrow}
\CSXdeclarearrowbundle{LeftArrow}{CSXallarrows,CSXLeftArrow}
@@ -729,7 +737,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}}}%
}%
}
\WithSuffix\newcommand\@struct*[3]{%
@@ -748,9 +756,9 @@
\def\fancyref at sort@list{}%
\def\fancyref at sort@labellist at unsorted{}%
\fancyref at sort{#2}%
- \expandnext{\fancyref at addtolist}%
- {\fancyref at sort@labellist at unsorted}%
- {\fancyref at sort@list}%
+ \edef\@Struct at helper{%
+ \noexpand\fancyref at addtolist{\fancyref at sort@labellist at unsorted}{\noexpand\fancyref at sort@list}%
+ }\@Struct at helper%
\edef\CSX at sorted@list{\fancyref at sort@list}%
% Generate the caption
\edef\@@Struct##1##2{%
@@ -763,13 +771,15 @@
use the command \string\newstruct.}{}%
}{%
\noexpand\fancyref at addtolist{%
- {{\noexpand\def\noexpand\fancylabelShowLabelEvent{\noexpand\CSXlabelsep}%
+ {{\noexpand\protecting{\noexpand\def\noexpand\fancylabelShowLabelEvent{\noexpand\CSXlabelsep}}%
\noexpand\fancysublabel[#1]{#3}{##2}},%
{\noexpand\@nameuse{CSX at newstruct@#3 at subcaption@##2}}}}%
{\noexpand\@@struct}%
}%
}%
- \expandnext{\fancyref at foreach{\@@Struct}{}}{\CSX at sorted@list}%
+ \edef\@Struct at helper{%
+ \noexpand\fancyref at foreach{\noexpand\@@Struct}{}{\CSX at sorted@list}%
+ }\@Struct at helper%
}
\WithSuffix\newcommand\@Struct*[3]{%
% #1=family
@@ -787,9 +797,11 @@
\edef\customstruct at outarrow@temp{%
\noexpand\node[\expandonce{#2}](Scheme\theCSXscheme Image\theCSXstruct){\expandonce{#4}};%
}%
- \expandnext{\expandafter\gdef\csname CSX at list@image@\theCSXstruct\endcsname}{%
- \customstruct at outarrow@temp%
- }%
+ \edef\customstruct at outarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX at list@image@\theCSXstruct\endcsname{%
+ \expandonce\customstruct at outarrow@temp%
+ }%
+ }\customstruct at outarrow@helper%
% Generate caption
\CSXgeneratecaption{#3}{#4}{Scheme\theCSXscheme Caption\theCSXstruct}{#1}%
% Set caption
@@ -800,9 +812,11 @@
}%
};%
}%
- \expandnext{\expandafter\gdef\csname CSX at list@caption@\theCSXstruct\endcsname}{%
- \customstruct at outarrow@temp%
- }%
+ \edef\customstruct at outarrow@helper{%
+ \noexpand\expandafter\noexpand\gdef\noexpand\csname CSX at list@caption@\theCSXstruct\endcsname{%
+ \expandonce\customstruct at outarrow@temp%
+ }%
+ }\customstruct at outarrow@helper%
\ifCSX at scheme%
% Inside Chemscheme environment
\else%
@@ -839,7 +853,7 @@
}%
}%
}%
- \expandnext{\CSX at savebox{CSX at savebox@\theCSXstructinarrow}}{%
+ \CSX at savebox{CSX at savebox@\theCSXstructinarrow}{%
\customstruct at inarrow@temp%
}%
\ignorespaces%
@@ -858,9 +872,8 @@
\def\CSX at generate@caption at captionstyle{CSXcaption,#4}%
\CSX at generate@@@caption at true%
\ifthenelse{\equal{#1}{}}{}{%
- \expandnext\expandnext\expandnext{%
- \fancyref at foreach{\CSX at generate@@caption}{}%
- }{#1}%
+ \protected at edef\CSXgeneratecaption at helper{\noexpand\fancyref at foreach{\noexpand\CSX at generate@@caption}{}{#1}}%
+ \CSXgeneratecaption at helper%
}%
}
\newcommand{\CSX at generate@@caption}[2]{%
More information about the tex-live-commits
mailing list