Don Simons wrote:
> Thanks, David. With the code you suggested, running with tex produces
>
> ==================================
> C:\DOCUME~1\Don\MYDOCU~1\PMX\musixtex115>tex bigjunq This is TeX, Version
> 3.141592 (MiKTeX 2.6) (bigjunq.tex (musixtex.tex
> MusiXTeX(c) T.115-beta2 <24 June 2010>
> maxinstruments=6 max128beams=6 maxgroups=3 maxslurs=6 maxtrills=6
> maxoctlines=6)
> ("C:\Documents and Settings\All Users\Application
> Data\MiKTeX\2.6\tex\generic\p mx\pmx.tex"
> PMX, a Preprocessor for MusiXTeX, Version 2.502a <29 March 04>
> )
> ! Sources compiled with PMX require e-TeX.
> \body ...{Sources compiled with PMX require e-TeX}
> \iftrue \iterate -
> >\body
> \let \next \iterate \else \let \next \relax \fi \next
> l.13 \repeat
>
> ?
> ==================================
>
> which I'm afraid is pretty ugly. If I leave out the loop and the repeat, I
> get
>
> ==================================
> C:\DOCUME~1\Don\MYDOCU~1\PMX\musixtex115>tex bigjunq This is TeX, Version
> 3.141592 (MiKTeX 2.6) (bigjunq.tex (musixtex.tex
> MusiXTeX(c) T.115-beta2 <24 June 2010>
> maxinstruments=6 max128beams=6 maxgroups=3 maxslurs=6 maxtrills=6
> maxoctlines=6)
> ("C:\Documents and Settings\All Users\Application
> Data\MiKTeX\2.6\tex\generic\p mx\pmx.tex"
> PMX, a Preprocessor for MusiXTeX, Version 2.502a <29 March 04>
> )
> ! Sources compiled with PMX require e-TeX.
> l.11 ...e{Sources compiled with PMX require e-TeX}
>
> ?
> ==================================
>
> which is much closer to what I'd prefer, but still not quite it. It's
> probably good that it pauses, so if running from a batch script the
> operator would know the error had occurred. But can I (1) just have the
> message printed once, and (2) precede the message with a blank line?
Personally I wouldn't worry about the blank line, but \immediate\write16{} will
add that for you. Getting rid of the duplicate error message is something I did
in in a massively over-engineered piece of TeX for database processing a few
years ago... although the code I had allowed you to define error messages using
a key (so you could say \...@error{etex}{sources ...}{Consult ...} then later
\error{etex}, for example) that's much more than you'd want here so I
simplified it to give:
\ifx\undefined\eTeXversion
\def\displayerror{\errmessage{\the\errormessage}}
\toksdef\errormessage=0
\def\etexerror{%
\errhelp={Consult your Local Guide for details on using e-TeX}%
\errorcontextlines=-1
\escapechar=-1
\errormessage={Sources compiled with PMX require e-TeX}%
\loop
\displayerror
\iftrue
\errormessage={Type X to quit and go and fix the problem}%
\errhelp={No, really - do just that. There's nothing else you can do
here.}%
\repeat}
\immediate\write16{}
\etexerror
\fi
On the console that gives
This is TeX, Version 3.1415926 (MiKTeX 2.8)
(D:\PMX.tex
! Sources compiled with PMX require e-TeX.
displayerror ->errmessage {the errormessage }
l.16 \etexerror
?
Which I is about as good as you can make it I think.
David
_______________________________________________
[email protected] mailing list
If you want to unsubscribe or look at the archives, go to
http://mailman.nfit.au.dk/mailman/listinfo/icking-music-archive.org-tex-music