From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100059 Path: news.gmane.org!.POSTED!not-for-mail From: Otared Kavian Newsgroups: gmane.comp.tex.context Subject: Re: Unexpected emergency stop Date: Fri, 9 Feb 2018 20:49:27 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.9\)) Content-Type: multipart/mixed; boundary="===============2852508894944437821==" X-Trace: blaine.gmane.org 1518205736 18648 195.159.176.226 (9 Feb 2018 19:48:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Feb 2018 19:48:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 09 20:48:52 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekEep-0003JE-Mi for gctc-ntg-context-518@m.gmane.org; Fri, 09 Feb 2018 20:48:27 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 76097423D52; Fri, 9 Feb 2018 20:50:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bf_gKGVQe-BU; Fri, 9 Feb 2018 20:50:09 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id DC52B42155F; Fri, 9 Feb 2018 20:49:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 9241F42155F for ; Fri, 9 Feb 2018 20:49:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jrD4q5c7V9pU for ; Fri, 9 Feb 2018 20:49:40 +0100 (CET) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 3FAD4420264 for ; Fri, 9 Feb 2018 20:49:30 +0100 (CET) Original-Received: by mail-wm0-f48.google.com with SMTP id b21so18345813wme.4 for ; Fri, 09 Feb 2018 11:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=bfmXidmVq+YoQ2c5J0yNXPszsdgE4+GfMFtGRseIOrE=; b=tri1izHcuBP2KN+y34U2UcedI3brBLyowkNqD7Or4UKV2gaBfKIwCOtIMi6xXnMWua 3enpK/zcKbnxPem5WehG94R3aYBHVVW8XTx+w+w/oSc5b/nnUxi+2Nkd1gfLwGJ9wO79 cy7O/+4wt4KA4dwo277ev0+pu7sofVR8r7f2cMYj+9PeJjiLQxQdHgC8a5KRbcGgOYS2 HiJVkDgTvFHioGsKefDt2PT64jOXmFsIIf/1lp9huX3nh5tw2sPL3+/lDVtec+jNquJR M7GUIGHzvt2qWaRDh+drDjdKYOyv+mAD5x5HgbrYftsGIZKt1E7lje4qi3klh/QBOBeE 8whA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=bfmXidmVq+YoQ2c5J0yNXPszsdgE4+GfMFtGRseIOrE=; b=ccZRa3KZt1lVwXivNssK7Fx6iYO7xgLVJ+ZuC4ziWvsxvsI5NYSGogBJ4RArQWgVhY OMsiMu4Nd5aL/CZn3Qw7Aau6Nc/yaWjdQMX5449SD4/aN//X/rPVB4d7WLi0I3DYMIUg queSzR5w9iqoDzIwCdsEQ9RZcmfojSxSJB13bzIn1wm4mlRTM0tdVVNjHjb9yGP9AhF5 1zcIIVP9M/6XpRoQBzVsMsWF6C10zDCQxxPaC2QTN2BTJwQRek6kSCZqgtMkTnQXZNA4 d2eO749crsq3BuOOUyLZ5OqAiPmBtP4Z3tyIdFEXcDT/mj58EITB2pky+aSF74IwX1OL Z0xQ== X-Gm-Message-State: APf1xPDGwPtVhZJJHnKSO8o31OUKUMGESxaYTwb8eecMlhKXsFtphKne 6MAxzjdh+LfMR6pMrlaZlanlbxqL X-Google-Smtp-Source: AH8x226B5UeQnSG2CxIEM9MzZUVEUZ3oDnUl9POHV17cpDscxQeBluAuOQdzNtFL72EPQub3JtizJQ== X-Received: by 10.80.218.4 with SMTP id z4mr5366194edj.173.1518205769630; Fri, 09 Feb 2018 11:49:29 -0800 (PST) Original-Received: from ?IPv6:2a01:e34:ec02:4760:a856:b69d:cf83:b70a? ([2a01:e34:ec02:4760:a856:b69d:cf83:b70a]) by smtp.gmail.com with ESMTPSA id j1sm1621451eda.9.2018.02.09.11.49.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 11:49:28 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3445.6.9) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:100059 Archived-At: --===============2852508894944437821== Content-Type: multipart/alternative; boundary="Apple-Mail=_A90840D6-F713-4CDB-A17F-25DE51D39E28" --Apple-Mail=_A90840D6-F713-4CDB-A17F-25DE51D39E28 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Tim, Welcome back to ConTeXt! When one defines a command, in particular when using the brackets [=E2=80=A6= ], it is wise to put a percent sign at the end of the line if one = changes the line on which the macro is defined. In your case, saying \definemacro\see[#1:#2]% {\dosee{#1}{#2}} suppresses the problem you are reporting (at least here on my machine = running MacOS 10.13.3 and the latest beta as yours). Best regards: OK=20 > On 9 Feb 2018, at 19:03, Tim Steenvoorden = wrote: >=20 > Dear all, >=20 > After some time I=E2=80=99m back to ConTeXt and I dug up some old = macros. I used to define a \see macro to automatically insert labels = like =E2=80=9Cchapter=E2=80=9D, "figure" etc. in front of a reference = based on the structure of the label. Below you'll find its definition. >=20 > It worked in MKIV about two years ago, nevertheless, now ConTeXt hangs = when placing punctuation after the command. I.e. TeX hangs with an = emergency stop (=E2=80=9C*" on the terminal) after all files have been = processed (after cont-yes.mkiv is closed). >=20 > What am I doing wrong that such a thing happens? >=20 > I=E2=80=99m on macOS 10.13.3 with minimals beta 2018.02.09 00:04. >=20 > Cheers, > Tim >=20 >=20 > =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=20 >=20 > \starttext >=20 > \definemacro\see[#1:#2] > {\dosee{#1}{#2}} >=20 > \starttexdefinition dosee #1#2 > \doifdefinedelse{in#1} > {\getvalue{in#1}[#1:#2]} > {\writestatus{references}{reference format in#1 not defined} > \in[#1:#2]} > \stoptexdefinition % #3 is optional and gobbled by \in >=20 > \definereferenceformat[inchp] > [text=3D\word{\labeltext{chapter}}] >=20 > \setuplabeltext[en] > [chapter=3DChapter~] >=20 > \chapter[chp:first]{First} >=20 > Works: > \see[chp:first] >=20 > Hangs: > \see[chp:first], >=20 > \stoptext >=20 > =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=20 > --=20 > ---- > T.J. Steenvoorden, MSc >=20 > PhD Candidate | Radboud University Nijmegen > Faculty of Science | Department of Software Science > Mercator 1 Building | Room 01.08 > Toernooiveld 212 | 6525 EC | Nijmegen | The Netherlands > +31 24 365 22 91 | t.steenvoorden@cs.ru.nl = __________________________________________= _________________________________________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail=_A90840D6-F713-4CDB-A17F-25DE51D39E28 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Tim,

Welcome back to = ConTeXt!
When one defines a command, in particular = when using the brackets [=E2=80=A6], it is wise to put a percent sign at = the end of the line if one changes the line on which the macro is = defined.
In your case, saying

\definemacro\see[#1:#2]%
= {\dosee{#1}{#2}}

suppresses the problem you are reporting (at least here on my = machine running MacOS 10.13.3 and the latest beta as yours).

Best regards: = OK 

On 9 Feb 2018, at 19:03, Tim Steenvoorden = <tim.steenvoorden@gmail.com> wrote:

Dear all,

After some time I=E2=80=99m back to = ConTeXt and I dug up some old macros. I used to define a \see macro to = automatically insert labels like =E2=80=9Cchapter=E2=80=9D, "figure" = etc. in front of a reference based on the structure of the label. Below = you'll find its definition.

It worked in MKIV about two years ago, nevertheless, now = ConTeXt hangs when placing punctuation after the command. I.e. TeX hangs = with an emergency stop (=E2=80=9C*" on the terminal) after all files = have been processed (after cont-yes.mkiv is closed).

What am I doing wrong = that such a thing happens?

I=E2=80=99m on macOS 10.13.3 with minimals beta 2018.02.09 = 00:04.

Cheers,
Tim


=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93 

\starttext

\definemacro\see[#1:#2]
  = {\dosee{#1}{#2}}

\starttexdefinition dosee #1#2
  = \doifdefinedelse{in#1}
    = {\getvalue{in#1}[#1:#2]}
    = {\writestatus{references}{reference format in#1 not defined}
     \in[#1:#2]}
\stoptexdefinition % #3 is optional and gobbled by = \in

\definereferenceformat[inchp]
  = [text=3D\word{\labeltext{chapter}}]

\setuplabeltext[en]
  [chapter=3DChapter~]

\chapter[chp:first]{First}

Works:
\see[chp:first]

Hangs:
\see[chp:first],

\stoptext

=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93 
--
----
T.J. = Steenvoorden, MSc

PhD Candidate | Radboud University Nijmegen
Faculty of Science | Department of Software Science
Mercator 1 Building | Room 01.08
Toernooiveld 212 | 6525 EC | Nijmegen | The = Netherlands
+31 24 365 22 91 | t.steenvoorden@cs.ru.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
_______________________________________________________________= ____________________

= --Apple-Mail=_A90840D6-F713-4CDB-A17F-25DE51D39E28-- --===============2852508894944437821== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============2852508894944437821==--