From 517d416b7c47a92e71e8f6d2a3bc5f0d81acfdae Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 11 Dec 2016 22:29:27 +0000
Subject: showexpl (11dec16)

git-svn-id: svn://tug.org/texlive/trunk@42677 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/showexpl/showexpl.sty | 29 ++++++++++-------------
 1 file changed, 13 insertions(+), 16 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/showexpl/showexpl.sty')

diff --git a/Master/texmf-dist/tex/latex/showexpl/showexpl.sty b/Master/texmf-dist/tex/latex/showexpl/showexpl.sty
index 6b5b542a4ec..f236f704e0b 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/11/20 v0.3n Typesetting example code (RN)]
+    [2016/12/11 v0.3o Typesetting example code (RN)]
 \DeclareOption{final}{%
   \PassOptionsToPackage{\CurrentOption}{graphicx}%
   \PassOptionsToPackage{\CurrentOption}{listings}%
@@ -173,22 +173,20 @@
 \lstnewenvironment{LTXexample}[1][]{%
   \@temptokena{#1}%
   \begingroup
-    \advance\c@ltxexample\@ne \advance\c@lstlisting\@ne
-    \expandafter\lstset\expandafter{\SX@explpreset,#1}%
-    \edef\x{\endgroup
-      \def\noexpand\SX@codefile{\SX@codefile}%
-      \def\noexpand\SX@graphicname{\SX@graphicname}%
-      \def\noexpand\SX@graphicparam{\SX@graphicparam}}%
+  \advance\c@ltxexample\@ne \advance\c@lstlisting\@ne
+  \expandafter\lstset\expandafter{\SX@explpreset,#1}%
+  \edef\x{\endgroup
+    \def\noexpand\SX@codefile{\SX@codefile}%
+    \def\noexpand\SX@graphicname{\SX@graphicname}%
+    \def\noexpand\SX@graphicparam{\SX@graphicparam}}%
   \x
-  \xdef\SX@@explpreset{\the\@temptokena,codefile=\SX@codefile,
+  \xdef\SX@@explpreset{\the\@temptokena,codefile=\SX@codefile,%
     graphic={[\SX@graphicparam]{\SX@graphicname}}}%
-  \begingroup
-  \let\UTFviii@defined=\@gobble
-  \let\@inpenc@undefined@=\@gobble
+  \setbox\@tempboxa=\hbox\bgroup
   \lst@BeginWriteFile{\SX@codefile}%
-}%
+}
 {%
-  \lst@EndWriteFile\endgroup
+  \lst@EndWriteFile\egroup
   \SX@put@code@result
 }
 \newcommand*\SX@put@code@result{%
@@ -232,7 +230,6 @@
           \let\@addtofilelist\@gobble
           \let\lst@ifdisplaystyle=\iftrue
           \SX@KillAboveCaptionskip\lst@MakeCaption{t}%
-          \let\lst@belowskip=\z@
           \let\SX@MakeCaption\lst@MakeCaption
           \let\lst@MakeCaption\@gobble{}
           \setbox\SX@ResBox\hbox{%
@@ -372,8 +369,8 @@
       \g@addto@macro\SX@@explpreset{,xleftmargin=0pt,xrightmargin=0pt}%
     \fi
     \SX@Info
-    \expandafter\lstinputlisting\expandafter%
-      [\SX@@explpreset,nolol=true,caption={}]{\SX@codefile}%
+    \expandafter\lstinputlisting\expandafter[\SX@@explpreset,nolol=true,%
+      caption={},belowskip=\z@,aboveskip=\z@]{\SX@codefile}%
   \endgroup
 }%
 \newcommand*\LTXinputExample[2][]{%
-- 
cgit v1.2.3

