diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-20 23:17:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-20 23:17:40 +0000 |
commit | c4fc9d799a82b2e62e2c7982a6e461d3a7fea717 (patch) | |
tree | 023158b7acdc143126f8fffe1c4ef6ed2f729dde /Master/texmf-dist/tex/latex/showexpl | |
parent | a5bbf3d2582890eb3376a46ab8e7dad19baf4e53 (diff) |
showexpl (20jan14)
git-svn-id: svn://tug.org/texlive/trunk@32737 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/showexpl')
-rw-r--r-- | Master/texmf-dist/tex/latex/showexpl/showexpl.sty | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/showexpl/showexpl.sty b/Master/texmf-dist/tex/latex/showexpl/showexpl.sty index 65451f40923..264edcd40ca 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} - [2013/03/21 v0.3k Typesetting example code (RN)] + [2014/01/19 v0.3l Typesetting example code (RN)] \DeclareOption{final}{% \PassOptionsToPackage{\CurrentOption}{graphicx}% \PassOptionsToPackage{\CurrentOption}{listings}% @@ -51,6 +51,8 @@ \lst@Key{wide}f[t]{\lstKV@SetIf{#1}\if@SX@wide} \lst@Key{rframe}\relax{\def\SX@rframe{#1}} \lst@Key{preset}\relax{\def\SX@preset{#1}} +\newcommand*\SX@scaled{} +\lst@Key{scaled}{?}[!]{\def\SX@scaled{#1}} \lst@Key{explpreset}\relax{\def\SX@explpreset{#1}} \lst@Key{codefile}\relax{\def\SX@codefile{#1}} \newif\if@SX@rangeaccept \@SX@rangeacceptfalse @@ -340,7 +342,16 @@ \else \let\SX@tempa=\input \fi - \SX@tempa{\SX@codefile}\par% + \if\SX@scaled ?% + \let\SX@tempb=\@firstofone + \else + \if\SX@scaled !% + \def\SX@tempb##1{\resizebox{\SX@width}{!}{##1}}% + \else + \def\SX@tempb##1{\scalebox{\SX@scaled}{##1}}% + \fi + \fi + \SX@tempb{\SX@tempa{\SX@codefile}}\par \endgroup \else \expandafter\includegraphics\expandafter[\SX@graphicparam]% |