On 4/16/2018 6:52 PM, Aditya Mahajan wrote:
On Sun, 15 Apr 2018, Hans Hagen wrote:
\start
\def\obeyedline{\blank[line]} \obeylines
Thanks! Not sure why I wasn't using that since the beginning.
I am testing with the latest beta and I get another bug with reading
http files. This is a simplified version of what I use in the filter
module:
\unprotect
\def\AnyFilename#1%
{\ctxcommand{getreadfilename("any",".","#1")}}
\def\ProcessFile#1%
{\edef\InputFile{\AnyFilename{#1}}%
\InputFile
\typefile[\InputFile]}
\protect
\starttext
\ProcessFile{http://cim.mcgill.ca/~adityam/index.html}
\stoptext
With the latest beta, I get the following error:
...inimals/texmf-context/tex/context/base/mkiv/file-res.lua:147: bad
argument #1 to 'find' (string expected, got nil)
stack traceback:
[C]: in function 'string.find'
...inimals/texmf-context/tex/context/base/mkiv/file-res.lua:147: in
upvalue 'action1'
[string "local action = tokens._action..."]:4: in field
'getreadfilename'
[ctxlua]:1: in main chunk
Not sure why #1 is being passed to the lua function instead of the
expanded value of "#1".
hm, i'll check it
#1 just means first argument in lua -)
use this:
\unprotect
\def\AnyFilename#1{\clf_getreadfilename{any}{.}{#1}}
\protect
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________