%% $Id: pst-dart-doc.tex 728 2018-02-09 19:29:41Z herbert $

\errorcontextlines=100
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
   headinclude=false,footinclude=false,twoside,english]{pst-doc}

\usepackage{hvlogos,iftex}
\usepackage{pst-dart}
\let\pstDartFV\fileversion
\renewcommand\bgImage{}%\psDartBoard[unit=2,fontsize=15pt]}

\addbibresource{\jobname.bib}


\lstset{language=PSTricks,
   morekeywords={psDart},basicstyle=\footnotesize\ttfamily,
 literate=%
   {Ö}{{\"O}}1
   {Ä}{{\"A}}1
   {Ü}{{\"U}}1
   {ß}{{\ss}}1
   {ü}{{\"u}}1
   {ä}{{\"a}}1
   {ö}{{\"o}}1
   {~}{{\textasciitilde}}1
}
%
\begin{document}



\title{\texttt{pst-dart}}
\subtitle{Plotting a Dart ; v.\pstDartFV}
\author{Thomas Söll\\Herbert Voß}
\docauthor{}
\date{\today}
\settitle

\tableofcontents


\clearpage

%\begin{abstract}
%\noindent
%\LPack{pst-func} loads by default the following packages: \LPack{pst-plot},
%\LPack{pstricks-add}, \LPack{pst-math}, \LPack{pst-xkey}, and, of course \LPack{pstricks}.
%All should be already part of your local \TeX\ installation. If not, or in case
%of having older versions, go to \url{http://www.CTAN.org/} and load the newest version.

%\vfill\noindent
%Thanks to \\
%    Michael Zedler,
%and last but not least
%    \url{http://mathworld.wolfram.com}.

%\end{abstract}

\section{Syntax of \Lcs{psDart}}


\begin{BDef}
\Lcs{psDartBoard}\OptArgs\OptArg*{$(x_0,y_0)$}
\end{BDef}

\section{Examples}
\subsection{The default size}


\begin{LTXexample}
\begin{pspicture}[showgrid](-3,-3)(9,3)
\psDartBoard % The default Dartboard (radius=2.1cm)
\psDartBoard[fontsize=7pt](6cm,0)
\end{pspicture}
\end{LTXexample}



\subsection{Scaling}

\begin{LTXexample}[pos=r,width=0.58\linewidth]
\begin{pspicture}[showgrid](-5,-5)(5,5)
\psDartBoard[unit=2]
\end{pspicture}
\end{LTXexample}

\begin{LTXexample}[pos=r,width=0.58\linewidth]
\begin{pspicture}[showgrid](-5,-5)(5,5)
\psDartBoard[fontsize=15pt,unit=2]
\end{pspicture}
\end{LTXexample}


\subsection{Space}

\Lcs{psDartBoard} itself uses internally already an environment \Lenv{pspicture} which
reserves the space. But an internal \Lcs{rput} command places the dartboard without specifying
coordinates at the origin which is the reason why one has to reserve space with an additional
environment \Lenv{pspicture} as can be seen in the above examples..

%\psset{unit=1cm}


\section{Darts}

\begin{pspicture}[showgrid](0,-1)(\linewidth,8)
\psDart(4,2)
\psDart[dartcolor=green,rot=22.50](4,2)
\psDart[dartcolor=blue,rot=45](4,2)
\psDart[rot=-90,unit=0.75](2,8)
\end{pspicture}

\begin{lstlisting}
\begin{pspicture}[showgrid](0,-1)(\linewidth,8)
\psDart(4,2)
\psDart[dartcolor=green,rot=22.50](4,2)
\psDart[dartcolor=blue,rot=45](4,2)
\psDart[rot=-90,unit=0.75](2,8)
\end{pspicture}
\end{lstlisting}


\section{Board and Darts}

\begin{LTXexample}[pos=t]
\begin{pspicture}(-5,-5)(5,5)
\psDartBoard[fontsize=15pt,unit=2]
\psDart[rot=45,unit=0.5](0,0)
\psDart[rot=30,unit=0.5,dartcolor=blue](0,0)
\psDart[rot=80,unit=0.5,dartcolor=green](-2,2)
\end{pspicture}
\end{LTXexample}


%\begin{LTXexample}[pos=r,width=0.6\linewidth]
%foo\psDart bar
%\end{LTXexample}

\section{Changing the viewpoint}

You can change the viewpoint with the optional argument
\Lkeyword{viewpoint}
%\footnote{There is also a \Lkeyword{postCode},
%which is not of real interest here.}
which expects three space separated values for $x$ $y$ $z$, where at least one value must be unless 0.
%allow to change the transformation matrix of PostScript. However, it does \emph{not} work
%with \XeLaTeX, you have to choose the Sequenz \texttt{latex}$\rightarrow$\texttt{dvips}$\rightarrow$\texttt{ps2pdf}.




\begin{LTXexample}[pos=t]
\begin{pspicture}(-2,-3)(12,4)
\psDartBoard[boardview=1 0 0,fontsize=18pt,unit=1.5]
\psDart[unit=0.5,rot=110](1,-1)
%%
\psDartBoard[boardview=1 0 1,fontsize=18pt,unit=1.5](10cm,0)
\psDart[unit=0.5,rot=50](9cm,-1cm)
\end{pspicture}
\end{LTXexample}


\clearpage
\section{List of all optional arguments for \texttt{pst-dart}}
\xkvview{family=pst-dart,columns={key,type,default}}

\nocite{*}
\bgroup
\RaggedRight
\printbibliography
\egroup

\printindex

\end{document}