texlive[55324] Master/texmf-dist: showexpl (28may20)
commits+karl at tug.org
commits+karl at tug.org
Fri May 29 00:00:19 CEST 2020
Revision: 55324
http://tug.org/svn/texlive?view=revision&revision=55324
Author: karl
Date: 2020-05-29 00:00:19 +0200 (Fri, 29 May 2020)
Log Message:
-----------
showexpl (28may20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf
trunk/Master/texmf-dist/doc/latex/showexpl/showexpl.pdf
trunk/Master/texmf-dist/source/latex/showexpl/showexpl.dtx
trunk/Master/texmf-dist/tex/latex/showexpl/showexpl.sty
Modified: trunk/Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/showexpl/showexpl.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/showexpl/showexpl.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/showexpl/showexpl.dtx 2020-05-28 21:59:59 UTC (rev 55323)
+++ trunk/Master/texmf-dist/source/latex/showexpl/showexpl.dtx 2020-05-28 22:00:19 UTC (rev 55324)
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{showexpl}
%<*package>
- [2020/05/04 v0.3p Typesetting example code (RN)]
+ [2020/05/26 v0.3q Typesetting example code (RN)]
%</package>
%
%<*driver>
@@ -39,7 +39,7 @@
%</driver>
% \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 at lst@Init=\lst at 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 at HH{##1}[H]}%
+ \def\@xfloat##1[##2]{%
+ \def\@captype{##1}%
+ \@namedef{the\@captype}{0}%
+ \@float at HH{##1}[H]}%
% \end{macrocode}
% Special handling of floating listing environments.
% \begin{macrocode}
\def\lst at Init{%
\let\lst at float=\relax
+ \setcounter\@captype{-1}%
\SX at lst@Init
}
+% \end{macrocode}
+% Typeset the Code.
+% \begin{macrocode}
\SX at tempb{\SX at tempa{\SX at codefile}}\par
+% \end{macrocode}
+% Restore the regular numbering of floats outside of `LTXexample'.
+% \begin{macrocode}
\endgroup
\else
\expandafter\includegraphics\expandafter[\SX at graphicparam]%
@@ -750,7 +762,7 @@
% \changes{v0.1h}{2005/06/03}{New macro \cmd{\LTXinputExample} (RN).}
% \begin{macrocode}
\newcommand*\LTXinputExample[2][]{%
- \g at addto@macro\SX@@explpreset{#1,codefile=#2}%
+ \g at addto@macro\SX@@explpreset{float=false,#1,codefile=#2}%
\SX at put@code at result}%
% \end{macrocode}
% All the default values.
Modified: trunk/Master/texmf-dist/tex/latex/showexpl/showexpl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/showexpl/showexpl.sty 2020-05-28 21:59:59 UTC (rev 55323)
+++ trunk/Master/texmf-dist/tex/latex/showexpl/showexpl.sty 2020-05-28 22:00:19 UTC (rev 55324)
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{showexpl}
- [2020/05/04 v0.3p Typesetting example code (RN)]
+ [2020/05/26 v0.3q Typesetting example code (RN)]
\DeclareOption{final}{%
\PassOptionsToPackage{\CurrentOption}{graphicx}%
\PassOptionsToPackage{\CurrentOption}{listings}%
@@ -94,6 +94,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
@@ -358,9 +359,13 @@
\fi
\fi
\let\SX at lst@Init=\lst at Init
- \def\@xfloat##1[##2]{\@float at HH{##1}[H]}%
+ \def\@xfloat##1[##2]{%
+ \def\@captype{##1}%
+ \@namedef{the\@captype}{0}%
+ \@float at HH{##1}[H]}%
\def\lst at Init{%
\let\lst at float=\relax
+ \setcounter\@captype{-1}%
\SX at lst@Init
}
\SX at tempb{\SX at tempa{\SX at codefile}}\par
@@ -383,7 +388,7 @@
\endgroup
}%
\newcommand*\LTXinputExample[2][]{%
- \g at addto@macro\SX@@explpreset{#1,codefile=#2}%
+ \g at addto@macro\SX@@explpreset{float=false,#1,codefile=#2}%
\SX at put@code at result}%
\lstset{explpreset={numbers=left,numberstyle=\tiny,numbersep=.3em,
xleftmargin=1em,columns=flexible,language=[LaTeX]TEX},pos=l,width=-99pt,
More information about the tex-live-commits
mailing list.