From 66c6ec32c62e3eee6a1d7008fa1381238a47bb7e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 29 May 2020 03:02:52 +0000 Subject: CTAN sync 202005290302 --- macros/latex/contrib/showexpl/showexpl.dtx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'macros/latex/contrib/showexpl/showexpl.dtx') diff --git a/macros/latex/contrib/showexpl/showexpl.dtx b/macros/latex/contrib/showexpl/showexpl.dtx index 4102c6b8dd..6219774f7b 100644 --- a/macros/latex/contrib/showexpl/showexpl.dtx +++ b/macros/latex/contrib/showexpl/showexpl.dtx @@ -22,7 +22,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{showexpl} %<*package> - [2020/05/04 v0.3p Typesetting example code (RN)] + [2020/05/26 v0.3q Typesetting example code (RN)] % % %<*driver> @@ -39,7 +39,7 @@ % % \fi % -% \CheckSum{880} +% \CheckSum{889} % % \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 @@ -328,6 +328,7 @@ \let\listoftables\relax \let\printindex\relax \let\listfiles\relax \let\nofiles\relax \let\index\@gobble \let\label\@gobble + \let\refstepcounter=\@gobble \let\bibliography\@gobble \let\pagestyle\@gobble \let\thispagestyle\@gobble %%\let\immediate\relax \let\write\@gobbletwo @@ -696,20 +697,31 @@ \fi \fi \let\SX@lst@Init=\lst@Init -% \end{macrocode} +% \end{macrocode} +% \changes{v0.3p}{2020/05/04}{Better handling of floats (RN).} +% \changes{v0.3q}{2020/05/06}{Floats should always be numbered 0 (RN).} % Prevents float environments from floating. This is not enough for floating % listing environments! Why? -% \changes{v0.3p}{2020/05/04}{Better handling of floats (RN).} % \begin{macrocode} - \def\@xfloat##1[##2]{\@float@HH{##1}[H]}% + \def\@xfloat##1[##2]{% + \def\@captype{##1}% + \@namedef{the\@captype}{0}% + \@float@HH{##1}[H]}% % \end{macrocode} % Special handling of floating listing environments. % \begin{macrocode} \def\lst@Init{% \let\lst@float=\relax + \setcounter\@captype{-1}% \SX@lst@Init } +% \end{macrocode} +% Typeset the Code. +% \begin{macrocode} \SX@tempb{\SX@tempa{\SX@codefile}}\par +% \end{macrocode} +% Restore the regular numbering of floats outside of `LTXexample'. +% \begin{macrocode} \endgroup \else \expandafter\includegraphics\expandafter[\SX@graphicparam]% @@ -750,7 +762,7 @@ % \changes{v0.1h}{2005/06/03}{New macro \cmd{\LTXinputExample} (RN).} % \begin{macrocode} \newcommand*\LTXinputExample[2][]{% - \g@addto@macro\SX@@explpreset{#1,codefile=#2}% + \g@addto@macro\SX@@explpreset{float=false,#1,codefile=#2}% \SX@put@code@result}% % \end{macrocode} % All the default values. -- cgit v1.2.3