[pstricks] pstricks-add, \def\pshlabel

Claus Behl claus at bempf.de
Thu Sep 9 09:03:16 CEST 2004


Hi,
I have a Problem using pstricks-add. If  i try to use
\usepackage{pstricks-add} in the following file, i get the Error
message:

! Missing number, treated as zero.
<to be read again>
                   \def
l.25 \uput
          [-90](11,0){x}
A number should have been here; I inserted `0'.

The problem vanishes, if i outcomment: \def\pshlabel#1{\XLABEL{#1}}
Is this a known problem of pstricks-add?

Second question, is it possible to determine the max or min of a 
Function in a given intervall?

Claus Behl


\documentclass[a4paper,10pt]{article}
\usepackage{pst-plot}
\usepackage{multido}
%\usepackage{pstricks-add}

\begin{document}

%%%%%%%%%%%% Beschriftung x-Achse %%%%%%%%%%%%%%%%
\def\XLABEL#1{%
    \ifcase#1\or
    $x_0=a$\or $x_1$\or $x_2$\or \or \or $x_\nu$\or $x_{\nu+1}$\or \or 
$x_{n-1}$\or  $x_n=b$\fi%
}%
\def\pshlabel#1{\XLABEL{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%% Funktion %%%%
\def\F{x 0.5 exp 3 mul}
%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{pspicture}(-0.5,-0.5)(11,10)
\SpecialCoor
%% Koordinatensystem
\psaxes[labels=x,ticks=x]{->}(11,10)
\uput[-90](11,0){x}
\uput[0](0,10){y}
%% Ende Koordinatensystem
%% Funktion
\psplot[plotstyle=curve]{0}{11}{\F}
%% Ende Funktion
%% Untersumme
\multido{\nx=1+1}{9}{%
\psframe[linecolor=green,hatchcolor=green,fillstyle=vlines](\nx,0)
(!
    \nx\space 1 add
    \nx\space 0.5 exp 3 mul
)
}
%%%%%%%%%%
\end{pspicture}
\end{document}




More information about the PSTricks mailing list