summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/showexpl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-20 22:11:09 +0000
committerKarl Berry <karl@freefriends.org>2016-11-20 22:11:09 +0000
commitfe0d83a76a7ad6b8fdebb9edab209b23abedd9e2 (patch)
tree867b3f11c7ba31d39f67fd736639b05ed8ad3eb1 /Master/texmf-dist/tex/latex/showexpl
parent1a8e8508c3a04b2368a4d81a58919e465c72d513 (diff)
showexpl (20nov16)
git-svn-id: svn://tug.org/texlive/trunk@42546 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/showexpl')
-rw-r--r--Master/texmf-dist/tex/latex/showexpl/showexpl.sty23
1 files changed, 14 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/showexpl/showexpl.sty b/Master/texmf-dist/tex/latex/showexpl/showexpl.sty
index 917f817e7ae..6b5b542a4ec 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/08/05 v0.3m Typesetting example code (RN)]
+ [2016/11/20 v0.3n Typesetting example code (RN)]
\DeclareOption{final}{%
\PassOptionsToPackage{\CurrentOption}{graphicx}%
\PassOptionsToPackage{\CurrentOption}{listings}%
@@ -71,6 +71,9 @@
}%
}%
\newbox\SX@ResBox
+\newcommand\ResultBox{} \let\ResultBox=\fbox
+\newdimen\ResultBoxSep \ResultBoxSep=\fboxsep
+\newdimen\ResultBoxRule \ResultBoxRule=\fboxrule
\newcommand*\SX@pos{}
\newcommand*\SX@width{}
\newcommand*\SX@hsep{}
@@ -167,8 +170,7 @@
{\vskip-\belowcaptionskip}{}%
\fi
}
-\lstnewenvironment{LTXexample}[1][]
-{%
+\lstnewenvironment{LTXexample}[1][]{%
\@temptokena{#1}%
\begingroup
\advance\c@ltxexample\@ne \advance\c@lstlisting\@ne
@@ -180,11 +182,13 @@
\x
\xdef\SX@@explpreset{\the\@temptokena,codefile=\SX@codefile,
graphic={[\SX@graphicparam]{\SX@graphicname}}}%
- \setbox\@tempboxa=\hbox\bgroup% Warum noetig?
+ \begingroup
+ \let\UTFviii@defined=\@gobble
+ \let\@inpenc@undefined@=\@gobble
\lst@BeginWriteFile{\SX@codefile}%
-}
+}%
{%
- \lst@EndWriteFile\egroup
+ \lst@EndWriteFile\endgroup
\SX@put@code@result
}
\newcommand*\SX@put@code@result{%
@@ -218,8 +222,8 @@
\ifx\SX@rframe\@empty
\long\def\SX@frame##1{##1}%
\else
- \let\SX@frame\fbox
- \setlength\@tempdima{\SX@width-2\fboxsep-2\fboxrule}%
+ \let\SX@frame\ResultBox
+ \setlength\@tempdima{\SX@width-2\ResultBoxSep-2\ResultBoxRule}%
\edef\SX@width{\the\@tempdima}%
\fi
\isSX@odd{\def\@tempa{l}}{\def\@tempa{r}}%
@@ -228,11 +232,12 @@
\let\@addtofilelist\@gobble
\let\lst@ifdisplaystyle=\iftrue
\SX@KillAboveCaptionskip\lst@MakeCaption{t}%
- \lst@belowskip=\z@
\let\lst@belowskip=\z@
\let\SX@MakeCaption\lst@MakeCaption
\let\lst@MakeCaption\@gobble{}
\setbox\SX@ResBox\hbox{%
+ \fboxsep=\ResultBoxSep
+ \fboxrule=\ResultBoxRule
\SX@frame{%
\@nameuse{\if@SX@varwidth varwidth\else minipage\fi}%
\SX@width\relax