[pstricks] Opening a data file with postscript
Herbert Voss
Herbert.Voss at fu-berlin.de
Wed Sep 18 11:36:51 CEST 2024
Am 18.09.24 um 10:59 schrieb Poul Riis:
>
> However, I cannot make it work even if I have added your suggested
> options for ps2pdf.
> The following works perfectly but not when I uncomment the line with
> /infilex:
I suppose you want to run the commands from the external file.
Then use the run command:
\documentclass[a4paper,14pt]{article}
\usepackage[x11names]{xcolor}
\usepackage{pstricks-add}
\begin{filecontents}[noheader,force]{hubble.txt}
200 0 moveto
(Hello!) show
200 2 neg moveto
230 2 neg lineto
2 setlinewidth
1 0 0 setrgbcolor
stroke
\end{filecontents}
\begin{document}
foo
\pstverb{
/Times-Roman findfont 12 scalefont setfont
50 0 moveto
(Hello!) show
50 2 neg moveto
80 2 neg lineto stroke
1 dict begin
/showpage {} def
(hubble.txt) run
end
}
bar
\end{document}
works also with running lualatex to get directly the PDF
Herbert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2024-09-18 um 11.32.09.png
Type: image/png
Size: 9365 bytes
Desc: not available
URL: <https://tug.org/pipermail/pstricks/attachments/20240918/2427a97c/attachment.png>
More information about the PSTricks
mailing list.