diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-05 21:32:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-05 21:32:38 +0000 |
commit | 5033b0a46ad21995a992442c4ca73580ed7e0c58 (patch) | |
tree | 43fe9f2cdccbf13c5de6a73080429f3d79f3debc /Master | |
parent | 9299899dc8277cdf25748ef0f2320593441e0a71 (diff) |
showexpl (5may20)
git-svn-id: svn://tug.org/texlive/trunk@55030 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/showexpl/README | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/showexpl/README.md | 24 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf | bin | 332458 -> 350530 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/showexpl/showexpl-test.tex | 39 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/showexpl/showexpl.pdf | bin | 243219 -> 250331 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/showexpl/showexpl.dtx | 90 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/showexpl/showexpl.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/showexpl/showexpl.sty | 63 |
8 files changed, 132 insertions, 102 deletions
diff --git a/Master/texmf-dist/doc/latex/showexpl/README b/Master/texmf-dist/doc/latex/showexpl/README deleted file mode 100644 index f16e1bc655f..00000000000 --- a/Master/texmf-dist/doc/latex/showexpl/README +++ /dev/null @@ -1,16 +0,0 @@ -showexpl -======== - -The LaTeX package 'showexpl' provides a way to typeset LaTeX source code and -the related result in the same document. The `listings' package is required. -See 'doc/showexpl-test.tex' for the details. - -Recommended TDS locations: - - showexpl.sty: tex/latex/showexpl - README, showexpl.pdf, showexpl-test.pdf, - showexpl-test.tex, result-picture.pdf: doc/latex/showexpl - -For general installation advice, see -http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages - diff --git a/Master/texmf-dist/doc/latex/showexpl/README.md b/Master/texmf-dist/doc/latex/showexpl/README.md new file mode 100644 index 00000000000..0c2fb4d52fe --- /dev/null +++ b/Master/texmf-dist/doc/latex/showexpl/README.md @@ -0,0 +1,24 @@ +showexpl +======== + +The LaTeX package `showexpl` provides a way to typeset LaTeX source code and +the related result in the same document. The `listings` package is required. +See `doc/showexpl-test.tex` for the details. + +Recommended TDS locations: + +```text + showexpl.sty: tex/latex/showexpl + README, showexpl.pdf, showexpl-test.pdf, + showexpl-test.tex, result-picture.pdf: doc/latex/showexpl +``` + +For general installation advice, see +<http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages> + +The showexpl package is also on +CTAN:[macros/latex/contrib/showexpl](http://www.ctan.org/tex-archive/macros/latex/contrib/showexpl) + +Rolf Niepraschk, +email: Rolf.Niepraschk@gmx.de, +2020-05-03 diff --git a/Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf b/Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf Binary files differindex ed08ca09e95..a645e087aeb 100644 --- a/Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf +++ b/Master/texmf-dist/doc/latex/showexpl/showexpl-test.pdf diff --git a/Master/texmf-dist/doc/latex/showexpl/showexpl-test.tex b/Master/texmf-dist/doc/latex/showexpl/showexpl-test.tex index 316049f555f..75b4664a5b4 100644 --- a/Master/texmf-dist/doc/latex/showexpl/showexpl-test.tex +++ b/Master/texmf-dist/doc/latex/showexpl/showexpl-test.tex @@ -1,36 +1,33 @@ -% Rolf Niepraschk, 2005-07-16, Rolf.Niepraschk@ptb.de +% Rolf Niepraschk, 2020-05-03, Rolf.Niepraschk@gmx.de \listfiles\errorcontextlines=100 \documentclass[a4paper,draft,twoside]{article} \usepackage[dvipsnames]{xcolor} \usepackage[textwidth=12cm,marginparwidth=4cm]{geometry} - \usepackage[final]{showexpl} -\usepackage[T1]{fontenc} +\usepackage{iftex} -\IfFileExists{luximono.sty}% -{% - \usepackage[scaled]{luximono}% -} -{% - \IfFileExists{beramono.sty}% - {% - \usepackage[scaled]{beramono}% - }{} -} +\iftutex % LuaTeX, XeTeX + \usepackage{fontspec} + \setmonofont{DejaVuSansMono}[Scale=MatchUppercase] +\else % old engines + \usepackage[T1]{fontenc} + \usepackage{lmodern} + \usepackage[scaled]{DejaVuSansMono} +\fi \lstset{% - basicstyle=\ttfamily\small, - commentstyle=\itshape\ttfamily\small, - showspaces=false, - showstringspaces=false, - breaklines=true, - backgroundcolor=\color{lightgray}, - breakautoindent=true, - captionpos=t + basicstyle=\ttfamily\small, + commentstyle=\itshape\ttfamily\small, + showspaces=false, + showstringspaces=false, + breaklines=true, + backgroundcolor=\color{lightgray}, + breakautoindent=true, + captionpos=t } \iftrue diff --git a/Master/texmf-dist/doc/latex/showexpl/showexpl.pdf b/Master/texmf-dist/doc/latex/showexpl/showexpl.pdf Binary files differindex 31c82aad6d3..31c0ffac2e6 100644 --- a/Master/texmf-dist/doc/latex/showexpl/showexpl.pdf +++ b/Master/texmf-dist/doc/latex/showexpl/showexpl.pdf diff --git a/Master/texmf-dist/source/latex/showexpl/showexpl.dtx b/Master/texmf-dist/source/latex/showexpl/showexpl.dtx index a7c3c966774..4102c6b8ddc 100644 --- a/Master/texmf-dist/source/latex/showexpl/showexpl.dtx +++ b/Master/texmf-dist/source/latex/showexpl/showexpl.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2004 -- 2016 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de> +% Copyright (C) 2004 -- by Rolf Niepraschk <Rolf.Niepraschk@gmx.de> % -------------------------------------------------------------------- % % This file may be distributed and/or modified under the @@ -22,7 +22,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{showexpl} %<*package> - [2016/12/11 v0.3o Typesetting example code (RN)] + [2020/05/04 v0.3p Typesetting example code (RN)] %</package> % %<*driver> @@ -39,7 +39,7 @@ %</driver> % \fi % -% \CheckSum{887} +% \CheckSum{880} % % \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 @@ -206,6 +206,7 @@ % % \section{Implementation} % \changes{v0.1e}{2004/11/24}{Loading of |showexpl.cfg| added (RN).} +% \changes{v0.3p}{2020/05/04}{Remove package `calc' (RN).} % \begin{macrocode} \DeclareOption{final}{% \PassOptionsToPackage{\CurrentOption}{graphicx}% @@ -224,7 +225,7 @@ }% \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{listings}} \ProcessOptions\relax -\RequirePackage{listings,calc,ifthen,graphicx,varwidth} +\RequirePackage{refcount,listings,graphicx,varwidth,float} % \end{macrocode} % We must aktivate code from package \textsf{listings} for writing files. % \begin{macrocode} @@ -316,13 +317,12 @@ % typesetting the result of the example code. More can be added with % the user key ``|preset=...|''. % \changes{v0.3e}{2006/04/05}{More redefinitions added (RN).} +% \changes{v0.3p}{2020/05/04}{Remove extra treatment of `figure'/`table' (RN).} % \begin{macrocode} \newcommand*\SX@@preset{% \renewcommand\documentclass[2][]{\SX@eat@version}% \renewcommand\usepackage[2][]{\SX@eat@version}% \renewenvironment{document}{}{}% - \renewenvironment{figure}[1][]{\def\@captype{figure}}{}% - \renewenvironment{table}[1][]{\def\@captype{table}}{}% \renewcommand\cite[1][]{}% \let\tableofcontens\relax \let\listoffigures\relax \let\listoftables\relax \let\printindex\relax @@ -344,14 +344,28 @@ % \begin{macro}{\isSX@odd} % Parameter |#1| is executed on odd pages, parameter |#2| on % even pages. +% \changes{v0.3p}{2020/05/04}{Replace \cmd{\isodd} with +% \cmd{\ifodd}\cmd{\getpagerefnumber} (remove package `ifthen') (RN).} % \begin{macrocode} \newif\ifSX@wasodd \if@twoside - \newcommand*{\isSX@odd}[2]{% - \ifthenelse{\isodd{\pageref{\SX@IDENT}}}% - {\SX@wasoddtrue #1}{\SX@wasoddfalse #2}} + \newcommand*\isSX@odd{% + \begingroup + \ifodd\getpagerefnumber{\SX@IDENT}% + \aftergroup\SX@wasoddtrue + \else + \aftergroup\SX@wasoddfalse + \fi + \endgroup + \ifSX@wasodd + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } \else - \newcommand*{\isSX@odd}[2]{#1}\SX@wasoddtrue + \SX@wasoddtrue + \newcommand*\isSX@odd[2]{#1} \fi % \end{macrocode} % The call of \cmd{\isSX@odd} sets also \cmd{\ifSX@wasodd} to true or @@ -388,20 +402,20 @@ % \begin{macrocode} \newcommand*\SX@put@t[3]{% \SX@ResultArea{\linewidth}{#2}\endgraf\pagebreak[2]% - \setlength\@tempdima{\SX@vsep}\vskip\@tempdima + \@tempdima=\dimexpr\SX@vsep\vskip\@tempdima \SX@CodeArea{\linewidth}{#3}% } \newcommand*\SX@put@b[3]{% \SX@CodeArea{\linewidth}{#3}\endgraf\pagebreak[2]% - \setlength\@tempdima{\SX@vsep}\vskip\@tempdima + \@tempdima=\dimexpr\SX@vsep\vskip\@tempdima \SX@ResultArea{\linewidth}{#2}% } \newcommand*\SX@put@l[3]{% - \setlength\@tempdimc{\linewidth-#1-\SX@hsep}% + \@tempdimc=\dimexpr\linewidth-#1-\SX@hsep % \SX@ResultArea{#1}{#2}\hfill\SX@CodeArea{\@tempdimc}{#3}% } \newcommand*\SX@put@r[3]{% - \setlength\@tempdimc{\linewidth-#1-\SX@hsep}% + \@tempdimc=\dimexpr\linewidth-#1-\SX@hsep % \SX@CodeArea{\@tempdimc}{#3}\hfill\SX@ResultArea{#1}{#2}% } \newcommand*\SX@put@o[3]{% @@ -411,12 +425,11 @@ \@nameuse{SX@put@\ifSX@wasodd l\else r\fi}{#1}{#2}{#3}% } \newcommand\SX@ResultArea[2]{% - \SX@justification\setlength\@tempdima{#1}% - %\minipage\@tempdima#2\endminipage + \SX@justification\@tempdima=\dimexpr #1 % \parbox\@tempdima{#2}% } \newcommand\SX@CodeArea[2]{% - \setlength\@tempdima{#1}% + \@tempdima=\dimexpr #1 % \sbox\@tempboxa{\parbox\@tempdima{#2}}% \@tempdima=\dp\@tempboxa\usebox\@tempboxa \rlap{\raisebox{-\@tempdima}[0pt][0pt]{\SX@attachfile}}% @@ -477,19 +490,12 @@ \newcommand*\SX@put@code@result{% \begingroup \expandafter\lstset\expandafter{\SX@explpreset}% - \let\lst@float=\relax\let\SX@float=\relax -% \end{macrocode} -% Without the following call \cmd{\lst@beginfloat} is undefined. -% \begin{macrocode} \expandafter\lstset\expandafter{\SX@@explpreset}% - \ifx\lst@float\relax\else % \end{macrocode} -% \cmd{\lst@float} must be \cmd{\relax} because the whole ``example'' -% should float but not the listings part in addition. +% Use listings floating procedure if necessary. % \begin{macrocode} - \let\SX@float=\lst@float\let\lst@float=\relax - \g@addto@macro\SX@@explpreset{,float=false}% - \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\SX@float]}% + \ifx\lst@float\relax\else + \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]} \expandafter\@tempa \fi \ifx\lst@caption\@empty @@ -511,7 +517,7 @@ \ifx\@tempa\SX@pos\@tempswafalse\fi \def\@tempa{b}% \ifx\@tempa\SX@pos\@tempswafalse\fi - \setlength\@tempdima{\linewidth+\SX@overhang}% + \@tempdima=\dimexpr\linewidth+\SX@overhang % \if@tempswa\@tempdima=.5\@tempdima\fi% \edef\SX@width{\the\@tempdima}% \fi @@ -523,12 +529,12 @@ \long\def\SX@frame##1{##1}% \else \let\SX@frame\ResultBox - \setlength\@tempdima{\SX@width-2\ResultBoxSep-2\ResultBoxRule}% + \@tempdima=\dimexpr\SX@width-2\ResultBoxSep-2\ResultBoxRule % \edef\SX@width{\the\@tempdima}% \fi \isSX@odd{\def\@tempa{l}}{\def\@tempa{r}}% \makebox[\linewidth][\@tempa]{% - \parbox{\linewidth+\SX@overhang}{% + \parbox{\dimexpr\linewidth+\SX@overhang}{% % \end{macrocode} % \cmd{\SX@codefile} (|\jobname.tmp|) is not nessesary for the filelist. % \changes{v0.3m}{2016/08/05}{Wrong assignement for \cmd{\lst@belowskip} (RN).} @@ -541,10 +547,7 @@ % true. % \changes{v0.3k}{2013/03/21}{Setting \cmd{\lst@MakeCaption} to \cmd{\@gobble} % again (prevent multiply defined labels; label key)}. -% \begin{macrocode} - \let\SX@MakeCaption\lst@MakeCaption - \let\lst@MakeCaption\@gobble{} -% \end{macrocode} +% \changes{v0.3p}{2020/05/04}{Let's leave \cmd{\lst@MakeCaption} untouched (RN).} % \changes{v0.3j}{2012/09/22}{Setting \cmd{\lst@MakeCaption} to % was a bad idea for hyperlinks. Group added to % varwidth environment. (Suggestions by Ulrike Fischer.).} @@ -564,12 +567,11 @@ {\@latex@error{Parameter `\SX@pos' undefined}\@ehd}% {\@nameuse{SX@put@\SX@pos}% {\SX@width}{\box\SX@ResBox}{\SX@codeInput}}% - \let\lst@MakeCaption\SX@MakeCaption \lst@MakeCaption{b}\SX@KillBelowCaptionskip }% }% \endtrivlist - \ifx\SX@float\relax\else\expandafter\lst@endfloat\fi + \ifx\lst@float\relax\else\expandafter\lst@endfloat\fi \gdef\SX@@explpreset{}% \endgroup } @@ -693,6 +695,20 @@ \def\SX@tempb##1{\scalebox{\SX@scaled}{##1}}% \fi \fi + \let\SX@lst@Init=\lst@Init +% \end{macrocode} +% 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]}% +% \end{macrocode} +% Special handling of floating listing environments. +% \begin{macrocode} + \def\lst@Init{% + \let\lst@float=\relax + \SX@lst@Init + } \SX@tempb{\SX@tempa{\SX@codefile}}\par \endgroup \else @@ -726,7 +742,7 @@ \fi \SX@Info \expandafter\lstinputlisting\expandafter[\SX@@explpreset,nolol=true,% - caption={},belowskip=\z@,aboveskip=\z@]{\SX@codefile}% + caption={},belowskip=\z@,aboveskip=\z@,float=false]{\SX@codefile}% \endgroup }% % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/showexpl/showexpl.ins b/Master/texmf-dist/source/latex/showexpl/showexpl.ins index 98548e0467f..773270fdd04 100644 --- a/Master/texmf-dist/source/latex/showexpl/showexpl.ins +++ b/Master/texmf-dist/source/latex/showexpl/showexpl.ins @@ -1,5 +1,5 @@ %% -%% Copyright (C) 2004 by Rolf Niepraschk <Rolf.Niepraschk@gmx.de> +%% Copyright (C) 2004 -- by Rolf Niepraschk <Rolf.Niepraschk@gmx.de> %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.2 of this license diff --git a/Master/texmf-dist/tex/latex/showexpl/showexpl.sty b/Master/texmf-dist/tex/latex/showexpl/showexpl.sty index f236f704e0b..7a54531d0fc 100644 --- a/Master/texmf-dist/tex/latex/showexpl/showexpl.sty +++ b/Master/texmf-dist/tex/latex/showexpl/showexpl.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{showexpl} - [2016/12/11 v0.3o Typesetting example code (RN)] + [2020/05/04 v0.3p Typesetting example code (RN)] \DeclareOption{final}{% \PassOptionsToPackage{\CurrentOption}{graphicx}% \PassOptionsToPackage{\CurrentOption}{listings}% @@ -37,7 +37,7 @@ }% \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{listings}} \ProcessOptions\relax -\RequirePackage{listings,calc,ifthen,graphicx,varwidth} +\RequirePackage{refcount,listings,graphicx,varwidth,float} \lst@RequireAspects{writefile} \newcommand*\SX@defaultWD[2]{% \afterassignment\SX@def@WD\dimen@#2\linewidth\relax{#1}} @@ -89,8 +89,6 @@ \renewcommand\documentclass[2][]{\SX@eat@version}% \renewcommand\usepackage[2][]{\SX@eat@version}% \renewenvironment{document}{}{}% - \renewenvironment{figure}[1][]{\def\@captype{figure}}{}% - \renewenvironment{table}[1][]{\def\@captype{table}}{}% \renewcommand\cite[1][]{}% \let\tableofcontens\relax \let\listoffigures\relax \let\listoftables\relax \let\printindex\relax @@ -109,11 +107,23 @@ \newcommand*\SX@eat@version[1][]{} \newif\ifSX@wasodd \if@twoside - \newcommand*{\isSX@odd}[2]{% - \ifthenelse{\isodd{\pageref{\SX@IDENT}}}% - {\SX@wasoddtrue #1}{\SX@wasoddfalse #2}} + \newcommand*\isSX@odd{% + \begingroup + \ifodd\getpagerefnumber{\SX@IDENT}% + \aftergroup\SX@wasoddtrue + \else + \aftergroup\SX@wasoddfalse + \fi + \endgroup + \ifSX@wasodd + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + } \else - \newcommand*{\isSX@odd}[2]{#1}\SX@wasoddtrue + \SX@wasoddtrue + \newcommand*\isSX@odd[2]{#1} \fi \newcounter{ltxexample} \newcommand*{\SX@IDENT}{SX@\number\value{ltxexample}} @@ -125,20 +135,20 @@ } \newcommand*\SX@put@t[3]{% \SX@ResultArea{\linewidth}{#2}\endgraf\pagebreak[2]% - \setlength\@tempdima{\SX@vsep}\vskip\@tempdima + \@tempdima=\dimexpr\SX@vsep\vskip\@tempdima \SX@CodeArea{\linewidth}{#3}% } \newcommand*\SX@put@b[3]{% \SX@CodeArea{\linewidth}{#3}\endgraf\pagebreak[2]% - \setlength\@tempdima{\SX@vsep}\vskip\@tempdima + \@tempdima=\dimexpr\SX@vsep\vskip\@tempdima \SX@ResultArea{\linewidth}{#2}% } \newcommand*\SX@put@l[3]{% - \setlength\@tempdimc{\linewidth-#1-\SX@hsep}% + \@tempdimc=\dimexpr\linewidth-#1-\SX@hsep % \SX@ResultArea{#1}{#2}\hfill\SX@CodeArea{\@tempdimc}{#3}% } \newcommand*\SX@put@r[3]{% - \setlength\@tempdimc{\linewidth-#1-\SX@hsep}% + \@tempdimc=\dimexpr\linewidth-#1-\SX@hsep % \SX@CodeArea{\@tempdimc}{#3}\hfill\SX@ResultArea{#1}{#2}% } \newcommand*\SX@put@o[3]{% @@ -148,12 +158,11 @@ \@nameuse{SX@put@\ifSX@wasodd l\else r\fi}{#1}{#2}{#3}% } \newcommand\SX@ResultArea[2]{% - \SX@justification\setlength\@tempdima{#1}% - %\minipage\@tempdima#2\endminipage + \SX@justification\@tempdima=\dimexpr #1 % \parbox\@tempdima{#2}% } \newcommand\SX@CodeArea[2]{% - \setlength\@tempdima{#1}% + \@tempdima=\dimexpr #1 % \sbox\@tempboxa{\parbox\@tempdima{#2}}% \@tempdima=\dp\@tempboxa\usebox\@tempboxa \rlap{\raisebox{-\@tempdima}[0pt][0pt]{\SX@attachfile}}% @@ -192,12 +201,9 @@ \newcommand*\SX@put@code@result{% \begingroup \expandafter\lstset\expandafter{\SX@explpreset}% - \let\lst@float=\relax\let\SX@float=\relax \expandafter\lstset\expandafter{\SX@@explpreset}% \ifx\lst@float\relax\else - \let\SX@float=\lst@float\let\lst@float=\relax - \g@addto@macro\SX@@explpreset{,float=false}% - \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\SX@float]}% + \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]} \expandafter\@tempa \fi \ifx\lst@caption\@empty @@ -213,7 +219,7 @@ \ifx\@tempa\SX@pos\@tempswafalse\fi \def\@tempa{b}% \ifx\@tempa\SX@pos\@tempswafalse\fi - \setlength\@tempdima{\linewidth+\SX@overhang}% + \@tempdima=\dimexpr\linewidth+\SX@overhang % \if@tempswa\@tempdima=.5\@tempdima\fi% \edef\SX@width{\the\@tempdima}% \fi @@ -221,17 +227,15 @@ \long\def\SX@frame##1{##1}% \else \let\SX@frame\ResultBox - \setlength\@tempdima{\SX@width-2\ResultBoxSep-2\ResultBoxRule}% + \@tempdima=\dimexpr\SX@width-2\ResultBoxSep-2\ResultBoxRule % \edef\SX@width{\the\@tempdima}% \fi \isSX@odd{\def\@tempa{l}}{\def\@tempa{r}}% \makebox[\linewidth][\@tempa]{% - \parbox{\linewidth+\SX@overhang}{% + \parbox{\dimexpr\linewidth+\SX@overhang}{% \let\@addtofilelist\@gobble \let\lst@ifdisplaystyle=\iftrue \SX@KillAboveCaptionskip\lst@MakeCaption{t}% - \let\SX@MakeCaption\lst@MakeCaption - \let\lst@MakeCaption\@gobble{} \setbox\SX@ResBox\hbox{% \fboxsep=\ResultBoxSep \fboxrule=\ResultBoxRule @@ -247,12 +251,11 @@ {\@latex@error{Parameter `\SX@pos' undefined}\@ehd}% {\@nameuse{SX@put@\SX@pos}% {\SX@width}{\box\SX@ResBox}{\SX@codeInput}}% - \let\lst@MakeCaption\SX@MakeCaption \lst@MakeCaption{b}\SX@KillBelowCaptionskip }% }% \endtrivlist - \ifx\SX@float\relax\else\expandafter\lst@endfloat\fi + \ifx\lst@float\relax\else\expandafter\lst@endfloat\fi \gdef\SX@@explpreset{}% \endgroup } @@ -354,6 +357,12 @@ \def\SX@tempb##1{\scalebox{\SX@scaled}{##1}}% \fi \fi + \let\SX@lst@Init=\lst@Init + \def\@xfloat##1[##2]{\@float@HH{##1}[H]}% + \def\lst@Init{% + \let\lst@float=\relax + \SX@lst@Init + } \SX@tempb{\SX@tempa{\SX@codefile}}\par \endgroup \else @@ -370,7 +379,7 @@ \fi \SX@Info \expandafter\lstinputlisting\expandafter[\SX@@explpreset,nolol=true,% - caption={},belowskip=\z@,aboveskip=\z@]{\SX@codefile}% + caption={},belowskip=\z@,aboveskip=\z@,float=false]{\SX@codefile}% \endgroup }% \newcommand*\LTXinputExample[2][]{% |