Re: [NTG-context] Unexpected emergency stop

2018-02-09 Thread Otared Kavian
Hi Tim,

Welcome back to ConTeXt!
When one defines a command, in particular when using the brackets […], 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  wrote:
> 
> 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.steenvoor...@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
> ___

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

[NTG-context] Unexpected emergency stop

2018-02-09 Thread Tim Steenvoorden
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.steenvoor...@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
___

Re: [NTG-context] Latest beta: reference to items broken in mkiv

2018-02-09 Thread r . ermers
Hi all,

I kindly ask for your attention for this problem again. I would like subitems 
to appear differently in the reference than they are in the listing:

1. item 1

a. subitem a, reference a

b. item b
c. Item c, reference c

2. Item 2, reference 2 See Item b, 2, 1 above. 


See Item b, 2, 1 above. 

--

Desired result:

See item 1b., 2 1 above.

This is possible in mkii, but not in mkiv it seems. Does anyone know how to 
achieve this?

Robert


A minimal example to play with:

%\setupitemgroup[itemize][1][n,repeat][width=1em]
%\setupitemgroup[itemize][2][a,repeat][width=2em]
%\setupitemgroup[itemize][3][r][width=3em]

\starttext 

\startitemize[n]
\item [ref:1] item 1
\startitemize[a]
\startitem[ref:a]
subitem a, reference a
\stopitem
\item [ref:b] item b
\startitem[ref:c]
Item c, reference c
\stopitem
\stopitemize
\item[ref:2]
Item 2, reference 2
\stopitem
\stopitemize

See \in{Item}[ref:b], \in[ref:2], \in[ref:1] above.




> Op 7 feb. 2018, om 14:53 heeft Otared Kavian  > het volgende geschreven:
> 
> Hi Robert,
> 
> Again I answered too quickly… excuse-me!
> If you want to have the subitems appear without the prefix, but references to 
> them contain the number of the item where they appear, I don’t know how to do 
> it.
> My previous message addresses only the separators between the numbers of the 
> items and subitems.
> Sorry… but my belief is that in ConTeXt everything is possible, even if I 
> don’t know how to do it :-)
> 
> Best regards: OK
> 
>> On 7 Feb 2018, at 12:56, r.erm...@hccnet.nl  
>> wrote:
>> 
>> Hi Otared,
>> 
>> Thanks, the solution works to some extend. It yields the following output.
>> 
>> 1. item 1
>> 
>> 1.a.  subitem a, reference a
>> 
>> 1.b.  item b
>> 
>>  1.b.i. A sub-sub item
>> 
>>  1.b.ii. Another sub-sub item, B 1.c. Item c, reference c
>> 
>> 2. Item 2, reference 2
>> 
>> See Item 1.b, see also items 2 and 1 above, as well as the sub-sub item 
>> 1.b.ii. 
>> 
>> 
>> Yet the output I am looking for, and which I had in mkii, is:
>> 1. item 1
>> 
>> a.  subitem a, reference a
>> 
>> b.  item b
>> 
>>  i. A sub-sub item
>> 
>>  ii. Another sub-sub item, B 1.c. Item c, reference c
>> 
>> 2. Item 2, reference 2
>> 
>> 
>> See Item 1.b / 1b, see also items 2 and 1 above, as well as the sub-sub item 
>> 1.b.ii / 1bii. 
>> 
>> 
>> Is this possible?
>> 
>> Regards,
>> 
>> Robert
>> 
>> 
>> 
>> 
>>> Op 7 feb. 2018, om 12:37 heeft Otared Kavian >> > het volgende geschreven:
>>> 
>>> Hi Robert,
>>> 
>>> I think the issue does not come from the version of Context you are using 
>>> but rather from a lack of formatting your itemgroups with the keyword « 
>>> repeat ».
>>> 
>>> I guess what you want to obtain can be achieved with the following example 
>>> below. At least here with either versions of Context I have the output is 
>>> as expected.
>>> 
>>> Best regards: OK
>>> 
>>> %% begin repeat-subitem.tex
>>> \setupitemgroup[itemize][1][n,repeat][width=1em]
>>> \setupitemgroup[itemize][2][a,repeat][width=2em]
>>> \setupitemgroup[itemize][3][r][width=3em]
>>> 
>>> \starttext 
>>> 
>>> \startitemize[n]
>>> \item[ref:1] item 1
>>> \startitemize  
>>> \startitem[ref:a]
>>> subitem a, reference a
>>> \stopitem
>>> \item [ref:b] item b
>>> \startitemize
>>> \item A sub-sub item
>>> \item[ref:subsub-B] Another sub-sub item, B
>>> \stopitemize
>>> \startitem[ref:c]
>>> Item c, reference c
>>> \stopitem
>>> \stopitemize
>>> \startitem[ref:2]
>>> Item 2, reference 2
>>> \stopitem
>>> 
>>> \stopitemize
>>> \blank[big]
>>> 
>>> See \in{Item}[ref:b], see also items \in[ref:2] and \in[ref:1] above, as 
>>> well as the \in{sub-sub item}[ref:subsub-B].
>>> 
>>> \stoptext
>>> %% end repeat-subitem.tex
>>> 
>>> 
>>> 
 On 7 Feb 2018, at 11:46, r.erm...@hccnet.nl  
 wrote:
 
 Hi Wolfgang, Otared and others,
 
 I installed a new standalone:
 
 mtx-context | main context file: 
 /Applications/ContextStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv
 mtx-context | current version: 2018.02.06 18:11
 
 However, I do not manage to get it going. The minimal example underneath 
 gives the following result:
 1. item 1
 a. subitem a, reference a 
 
 b. item b
 
 c. Item c, reference c
 
 2. Item 2, reference 2 
 
 
 See Item b, 2, 1 above. 
 
 This should be: 
 
 See Item 1b, 2, 1 above.
 
 Regards,
 
 Robert
 
 
 
 \starttext 
 
 \startitemize[n]\starttext 
 
 \startitemize[n]
 \item 

Re: [NTG-context] bug with special hyphenation?

2018-02-09 Thread Pablo Rodriguez
On 02/09/2018 12:03 AM, Hans Hagen wrote:
> On 2/8/2018 8:00 PM, Pablo Rodriguez wrote:
> 
>> Have I hit an issue with the new hyphenator, or am I simply missing
>> somehting?
> 
> it's a border case that i'll look into

Many thanks for your fast fix in latest beta, Hans.

Pablo
-- 
http://www.ousia.tk
___
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
___