texlive[45289] Master/texmf-dist: pst-exa (14sep17)

commits+karl at tug.org commits+karl at tug.org
Thu Sep 14 00:05:43 CEST 2017


Revision: 45289
          http://tug.org/svn/texlive?view=revision&revision=45289
Author:   karl
Date:     2017-09-14 00:05:42 +0200 (Thu, 14 Sep 2017)
Log Message:
-----------
pst-exa (14sep17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pst-exa/Changes
    trunk/Master/texmf-dist/doc/latex/pst-exa/README
    trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.bib
    trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.pdf
    trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.tex
    trunk/Master/texmf-dist/tex/latex/pst-exa/pst-exa.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.inc

Modified: trunk/Master/texmf-dist/doc/latex/pst-exa/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pst-exa/Changes	2017-09-13 22:05:24 UTC (rev 45288)
+++ trunk/Master/texmf-dist/doc/latex/pst-exa/Changes	2017-09-13 22:05:42 UTC (rev 45289)
@@ -1,2 +1,3 @@
+0.06  2017-09-12  code modifications (pablo)
 0.05  2014-09-24  added style options (pablo)
 0.01  2010-01-01  first CTAN version
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/pst-exa/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pst-exa/README	2017-09-13 22:05:24 UTC (rev 45288)
+++ trunk/Master/texmf-dist/doc/latex/pst-exa/README	2017-09-13 22:05:42 UTC (rev 45289)
@@ -1,6 +1,6 @@
 The package \LPack{pst-exa} was created to realize examples with printed code and output
 side by side or on top of each other. The package looks in the image directory for the source
-code of the examples and inserts only the code between the environment \Lenv{document},
+code of the examples and inserts only the code between the document environment ,
 which is the sequence \LBEG{document} \ldots\ \LEND{document}.
 
 The package provides the environment \Lenv{PSTexample} with the optional

Modified: trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.bib	2017-09-13 22:05:24 UTC (rev 45288)
+++ trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.bib	2017-09-13 22:05:42 UTC (rev 45289)
@@ -13,49 +13,6 @@
 @STRING{theaterkasse	= {Von der Theaterkasse} }
 @STRING{theatertage	= {{\TeX}-Theatertage} }
 
- at Article{	  dtk02.2:jackson.voss:plot-funktionen,
-  author	= {Laura E. Jackson and Herbert Vo{\ss}},
-  title		= {Die {P}lot-{F}unktionen von {\texttt{pst-plot}}},
-  journal	= dtk,
-  year		= 2002,
-  volume	= {2/02},
-  altvolume	= 2,
-  altnumber	= 14,
-  month		= jun,
-  pages		= {27--34},
-  annote	= bretter,
-  keywords	= {},
-  abstract	= { Im letzten Heft wurden die mathematischen Funktionen von
-		  \PS~im Zusammenhang mit dem {\LaTeX}-Paket
-		  \texttt{pst-plot} zum Zeichnen von Funktionen beschrieben
-		  und durch Beispiele erl{\"a}utert. In diesem Teil werden
-		  die bislang nur erw{\"a}hnten Plot-Funktionen f{\"u}r
-		  externe Daten behandelt. }
-}
-
- at Article{	  dtk02.1:voss:mathematischen,
-  author	= {Herbert Vo{\ss}},
-  title		= {Die mathematischen {F}unktionen von {P}ost{S}cript},
-  journal	= dtk,
-  year		= 2002,
-  volume	= {1/02},
-  altvolume	= 1,
-  altnumber	= 14,
-  month		= mar,
-  pages		= {},
-  annote	= bretter,
-  keywords	= {},
-  abstract	= { \PS, faktisch genauso alt wie {\TeX}, ist im
-		  Verh{\"a}ltnis dazu allgemein noch weniger bekannt, wenn es
-		  darum geht zu beurteilen, was es denn nun im eigentlichen
-		  Sinne ist. Au{\ss}erdem wird h{\"a}ufig vergessen, dass
-		  sich mit den \PS-Funktionen viele Dinge erledigen lassen,
-		  bei denen sonst auf externe Programme zur{\"u}ckgegriffen
-		  wird. Dies wird im Folgenden f{\"u}r die mathematischen
-		  Funktionen im Zusammenhang mit dem Paket \texttt{pst-plot}
-		  gezeigt. }
-}
-
 @Book{tlgc2,
   author	= {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}},
   title		= {The {\LaTeX} {G}raphics {C}ompanion},
@@ -66,15 +23,6 @@
 }
 
 
- at Book{voss:chaos,
-  author	= {Herbert Vo{\ss}},
-  title		= {Chaos und {F}raktale selbst programmieren: von {M}andelbrotmengen 
-    {\"u}ber {F}arbmanipulationen zur perfekten Darstellung},
-  publisher	= {{Franzis Verlag}},
-  year		= {1994},
-  address	= {Poing}
-}
-
 @Article{girou:01:,
   author	= {Denis Girou},
   title		= {Pr\'esentation de {PST}ricks},
@@ -95,59 +43,22 @@
   pages		= {239-246}
 }
 
- at Book{PostScript,
-  Author         = {Kollock, Nikolai G.},
-  Title          = {Post{S}cript richtig eingesetzt: vom {K}onzept zum
-                   praktischen {E}insatz},
-  Publisher      = {IWT},
-  Address        = {Vaterstetten},
-  year           = 1989,
-}
-
 @Manual{pstricks,
   Title          = {PSTricks - {\PS} macros for generic {\TeX}},
   Author         = {{Timothy van} Zandt},
-  Organization   = {},
   Address        = {\url{http://www.tug.org/application/PSTricks}},
-  Note           = {},
   year           = 1993
 }
 
- at Manual{pst-plot,
-  Title          = {\texttt{pst-plot}: Plotting two dimensional functions and data},
-  Author         = {{Timothy van} Zandt},
-  Organization   = {},
-  Address        = {\url{CTAN:graphics/pstricks/generic/pst-plot.tex}},
-  Note           = {},
-  year           = 1999
-}
-
- at Manual{multido,
-  Title          = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition},
-  Author         = {{Timothy van} Zandt},
-  Organization   = {},
-  Address        = {\url{CTAN:/graphics/pstricks/generic/multido.tex}},
-  Note           = {},
-  year           = 1997
-}
-
 @Book{PSTricks2,
   author	= {Herbert Vo\ss},
   title		= {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
-  edition	= {6.},
+  edition	= {7},
   publisher	= {DANTE -- Lehmanns},
   year		= {2010},
   address	= {Heidelberg/Berlin}
 }
 
- at Book{voss:math,
-  author	= {Herbert Vo\ss},
-  title		= {Typesetting mathematics with \LaTeX},
-  publisher	= {UIT},
-  year		= {2010},
-  address	= {Cambridge}
-}
-
 @Book{PSTricks2-UIT,
   author	= {Herbert Vo\ss},
   title		= {PSTricks -- Graphics for \TeX\ and \LaTeX},
@@ -164,14 +75,6 @@
   address	= {Cambridge}
 }
 
- at Manual{wolfram,
-  author	= {Eric Weisstein},
-  title		= {Wolfram MathWorld},
-  publisher	= {{Wolfram}},
-  year		= {2007},
-  address	= {\url{http://mathworld.wolfram.com}}
-}
-
 @Manual{pst-tools,
   author	= {Herbert Voß},
   title		= {\texttt{pst-tools} -- Helper functions},

Added: trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.inc
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.inc	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.inc	2017-09-13 22:05:42 UTC (rev 45289)
@@ -0,0 +1,165 @@
+\DeclareRobustCommand\PST{\texttt{PSTricks\xspace}}
+\DeclareRobustCommand\PS{\texttt{PostScript\xspace}}
+\def\dt{\ensuremath{\,\mathrm{d}t}}
+\def\Index#1{\index{#1}#1}
+%
+\def\LPack#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Package!#1@\texttt{#1}}}
+\def\nxLPack#1{\texttt{#1}}
+\def\Lprog#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Program!#1@\texttt{#1}}}
+\let\nxLprog\nxLPack
+\def\LFile#1{\texttt{#1}\index{#1@\texttt{#1}}\index{File!#1@\texttt{#1}}}
+\def\nxLFile#1{\texttt{#1}}
+\def\Lext#1{\texttt{.#1}\index{#1@\texttt{.#1}}\index{Extension!#1@\texttt{.#1}}}
+\def\nxLext#1{\texttt{.#1}}
+\def\xLcs#1{\index{#1@\nxLcs{#1}}\index{Macro!#1@\nxLcs{#1}}}
+\def\Lcs#1{\nxLcs{#1}\xLcs{#1}}
+\def\LcsStar#1{\index{#1*@\nxLcs{#1*}}\index{Macro!#1@\nxLcs{#1*}}\nxLcs{#1}\OptArg*{*}}
+\def\nxLcs#1{\texttt{\textbackslash#1}}
+\def\xLenv#1{\index{#1@\texttt{#1}}\index{Environment!#1@\texttt{#1}}}
+\def\Lenv#1{\texttt{#1}\xLenv{#1}}
+\def\Ldim#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}\index{Dimension!#1@\texttt{\textbackslash#1}}}
+\def\Lskip#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}\index{Skip!#1@\texttt{\textbackslash#1}}}
+\def\Lkeyword#1{\texttt{#1}\xLkeyword{#1}}
+\def\xLkeyword#1{\index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}}
+\def\nxLkeyword#1{\texttt{#1}}
+
+\def\LKeyword#1{\LKeyword at i#1!!}
+\def\LKeyword at i#1=#2!!{\Lkeyword{#1}\nxLkeyword{=#2}}
+\let\nxLKeyword\nxLenv % same formatting
+
+\let\nxLkeyval\nxLkeyword
+\let\nxLenv\nxLkeyword
+\let\nxLps\nxLkeyword
+\def\LColor#1{\texttt{#1}\xLColor{#1}}
+\def\xLColor#1{\index{#1@\texttt{#1}}\index{Color!#1@\texttt{#1}}}
+\def\Lkeyval#1{\texttt{#1}\xLkeyval{#1}}
+\def\xLkeyval#1{\index{#1@\texttt{#1}}\index{Keyvalue!#1@\texttt{#1}}}
+\def\xLoption#1{\index{#1@\texttt{#1}}\index{Package option!#1@\texttt{#1}}}
+\def\Loption#1{\texttt{#1}\xLoption{#1}}
+\def\LPS#1{\texttt{#1}\index{#1@\texttt{#1}}\index{PostScript!#1@\texttt{#1}}}
+\def\xLps#1{\index{#1@\texttt{#1}}\index{PostScript!#1@\texttt{#1}}}
+\def\nxLps#1{\texttt{#1}}
+\def\Lps#1{\nxLps{#1}\xLps{#1}}
+\def\LClass#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Class!#1@\texttt{#1}}}
+\let\nxLClass\nxLPack
+\let\nxLdim\nxLcs
+\let\nxLskip\nxLcs
+\def\Lctr#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Counter!#1@\texttt{#1}}}
+\def\LCtr#1{\texttt{#1}\index{#1@\texttt{#1}}\index{TeX Counter@\TeX\ Counter!#1@\texttt{#1}}}
+\def\nxLctr#1{\texttt{#1}}
+%
+\newcommand\Lnotation [1]{\nxLnotation{#1}\xLnotation{#1}}
+\newcommand\Lmnotation[1]{\nxLnotation{#1}\xLmnotation{#1}}
+\newcommand\xLnotation[1]{\index{Syntax!#1@\nxLnotation{#1}}\index{#1@\nxLnotation{#1}}}
+\def\nxLnotation#1{\texttt{#1}}
+\def\xLkeyset#1{\expandafter\xLkeyset at i#1\@nil}
+\def\xLkeyset at i#1=#2\@nil{\index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}
+  \index{#2@\texttt{#2}}\index{Value!#2@\texttt{#2}}}
+\def\Lkeyset#1{\expandafter\Lkeyset at i#1\@nil}
+\def\Lkeyset at i#1=#2\@nil{\texttt{#1=#2}%
+  \index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}
+  \index{#2@\texttt{#2}}\index{Value!#2@\texttt{#2}}}
+%
+\def\xLKeyset#1{\expandafter\xLKeyset at i#1\@nil}% without using the right value of =
+\def\xLKeyset at i#1=#2\@nil{\index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}}
+\def\LKeyset#1{\expandafter\LKeyset at i#1\@nil}
+\def\LKeyset at i#1=#2\@nil{\texttt{#1=#2}%
+  \index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}}
+\let\LKeyword\LKeyset
+%
+\newcommand\Larg [1]{{\normalfont\itshape#1\/}}
+\newcommand\Larga[1]{$\langle$\Larg{#1}$\rangle$}% angles
+\newcommand\Largb[1]{\lcb\Larg{#1}\rcb}          % curly brace
+\newcommand\Largs[1]{\lsb\Larg{#1}\rsb}          % square brackets
+\newcommand\Largr[1]{\lrb\Larg{#1}\rrb}          % round brackets
+\newcommand\LBEG[1]{{\normalfont\ttfamily\bs{}begin\lcb#1\rcb}\xLenv{#1}}
+\newcommand\LmBEG[1]{{\normalfont\ttfamily\bs{}begin\lcb#1\rcb}\xLmenv{#1}}
+\newcommand\LEND[1]{{\normalfont\ttfamily\bs{}end\lcb#1\rcb}\xLenv{#1}}
+\newcommand\LmEND[1]{{\normalfont\ttfamily\bs{}end\lcb#1\rcb}\xLmenv{#1}}
+%
+\DeclareRobustCommand\bs{{\normalfont\ttfamily\textbackslash}}  % \let\bslash=\bs
+\DeclareRobustCommand\lcb{{\normalfont\ttfamily\textbraceleft}}
+\DeclareRobustCommand\rcb{{\normalfont\ttfamily\textbraceright}}
+\DeclareRobustCommand\lsb{{\normalfont\ttfamily[}}
+\DeclareRobustCommand\rsb{{\normalfont\ttfamily]}}
+\DeclareRobustCommand\lrb{{\normalfont\ttfamily(}}
+\DeclareRobustCommand\rrb{{\normalfont\ttfamily)}}
+\DeclareRobustCommand\false{{\ttfamily false}}
+\DeclareRobustCommand\true{{\ttfamily true}}
+
+%
+% without brackets
+\def\Coordx#1{$x_{#1}$}
+\def\Coordy#1{$y_{#1}$}
+\def\Coordz#1{$z_{#1}$}
+\def\Coord#1{\Coordx{#1},\kern 1pt\Coordy{#1}}
+\def\Coordn{\Coordx{n},\kern 1pt\Coordy{n}}
+\def\CoordIII#1{\Coordx{#1},\kern 1pt\Coordy{#1},\kern 1pt\Coordz{#1}}% HjG
+\def\CAny{\Coordx{},\kern 1pt\Coordy{}}
+\def\CIIIAny{\Coordx{},\kern 1pt\Coordy{},\kern 1pt\Coordz{}}%  hv
+% with brackets
+\def\coord#1{(\Coordx{#1},\kern 1pt\Coordy{#1})}
+\def\coordn{(\Coordx{n},\kern 1pt\Coordy{n})}
+\def\coordiii#1{(\Coordx{#1},\kern 1pt\Coordy{#1},\kern 1pt\Coordz{#1})}% hv
+\def\coordx#1{($x_{#1}$)}
+\def\coordy#1{($y_{#1}$)}
+\def\coordz#1{($z_{#1}$)}
+\def\cAny{(\Coordx{},\kern 1pt\Coordy{})}
+\def\ciiiAny{(\Coordx{},\kern 1pt\Coordy{},\kern 1pt\Coordz{})}% hv
+%
+\newskip\BDefaboveskip
+\newskip\BDefbelowskip
+\newskip\BDefinlineskip
+\setlength\BDefaboveskip{0pt plus 2pt}% first-level list topsep
+\setlength\BDefbelowskip{10pt}
+\setlength\BDefinlineskip{6pt}
+%
+\makeatletter
+\newsavebox{\boxdef}
+\newenvironment{BDef}
+  {\begin{lrbox}\boxdef
+      \def\arraystretch{1.0}
+      \begin{tabular}{@{}l@{}l@{}l@{}}}
+  {\end{tabular}\end{lrbox}
+%
+% braces around next block are needed to stop the list env checking for blank lines
+% and the \aftergroups then for making sure no indentation happens ... as i said
+% urg
+%
+   {\BCmd\fbox{\usebox\boxdef}\endBCmd}
+   \aftergroup\@afterindentfalse\aftergroup\@afterheading
+  }
+\newenvironment{BDef*}
+  {\begin{lrbox}\boxdef
+      \def\arraystretch{1.0}
+      \begin{tabular}{@{}l@{}l@{}l@{}}
+  }
+  {\end{tabular}\end{lrbox}
+   {\begin{BCmd*}\fbox{\usebox\boxdef}\end{BCmd*}}
+   \aftergroup\@afterindentfalse\aftergroup\@afterheading
+  }
+\newenvironment{BCmd}{
+  \@beginparpenalty-\@lowpenalty
+  \topsep\BDefaboveskip
+  \fboxsep3pt
+  \flushleft}
+ {\@endparpenalty\@M
+  \@topsepadd\BDefbelowskip
+  \endflushleft}
+
+\newenvironment{BCmd*}{
+  \@beginparpenalty\@M
+  \topsep\BDefinlineskip
+  \fboxsep3pt
+  \flushleft}
+ {\@endparpenalty5000
+  \endflushleft}
+
+
+\def\OptArgs{\colorbox{black!20}{\texttt{[Options]}}\kern1pt}
+\def\OptArg{\@ifnextchar*\OptArg at i{\OptArg at ii*}}% star version without braces
+\def\OptArg at i*#1{\colorbox{black!20}{\texttt{#1}}\kern1pt}
+\def\OptArg at ii*#1{\colorbox{black!20}{\texttt{[#1]}}\kern1pt}
+\def\DBS{{\ttfamily\textbackslash\textbackslash}}
+
+\makeatother
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.inc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.tex	2017-09-13 22:05:24 UTC (rev 45288)
+++ trunk/Master/texmf-dist/doc/latex/pst-exa/pst-exa-doc.tex	2017-09-13 22:05:42 UTC (rev 45289)
@@ -1,42 +1,343 @@
-\documentclass[pagesize=auto, fontsize=14pt, DIV=9, parskip=half]{scrartcl}
-\usepackage{fixltx2e}
-\usepackage{etex}
-\usepackage{lmodern}
+% arara: latex: {draft: yes}
+% arara: latex
+% arara: biber
+% arara: makeindex
+% arara: latex: {draft: yes}
+% arara: latex
+% arara: dvips
+% arara: ps2pdf
+% arara: clean: { files:[pst-exa-doc.out, pst-exa-doc.ps, pst-exa-doc.toc,pst-exa-doc.log,pst-exa-doc.ind,pst-exa-doc.aux, pst-exa-doc.bbl, pst-exa-doc.bcf, pst-exa-doc.blg,pst-exa-doc.dvi,pst-exa-doc.idx,pst-exa-doc.ilg,pst-exa-doc.run.xml] }
+\documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
+    headinclude=false,footinclude=false,twoside]{scrartcl}
+\usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\usepackage[utf8]{inputenc}
-\usepackage{microtype}
-\usepackage{hyperref}
+\usepackage{libertine}
+\usepackage[scaled=0.88]{beramono}
+\usepackage{babel}
+\usepackage{makeidx}\makeindex
+\input{\jobname.inc}
+\listfiles
+\let\Lfile\LFile
+\usepackage{pst-node}
+\usepackage{biblatex}
 
-\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
-\newcommand*{\pkg}[1]{\textsf{#1}}
-\newcommand*{\env}[1]{\texttt{#1}}
-\def\PS{PostScript}
-\addtokomafont{title}{\rmfamily}
+\addbibresource{\jobname.bib}
 
-\title{The \pkg{pst-exa} package\thanks{This manual corresponds to \pkg{pst-exa.sty}~v0.05, dated~2014/09/24.}}
-\author{Herbert Voß\thanks{\mail{hvoss at tug.org}}}
-\date{\today}
+\usepackage{xspace,showexpl}
+\usepackage{pst-text,pst-grad}
+\usepackage[tcb]{pst-exa}
+\let\pstFV\fileversion
 
+%\DeclareFixedFont{\RM}{T1}{ptm}{b}{n}{4cm}
+%\renewcommand\bgImage{\pscharpath[fillstyle=gradient,
+%  gradbegin=red,gradend=blue,gradangle=-90]{\RM pst-exa}}
 
+\lstset{language=PSTricks,basicstyle=\footnotesize\ttfamily}
+\def\DVI{\textsc{DVI}}
+\def\PDF{\textsc{PDF}}
+\def\gs{\textsc{Ghostscript}}
+%
 \begin{document}
-
+\title{\texttt{pst-exa}\\
+Generate examples for PSTricks environments (with pdflatex);\\  \small v. 0.06}
+\author{Herbert Vo\ss  \\ Pablo Gonz\'{a}lez Luengo}
+%\docauthor{}
+\date{\today}
 \maketitle
 
-The package \pkg{pst-exa} was created to realize examples with printed code and output
-side by side or on top of each other. The package looks in the image directory for the source
-code of the examples and inserts only the code between the environment \env{document},
-which is the sequence \verb+\begin{document} ... \end{document}+.
+\tableofcontents
 
-The package provides the environment \env{PSTexample} with the optional
-arguments. For more information read the documentation of \texttt{pst2pdf}.
+\clearpage
 
-Using \pkg{pst-exa} makes only sense together with the Perl script \texttt{pst2pdf}, which
-allows the use of Postscript code and running the document in \textsc{pdf} mode.
+\section{Introduction}
 
+The package \LPack{pst-exa} was created to realize examples with printed
+code and output side by side or on top of each other. The package
+looks in the image directory for the source code of the examples
+and inserts only the image for code environment
+
+However, creating a \PDF\ file in a direct way with \Lprog{pst2pdf} or \Lprog{ltximg} is
+possible and the compiles whits \Lprog{pdflatex}. 
+
+\PST\ as \PS\ related package uses the programming language \PS\ for internal
+calculations. This is an important advantage, because floating point arithmetic is no
+problem. Nearly all mathematical calculation can be done when running the \DVI-file
+with \gs. 
+
+\section{Loading the package}
+
+The package \LPack{pst-exa} must be loaded with one of the following options in the preamble of the document:
+
+\begin{verbatim}
+\usepackage[swpl]{pst-exa}
+\end{verbatim}
+
+automatically load \LPack{showexpl} package. 
+
+\begin{verbatim}
+\usepackage[tcb]{pst-exa}
+\end{verbatim}
+
+automatically load \LPack{tcolorbox} package.
+
+\section{Environments}
+The package \LPack{pst-exa} provides two environments:
+
+\Lenv{PSTcode} to write only code that does not generate 
+an image, this is necessary to not interrupt the order in which the images are copied by the script in the process 
+of conversion to pdf. 
+
+\Lenv{PSTexample} environment,
+to write only code that generates an image, keep in mind that the script that performs the extraction process 
+does not distinguish the format given to the lines in this environment (only reads plain text) the idea is to 
+concentrate on the image you want to extrare and then in the format of the text.
+
+\section{Programs needed}
+You need \nxLprog{pst2pdf} (or \Lprog{ltximg}) whit a latest version of \Lprog{Ghostscript} (9.14), 
+\Lprog{perl} (>=5.18), \Lprog{pdf2svg}, \Lprog{pdftoppm} and \Lprog{pdftops}
+(from \Lprog{poppler-utils} or \Lprog{xpdf-utils}) for the process file. 
+
+The general syntax for the \emph{script} is simple:
+
+\begin{BDef}
+\nxLprog{perl} \nxLprog{pst2pdf} \Larg{file.tex} \Largs{--options}
+\end{BDef}
+
+For \TeX Live users:
+
+\begin{BDef}
+\nxLprog{pst2pdf} \Larg{file.tex} \Largs{--options}
+\end{BDef}
+
+this create file-pdf-exa.pdf and file-fig-exa-1.pdf, file-fig-exa-2.pdf, file-fig-exa-\dots.pdf
+
+\section{Examples with option \texttt{tcb}}
+
+\verb|\begin{pspicture}| o \tcboxverb{\begin{pspicture}[showgrid](4,4)}
+
+\begin{pspicture}[showgrid](4,4)
+  \psRing(2,2){0.3}{0.8}
+  \psRing*[opacity=0.5](2,2){1}{2}
+\psdot(2,2)
+\end{pspicture}
+
+%\mint[hola]{algo}$\begin{pspicture} o \begin{pspicture*}$ no problem whit inline verb :)
+\section{Test PSTexample}
+% numbers=none
+\begin{PSTexample}[pos=t,numbers=fancy,title=First example]
+\pstVerb{ 1234321 srand }
+\begin{pspicture}[showgrid](-2,-2)(2,2)
+\psframe*[linecolor=blue,opacity=!Rand](2,2)
+\psframe*[linecolor=red,opacity=!Rand](-1,-1)(1,1)
+\psframe*[linecolor=green,opacity=!Rand](-2,-2)(0,0)
+\end{pspicture}
+\end{PSTexample}
+\vspace{20pt}
+\begin{PSTexample}[hwidth=5cm]
+\begin{pspicture}[showgrid](4,4)
+  \psRing(2,2){0.3}{0.8}
+  \psRing*[opacity=0.5](2,2){1}{2}
+\psdot(2,2)
+\end{pspicture}
+\end{PSTexample}
+% ned
+\section{Test PSTcode}
+\begin{PSTcode}
+\pstVerb{ 1234321 srand }
+\begin{pspicture}[showgrid](-2,-2)(2,2)
+\psframe*[linecolor=blue,opacity=!Rand](2,2)
+\psframe*[linecolor=red,opacity=!Rand](-1,-1)(1,1)
+\psframe*[linecolor=green,opacity=!Rand](-2,-2)(0,0)
+\end{pspicture}
+\end{PSTcode}
+
+\begin{PSTcode}
+\begin{pspicture}[showgrid](4,4)
+  \psRing(2,2){0.3}{0.8}
+  \psRing*[opacity=0.5](2,2){1}{2}
+\psdot(2,2)
+\end{pspicture}
+\end{PSTcode}
+
+
+\section{Examples with option \texttt{swpl}}
+
+\makeatletter
+\pstexa at swpltrue
+% Star code for swpl option
+% Environment for code
+\let\PSTcode\relax
+\let\endPSTcode\relax
+\lstnewenvironment{PSTcode}
+  {%
+\lstset{
+    language=PSTexa,%
+    frame=single,%
+    numbers=left,%
+    numbersep=1em,%
+    numberstyle=\tiny\color{black!75}\noaccsupp,%
+    rulecolor=\color{black!67},%
+    framesep=\fboxsep,%
+    framerule=\fboxrule,%
+    xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+    xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+    backgroundcolor=\color[rgb]{1,1,0.8},%
+% literateee
+literate=*{\{}{{\textcolor{blue}{\{}}}{1}
+    {\}}{{\textcolor{blue}{\}}}}{1}
+    {[}{{\textcolor{blue}{[}}}{1}
+    {]}{{\textcolor{blue}{]}}}{1}
+    {(}{{\textcolor{blue}{(}}}{1}
+    {)}{{\textcolor{blue}{)}}}{1}
+    {\$}{{\textcolor{red}{\$}}}{1}
+    {\#}{{\textcolor{red}{\#}}}{1}%,
+ }% close lstset
+ }%
+{}% close PSTcode
+
+% Change position for images
+\renewcommand*\SX at resultInput{%
+  \ifx\SX at graphicname\@empty
+    \begingroup
+      \MakePercentComment\makeatother\catcode`\^^M=5\relax
+      \SX@@preset\SX at preset
+      \if at SX@rangeaccept
+       \let\SX at tempa=\SX at input
+      \else
+       \let\SX at tempa=\input
+      \fi
+      \SX at tempa{\SX at codefile}\par%
+    \endgroup
+  \else
+    \begin{center}
+      \expandafter\includegraphics\expandafter[\SX at graphicparam]{\SX at graphicname}
+    \end{center}
+  \fi
+}% end change postition
+% PSTexample definition in swpl
+\let\PSTexample\relax
+\let\endPSTexample\relax
+ \lstnewenvironment{PSTexample}[1][]
+ {%
+ \lstset{%
+    language=PSTexa,%
+    frame=single,%
+    numbers=left,%
+    numbersep=1em,%
+    numberstyle=\tiny\color{black!75}\noaccsupp,%
+    rulecolor=\color{black!67},%
+    framesep=\fboxsep,%
+    framerule=\fboxrule,%
+    xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+    xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+    backgroundcolor=\color[rgb]{1,1,0.8},%
+% literate for swpl, need inside the explpreset
+    explpreset={
+% literate
+literate=*{\{}{{\textcolor{blue}{\{}}}{1}
+    {\}}{{\textcolor{blue}{\}}}}{1}
+    {[}{{\textcolor{blue}{[}}}{1}
+    {]}{{\textcolor{blue}{]}}}{1}
+    {(}{{\textcolor{blue}{(}}}{1}
+    {)}{{\textcolor{blue}{)}}}{1}
+    {\$}{{\textcolor{red}{\$}}}{1}
+    {\#}{{\textcolor{red}{\#}}}{1},%
+    codefile=\jobname.swpl,%
+    hsep=\columnsep,%
+    vsep=15pt,%
+    pos=l,%
+    wide=false,%
+    rframe={},%
+    preset=\centering,%
+    } % close explpreset
+ } % close lstset
+  \@temptokena{#1}%
+   \begingroup
+     \advance\c at ltxexample\@ne \advance\c at lstlisting\@ne
+     \expandafter\lstset\expandafter{\SX at explpreset,#1}%
+     \edef\x{\endgroup
+       \def\noexpand\SX at codefile{\SX at codefile}%
+       \def\noexpand\SX at graphicname{\SX at graphicname}%
+       \def\noexpand\SX at graphicparam{\SX at graphicparam}}%
+   \x
+   \xdef\SX@@explpreset{\the\@temptokena,codefile=\SX at codefile,
+     graphic={[\SX at graphicparam]{\SX at graphicname}}}%
+   \setbox\@tempboxa=\hbox\bgroup% Warum noetig?
+   \lst at BeginWriteFile{\SX at codefile}%
+% Change position for images
+ }
+ {%
+   \lst at EndWriteFile\egroup
+   \SX at put@code at result
+  }% close environment
+% end swpl code
+\makeatother
+
+% numbers=none
+\begin{PSTexample}[pos=t,numbers=none]
+\pstVerb{ 1234321 srand }
+\begin{pspicture}[showgrid](-2,-2)(2,2)
+\psframe*[linecolor=blue,opacity=!Rand](2,2)
+\psframe*[linecolor=red,opacity=!Rand](-1,-1)(1,1)
+\psframe*[linecolor=green,opacity=!Rand](-2,-2)(0,0)
+\end{pspicture}
+\end{PSTexample}
+% numbers true default
+\begin{PSTexample}[width=5cm]
+\begin{pspicture}[showgrid](4,4)
+  \psRing(2,2){0.3}{0.8}
+  \psRing*[opacity=0.5](2,2){1}{2}
+\psdot(2,2)
+\end{pspicture}
+\end{PSTexample}
+% ned
+
+\begin{PSTcode}
+\pstVerb{ 1234321 srand }
+\begin{pspicture}[showgrid](-2,-2)(2,2)
+\psframe*[linecolor=blue,opacity=!Rand](2,2)
+\psframe*[linecolor=red,opacity=!Rand](-1,-1)(1,1)
+\psframe*[linecolor=green,opacity=!Rand](-2,-2)(0,0)
+\end{pspicture}
+\end{PSTcode}
+
+\begin{PSTcode}
+\begin{pspicture}[showgrid](4,4)
+  \psRing(2,2){0.3}{0.8}
+  \psRing*[opacity=0.5](2,2){1}{2}
+\psdot(2,2)
+\end{pspicture}
+\end{PSTcode}
+
+\begin{pspicture}[showgrid](4,4)
+  \psRing(2,2){0.3}{0.8}
+  \psRing*[opacity=0.5](2,2){1}{2}
+\psdot(2,2)
+\end{pspicture}
+
+
+
+
+\definecolor{mygreen}{rgb}{0,0.6,0}
+\definecolor{mygray}{rgb}{0.5,0.5,0.5}
+
+\lstset{ %
+  basicstyle=\ttfamily\small,
+  commentstyle=\color{mygreen},
+  extendedchars=true,
+  frame={},
+  keepspaces=true,
+  keywordstyle=\color{blue},
+  numbers=left,
+  numbersep=5pt,
+  numberstyle=\tiny\color{mygray}
+}
+%\lstinputlisting[language=TeX]{pst-exa.sty}
+%\newpage
+%
+\clearpage
 \nocite{*}
-\bibliographystyle{plain}
-\bibliography{\jobname}
+\printbibliography
 
-
+\printindex
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/pst-exa/pst-exa.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-exa/pst-exa.sty	2017-09-13 22:05:24 UTC (rev 45288)
+++ trunk/Master/texmf-dist/tex/latex/pst-exa/pst-exa.sty	2017-09-13 22:05:42 UTC (rev 45289)
@@ -5,7 +5,7 @@
 %% each other with PSTricks.
 %%
 %% COPYRIGHT 2015- by Herbert Voss, <hvoss at tug.org>
-%%                    Pablo Gozález Luengo <pablogonz at yahoo.com>
+%%                    Pablo Gonz\'{a}lez Luengo <pablogonz at yahoo.com>
 %%
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN
@@ -13,8 +13,8 @@
 %%
 %
 \NeedsTeXFormat{LaTeX2e}
-\def\filedate{2014/09/24}
-\def\fileversion{v0.5}
+\def\filedate{2017/09/11}
+\def\fileversion{v0.06}
 \ProvidesPackage{pst-exa}[\filedate\space\fileversion\space]
 \RequirePackage{etoolbox}
 \RequirePackage{xcolor}
@@ -25,7 +25,7 @@
 \tcbuselibrary{listings,breakable,skins,xparse}%
 \newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}
 \renewcommand*\SX at Info{}%
-% Colors 
+% Colors
 \definecolor{hellgelb}{rgb}{1,1,0.8}
 \definecolor{colKeys}{rgb}{0,0,1}
 \definecolor{colIdentifier}{rgb}{0,0,0}
@@ -109,7 +109,6 @@
       \SX at tempa{\SX at codefile}\par%
     \endgroup
   \else
-  \sbox\SX at tempbox{\includegraphics{\SX at graphicname}}
     \begin{center}
       \expandafter\includegraphics\expandafter[\SX at graphicparam]{\SX at graphicname}
     \end{center}
@@ -230,43 +229,43 @@
 \tcbset{
 numbers/true/.style={%
     listing options={%
-	style=pstexample,%
-	numbers=left,%
-	numbersep=0.5em,%
-	framesep=\fboxsep,%
-	framerule=\fboxrule,%
-	xleftmargin=-\dimexpr\fboxsep-\fboxrule\relax,%
-	xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
-	numberstyle=\tiny\color{black!75}\noaccsupp,%
-	    }% close listings options
+ style=pstexample,%
+ numbers=left,%
+ numbersep=0.5em,%
+ framesep=\fboxsep,%
+ framerule=\fboxrule,%
+ xleftmargin=-\dimexpr\fboxsep-\fboxrule\relax,%
+ xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+ numberstyle=\tiny\color{black!75}\noaccsupp,%
+     }% close listings options
     },% close numbers true
 numbers/none/.style={%
     listing options={%
-	style=pstexample,%
-	xleftmargin=-1.5em,%
-	xrightmargin=-\dimexpr\fboxsep-\fboxrule\relax,%
-	numbers=none
-	}% close listings options
+ style=pstexample,%
+ xleftmargin=-1.5em,%
+ xrightmargin=-\dimexpr\fboxsep-\fboxrule\relax,%
+ numbers=none
+ }% close listings options
     },% close numbers none
 numbers/out/.style={%
     listing options={%
-	style=pstexample,%
-	xleftmargin=-1.5em,%
-	numbers=left,%
+ style=pstexample,%
+ xleftmargin=-1.5em,%
+ numbers=left,%
         numbersep=1em,%
-	numberstyle=\tiny\color{black!75}\noaccsupp,%
-	}% close listings options
+ numberstyle=\tiny\color{black!75}\noaccsupp,%
+ }% close listings options
     },% close numbers out
 numbers/fancy/.style={
     overlay={\begin{tcbclipinterior}\fill[red!20!blue!20!white] (frame.south west)%
-	rectangle ([xshift=12pt]frame.north west);\end{tcbclipinterior}},%
+ rectangle ([xshift=12pt]frame.north west);\end{tcbclipinterior}},%
     listing options={%
-	style=pstexample,%
-	numbers=left,%
-	numbersep=0.85em,%
+ style=pstexample,%
+ numbers=left,%
+ numbersep=0.85em,%
         xleftmargin=0em,%
-	numberstyle=\tiny\color{black!75}\noaccsupp,%
-	}% close listings options
+ numberstyle=\tiny\color{black!75}\noaccsupp,%
+ }% close listings options
     }%,%
 } % close tcb settings
 % Default PSTexample environment style
@@ -303,7 +302,7 @@
     top=-2.5mm,bottom=-2.5mm,boxsep=3pt,%
     fonttitle=\bfseries\small,boxrule=0.8pt
     }% close psexample settings
-}     
+}
 % Define PSTexample environment
 \NewTCBListing{PSTexample}{O{}}{psexample,#1}
 \NewTCBListing{PSTcode}{O{}}{pscode,#1}
@@ -310,3 +309,4 @@
 %% end PSTexample environment
 \fi
 \endinput
+



More information about the tex-live-commits mailing list