[pstricks] using values read from an external file

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Apr 12 20:18:14 CEST 2012

Am 12.04.2012 14:04, schrieb Leon Free:

> As an example, I tried doing something similar to 2 (but more complex
> because the a[i] are generated by an external program and read by latex
> "on the fly"). Here is my exemple (needs scilab to be run). It does what
> I want, but it's really hugly. Compiles with --shell-escape option.

you can read the value with \readdata and then extend it
with an \edef. The delimiter of the data values is the
character D:

%% macro for executing scilab from within latex
\newcommand\scilab[1]{\write18{scilab -nogui -f #1}}


% scilab execution
   \edef\data{\data\space D 1 D \rA\space D 1 }
   $\alpha = $ \input{leftcdf} \rA


More information about the PSTricks mailing list