\documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} %\usepackage{geometry} \usepackage{url,calc} \usepackage{pstricks} \usepackage{pst-plot} \SpecialCoor %\usepackage[ps2pdf,colorlinks,linktocpage]{hyperref} \usepackage[vtex,colorlinks,linktocpage]{hyperref} \def\UrlFont{\small\ttfamily} \makeatletter \def\verbatim@font{\small\normalfont\ttfamily} \makeatother %\usepackage{color} \definecolor{hellgelb}{rgb}{1,1,0.8} \definecolor{colKeys}{rgb}{0,0,1} \definecolor{colIdentifier}{rgb}{0,0,0} \definecolor{colComments}{rgb}{1,0,0} \definecolor{colString}{rgb}{0,0.5,0} % \usepackage{listings} \lstset{% language=[LaTeX]TEX,% 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, % numberstyle=\tiny, % breaklines=true, % % backgroundcolor=\color{hellgelb}, % breakautoindent=true, % captionpos=b,% xleftmargin=0pt% } %\parindent=0pt \newcommand\verbI[1]{{\small\texttt{#1}}} \newcommand\CMD[1]{{\texttt{\textbackslash#1}}} % \psset{subgriddiv=0,griddots=5,gridlabels=7pt} % \DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} \def\PS{PostScript} % \begin{document} \title{\texttt{pstricks -- patch 15}\\new macros and bugfixes for \texttt{pstricks}} \author{Herbert Voß\thanks{% \url{Herbert.Voss@perce.de}} \and Rolf Niepraschk\thanks{\url{Rolf.Niepraschk@ptb.de}}} \date{2004/05/12} \maketitle \begin{abstract} It is long time ago since \verb+pstricks.tex patch 14+ came out. The new version \verb+patch 15+ fixes some bugs and provides three new elliptic macros, which were already present in the old beta version of \verb+PSTricks+. There is also a new \verb+pstricks.sty+, which makes the \verb+\pstcol+ package obsolete. It uses the new color package \verb+xcolor+, which provides a much more powerful color management than \verb+color.sty+ does. The \verb+pstricks.sty+ is a real \LaTeX{} package, it makes no sense for \TeX{} users. Nevertheless, using of \verb+pstcol+ or package \verb+color+ is still possible. Timothy Van Zandt was the one, who creates \verb+PSTricks+, but Denis Girou was the one who makes it run over many years. Needless to say, how important his work is for \verb+PSTricks+. Since more than nine month we are unable to get in touch with Denis, which is the reason why this update of \verb+PSTricks+ comes without any comments from Denis. \end{abstract} \clearpage \tableofcontents \clearpage \section{New fill style \texttt{eofill}} \PS\ has a special fillstyle, called \verb|eofill|, which is now available with the option \verb|fillstyle=eofill|. The following two images show the difference, the first one is filled with \verb|fillstyle=solid| and the second one with the new option \verb|fillstyle=eofill|. \begin{minipage}{5.5cm} \begin{pspicture}(5,2.5) \pspolygon[unit=0.5cm,% fillstyle=solid,% fillcolor=yellow](7,3)(0,0)(1,3) (5,5)(10,3)(2,2)(7,5)(7,3) \end{pspicture} \end{minipage}\hfill% \begin{minipage}{\linewidth-6cm} \begin{lstlisting} \begin{pspicture}(5,2.5) \pspolygon[unit=0.5cm,% fillstyle=solid,% fillcolor=yellow](7,3)(0,0)(1,3) (5,5)(10,3)(2,2)(7,5)(7,3) \end{pspicture} \end{lstlisting} \end{minipage} \begin{minipage}{5.5cm} \begin{pspicture}(5,2.5) \pspolygon[unit=0.5cm,% fillstyle=eofill,% fillcolor=yellow](7,3)(0,0)(1,3)% (5,5)(10,3)(2,2)(7,5)(7,3) \end{pspicture} \end{minipage}\hfill% \begin{minipage}{\linewidth-6cm} \begin{lstlisting} \begin{pspicture}(5,2.5) \pspolygon[unit=0.5cm,% fillstyle=eofill,% fillcolor=yellow](7,3)(0,0)(1,3)% (5,5)(10,3)(2,2)(7,5)(7,3) \end{pspicture} \end{lstlisting} \end{minipage} \section{Dashed lines} By default a dash line can be set with the option \verb+dash= +, e.g. \verb+dash=10pt 5pt+. This definition makes it impossible to define a dashed/dotted line. \verb+pstricks-add+ redefines this option for a use with four parameters \verb+dash= +, where the last two can be omit. The following examples show different values for these parameters: \medskip \begin{center} \begin{minipage}{10.5cm}% \psset{linestyle=dashed,dashadjust=false} \noindent \psline[dash=1 1](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 0.5](0,0)(10,0)\\ \psline[dash=1 0.2 0.05 0.2](0,0)(10,0)\\ \psline[dash=0.05 0.2 1 0.2](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 1 1 2](0,0)(10,0)\\ \psset{dashadjust=true} \noindent \psline[dash=1 1](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 0](0,0)(10,0)\\ \psline[dash=1 0.2 0.05 0.2](0,0)(10,0)\\ \psline[dash=0.05 0.2 1 0.2](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 1 1 2](0,0)(10,0) \end{minipage} \end{center} \medskip \begin{lstlisting} {\psset{linestyle=dashed,dashadjust=false} \psline[dash=1 1](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 0.5](0,0)(10,0)\\ \psline[dash=1 0.2 0.05 0.2](0,0)(10,0)\\ \psline[dash=0.05 0.2 1 0.2](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 1 1 2](0,0)(10,0)\\ \psset{dashadjust=true} \psline[dash=1 1](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 0](0,0)(10,0)\\ \psline[dash=1 0.2 0.05 0.2](0,0)(10,0)\\ \psline[dash=0.05 0.2 1 0.2](0,0)(10,0)\\ \psline[linewidth=1mm,dash=2 1 1 2](0,0)(10,0)} \end{lstlisting} As seen in the above code, it is no problem to use dashed lines in the usual way with two parameters. \section{Ellipses} \verbI{pstricks - patch 14} has only the following macro for drawing an ellipse: {\small\begin{verbatim} \psellipse[