Christoph Bersch christoph at bersch.net
Fri Sep 7 16:51:32 CEST 2007

Hi,

for me it would be comfortable to have a macro which adds some
additional settings to an existing psstyle. Something like

\newpsstyle{Fiber}{linecolor=green}

-> style Fiber contains both informations

The following code seems to work, but it uses the LaTeX macro
\g at addto@macro. As I plan to include this into a PSTricks package, the
question is, if I should rewrite it in plain TeX (don't know how), or if
use of a LaTeX macro is ok.

\documentclass{article}
\usepackage{pstricks}
\makeatletter
\@ifundefined{pscs@#1}%
{\newpsstyle{#1}{#2}}%
{%
\def\pset at tempa{#2}%
\ifx\pst at tempa\@empty\else\psset{#2}\fi%
}
}%
}
\makeatother
\newpsstyle{Fiber}{linewidth=0.1}
\begin{document}
\begin{pspicture}(5,5)
\psline[style=Fiber](0,0)(5,1)