ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] ask for help on balancing columnset
@ 2025-04-17 10:29 wangzhongtian
  2025-04-17 10:58 ` [NTG-context] " Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: wangzhongtian @ 2025-04-17 10:29 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 1191 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: ask for help on balancing columnset
  2025-04-17 10:29 [NTG-context] ask for help on balancing columnset wangzhongtian
@ 2025-04-17 10:58 ` Henning Hraban Ramm
  2025-04-17 14:39   ` Mikael Sundqvist
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2025-04-17 10:58 UTC (permalink / raw)
  To: ntg-context

Am 17.04.25 um 12:29 schrieb wangzhongtian:
> I have a question about the balancing of columnset.the bolow code can't 
> generate the balanced column in the last page as expected,all the text 
> is gathered in the left column of last page.

AFAIK column sets can’t be balanced, only regular old columns.

See p.10 of the columnsets manual: you can only do manual balancing.


Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: ask for help on balancing columnset
  2025-04-17 10:58 ` [NTG-context] " Henning Hraban Ramm
@ 2025-04-17 14:39   ` Mikael Sundqvist
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Sundqvist @ 2025-04-17 14:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

Hi,

with the new mechanism, it is possible with subcolumnsets. This is
still a bit experimental. I attach an example that you can play with.

/Mikael

On Thu, Apr 17, 2025 at 12:59 PM Henning Hraban Ramm <texml@fiee.net> wrote:
>
> Am 17.04.25 um 12:29 schrieb wangzhongtian:
> > I have a question about the balancing of columnset.the bolow code can't
> > generate the balanced column in the last page as expected,all the text
> > is gathered in the left column of last page.
>
> AFAIK column sets can’t be balanced, only regular old columns.
>
> See p.10 of the columnsets manual: you can only do manual balancing.
>
>
> Hraban
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

[-- Attachment #2: 250417-2.tex --]
[-- Type: application/octet-stream, Size: 2199 bytes --]


% use improved vectors
\definefontfeature
  [default]
  [default]
  [expansion=quality,
   protrusion=quality]

% this fits well the grid
\setupinterlinespace[top=height]
\setupbodyfont[pagella,9pt]

% a parpass setup
\newinteger\parpassdefaultone
\parpassdefaultone\parpassidentifier{test}

% setup parpasses
\startsetups align:pass:test
    \parpasses  5
        identifier           \parpassdefaultone
        tolerance            100
        adjustspacing          0
        emergencyfactor        0
        hyphenation            0
        mathpenaltyfactor  20000
        orphanlinefactors   4 100 250 500 1000
        toddlerpenalties    1 options 2 200 50
    next
        tolerance            200
        adjustspacing          3
        adjustspacingstep      1
        adjustspacingshrink    5
        adjustspacingstretch  10
    next
        tolerance            300
        adjustspacing          0
    next
        tolerance            200
        adjustspacing          3
        adjustspacingshrink   20
        adjustspacingstretch  40
    next
        tolerance            400
        hyphenation            1
        extrahyphenpenalty   200
        adjustspacing          3
        adjustspacingshrink   30
        adjustspacingstretch  60
        emergencystretch       1\bodyfontsize
        emergencyfactor     1000
        mathpenaltyfactor   1000
     \relax
\stopsetups

\setupalignpass[test]

% possible that these could be different
\startsetups balance:example
  \balancetopskip \strutht
  \balancebottomskip \strutdp
  \balanceemergencystretch 0pt
  \balanceemergencyshrink 0pt
  \balanceadjdemerits 0
  \balancetolerance 10
  \balancelineheight \lineheight
\stopsetups

\definecolumnset
  [example]
  [n=2,
   limit=6,
   setups=balance:example,
   align={defaultwidows,defaultclubs,defaultbroken}]

\definesubcolumnset[e] %[1,2,3,4]% default

\starttext

\startcolumnset [example]

\startsubcolumnset[e]

\dorecurse {10}{\input tufte \par}

\stopsubcolumnset

% just flushing, no balancing
\flushsubcolumnsets

\startsubcolumnset[e]

\red \dorecurse {7}{\input tufte \par}

\stopsubcolumnset

% here we do balancing
\balancesubcolumnsets

\stopcolumnset

\stoptext

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-17 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-17 10:29 [NTG-context] ask for help on balancing columnset wangzhongtian
2025-04-17 10:58 ` [NTG-context] " Henning Hraban Ramm
2025-04-17 14:39   ` Mikael Sundqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).