[NTG-context] Stop with an error signal

Khaled Hosny khaledhosny at eglug.org
Sun Oct 31 06:12:03 CET 2010


On Sun, Oct 31, 2010 at 01:08:40AM -0400, Aditya Mahajan wrote:
> On Sun, 31 Oct 2010, Khaled Hosny wrote:
> 
> >On Sat, Oct 30, 2010 at 07:27:02PM -0400, Aditya Mahajan wrote:
> >>Hi,
> >>
> >>I want to write a macro that checks for some settings and if the
> >>settings are wrong stop the current compilation and terminate with
> >>an error message. Right now I have
> >>
> >>\def\ERROR
> >>      {\writeline
> >>       \showmessage\??externalfilter??{forbidden}\getexternalfilterdirectory
> >>       \batchmode
> >>       \normalend}
> >
> >Well, the first thought that came in my mind is using os.exit(1):
> >
> >\def\ERROR{\directlua{os.exit(1)}}
> >
> >But since this is pretty obvious, I'm sure I'm missing something.
> 
> I want the code to also work with MkII, so I did not even think of a
> lua solution :)

For some reason I was assuming the external filter module is MkIV only
thing, now I wounder from where I got that impression.

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the ntg-context mailing list