[pstricks] pst-pdf and readdata: long compilation time

Antoine Pairet lists at pairet.be
Sat Apr 25 14:50:29 CEST 2009


On Sat, 2009-04-25 at 10:18 +0200, Herbert Voss wrote:
> Antoine Pairet schrieb:
> > I use pst-pdf in order to mix PStricks code and jpegs in the same
> > document. In this document great amount of data is plotted. What I mean
> > is that large files are read with readdata and then plotted with
> > PStricks. What I would like to achieve is that data are only read once.
> > 
> > I use a Makefile to handle this compilation scheme:
> > latex MAIN.tex
> > dvips -o MAIN-pics.ps MAIN.dvi
> > ps2pdf MAIN-pics.ps
> > pdflatex MAIN.tex
> try
> pdflatex `\AtBeginDocument{\def\readdata#1#2{}} \input{MAIN.tex}`

It does not seem to work, here is the output I got:

  ps2pdf supraMain-pics.ps
  pdflatex `\AtBeginDocument{\def\readdata#1#2{}} \input{supraMain.tex}`
  /bin/sh: AtBeginDocument{defreaddata#1#2{}}: not found
  This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
   %&-line parsing enabled.

After entering the file name at the prompt, the build goes on. However
the readdata commands are read and executed.

Modifying the quotes from ` to ' :
  pdflatex '\AtBeginDocument{\def\readdata#1#2{}} \input{supraMain.tex}'
gives the following error:
  ! Undefined control sequence.
  l.1 \readdata[ignoreLines=5,nStep=25]{\macroRT

The error seems to come from the optional args contained in the
brackets. Indeed suppressing those args and manually removing the first
5 lines of the macroRT.dat file corrects the error. However, the build
stops at the next readdata command:

! Undefined control sequence.
l.2 ...ta[ignoreLines=5,nStep=1]{\nanoVIfourFilter


I tried to modify the command 
  pdflatex '\AtBeginDocument{\def\readdata#1#2{}} \input{supraMain.tex}'
  pdflatex '\AtBeginDocument{\def\readdata#1#2#3#4{}}
But it does not work either. 

The following files are attached:
 supraReadata.tex contains all the readdata commands
 supraMain.tex main file of the project

Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 1003 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20090425/19daf332/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: supraMain.tex
Type: text/x-tex
Size: 2621 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20090425/19daf332/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: supraReaddata.tex
Type: text/x-tex
Size: 1587 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20090425/19daf332/attachment-0002.bin 

More information about the PSTricks mailing list