diff options
author | Karl Berry <karl@freefriends.org> | 2008-11-14 19:42:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-11-14 19:42:14 +0000 |
commit | 4c8aed3fcee22e9b1bc5f71ac76a8e02c2133ab1 (patch) | |
tree | 14088ae73d186618f922b010be2e56f2b113acb9 /Master/texmf-dist/doc/generic/pstricks/pst-doc.cls | |
parent | 33d655a1e6d73f28a58b8ef484baa8607ed14530 (diff) |
pst-doc.cls (13nov08)
git-svn-id: svn://tug.org/texlive/trunk@11301 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pstricks/pst-doc.cls')
-rw-r--r-- | Master/texmf-dist/doc/generic/pstricks/pst-doc.cls | 335 |
1 files changed, 335 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls b/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls new file mode 100644 index 00000000000..aafdbdd4b43 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pstricks/pst-doc.cls @@ -0,0 +1,335 @@ +% $Id: pst-doc.cls 52 2008-11-13 14:53:31Z 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}[2008/11/13 v 0.01 PSTricks documentation class (hv)] +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} +\ProcessOptions\relax +% +\LoadClass[titlepage]{scrartcl} +% +\PassOptionsToPackage{dvipsnames,table,prologue}{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}% + }% +} +%%% ---------------------------------------------------------------- + +\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} +\RequirePackage{babel} +\RequirePackage[table,svgnames,dvipsnames]{pstricks} +\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} +\singlespace + +\raggedbottom +\definecolor{sectioncolor}{RGB}{0, 0, 0} % 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 + +\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,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) + \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\textbf{\@docauthor}\fi\hfill\makebox[7cm][l]{\textbf{\@author}}}} +\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'. |