ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Tim Steenvoorden <tim.steenvoorden@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Unexpected emergency stop
Date: Fri, 09 Feb 2018 18:03:46 +0000	[thread overview]
Message-ID: <CAJjcFnLXUbJEbCOxRvRb6BExVQXfrDM6QVsU7p1d62XX-Mj8fw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1478 bytes --]

Dear all,

After some time I’m back to ConTeXt and I dug up some old macros. I used to
define a \see macro to automatically insert labels like “chapter”, "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 (“*" 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’m on macOS 10.13.3 with minimals beta 2018.02.09 00:04.

Cheers,
Tim


––––––

\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=\word{\labeltext{chapter}}]

\setuplabeltext[en]
  [chapter=Chapter~]

\chapter[chp:first]{First}

Works:
\see[chp:first]

Hangs:
\see[chp:first],

\stoptext

––––––
-- 
----
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

[-- Attachment #1.2: Type: text/html, Size: 2902 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2018-02-09 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-09 18:03 Tim Steenvoorden [this message]
2018-02-09 19:49 ` Otared Kavian
2018-02-10 11:44   ` Tim Steenvoorden
2018-02-10 12:45     ` Wolfgang Schuster
2018-02-10 12:57       ` Tim Steenvoorden

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=CAJjcFnLXUbJEbCOxRvRb6BExVQXfrDM6QVsU7p1d62XX-Mj8fw@mail.gmail.com \
    --to=tim.steenvoorden@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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).