% $Id: pst-doc.cls 86 2009-01-29 10:34:00Z herbert $ % %% %% The PSTricks Project %% %% ``pst-doc'' class for use with the PSTricks documentation. %% %% Copyright (C) 2009 Herbert Voss %% %% It may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% %% See http://www.latex-project.org/lppl.txt for details. %% % \listfiles \ProvidesClass{pst-doc}[2009/01/20 v 0.05 PSTricks documentation class (hv)] \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} \ProcessOptions\relax % \LoadClass[titlepage]{scrartcl} % \PassOptionsToPackage{dvipsnames,x11names,svgnames,table}{xcolor} \RequirePackage[T1]{fontenc} %\RequirePackage{mathpazo} \RequirePackage{textcomp} %\RequirePackage[euler-digits]{eulervm} \RequirePackage{bera} %\RequirePackage[scaled=0.85]{luximono} % Define commands that don't eat spaces. \RequirePackage{xspace} \makeatletter \providecommand{\IfPackageLoaded}[2]{\@ifpackageloaded{#1}{#2}{}} \providecommand{\IfPackageNotLoaded}[2]{\@ifpackageloaded{#1}{}{#2}} \providecommand{\IfElsePackageLoaded}[3]{\@ifpackageloaded{#1}{#2}{#3}} \providecommand{\IfChapterDefined}[1]{\ifthenelse{\boolean{chapteravailable}}{#1}{}}% \providecommand{\IfElseChapterDefined}[2]{\ifthenelse{\boolean{chapteravailable}}{#1}{#2}}% \providecommand{\IfDefined}[2]{\ifcsname #1\endcsname #2 \fi} \providecommand{\IfElseDefined}[3]{\ifcsname #1\endcsname #2 \else #3 \fi} \providecommand{\IfElseUnDefined}[3]{\ifcsname #1\endcsname #3 \else #2\fi} \newcommand{\IfNotDraft}[1]{\ifx\@draft\@undefined #1 \fi} \newcommand{\IfNotDraftElse}[2]{\ifx\@draft\@undefined #1 \else #2 \fi} \newcommand{\IfDraft}[1]{\ifx\@draft\@undefined \else #1 \fi} % Definde frontmatter, mainmatter and backmatter if not defined \@ifundefined{frontmatter}{% \newcommand{\frontmatter}{% %In Roemischen Buchstaben nummerieren (i, ii, iii) \pagenumbering{roman}} }{} \@ifundefined{mainmatter}{% % scrpage2 benoetigt den folgenden switch % wenn \mainmatter definiert ist. \newif\if@mainmatter\@mainmattertrue \newcommand{\mainmatter}{% % -- Seitennummerierung auf Arabische Zahlen zuruecksetzen (1,2,3) \pagenumbering{arabic}% \setcounter{page}{1}} }{} \@ifundefined{backmatter}{% \newcommand{\backmatter}{ %In Roemischen Buchstaben nummerieren (i, ii, iii) \pagenumbering{roman}} }{} % Pakete speichern die spaeter geladen werden sollen \newcommand{\LoadPackagesNow}{} \newcommand{\LoadPackageLater}[1]{% \g@addto@macro{\LoadPackagesNow}{% \RequirePackage{#1}% }% } % \RequirePackage{makeidx} \makeindex \RequirePackage{calc} \RequirePackage{babel} \RequirePackage[table,svgnames,dvipsnames]{pstricks} \let\pstricksFV\fileversion \let\pstricksFD\filedate \RequirePackage{multido} \RequirePackage{lscape} \RequirePackage{graphicx} \definecolor{DOrange}{rgb}{1,.4,.2} \RequirePackage{amsmath, amssymb} \RequirePackage{tabularx,ragged2e} \RequirePackage{booktabs} \RequirePackage[bottom,stable,ragged]{footmisc} \RequirePackage{chngcntr} \RequirePackage{nameref} \RequirePackage{varioref} \RequirePackage{subfig} \RequirePackage{setspace} \RequirePackage{filecontents} \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} \lstdefinestyle{code}{backgroundcolor=\color{red!20},numbers=left,xleftmargin=0pt,xrightmargin=0pt, frame=single} \RequirePackage{xkvview} \raggedbottom \definecolor{sectioncolor}{RGB}{0, 0, 255} % Schwarz \definecolor{textcolor}{RGB}{0, 0, 0} % Schwarz \definecolor{shadecolor}{gray}{0.90} \colorlet{pdflinkcolor}{DOrange} \colorlet{pdfurlcolor}{DOrange} \colorlet{pdffilecolor}{DOrange} \colorlet{stringcolor}{green!40!black!100} \colorlet{commencolor}{blue!0!black!100} \RequirePackage[automark,nouppercase]{scrpage2} \pagestyle{scrheadings} \clearscrheadings \clearscrplain \ohead{\pagemark} \ihead{\headmark} \ofoot[\pagemark]{} \automark[subsection]{section} \setheadsepline{.4pt}[\color{DOrange}] \setheadwidth[0pt]{text} \setfootwidth[0pt]{text} %% Fussnoten ============================================================= % Keine hochgestellten Ziffern in der Fussnote (KOMA-Script-spezifisch): \deffootnote{1.5em}{1em}{\makebox[1.5em][l]{\thefootnotemark}} \addtolength{\skip\footins}{\baselineskip} % Abstand Text <-> Fussnote %% Schriften (Sections )================================================== \newcommand\SectionFontStyle{\sffamily} \setkomafont{sectioning}{\bfseries\SectionFontStyle} % % Titelzeilen % \bfseries \setkomafont{pagenumber}{\bfseries\SectionFontStyle} % Seitenzahl \setkomafont{pagehead}{\small\sffamily} % Kopfzeile %\setkomafont{pagefoot}{\small\sffamily} % Kopfzeile \setkomafont{descriptionlabel}{\itshape} % Kopfzeile \addtokomafont{sectioning}{\color{sectioncolor}} % Farbe der Ueberschriften \renewcommand*{\raggedsection}{\raggedright} % Titelzeile linksbuendig, haengend \RequirePackage{caption} \captionsetup{ margin = 10pt, font = {small,rm}, labelfont = {small,bf}, format = plain, % oder 'hang' indention = 0em, % Einruecken der Beschriftung labelsep = colon, %period, space, quad, newline justification = RaggedRight, % justified, centering singlelinecheck = true, % false (true=bei einer Zeile immer zentrieren) position = bottom %top } %%% Bugfix Workaround \DeclareCaptionOption{parskip}[]{} \DeclareCaptionOption{parindent}[]{} % Aussehen der Captions fuer subfigures (subfig-Paket) \IfPackageLoaded{subfig}{ \captionsetup[subfloat]{% margin = 10pt, font = {small,rm}, labelfont = {small,bf}, format = plain, % oder 'hang' indention = 0em, % Einruecken der Beschriftung labelsep = space, %period, space, quad, newline justification = RaggedRight, % justified, centering singlelinecheck = true, % false (true=bei einer Zeile immer zentrieren) position = bottom, %top labelformat = parens % simple, empty % Wie die Bezeichnung gesetzt wird } } \setcounter{secnumdepth}{2} % Abbildungsnummerierung mit groesserer Tiefe \setcounter{tocdepth}{2} % Inhaltsverzeichnis mit groesserer Tiefe % % Inhalte von List of Figures \IfPackageLoaded{subfig}{\setcounter{lofdepth}{1} %1 = nur figures, 2 = figures + subfigures } \RequirePackage[colorlinks=true, urlcolor=pdfurlcolor, filecolor=pdffilecolor, linkcolor=pdflinkcolor, breaklinks, linktocpage=true]{hyperref} \RequirePackage{breakurl} \newsavebox\TBox \newenvironment{Bsp}[1]{% \par\bigskip% \begin{lrbox}{\TBox} \begin{minipage}{\linewidth-2\fboxrule}% \setlength\fboxsep{1mm}% \colorbox{DOrange}{\parbox{\linewidth-2\fboxsep}{% \color{White}\sffamily#1}}\par \fontsize{10}{12pt}\fontshape{it}\selectfont% \begin{quote} }{% \par\bigskip\end{quote}\end{minipage}\end{lrbox}\fboxsep=0pt% \fcolorbox{DOrange}{White}{\usebox\TBox}\par\bigskip} \newenvironment{Glistout}{\begin{list}{\color{DOrange}\rule{2mm}{2mm}}{\setlength{\labelsep}{10pt}\setlength{\leftmargin}{2.5mm+\labelsep}}}{\end{list}} \newcounter{Numlist}\newenvironment{Numlist}{\begin{list}{\color{DOrange}\arabic{Numlist}.}{\usecounter{Numlist}\setlength{\labelsep}{2mm}\setlength{\leftmargin}{3.5mm+\labelsep}}}{\end{list}} \newenvironment{listin}{\begin{list}{\color{DOrange}\rule{2mm}{2mm}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}\setlength{\leftmargin}{4.5mm}}}{\end{list}} \newenvironment{Zlistin}{\begin{quote}\fontsize{10}{12pt}\fontshape{it}\selectfont\begin{list}{\color{DOrange}\rule{2mm}{2mm}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}\setlength{\leftmargin}{4.5mm}}}{\end{list}\end{quote}} \newcommand{\RDO}{\color{DOrange!25}\rule[-1mm]{10mm}{5mm}} \newcommand{\ph}[1]{\phantom{#1}} \newcommand{\MathWBox}[2]{\setlength\fboxsep{1mm}\colorbox{White}{\makebox[\widthof{$#1$}]{$#2$}}} \newcommand{\MathDOBox}[2]{\setlength\fboxsep{1mm}\colorbox{DOrange!25}{\makebox[\widthof{$#1$}]{$#2$}}} \newcommand{\MathDOUBox}[2]{\setlength\fboxsep{1mm}\underline{\rule[-2mm]{0mm}{2mm}\colorbox{DOrange!25}{\makebox[\widthof{$#1$}]{$#2$}}}} \newcommand{\rb}[2]{\raisebox{#1}{#2}} \makeatletter %%% ---------------------------------------------------------------- \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\Lkeyword#1{\texttt{#1}\xLkeyword{#1}} \def\xLkeyword#1{\index{#1@\texttt{#1}}\index{Keyword!#1@\texttt{#1}}} \def\nxLkeyword#1{\texttt{#1}} \def\Lkeyval#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Keyvalue!#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\LClass#1{\texttt{#1}\index{#1@\texttt{#1}}\index{Class!#1@\texttt{#1}}} \let\nxLClass\nxLPack \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\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\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 % \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[framesep=2pt,fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[Options]}}\kern1pt} \def\OptArg{\@ifnextchar*\OptArg@i{\OptArg@ii*}}% star version without braces \def\OptArg@i*#1{\psframebox[framesep=2pt,fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{#1}}\kern1pt} \def\OptArg@ii*#1{\psframebox[framesep=2pt,fillstyle=solid,fillcolor=black!20,linecolor=black!20]{\texttt{[#1]}}\kern1pt} \def\docauthor#1{\gdef\@docauthor{#1}} \docauthor{} %\def\author#1{\gdef\@author{#1}\gdef\@docauthor{#1}} \renewcommand\maketitle{% \thispagestyle{empty}% %\mktitledecor \begin{titlepage} \begin{pspicture}(1.6in,0)(21,21.7) % \rput(3,22.5){% % \begin{pspicture}(-2,-2)(2,2) % \psset{Decran=30,viewpoint=50 20 10 rtp2xyz} % \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.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}} \rput[lb](3,7.6){\parbox{15cm}{\sffamily\@date}} \rput[lb](3,-2.6){\parbox[b]{19cm}{\sffamily\RaggedRight \ifx\@docauthor\empty~\else Documentation by\fi\hfill\makebox[7cm][l]{Package author(s):}\\ \ifx\@docauthor\empty~\else{\bfseries\tabular[t]{@{}l@{}}\@docauthor\endtabular}\fi\hfill\makebox[7cm][l]{% \bfseries\tabular[t]{@{}l@{}}\@author\endtabular}}} \end{pspicture}% \end{titlepage} \setcounter{footnote}{0}% \global\let\thanks\relax% \global\let\maketitle\relax% \global\let\@thanks\@empty% \global\let\@author\@empty% \global\let\@docauthor\@empty% \global\let\@date\@empty% \global\let\@title\@empty% \global\let\@subtitle\@empty% \global\let\title\relax% \global\let\author\relax% \global\let\date\relax% \global\let\and\relax% } \makeatother %% %% End of file `pst-doc.cls'.