[NTG-context] Bug in \setupinterlinespace ?

2014-07-06 Thread Otared Kavian
Hi all,

I don’t know how to change the interline space in a chapter.
In principle I thought that if at some point I have used for some reason
\setupinterlinespace[4.0ex]
then saying
\setupinterlinespace[reset,small]
would reset the interline space to its default value, but this is not the case. 
The version I am using is:
ConTeXt  ver: 2014.07.04 15:55 MKIV beta  fmt: 2014.7.5  int: english/english

Here is a minimal example:

 begin bug-interline.tex
\setupinterlinespace[4.0ex]
\starttext

\input knuth.tex

\page
\setupinterlinespace[reset,small]

\input knuth.tex
\stoptext
 end bug-interline.tex

Thanks for your help: OK
___
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] Testing the param value

2014-07-06 Thread Jan Tosovsky
On 2014-07-05 Wolfgang Schuster wrote:
 Am 05.07.2014 um 16:47 schrieb Jan Tosovsky:
 
  I am hacking the context index entry rendering... ;-)
  ... but I am stuck with a simple comparison
 
  How can I test the given entry if it equals to the specified one?
 
  The following code has no effect.
 
  \unexpanded\def\defaultregisterentry#1#2#3#4%
  % #1:processor #2:internal #3:seeindex #4:word
   {\def\currentregisterpageindex{#2}%
% start hacking
\def\myword{#4}%
\ifx\myword{My Primary}
   \column % do something
\fi
% stop hacking
\strc_register_injector_process
...
 
  What is the proper syntax?
 
 
 This should be possible without hacks but without a example I can't
 provide more than a simple example code.
 
 \newconditional\IndexState
 
 \define[1]\IndexInternalCommand
 
 {\doifelse{#1}{MyPrimary}{\global\settrue\IndexState}{\global\setfalse\
 IndexState}#1}
 
 \define[1]\IndexCommand
   {\setfalse\IndexState
\setbox\scratchbox\hbox{#1}%
\ifconditional\IndexState
  \column
\fi
\box\nextbox}
 
 \setupregister
   [index]
   [textcommand=\IndexCommand,
deeptextcommand=\IndexInternalCommand]
 

Thanks, it looks promising even I am quite lost in this logic :-)

Do I understand correctly that the IndexState is a global boolean which is
set either to true or false when deeptextcommand is processed and when
textcommand is called, it works with this pre-filled variable?

{\setfalse\IndexState % why this? A default value?
 \setbox\scratchbox\hbox{#1}%
 \box\nextbox} % what do these two do?

I am asking as #1 is consumed somehow and there is just a page reference in
the result index. But that break (\column) works correctly.

I've encountered mising words when comparing hashed params directly. Like if
they are read once, they are not available any more. This was the reason why
I used a helper 'myword' variable in my hack.

But I've just written that code analogically to some other conditions found
in the sources without proper knowledge what exactly it does.

Regards, Jan


___
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] underbraces get progressively more misaligned (w/ minimal example)

2014-07-06 Thread Sanjoy Mahajan
Hans Hagen pra...@wxs.nl writes:

 After a day of testing, tracing, wondering etc Luigi and I figured out 
 what was the problem it tooks us lots of debug prints -). Indeed there 
 is a bug in luatex. 

Great detective work!

 So, some random value (not entirely random as it depends on what mem 
 area the glue node is allocated from and that is kind of stable in a 
 run) was added which results in the effects you noticed.

Ah, so running it 3 times would allocate the glue node from higher
and higher mem, and thereby making the not-so-random value larger and
larger.

 So, once this fix moves upstream you can check your suspicious cases. 
 Luigi will push it in our experimental branch and I suppose that Taco 
 will then push it into trunk and after that you can compile

Once it in the luatex trunk, I will check it right away.  I am also
happy to test the experimental branch if you give me a pointer to it.

 or wait till the garden carries it.

Do you mean in the minimals?

 Thanks for noticing!

For sure.  I am very happy that it is fixed, and fixed before I have to
give in my absolute final PDF file.  

My only worry is that the carefully tuned page breaks, some of which are
sensitive to 1pt insertions of vertical space, might change once the
underbraces return to their homes.  But I'll tweak it with a bit of
vertical space.

-Sanjoy
___
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] underbraces get progressively more misaligned (w/ minimal example)

2014-07-06 Thread Sanjoy Mahajan
 Once it in the luatex trunk, I will check it right away.

I just compiled and installed luatex 0.79.1 r5033, remade the formats,
and the result passes my underbrace tests (the 30,000 iterations and the
examples in my book mss).

Thank you for the great debugging.

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