[NTG-context] vertical justification of mixedcolumns

2019-04-30 Thread mf

Hello list,
in this MWE the columns are not aligned at the bottom, and they are not 
at the bottom of the page:


\definevspacingamount[myBlank][5pt plus 5pt minus 2pt][5pt plus 5pt 
minus 2pt]

\starttext
\showgrid
\startmixedcolumns[n=2,balance=yes]
\dorecurse{2}{\input knuth \blank[myBlank]}
Another paragraph to make columns uneven.\par\blank[myBlank]
\dorecurse{3}{\input knuth \blank[myBlank]}
\stopmixedcolumns
\stoptext

Is there a way to configure mixedcolumns so that \blank[myBlank] is 
stretched or shrinked to get the two columns end aligned at the bottom 
of the page?


Thanks in advance,
Massimiliano
___
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] Undesirable space with mixedcolumns

2017-10-27 Thread Fabrice Couvreur
Hello,
I'm looking in the documentation and I think I found the key to remove the
white space under the mathematical formula.
Is this the best way to achieve optimal rendering using columns ?
Thank you
Fabrice


\definemixedcolumns
  [Mycolumns]
  [
n=2,
separator=rule,
rulecolor=darkred,
rulethickness=1pt,
balance=yes,
*grid=strut,*
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMycolumns
On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
0,8^n+2\,000}, on en déduit que la limite de la suite \math{(u_n)} est
égale à 2\,000. Si l'évolution des utilisateurs se maintient à long terme,
le nombre de calculatrices vendues se stabiliserait autour de 2 millions.

\startformula
   \startmathalignment[n=2,align={right,left}]
 \NC (1+t)^3 \NC = 1,87\NR
 \NC 1+t \NC = 1,87^{\frac{1}{3}}  \NR
 \NC 1+t \NC = 1,23\NR
 \NC t   \NC =  0,23.  \NR
\stopmathalignment
\stopformula
\input ward
\stopMycolumns
\stoptext


Le 25 octobre 2017 à 14:32, Fabrice Couvreur 
a écrit :

> Hello,
> I notice a space when I use the command \math{\lim\limits_{n \to +\infty}
> 0,8^n=0} and mixedcolumns.
> Thanks.
> Fabrice
> #
>
> \definemixedcolumns
>   [sectioncolumns]
>   [
> n=2,
> separator=rule,
> rulecolor=,
> balance=yes,
>   ]
>
> \setupalign[verytolerant,stretch,hanging]
>
> \starttext
> On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
> Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
> 0,8^n+2\,000}, on en déduit que la limite de la suite \u est égale à
> 2\,000. Si l'évolution des utilisateurs se maintient à long terme, le
> nombre de calculatrices vendues se stabiliserait autour de 2 millions.
> \blank
> \startsectioncolumns
>   On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
> Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
> 0,8^n+2\,000}, on en déduit que la limite de la suite \u est égale à
> 2\,000. Si l'évolution des utilisateurs se maintient à long terme, le
> nombre de calculatrices vendues se stabiliserait autour de 2 millions.
> \startsectioncolumns
>
> \stoptext
>
___
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] Undesirable space with mixedcolumns

2017-10-25 Thread Fabrice Couvreur
Hello,
I notice a space when I use the command \math{\lim\limits_{n \to +\infty}
0,8^n=0} and mixedcolumns.
Thanks.
Fabrice
#

\definemixedcolumns
  [sectioncolumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
0,8^n+2\,000}, on en déduit que la limite de la suite \u est égale à
2\,000. Si l'évolution des utilisateurs se maintient à long terme, le
nombre de calculatrices vendues se stabiliserait autour de 2 millions.
\blank
\startsectioncolumns
  On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
0,8^n+2\,000}, on en déduit que la limite de la suite \u est égale à
2\,000. Si l'évolution des utilisateurs se maintient à long terme, le
nombre de calculatrices vendues se stabiliserait autour de 2 millions.
\startsectioncolumns

\stoptext
___
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] Undesirable space with mixedcolumns

2017-10-25 Thread Fabrice Couvreur
Hello,
I notice a space when I use \definemixedcolumns with the command
\math{\lim\limits_{n
\to +\infty} 0,8^n=0} and mixedcolumns.
Thanks.
Fabrice
#

\definemixedcolumns
  [sectioncolumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
0,8^n+2\,000}, on en déduit que la limite de la suite \u est égale à
2\,000. Si l'évolution des utilisateurs se maintient à long terme, le
nombre de calculatrices vendues se stabiliserait autour de 2 millions.
\blank
\startsectioncolumns
  On a \math{0< 0,8 < 1} donc \math{\lim\limits_{n \to +\infty} 0,8^n=0}.
Comme pour tout entier naturel \math{n}, on a : \math{u_n=-500\times
0,8^n+2\,000}, on en déduit que la limite de la suite \u est égale à
2\,000. Si l'évolution des utilisateurs se maintient à long terme, le
nombre de calculatrices vendues se stabiliserait autour de 2 millions.
\startsectioncolumns

\stoptext
___
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] Another issue with EBGaramond / firstline / mixedcolumns

2015-11-08 Thread josephcanedo
Dear all,


Trying to use EB Garamond font Inside mixed columns + use firstline  feature 
(to make it larger) I get an empty line in output between first line and the 
rest of paragraph. If I comment the line containing \setupbodyfont and use 
default font the problem disappears (even with larger \tfa ratios well above 2).


The problem seems only to happen when first line contains letters with space 
hanging below line base (like g or p for example).

As well using columnset does not show the problem and using grid=verytolerant 
as well.


Attached MWE + output.


Many thanks

Best regards


Joseph Canedo

mwe_mixedcolumns.pdf
Description: mwe_mixedcolumns.pdf


mwe_mixedcolumns.tex
Description: mwe_mixedcolumns.tex
___
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] Pagebreak forced after mixedcolumns (new bug?)

2014-06-09 Thread Joshua Krämer
On 2014-06-08, 23:34, Hans Hagen wrote:
> does
> balance=yes
> help?

Yes, it helps.  Thank you!

Kind regards,
Joshua


___
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] Pagebreak forced after mixedcolumns (new bug?)

2014-06-08 Thread Hans Hagen

On 6/8/2014 10:57 PM, Joshua Krämer wrote:

Dear list,

I have updated to the latest beta today, and I can no longer put text
after \stopmixedcolumns on the same page.


\setuplayout[grid=yes]
\starttext
\startmixedcolumns
Left

\column

Right

Right
\stopmixedcolumns

Something after the columns
\stoptext


There should be no pagebreak after \stopmixedcolumns.  It works with
\start... \stopcolumns, but then the column break (\column) is ignored.

It worked before with mixedcolumns, but I don't know when I updated the
last time.


does

balance=yes

help?

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


[NTG-context] Pagebreak forced after mixedcolumns (new bug?)

2014-06-08 Thread Joshua Krämer
Dear list,

I have updated to the latest beta today, and I can no longer put text
after \stopmixedcolumns on the same page.


\setuplayout[grid=yes]
\starttext
\startmixedcolumns
Left

\column

Right

Right
\stopmixedcolumns

Something after the columns
\stoptext


There should be no pagebreak after \stopmixedcolumns.  It works with
\start... \stopcolumns, but then the column break (\column) is ignored.

It worked before with mixedcolumns, but I don't know when I updated the
last time.

Kind regards,
Joshua


___
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] a way to implement \testcolumn in mixedcolumns

2013-12-05 Thread Lars Huttar (SIL gmail)
On 12/3/2013 4:40 PM, Hans Hagen wrote:
> On 12/3/2013 3:10 PM, Lars Huttar wrote:
>> ...
>> Thanks again for your work on this.
>> We're continually reevaluating whether we can use the beta or need to
>> stick with the stable version. At the moment, it looks like we'll be
>> sticking with the stable version. But we'd like to use the beta, if the
>> problems can be ironed out.
>
> fyi: i'll not patch the stable version
>
> new beta
>

Thanks for the fixes.
When I said "the stable version", I wasn't very specific, but I was
referring to the one on the TeX Live 2013 CD.

But after you said the above I realized you were talking about this
(http://wiki.contextgarden.net/ConTeXt_Standalone#Single_user_installation):

> By default, the suite installs ConTeXt beta. If you want the stable
> version of ConTeXt, you can use
>
> sh ./first-setup.sh --context=current

I'm making a note of it here in hope that it will help me remember next
time what the "stable" version refers to.

Regards,
Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-12-03 Thread Hans Hagen

On 12/3/2013 3:10 PM, Lars Huttar wrote:

On 11/28/2013 1:34 PM, Hans Hagen wrote:


That macro was never meant for mixed columns. I made a variant that
works ok in mixed columns which will be in the next beta.

\setuptolerance[verytolerant]

\starttext

\startmixedcolumns

 \dorecurse{4}{\input ward \par}

 \testcolumn[10][-1pt] % 10 lines - 1pt slack

 \dorecurse{2}{\input ward \par}

\stopmixedcolumns

\stoptext


Ok. It looks like the second parameter to \testcolumn is now required
(it didn't used to be).


i'll fix that


What does this slack value do? Does it mean that the minimum amount of
space left in the column is 10 lines minus 1pt?


indeed


Also, in the Dec. 2 beta (current version: 2013.12.02 15:22),  the
\column command now causes an error when we come to the \stopmixedcolumns.
I don't know if it's connected with the above change, or something else.


no, more to making section breaks working better in columns (i forgot to 
rename a variable)



MWE: change the \testcolumn command above to \column.
I get the following error output:

! LuaTeX error
C:/context/tex/texmf-context/tex/context/base/page-mix.lua:474
: attempt to compare number with nil
stack traceback:

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:474: in function 'process_penalty'

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:572: in function 'setsplit'

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:687: in function 'setsplit'

C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:819: in function 'mixsetsplit'
 [string "\directlua "]:1: in main chunk.

system  > tex > error on line 14 in file
C:/Users/Huttar/Documents/work/tex/test-beta-testcolumn.tex:
LuaTeX error  ...

  4
  5 \startmixedcolumns
  6
  7 \dorecurse{4}{\input ward \par}
  8
  9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack
10 \column
11
12 \dorecurse{2}{\input ward \par}
13
14 >>  \stopmixedcolumns
15
16 \stoptext
17


\ctxcommand #1 -\directlua {commands.#1}

\page_mix_routine_construct ...\else false\fi , }}
   \deadcycles
\zerocount
\page_mix_routine_continue ...ine_construct \v!no

\page_mix_routine_package ...
\page_otr_command_routine ...mix_routine_continue
   \or
\page_mix_routine_bala...
\page_otr_triggered_output_routine ...and_routine
   \fi
 ...eforeoutput \page_otr_triggered_output_routine
   \relax \the
\everyafterout...

l.14 \stopmixedcolumns

? X


Thanks again for your work on this.
We're continually reevaluating whether we can use the beta or need to
stick with the stable version. At the moment, it looks like we'll be
sticking with the stable version. But we'd like to use the beta, if the
problems can be ironed out.


fyi: i'll not patch the stable version

new beta


Lars

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




--

-
  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] a way to implement \testcolumn in mixedcolumns

2013-12-03 Thread Lars Huttar
On 11/28/2013 1:34 PM, Hans Hagen wrote:
>
> That macro was never meant for mixed columns. I made a variant that
> works ok in mixed columns which will be in the next beta.
>
> \setuptolerance[verytolerant]
>
> \starttext
>
> \startmixedcolumns
>
> \dorecurse{4}{\input ward \par}
>
> \testcolumn[10][-1pt] % 10 lines - 1pt slack
>
> \dorecurse{2}{\input ward \par}
>
> \stopmixedcolumns
>
> \stoptext

Ok. It looks like the second parameter to \testcolumn is now required
(it didn't used to be).
What does this slack value do? Does it mean that the minimum amount of
space left in the column is 10 lines minus 1pt?

Also, in the Dec. 2 beta (current version: 2013.12.02 15:22),  the
\column command now causes an error when we come to the \stopmixedcolumns.
I don't know if it's connected with the above change, or something else.

MWE: change the \testcolumn command above to \column.
I get the following error output:

! LuaTeX error
C:/context/tex/texmf-context/tex/context/base/page-mix.lua:474
: attempt to compare number with nil
stack traceback:
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:474: in function 'process_penalty'
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:572: in function 'setsplit'
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:687: in function 'setsplit'
   
C:/context/tex/texmf-context/tex/context/base/page-mix.lua
:819: in function 'mixsetsplit'
[string "\directlua "]:1: in main chunk.

system  > tex > error on line 14 in file
C:/Users/Huttar/Documents/work/tex/test-beta-testcolumn.tex:
LuaTeX error  ...

 4
 5 \startmixedcolumns
 6
 7 \dorecurse{4}{\input ward \par}
 8
 9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack
10 \column
11
12 \dorecurse{2}{\input ward \par}
13
14 >>  \stopmixedcolumns
15
16 \stoptext
17


\ctxcommand #1 -\directlua {commands.#1}
   
\page_mix_routine_construct ...\else false\fi , }}
  \deadcycles
\zerocount
\page_mix_routine_continue ...ine_construct \v!no
 
\page_mix_routine_package ...
\page_otr_command_routine ...mix_routine_continue
  \or
\page_mix_routine_bala...
\page_otr_triggered_output_routine ...and_routine
  \fi
 ...eforeoutput \page_otr_triggered_output_routine
  \relax \the
\everyafterout...
...
l.14 \stopmixedcolumns
   
? X


Thanks again for your work on this.
We're continually reevaluating whether we can use the beta or need to
stick with the stable version. At the moment, it looks like we'll be
sticking with the stable version. But we'd like to use the beta, if the
problems can be ironed out.

Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-29 Thread Hans Hagen

On 11/29/2013 12:26 PM, Lars Huttar (SIL gmail) wrote:

On 11/28/2013 1:34 PM, Hans Hagen wrote:


That macro was never meant for mixed columns. I made a variant that
works ok in mixed columns which will be in the next beta.



Excellent. I will give it a try.
I see a context-setup-win64 dated 2013-11-28 19:45. Is that beta? I may
wait for the next one anyway just to be sure... today is a holiday for us.


you can just update with the already installed first-setup script (no 
need to do a new install)


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] a way to implement \testcolumn in mixedcolumns

2013-11-29 Thread Lars Huttar (SIL gmail)
On 11/28/2013 1:34 PM, Hans Hagen wrote:
>
> That macro was never meant for mixed columns. I made a variant that
> works ok in mixed columns which will be in the next beta.
>

Excellent. I will give it a try.
I see a context-setup-win64 dated 2013-11-28 19:45. Is that beta? I may
wait for the next one anyway just to be sure... today is a holiday for us.

Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-28 Thread Hans Hagen

On 11/20/2013 10:47 PM, Lars Huttar wrote:

Hello,

On this list I've been advised that mixedcolumns is the latest and
greatest implementation of columns; the one to use. We have switched
over from columnsets to mixedcolumns, and have been very pleased with
the column balancing (for some reason we couldn't get column balancing
to work in columnsets).

However one thing we do miss from columnsets is the control over widows
& orphans in two ways: \testcolumn, and \setupcolumnsetlines.
\testcolumn[n] allowed us to do a conditional column break, so when we
were about to start a new subsection heading, we could prevent it being
an orphan at the bottom of the column; and when starting a paragraph
with a hangaround graphic framed flushright and bottom, we could
similarly use \testcolumn to prevent the graphic from hanging down into
the footer (which is what sometimes happened otherwise).

So I'm wondering, is there some way to achieve the equivalent of
\testcolumn in mixedcolumns?

Is it theoretically impossible to implement this in mixedcolumns because
the required information (how many lines are left in the current column)
is not yet known?
Or could that information be gleaned from somewhere?

I see in page-brk.mkiv the following definition for \testcolumn:

\def\testcolumn
   {\dodoubleempty\page_tests_columns_test}

\def\page_tests_columns_test[#1][#2]%
   {\endgraf
\ifdim\pagegoal<\maxdimen
  \ifdim\pagetotal<\pagegoal
\d_page_tests_test\dimexpr
  \pagegoal
 -\pagetotal
  \ifdim\lastskip<\parskip+\parskip\fi
  \ifsecondargument+#2\fi
\relax
\getrawnoflines\d_page_tests_test % (raw)
\ifnum#1>\noflines
  \column
\fi
  \else
\penalty-\plustenthousand % (untested)
  \fi
\fi}


I'm not a low-level TeX programmer, and I don't understand a lot of
this, but it looks like
   \getrawnoflines\d_page_tests_test
puts the number of remaining lines into \noflines

Any suggestions are appreciated.
(And I should have a MWE soon.)


That macro was never meant for mixed columns. I made a variant that 
works ok in mixed columns which will be in the next beta.


\setuptolerance[verytolerant]

\starttext

\startmixedcolumns

\dorecurse{4}{\input ward \par}

\testcolumn[10][-1pt] % 10 lines - 1pt slack

\dorecurse{2}{\input ward \par}

\stopmixedcolumns

\stoptext




-
  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: \getmarking with mixedcolumns

2013-11-26 Thread Lars Huttar
On 11/22/2013 4:34 PM, Hans Hagen wrote:
> On 11/21/2013 7:01 PM, Lars Huttar wrote:
>
>> I now have a MWE that shows the problem.
>> Where top and bottom work fine outside of columns, in mixedcolumns, any
>> keyword I use with \getmarking always seem to return the *last* item on
>> the page. Here's the MWE:
>
> I changed the example a bit
>
> \setupbodyfont[dejavu]
>
> \definemarking[country]
>
> \startsetups myheader
>
> (\getmarking[country][1][top]\enspace\emdash\enspace\getmarking[country][1][bottom])
>
> \hfill
>
> (\getmarking[country][2][top]\enspace\emdash\enspace\getmarking[country][2][bottom])
>
> \stopsetups
>
> \setupheadertexts
>   [\setups{myheader}][]
>   [][\setups{myheader}]
>
> \def\anothersection#1%
>   {\par
>\dontleavehmode
>\marking[country]{#1}%
>\start\bf #1 \endgraf\stop
>\quad
>test
>\par}
>
> \starttext
> \startmixedcolumns[distance=5mm, balance=yes]
> \anothersection{Brazil}
>%\anothersection{Suriname}
>%\anothersection{Uruguay}
>%\anothersection{Bolivia}
>%\anothersection{Venezuela}
> \anothersection{Peru}
> \stopmixedcolumns
> \stoptext
>
> The problem, is/was that mixed columns had not yet mark
> synchronization enabled. I uploaded a new beta.

When I use the new beta (using 2013.11.26), marking works better, with
the following caveats:

1) The column number argument is required; using
\getmarking[country][top] instead of \getmarking[country][1][top] still
returns the wrong value. This is not a problem for us, but it's
important to know, because if you leave out the column number argument,
there is no error given, and AFAIR the documentation doesn't tell you
it's required.

2) Sometimes \getmark[country][n][bottom] returns the country at the top
of column n+1 (or column 1 on the next page). In your example above,
\getmarking[country][1][bottom] shows Peru, which is in column 2,
instead of Brazil. This can be a significant problem for us, unless we
can find a way to fix it.
Did you get a different result?

> In the process I also made marks a bit more restrictive but it might
> have (yet unknown) side effects.
>
> \enabledirectives[marks.boxestoo]
>
> can be used to see the effect of this.
>

I tried this with your example above, but didn't see anything change.
Are we supposed to see some colored boxes around the marks?

Thanks again,
Lars


___
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] a way to implement \testcolumn in mixedcolumns

2013-11-26 Thread Lars Huttar
On 11/23/2013 6:49 AM, Hans Hagen wrote:
> On 11/22/2013 11:37 PM, Lars Huttar wrote:
>> On 11/22/2013 4:59 PM, Hans Hagen wrote:
>>> On 11/20/2013 11:12 PM, Lars Huttar wrote:
>>>> On 11/20/2013 4:47 PM, Lars Huttar wrote:
>>>>> However one thing we do miss from columnsets is the control over
>>>>> widows
>>>>> & orphans in two ways: \testcolumn, and \setupcolumnsetlines.
>>>>> \testcolumn[n] allowed us to do a conditional column break, so
>>>>> when we
>>>>> were about to start a new subsection heading, we could prevent it
>>>>> being
>>>>> an orphan at the bottom of the column; and when starting a paragraph
>>>>> with a hangaround graphic framed flushright and bottom, we could
>>>>> similarly use \testcolumn to prevent the graphic from hanging down
>>>>> into
>>>>> the footer (which is what sometimes happened otherwise).
>>>>>
>>>>> So I'm wondering, is there some way to achieve the equivalent of
>>>>> \testcolumn in mixedcolumns?
>>>
>>> for the moment add \penalty1
>>>
>>
>> OK... where? In the same place we used to use \testcolumn?
>
> just after the (sub)section title
>
> i need time to figure out this kind of things in the balancer

Hans, here is what I tried (MWE):

\setuppapersize[A4]

\starttext

\section{Introduction}

\startmixedcolumns[distance=5mm, balance=yes]

\dorecurse {25} {

\subsection{Subsection Heading}

\penalty1

If I had not participated fully in all these activities, literally
hundreds of improvements would never have been made, because I would
never have thought of them or perceived their importance. \endgraf

}

\stopmixedcolumns

\stoptext


As you see, I tried \penalty1 after the subsection heading.
But in the resulting PDF, on page 3, in the left column, we see a
subsection heading at the bottom of the column with nothing below it. So
something didn't work.

Am I not doing it the way you meant?


Thanks for your help,
Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-23 Thread Hans Hagen

On 11/22/2013 11:37 PM, Lars Huttar wrote:

On 11/22/2013 4:59 PM, Hans Hagen wrote:

On 11/20/2013 11:12 PM, Lars Huttar wrote:

On 11/20/2013 4:47 PM, Lars Huttar wrote:

However one thing we do miss from columnsets is the control over widows
& orphans in two ways: \testcolumn, and \setupcolumnsetlines.
\testcolumn[n] allowed us to do a conditional column break, so when we
were about to start a new subsection heading, we could prevent it being
an orphan at the bottom of the column; and when starting a paragraph
with a hangaround graphic framed flushright and bottom, we could
similarly use \testcolumn to prevent the graphic from hanging down into
the footer (which is what sometimes happened otherwise).

So I'm wondering, is there some way to achieve the equivalent of
\testcolumn in mixedcolumns?


for the moment add \penalty1



OK... where? In the same place we used to use \testcolumn?


just after the (sub)section title

i need time to figure out this kind of things in the balancer

-
  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] a way to implement \testcolumn in mixedcolumns

2013-11-22 Thread Lars Huttar
On 11/22/2013 4:59 PM, Hans Hagen wrote:
> On 11/20/2013 11:12 PM, Lars Huttar wrote:
>> On 11/20/2013 4:47 PM, Lars Huttar wrote:
>>> However one thing we do miss from columnsets is the control over widows
>>> & orphans in two ways: \testcolumn, and \setupcolumnsetlines.
>>> \testcolumn[n] allowed us to do a conditional column break, so when we
>>> were about to start a new subsection heading, we could prevent it being
>>> an orphan at the bottom of the column; and when starting a paragraph
>>> with a hangaround graphic framed flushright and bottom, we could
>>> similarly use \testcolumn to prevent the graphic from hanging down into
>>> the footer (which is what sometimes happened otherwise).
>>>
>>> So I'm wondering, is there some way to achieve the equivalent of
>>> \testcolumn in mixedcolumns?
>
> for the moment add \penalty1
>

OK... where? In the same place we used to use \testcolumn?

According to http://www.tug.org/utilities/plain/cseq.html#penalty-rp,
"If  is 10,000 or larger, TeX will never break a line or a page
there. Also, if  is -10,000 or less, it will always break a line
or a page there [97 and 110]. ... Plain TeX has \break and \nobreak
macros which are defined to be: \penalty-1 and \penalty1."

So it sounds like you're recommending the equivalent of a \nobreak. That
wouldn't make sense in the place where we want to conditionally break
the column. So I guess you're talking about using it e.g. right after
the subsection heading, since we don't want it to break right there?

If so, that sounds like it will be helpful for preventing that
particular case.

I don't think it will work for preventing external figures from hanging
down below the bottom of the column though, will it? Because for that to
work, we'd have to prevent breaks anywhere in the flowing-around
paragraph. And I don't see a way to do that.

Thanks,
Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-22 Thread Hans Hagen

On 11/20/2013 11:12 PM, Lars Huttar wrote:

On 11/20/2013 4:47 PM, Lars Huttar wrote:

However one thing we do miss from columnsets is the control over widows
& orphans in two ways: \testcolumn, and \setupcolumnsetlines.
\testcolumn[n] allowed us to do a conditional column break, so when we
were about to start a new subsection heading, we could prevent it being
an orphan at the bottom of the column; and when starting a paragraph
with a hangaround graphic framed flushright and bottom, we could
similarly use \testcolumn to prevent the graphic from hanging down into
the footer (which is what sometimes happened otherwise).

So I'm wondering, is there some way to achieve the equivalent of
\testcolumn in mixedcolumns?


for the moment add \penalty1


Here is a MWE:

\starttext


\startmixedcolumns[distance=5mm, balance=yes]

\dorecurse {20} {

\testcolumn[8]

\subsection{Subsection Heading} \input knuth \endgraf

}

\stopmixedcolumns


\stoptext


You can see that the heading for subsection 6 is an orphan at the bottom
of a column (at least, with the paper size settings I have; otherwise,
I'm sure it happens somewhere else). If \testcolumn worked, the
\testcolumn[8] would have shoved the subsection heading to the next
column, because there was not space for 8 lines left in the column at
that point.

Any thoughts on how to fix this kind of occurrence?

Thanks,
Lars

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




--

-
  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: \getmarking with mixedcolumns

2013-11-22 Thread Lars Huttar
On 11/22/2013 4:34 PM, Hans Hagen wrote:
> On 11/21/2013 7:01 PM, Lars Huttar wrote:
>
>> I now have a MWE that shows the problem.
>> Where top and bottom work fine outside of columns, in mixedcolumns, any
>> keyword I use with \getmarking always seem to return the *last* item on
>> the page. Here's the MWE:
>
> I changed the example a bit
>
> \setupbodyfont[dejavu]
>
> \definemarking[country]
>
> \startsetups myheader
>
> (\getmarking[country][1][top]\enspace\emdash\enspace\getmarking[country][1][bottom])
>
> \hfill
>
> (\getmarking[country][2][top]\enspace\emdash\enspace\getmarking[country][2][bottom])
>
> \stopsetups
>
> \setupheadertexts
>   [\setups{myheader}][]
>   [][\setups{myheader}]
>
> \def\anothersection#1%
>   {\par
>\dontleavehmode
>\marking[country]{#1}%
>\start\bf #1 \endgraf\stop
>\quad
>test
>\par}
>
> \starttext
> \startmixedcolumns[distance=5mm, balance=yes]
> \anothersection{Brazil}
>%\anothersection{Suriname}
>%\anothersection{Uruguay}
>%\anothersection{Bolivia}
>%\anothersection{Venezuela}
> \anothersection{Peru}
> \stopmixedcolumns
> \stoptext
>
> The problem, is/was that mixed columns had not yet mark
> synchronization enabled. I uploaded a new beta. In the process I also
> made marks a bit more restrictive but it might have (yet unknown) side
> effects.
>
> \enabledirectives[marks.boxestoo]
>
> can be used to see the effect of this.
>

Thanks. We will try this out.

Lars

___
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: \getmarking with mixedcolumns

2013-11-22 Thread Hans Hagen

On 11/21/2013 7:01 PM, Lars Huttar wrote:


I now have a MWE that shows the problem.
Where top and bottom work fine outside of columns, in mixedcolumns, any
keyword I use with \getmarking always seem to return the *last* item on
the page. Here's the MWE:


I changed the example a bit

\setupbodyfont[dejavu]

\definemarking[country]

\startsetups myheader

(\getmarking[country][1][top]\enspace\emdash\enspace\getmarking[country][1][bottom])
\hfill

(\getmarking[country][2][top]\enspace\emdash\enspace\getmarking[country][2][bottom])
\stopsetups

\setupheadertexts
  [\setups{myheader}][]
  [][\setups{myheader}]

\def\anothersection#1%
  {\par
   \dontleavehmode
   \marking[country]{#1}%
   \start\bf #1 \endgraf\stop
   \quad
   test
   \par}

\starttext
\startmixedcolumns[distance=5mm, balance=yes]
\anothersection{Brazil}
   %\anothersection{Suriname}
   %\anothersection{Uruguay}
   %\anothersection{Bolivia}
   %\anothersection{Venezuela}
\anothersection{Peru}
\stopmixedcolumns
\stoptext

The problem, is/was that mixed columns had not yet mark synchronization 
enabled. I uploaded a new beta. In the process I also made marks a bit 
more restrictive but it might have (yet unknown) side effects.


\enabledirectives[marks.boxestoo]

can be used to see the effect of this.

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: \getmarking with mixedcolumns

2013-11-21 Thread Lars Huttar
On 11/21/2013 1:01 PM, Lars Huttar wrote:
> I now have a MWE that shows the problem. Where top and bottom work
> fine outside of columns, in mixedcolumns, any keyword I use with
> \getmarking always seem to return the *last* item on the page. 

I sometimes forget to include our version info.
MKIV, the Context version from TeX Live 2013.

Lars

___
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: \getmarking with mixedcolumns

2013-11-21 Thread Lars Huttar
On 11/21/2013 11:40 AM, Lars Huttar wrote:
> In a thread from July
> (http://context.markmail.org/thread/6tgzusw45whaqghi), Marco Patzer
> raised some questions that we have too. They were somewhat answered, but
> I'm still not clear on what the meanings of the keywords are.
>
> On Jul 8, 2013 4:08:33 pm Hans wrote:
>> On 7/9/2013 12:30 AM, Marco Patzer wrote:
>>> / On 2013–07–08 Hans Hagen wrote:
>> />/
>> />>>/ I expect the markings on the left and right to be the same and show
>> />>>/ A–C on the first page and D–E on the second one. Looks like a bug to
>> />>>/ me.
>> />>/
>> />>/ use top and bottom
>> />/
>> />/ This works. Thanks.
>> />/
>> />>/ -- previous : last before sync
>> />>/ -- next : first after sync
>> />>/
>> />>/ -- top  : first in sync
>> />>/ -- bottom   : last in sync
>> />>/
>> />>/ -- first: first not top in sync
>> />>/ -- last : last not bottom in sync
>> />/
>> />/ That is exactly what's in the wiki (Command/getmarking). To my
>> />/ defence: The manual (chapter 12.4) is outdated, it lists:
>> />/
>> />/previous - the last of the previous page
>> />/first- the first of the actual page
>> />/last - the last of the actual page
>> />/both - first — last
>> />/all  - previous — first — last
>> />/
>> />/ I have no idea what “first not top in sync” means, in contrast to
>> />/ “first of the actual page”, which is quite clear but wrong on a
>> />/ current MkIV.
>> /
>> old tex terminology ... in mkiv i don't use the build-in-tex marks at 
>> all (too much juggling needed to get things right)
> So I'm wondering ... Hans, since the descriptions you posted are old tex
> terminology, what do previous/next/top/bottom/first/last/etc. mean in
> current terminology?
> I agree with Marco that the descriptions in the ref manual are much
> easier to understand, but appear to be wrong; and do not include top/bottom.
> I'll be happy to update the ref manual and the wiki if I can get clear
> and accurate information.
>
> We have run many examples here, including the ones on the getmarking
> wiki page, trying to understand what these keywords mean.
> top/bottom do appear to do what we need in an MWE, but are not working
> for us in the real document, and knowing the meaning of these keywords
> would be very helpful in troubleshooting the problem.
>
> Thanks,
> Lars
>
 
I now have a MWE that shows the problem.
Where top and bottom work fine outside of columns, in mixedcolumns, any
keyword I use with \getmarking always seem to return the *last* item on
the page. Here's the MWE:
\definemarking[country]


%\startsetups myheader

%F1: \getmarking[country][1][first] - L2: \getmarking[country][2][last]

%\hfill

%T1: \getmarking[country][1][top] - B2: \getmarking[country][2][bottom]

%\stopsetups


\startsetups myheader

F: \getmarking[country][first] - L: \getmarking[country][last]

\hfill

T: \getmarking[country][top] - B: \getmarking[country][bottom]

\stopsetups


\setupheadertexts[\setups{myheader}][][][\setups{myheader}]


\def\anothersection#1{

\marking[country]{#1}

{\bfb #1 \endgraf}

\dorecurse{1}{\input knuth \endgraf}

\marking[country]{#1}

}


\starttext

\startmixedcolumns[distance=5mm, balance=yes]

\anothersection{Brazil}

\anothersection{Suriname}

\anothersection{Uruguay}

\anothersection{Bolivia}

\anothersection{Venezuela}

\anothersection{Peru}

\stopmixedcolumns

\stoptext



When you run the MWE, you see that all the fields in the page header
show the same value: whatever country appears last on the page. (Or
even, depending on how you tweak the length of the country text, if the
next page starts with a new country, you'll get that new country for the
old page.)

I also tried using column numbers, in imitation of the columnsets
example on the wiki at http://wiki.contextgarden.net/Command/getmarking

\startsetups myheader

F1: \getmarking[country][1][first] - L2: \getmarking[country][2][last]

\hfill

T1: \getmarking[country][1][top] - B2: \getmarking[country][2][bottom]

\stopsetups


But this didn't appear to make any difference. Maybe it works for
columnsets but not for mixedcolumns. Does anyone know how to get correct
results for \getmarking in mixedcolumns?


Thanks,
Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-20 Thread Lars Huttar
On 11/20/2013 4:47 PM, Lars Huttar wrote:
> However one thing we do miss from columnsets is the control over widows
> & orphans in two ways: \testcolumn, and \setupcolumnsetlines.
> \testcolumn[n] allowed us to do a conditional column break, so when we
> were about to start a new subsection heading, we could prevent it being
> an orphan at the bottom of the column; and when starting a paragraph
> with a hangaround graphic framed flushright and bottom, we could
> similarly use \testcolumn to prevent the graphic from hanging down into
> the footer (which is what sometimes happened otherwise).
>
> So I'm wondering, is there some way to achieve the equivalent of
> \testcolumn in mixedcolumns?

Here is a MWE:

\starttext


\startmixedcolumns[distance=5mm, balance=yes]

\dorecurse {20} {

\testcolumn[8]

\subsection{Subsection Heading} \input knuth \endgraf

}

\stopmixedcolumns


\stoptext


You can see that the heading for subsection 6 is an orphan at the bottom
of a column (at least, with the paper size settings I have; otherwise,
I'm sure it happens somewhere else). If \testcolumn worked, the
\testcolumn[8] would have shoved the subsection heading to the next
column, because there was not space for 8 lines left in the column at
that point.

Any thoughts on how to fix this kind of occurrence?

Thanks,
Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-20 Thread Lars Huttar
Hello,

On this list I've been advised that mixedcolumns is the latest and
greatest implementation of columns; the one to use. We have switched
over from columnsets to mixedcolumns, and have been very pleased with
the column balancing (for some reason we couldn't get column balancing
to work in columnsets).

However one thing we do miss from columnsets is the control over widows
& orphans in two ways: \testcolumn, and \setupcolumnsetlines.
\testcolumn[n] allowed us to do a conditional column break, so when we
were about to start a new subsection heading, we could prevent it being
an orphan at the bottom of the column; and when starting a paragraph
with a hangaround graphic framed flushright and bottom, we could
similarly use \testcolumn to prevent the graphic from hanging down into
the footer (which is what sometimes happened otherwise).

So I'm wondering, is there some way to achieve the equivalent of
\testcolumn in mixedcolumns?

Is it theoretically impossible to implement this in mixedcolumns because
the required information (how many lines are left in the current column)
is not yet known?
Or could that information be gleaned from somewhere?

I see in page-brk.mkiv the following definition for \testcolumn:

\def\testcolumn
  {\dodoubleempty\page_tests_columns_test}

\def\page_tests_columns_test[#1][#2]%
  {\endgraf
   \ifdim\pagegoal<\maxdimen
 \ifdim\pagetotal<\pagegoal
   \d_page_tests_test\dimexpr
 \pagegoal
-\pagetotal
 \ifdim\lastskip<\parskip+\parskip\fi
 \ifsecondargument+#2\fi
   \relax
   \getrawnoflines\d_page_tests_test % (raw)
   \ifnum#1>\noflines
 \column
   \fi
 \else
   \penalty-\plustenthousand % (untested)
 \fi
   \fi}


I'm not a low-level TeX programmer, and I don't understand a lot of
this, but it looks like
  \getrawnoflines\d_page_tests_test
puts the number of remaining lines into \noflines

Any suggestions are appreciated.
(And I should have a MWE soon.)

Lars

___
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] widowpenalty in mixedcolumns

2013-11-12 Thread Joshua Krämer
Am Tue, 12 Nov 2013 19:00:52 +0100 schrieb Wolfgang Schuster:

> \stoptext You have to set the values of the offset key to 0pt to use
> only the values for distance:

Thanks, that did the trick.  However, I still wonder why \widowpenalty 
doesn't work in mixedcolumns.  This should be revised.  Maybe penalty 
keys for \setupmixedcolumns and \startmixedcolumns would be even better.

Kind regards,
Joshua Krämer

___
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] widowpenalty in mixedcolumns

2013-11-12 Thread Wolfgang Schuster


On 12. November 2013 at 18:45:55, Joshua Krämer (joshua.krae...@gmail.com) 
wrote:

Dear Wolfgang, 

thanks for your answer. Please compare: 

\starttext 

\startcolumns[distance=5pt] 
\input knuth 
\stopcolumns 

\startmixedcolumns[distance=5pt] 
\input knuth 
\stopmixedcolumns 

\stoptext
You have to set the values of the offset key to 0pt to use only the values for 
distance:

\starttext

\startcolumns[distance=5pt,offset=0pt]
\input knuth 
\stopcolumns 

\startmixedcolumns[distance=5pt]
\input knuth 
\stopmixedcolumns 

\stoptext

Wolfgang___
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] widowpenalty in mixedcolumns

2013-11-12 Thread Joshua Krämer
Dear Wolfgang,

thanks for your answer.  Please compare:

\starttext

\startcolumns[distance=5pt]
\input knuth
\stopcolumns

\startmixedcolumns[distance=5pt]
\input knuth
\stopmixedcolumns

\stoptext

___
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] widowpenalty in mixedcolumns

2013-11-12 Thread Wolfgang Schuster
On 12. November 2013 at 18:36:49, Joshua Krämer (joshua.krae...@gmail.com) 
wrote:
Dear list,

while \widowpenalty is respected in conventional columns, inside or 
outside \startmixedcolumns and \stopmixedcolumns, it is ignored. How can 
I make ConTeXt avoid widows in mixedcolumns?

(I can't use conventional columns, some things like distance=... don't 
work there.)

Thank you,
Joshua Krämer

MWE:

\starttext

\startmixedcolumns
%\startcolumns

\widowpenalty1

\dorecurse{290}{word }

\dorecurse{250}{second }

\stopmixedcolumns
%\stopcolumns

\stoptext

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



\startcolumns

\input knuth

\stopcolumns



\startcolumns[distance=4cm]

\input knuth

\stopcolumns



\stoptext

-- 
Wolfgang Schuster___
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] widowpenalty in mixedcolumns

2013-11-12 Thread Joshua Krämer
Dear list,

while \widowpenalty is respected in conventional columns, inside or 
outside \startmixedcolumns and \stopmixedcolumns, it is ignored.  How can 
I make ConTeXt avoid widows in mixedcolumns?

(I can't use conventional columns, some things like distance=... don't 
work there.)

Thank you,
Joshua Krämer

MWE:

\starttext

\startmixedcolumns
%\startcolumns

\widowpenalty1

\dorecurse{290}{word }

\dorecurse{250}{second }

\stopmixedcolumns
%\stopcolumns

\stoptext

___
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] Mixedcolumns maximum height for vertical rule: bug?

2013-09-23 Thread Thangalin
Hi,

The horizontal rule for the first page extends to the bottom of the page,
but does not do so on the second page. How do you prevent the vertical rule
from extending to the bottom of the page?

\usemodule[ipsum]
\setuplayout[
  topspace=\zeropoint,
  height=fit,
  width=fit, % Allow text to be flush with the bottom.
  %footerdistance=2cm,]
\definemixedcolumns[StyleColumns][
  frame=off,
  separator=rule,
  rulecolor=black,
  alternative=global,
  %maxheight=\textheight,]
% Set up two-column mode for the ingredients, instructions,
etc.\setuphead[section][
  after={\startStyleColumns},
  aftersection={\stopStyleColumns},]
\def\StylePageNumber#1{%
  {\inframed[
frame=off,
background=color,
backgroundcolor=red,
width=2em,
height=2em,
  ]{#1}}}
\setuppagenumbering[location=inright,command=\StylePageNumber,]
\starttext\startchapter[title=Chapter]
  \startsection[title=Section]
\input knuth \input zapf \ipsum \input knuth \input knuth \input zapf
  \stopsection\stopchapter\stoptext


For further details, see: http://tex.stackexchange.com/q/134750/2148

Kindest regards.
___
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] Limitation of mixedcolumns?

2012-07-28 Thread Zhichu Chen
The "nested mixedcolumns" does not work properly when it reaches the
bottom of the "outer mixedcolumns" here:
$ context --version

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file:
d:/ConTeXt/tex/texmf-local/tex/context/base/context.mkiv
mtx-context | current version: 2012.07.24 15:58

here is the minimal example (mostly copied from page-mix.mkiv
===
\setupbodyfont[5pt]


\starttext

\setupmixedcolumns
  [boxedcolumns]
  [n=2,
   balance=no]

\definemixedcolumns
  [nestedboxedcolumns]
  [boxedcolumns]
  [n=2,
   background=color,
   backgroundcolor=yellow,
   color=red,
   strut=yes,
   balance=yes,
   backgroundoffset=0mm]

\startboxedcolumns
%\dorecurse{10}{\input zapf \par \input ward \par} \obeydepth
\startnestedboxedcolumns
\dorecurse{15}{\input zapf\par}
\stopnestedboxedcolumns
\par \input zapf \par \obeydepth
\startnestedboxedcolumns
\input zapf
\stopnestedboxedcolumns
\par \input zapf
\stopboxedcolumns

\stoptext

-- 
Best Regards
Chen
___
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
___