adityam / filter

ConTeXt module to process contents of a start-stop environment through an external program
45 stars 10 forks source link

Strange error #16

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hi,

With this code

\usemodule[filter]

\defineexternalfilter 
  [sympy]
  [filtercommand={python \externalfilterinputfile\space > \externalfilteroutputfile},
   bufferbefore=init]

\defineexternalfilter
  [sympycalc]
  [filtercommand={python \externalfilterinputfile\space > \externalfilteroutputfile},
   bufferbefore=init,
   readcommand=\DisplayCalcFile]

\startbuffer[init]
from sympy import apart
from sympy.abc import x
\stopbuffer

\starttext
\startsympy
print(apart( (x+1)/(x-1), x))
\stopsympy

\startsympycalc
print(apart( (x+1)/(x-1), x))
\stopsympycalc

\stoptext

I get:

tex error       > error on line 26 in file /home/xan/SYNC/cepasud-raw/classe/ESPA3/planificació/Tema2-Àlgebra/entorn-simple-cas.tex: ! Undefined control sequence

\@@@@externalfiltersympycalc:readcommand ...cFile 

\externalfilter@read_processed_file_indeed ...and 
                                                  \externalfilter@output_fil...
\externalfilter@process_filter ..._processed_file 
                                                  \iftraceexternalfilters \e...
l.26 \stopsympycalc

16     from sympy.abc import x
17     \stopbuffer
18     
19     \starttext
20     \startsympy
21     print(apart( (x+1)/(x-1), x))
22     \stopsympy
23     
24     \startsympycalc
25     print(apart( (x+1)/(x-1), x))
26 >>  \stopsympycalc
27     
28     \stoptext
29     
30     

? 

What's wrong?

adityam commented 10 years ago

The command \DisplayCalcFile is not defined!