ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Taco Hoekwater <taco@elvenkind.com>, Marco <netuse@lavabit.com>
Subject: Re: Return value of context call
Date: Wed, 14 Jul 2010 14:40:34 +0200	[thread overview]
Message-ID: <4C3DB042.6090404@wxs.nl> (raw)
In-Reply-To: <4C318CB3.4050900@elvenkind.com>

On 5-7-2010 9:41, Taco Hoekwater wrote:
> On 07/04/2010 07:39 PM, Marco wrote:
>> Hi,
>>
>> when there's a mistake in the context code then the context call
>> returns »1«. When there's a mistake in the metapost code then the
>> context call returns »0«.
>>
>> This is annoying for me, since I use the return value as indicator for
>> my pdf reader to refresh. This seems like a bug to me. Is there a
>> workaround?
>
> Like this maybe, this converts metapost errors into a series of tex
> errors:
>
> \startluacode
> function report_mplib_error (...)
> local v = string.format(...)
> tex.sprint(tex.ctxcatcodes,"\\errmessage{")
> tex.sprint(tex.vrbcatcodes,v)
> tex.print(tex.ctxcatcodes,"}")
> end

i added something like this as option

\enabledirectives[mplib.texerrors]

\startMPcode
     draww fullcircle ;
\stopMPcode

this then can be set in texmfcnf.lua in the directives table

   mplib.texerrors = "yes",

no beta yet

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2010-07-14 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-04 17:39 Marco
2010-07-05  7:41 ` Taco Hoekwater
2010-07-05 10:49   ` Marco
2010-07-14 12:40   ` Hans Hagen [this message]
2010-07-14 14:28     ` Marco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C3DB042.6090404@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=netuse@lavabit.com \
    --cc=ntg-context@ntg.nl \
    --cc=taco@elvenkind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).