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?

Im 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