diff options
author | Karl Berry <karl@freefriends.org> | 2008-11-20 17:02:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-11-20 17:02:40 +0000 |
commit | 8c86a1e7745880e73684de781f2bddf6a2b9b7af (patch) | |
tree | a6af2f1680bce28177f6256d5ec314b02ed6e5af | |
parent | b06d8ab558b84cff6d6cf06ed6eb914bcf6e7a9f (diff) |
pstricks update (19nov08)
git-svn-id: svn://tug.org/texlive/trunk@11379 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks/pst-doc.cls | 233 |
1 files changed, 139 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls b/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls index aafdbdd4b43..9345e8d3c50 100644 --- a/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls +++ b/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls @@ -1,4 +1,4 @@ -% $Id: pst-doc.cls 52 2008-11-13 14:53:31Z herbert $ +% $Id: pst-doc.cls 55 2008-11-14 12:01:12Z herbert $ % %% %% The PSTricks Project @@ -15,7 +15,7 @@ %% % \listfiles -\ProvidesClass{pst-doc}[2008/11/13 v 0.01 PSTricks documentation class (hv)] +\ProvidesClass{pst-doc}[2008/11/13 v 0.02 PSTricks documentation class (hv)] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} \ProcessOptions\relax % @@ -71,96 +71,7 @@ \RequirePackage{#1}% }% } -%%% ---------------------------------------------------------------- - -\def\PST{\texttt{PSTricks\xspace}} -\def\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\LFile#1{\texttt{#1}\index{#1@\texttt{#1}}\index{File!#1@\texttt{#1}}} -\def\nxLFile#1{\texttt{#1}} -\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}\index{Macro!#1@\texttt{\textbackslash#1}}} -\def\nxLcs#1{\texttt{\textbackslash#1}} -\def\Lenv#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Environment!#1@\texttt{#1}}} -\def\Ldim#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}\index{Dimension!#1@\texttt{\textbackslash#1}}} -\def\Lkeyword#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}} -\def\Lkeyval#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Value!#1@\texttt{#1}}} -\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Package option!#1@\texttt{#1}}} -\def\LPS#1{\texttt{#1}\index{#1@\texttt{#1}}\index{PostScript!#1@\texttt{#1}}} -\def\Lps#1{\texttt{#1}\index{#1@\texttt{#1}}\index{PostScript!#1@\texttt{#1}}} -\def\Lkeyset#1{\expandafter\Lkeyset@i#1\@nil} -\def\Lkeyset@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}}} -\newcommand\Larg [1]{{\normalfont\itshape#1\/}} -\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 - -\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)}} - -\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} - -\newskip\BDefaboveskip -\newskip\BDefbelowskip -\newskip\BDefinlineskip -\setlength\BDefaboveskip{10pt plus 4pt} % first-level list topsep -\setlength\BDefbelowskip{6pt} -\setlength\BDefinlineskip{6pt} - -\def\OptArgs{\psframebox[fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[Options]}}} -\def\OptArg#1{\psframebox[fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[#1]}}} -\makeatother - \RequirePackage{makeidx} \makeindex \RequirePackage{calc} @@ -180,7 +91,33 @@ \RequirePackage{subfig} \RequirePackage{setspace} \singlespace +\RequirePackage{showexpl} +\lstset{% + language=PSTricks,% + float=hbp,% + basicstyle=\ttfamily\small, % + identifierstyle=\color{colIdentifier}, % + keywordstyle=\color{colKeys}, % + stringstyle=\color{colString}, % + commentstyle=\color{colComments}, % + columns=flexible, % + tabsize=4, % + frame=single, % + extendedchars=true, % + showspaces=false, % + showstringspaces=false, % + numbers=left, + numbersep=0.5em, + numberstyle=\tiny, % + breaklines=true, % + breakautoindent=true, + captionpos=b, + xleftmargin=1em +} +\lstdefinestyle{syntax}{backgroundcolor=\color{blue!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt, + frame=single} +\RequirePackage{xkvview} \raggedbottom \definecolor{sectioncolor}{RGB}{0, 0, 0} % Schwarz \definecolor{textcolor}{RGB}{0, 0, 0} % Schwarz @@ -289,6 +226,114 @@ \newcommand{\rb}[2]{\raisebox{#1}{#2}} \makeatletter +%%% ---------------------------------------------------------------- + +\def\PST{\texttt{PSTricks\xspace}} +\def\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\LFile#1{\texttt{#1}\index{#1@\texttt{#1}}\index{File!#1@\texttt{#1}}} +\def\nxLFile#1{\texttt{#1}} +\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}\index{Macro!#1@\texttt{\textbackslash#1}}} +\def\nxLcs#1{\texttt{\textbackslash#1}} +\def\Lenv#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Environment!#1@\texttt{#1}}} +\def\Ldim#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}\index{Dimension!#1@\texttt{\textbackslash#1}}} +\def\Lkeyword#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}} +\def\Lkeyval#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Value!#1@\texttt{#1}}} +\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Package option!#1@\texttt{#1}}} +\def\LPS#1{\texttt{#1}\index{#1@\texttt{#1}}\index{PostScript!#1@\texttt{#1}}} +\def\Lps#1{\texttt{#1}\index{#1@\texttt{#1}}\index{PostScript!#1@\texttt{#1}}} +\def\Lkeyset#1{\expandafter\Lkeyset@i#1\@nil} +\def\Lkeyset@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}}} +\newcommand\Larg [1]{{\normalfont\itshape#1\/}} +\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 +% +\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)}} +% +% 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 +% +\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} + +\newskip\BDefaboveskip +\newskip\BDefbelowskip +\newskip\BDefinlineskip +\setlength\BDefaboveskip{10pt plus 4pt} % first-level list topsep +\setlength\BDefbelowskip{6pt} +\setlength\BDefinlineskip{6pt} + +\def\OptArgs{\psframebox[fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[Options]}}} +\def\OptArg#1{\psframebox[fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[#1]}}} + \def\docauthor#1{\gdef\@docauthor{#1}} \docauthor{} %\def\author#1{\gdef\@author{#1}\gdef\@docauthor{#1}} @@ -304,9 +349,9 @@ % \psSolid[object=cube,a=2,action=draw*,fillcolor=magenta!20]% % \axesIIID(1,1,1)(1.5,1.5,1.5) % \end{pspicture}} - \psframe[fillstyle=solid,linecolor=lightgray,fillcolor=lightgray,linestyle=solid](0,-5.75)(21,10) - \psframe[fillstyle=solid,linecolor=Orange!85!Red,fillcolor=Orange!85!Red,linestyle=solid](0,10)(21,10.5) - \psframe[fillstyle=solid,linecolor=Orange!85!Red,fillcolor=Orange!85!Red,linestyle=solid](0,21.1)(21,21.2) + \psframe[fillstyle=solid,linecolor=lightgray,fillcolor=lightgray,linestyle=solid](0,-5.75)(21.2,10) + \psframe[fillstyle=solid,linecolor=Orange!85!Red,fillcolor=Orange!85!Red,linestyle=solid](0,10)(21.2,10.5) + \psframe[fillstyle=solid,linecolor=Orange!85!Red,fillcolor=Orange!85!Red,linestyle=solid](0,21.1)(21.2,21.2) \rput[lb](3,22){\Huge\sffamily\color{Orange!65!Red}\psscalebox{2}{\textbf{PSTricks}}} \rput[lb](3,14.1){\parbox{17cm}{\sffamily\RaggedRight\bfseries\huge\@title}} \rput[lb](3,12.6){\parbox{15cm}{\sffamily\Large\@subtitle}} |