Re: [NTG-context] bug or needs warning documentation

2013-10-13 Thread Hans Hagen

On 10/13/2013 11:26 PM, Marco Patzer wrote:


How about switching paired boxes to \assumelongusagecs as well and
getting rid of \dogotopar? Paired boxes are the only mechanism which
uses \dogotopar.


ok

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


Re: [NTG-context] bug or needs warning documentation

2013-10-13 Thread Marco Patzer
On 2013–10–13 Hans Hagen wrote:

> On 10/13/2013 2:48 AM, Marco Patzer wrote:
> 
> >\unprotect
> >
> >\def\pack_combinations_pickup
> >   {\dostarttagged\t!combinationpair\empty
> >\dostarttagged\t!combinationcontent\empty
> >\dogotopar\pack_combinations_pickup_content_indeed}
> 
> .. ok, patched ... but with a bit more efficient variant for \dogotopar

How about switching paired boxes to \assumelongusagecs as well and
getting rid of \dogotopar? Paired boxes are the only mechanism which
uses \dogotopar.

\def\pack_pairedboxes_place_indeed
  {\pairedboxparameter\c!before
   \bgroup
   \edef\p_location{\pairedboxparameter\c!location}%
   \edef\p_n   {\pairedboxparameter\c!n}%
   %
   \let\startcontent\pack_common_content_start
   \let\stopcontent \pack_common_content_stop
   \let\startcaption\pack_common_caption_start
   \let\stopcaption \pack_common_caption_stop
   %
   \global\setsystemmode{pairedbox}%
   \pack_pairedboxes_before
   \assumelongusagecs\pack_pairedboxes_first_pickup}

\def\pack_pairedboxes_first
  {\pack_pairedboxes_between
   \assumelongusagecs\pack_pairedboxes_second_pickup}

Marco


signature.asc
Description: Digital signature
___
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
___

Re: [NTG-context] bug or needs warning documentation

2013-10-13 Thread Hans Hagen

On 10/13/2013 2:48 AM, Marco Patzer wrote:


\unprotect

\def\pack_combinations_pickup
   {\dostarttagged\t!combinationpair\empty
\dostarttagged\t!combinationcontent\empty
\dogotopar\pack_combinations_pickup_content_indeed}


.. ok, patched ... but with a bit more efficient variant for \dogotopar

Hans


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


Re: [NTG-context] bug or needs warning documentation

2013-10-13 Thread Hans Hagen

On 10/12/2013 2:15 PM, d.henman wrote:



I found what I consider a bug in startcombination processing.


it's actually a side effect of a tex property:

\hbox

{x}

is the problem here. Makes me wonder if we should also ignore par tokens 
there (we already have an always \long variant in the engine anyway)


The same is true for alignments and display math.

Hans



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


Re: [NTG-context] bug or needs warning documentation

2013-10-12 Thread Marco Patzer
On 2013–10–12 d.henman wrote:

> I found what I consider a bug in startcombination processing.
> 
> […]
> 
>   The below fails
> \starttext
> \placefigure
> [here,none]
> [fig: reference tag] 
> {citation text}
> { \startcombination[1*2]
>{\externalfigure[test-image.png][width=34mm]}{}
> 
>{\externalfigure[test-image.png][width=34mm]}{}
> \stopcombination 
> }
> \stoptext

\unprotect

\def\pack_combinations_pickup
  {\dostarttagged\t!combinationpair\empty
   \dostarttagged\t!combinationcontent\empty
   \dogotopar\pack_combinations_pickup_content_indeed}

\def\pack_combinations_pickup_content_indeed
   {\dowithnextboxcs\pack_combinations_pickup_content\hbox}

\setvalue{\??combinationalternative\v!text}%
  {\dogotopar\pack_combinations_alternative_text_indeed}

\setvalue{\??combinationalternative\v!label}%
  {\dogotopar\pack_combinations_alternative_label_indeed}

\def\pack_combinations_alternative_text_indeed
  {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
 \afterassignment\pack_combinations_caption_first
 \let\nexttoken=}

\def\pack_combinations_alternative_label_indeed
  {\dowithnextboxcs\pack_combinations_pickup_caption\vtop\bgroup
 \hsize\wd\b_pack_combinations_content
 \ifx\p_align\empty\else\setupalign[\p_align]\fi
 \usecombinationstyleandcolor\c!style\c!color
 \begstrut
   
\normalexpanded{\strc_labels_command{\v!combination\ifx\currentcombination\empty\else:\currentcombination\fi}}%
 \endstrut
   \egroup}

\protect

\starttext

  \startcombination

{alpha}{foo}

{beta}{bar}

  \stopcombination

  \startcombination

\startcontent
  alpha
\stopcontent

\startcaption
  foo
\stopcaption

\startcontent
  beta
\stopcontent

\startcaption
  bar
\stopcaption

  \stopcombination

\stoptext

Marco


signature.asc
Description: Digital signature
___
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
___

[NTG-context] bug or needs warning documentation

2013-10-12 Thread d.henman


I found what I consider a bug in startcombination processing.

context version used: version: 2013.09.03 16:23

Examples:  1.) Good compilable source and 2.) source that fails

The bad thing about this is that one, at least checks and checks syntax for 
errors and the error in fact is simply a blank line, which doesn't stand out as 
a syntax error in my mind, expecially when white space is supposed to be 
ignored by tex/context in usual modes. 

Has this been noticed before?

 The below works successfully
\starttext
\placefigure
[here,none]
[fig: reference tag] 
{citation text}
{ \startcombination[1*2]
 {\externalfigure[test-image.png][width=34mm]}{}

 {\externalfigure[test-image.png][width=34mm]}{}
\stopcombination 
}
\stoptext

  The below fails
\starttext
\placefigure
[here,none]
[fig: reference tag] 
{citation text}
{ \startcombination[1*2]
 {\externalfigure[test-image.png][width=34mm]}{}

 {\externalfigure[test-image.png][width=34mm]}{}
\stopcombination 
}
\stoptext
--this failure prints out the following in the log file.
system  > tex > error on line 8 in file /tmp/minexp.mkiv: Missing { 
inserted ...
system  > tex > error on line 1 in file /tmp/minexp.mkiv: You can't use 
` ...
system  > tex > error on line 2 in file /tmp/minexp.mkiv: Undefined 
control sequence ...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

))
! Emergency stop.

system  > tex > error on line 0 in file : Emergency stop ...

% END

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