On 18-10-2010 12:32, Aditya Mahajan wrote:
On Mon, 18 Oct 2010, Hans Hagen wrote:

On 17-10-2010 11:38, Aditya Mahajan wrote:
Hi,

Try this example:

\newcatcodetable\arbitcatcodes

\startcatcodetable\arbitcatcodes
\catcod...@=0
\stopcatcodetable

\setcatcodetable\arbitcatcodes

@starttext
Hello
@stoptext

This results in the entire bxml-apa.mkiv being typeset! The file
bxml-apa is called by

\def\dodoloadbibtexpublicationalternative#1%
{\doonlyonce{#1}
{\readsysfile{bxml-#1.mkiv}
{\showmessage\m!publications{6}{bxml-#1}}
{\showmessage\m!publications{1}{bxml-#1}}}}

in bibl-bib.mkiv

I don't know if this should be considered a bug or not.

does wrapping in

\startreadingfile

\stopreadingfile

Partially. Adding

\def\dodoloadbibtexpublicationalternative#1%
{\doonlyonce{#1}
{\startreadingfile\readsysfile{bxml-#1.mkiv}\stopreadingfile
{\showmessage\m!publications{6}{bxml-#1}}
{\showmessage\m!publications{1}{bxml-#1}}}}

before the test file gives an error on the next command:

! LuaTeX error <main ctx instance>:1: ')' expected near '\'.

system > error on line 15 in file backend.tex: LuaTeX error ...

5 \stopcatcodetable
6
7 \def\dodoloadbibtexpublicationalternative#1%
8 {\doonlyonce{#1}
9 {\startreadingfile\readsysfile{bxml-#1.mkiv}\stopreadingfile
10 {\showmessage\m!publications{6}{bxml-#1}}
11 {\showmessage\m!publications{1}{bxml-#1}}}}
12
13 \setcatcodetable\arbitcatcodes
14
15 >> @starttext
16 Hello
17 @stoptext


\normalshowmessage ...showmessage("#1","#2","#3")}

<argument> ...ns{6}{bxml-apa}} {\showmessage \m !p

ublications{1}{bxml-apa}}
\firstofoneargument #1->#1


But adding this at the beginning of the file works.
\unprotect

\def\dodoloadbibtexpublicationalternative#1%
  {\doonlyonce{#1}
     {\startreadingfile
      \readsysfile{bxml-#1.mkiv}
        {\showmessage\m!publications{6}{bxml-#1}}
        {\showmessage\m!publications{1}{bxml-#1}}%
      \stopreadingfile}}

\protect


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to