[pstricks] Linewidth as postscript parameter

San Kaneda bilbolord2001 at gmail.com
Mon Sep 21 19:38:26 CEST 2015


Disclaimer: I am not a package author, and I'm not sure if I should be
answering any questions

What is your intention?

Do you want to use PS data as optional pstricks parameters?
Do you want to define the width in one place and just reuse?

\documentclass[a4paper,12pt]{article}
\usepackage[x11names]{xcolor}
\usepackage{pstricks-add}

\begin{document}
\begin{pspicture}[bgcolor=Cornsilk1](-5,-5)(5,5)
%\pstVerb{/lw 0.2 def}
\newcommand{\lw}{0.2}% something like this?
\psline[linewidth=\lw](-4,-4)(4,4)%Does not work
%\psline[linewidth=0.2](-4,-4)(4,4)%Works
\end{pspicture}
\end{document}


More information about the PSTricks mailing list