summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/showexpl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-28 22:00:19 +0000
committerKarl Berry <karl@freefriends.org>2020-05-28 22:00:19 +0000
commit0893837b836c0bc724438be1b006cb3fa88a5338 (patch)
tree413ed2e2653a03009cf62c492ca93a8567e75037 /Master/texmf-dist/source/latex/showexpl
parent95adfddbd29a54564bdafff9e843bbf8618049e9 (diff)
showexpl (28may20)
git-svn-id: svn://tug.org/texlive/trunk@55324 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/showexpl')
-rw-r--r--Master/texmf-dist/source/latex/showexpl/showexpl.dtx24
1 files changed, 18 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/showexpl/showexpl.dtx b/Master/texmf-dist/source/latex/showexpl/showexpl.dtx
index 4102c6b8ddc..6219774f7b4 100644
--- a/Master/texmf-dist/source/latex/showexpl/showexpl.dtx
+++ b/Master/texmf-dist/source/latex/showexpl/showexpl.dtx
@@ -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@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.