ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* columnset issues
@ 2020-01-19 22:38 Henning Hraban Ramm
  2020-01-19 22:40 ` Henning Hraban Ramm
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Henning Hraban Ramm @ 2020-01-19 22:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi again.

I use columnsets and wanted to setup my section titles to have one blank line before and none after them.
If I use before={\blank[line]}, I sometimes don’t get that blank line.
If I use \blank in my section command, I get it always, but also if the section starts on top of a column.
How can I reliably get one blank line before a section title, but not on the top of a column?

That’s the original problem.

The MWE also shows:
– There’s irregular space at the top of columns, esp. on the first page.
– Sometimes the multi-line section title is moved into the previous paragraph.
These issues get fixed with grid=yes.

The original problem is also fixed in the MWE if I enable grid mode, there are just sometimes two blank lines instead of one. In my actual project I get one or zero lines. Couldn’t reproduce that in a MWE.


\usemodule[visual]
\setuppapersize[A5]
\showframe[text]
\definecolor[fakerulecolor][gray]

%\setuplayout[grid=yes]
%\showgrid

\define[2]\MySection{\vbox{%
\definecolor[fakerulecolor][blue]
%\blank[line,max]%
{\strut #2}\par
}}

\setuphead[section][
  command=\MySection,
  before={\blank[line]},
  %before=,
  after=,
  style=\tf,
]

\definecolumnset[Two][n=2]

\starttext
%
\startcolumnset[Two]
\dorecurse{10}{
\section{\fakewords{3}{15}}
\fakewords{10}{50}\par
\fakewords{10}{50}\par
\fakewords{10}{50}\par
}
\stopcolumnset

\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
___________________________________________________________________________________

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

* Re: columnset issues
  2020-01-19 22:38 columnset issues Henning Hraban Ramm
@ 2020-01-19 22:40 ` Henning Hraban Ramm
  2020-01-20  6:54 ` another columnset issue (solved) Henning Hraban Ramm
  2020-01-26 12:07 ` columnset issues Henning Hraban Ramm
  2 siblings, 0 replies; 7+ messages in thread
From: Henning Hraban Ramm @ 2020-01-19 22:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 2020-01-19 um 23:38 schrieb Henning Hraban Ramm <texml@fiee.net>:
> – Sometimes the multi-line section title is moved into the previous paragraph.
> These issues get fixed with grid=yes.

BTW: If you use grid=strut, the section title is always moved up into the previous paragraph, i.e. it’s always handled like one line.

HR
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: another columnset issue (solved)
  2020-01-19 22:38 columnset issues Henning Hraban Ramm
  2020-01-19 22:40 ` Henning Hraban Ramm
@ 2020-01-20  6:54 ` Henning Hraban Ramm
  2020-01-26 12:07 ` columnset issues Henning Hraban Ramm
  2 siblings, 0 replies; 7+ messages in thread
From: Henning Hraban Ramm @ 2020-01-20  6:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi again,

I had the problem that my chapters always started on a left page, even if I just had page=yes.
I found out I had to set page=no in my columnset as well as in \setuphead[chapter].
Seems like either the columnset or the columnsetspan always starts a new page.
While testing I didn’t get a new page reliably, but I can’t reproduce it anymore.
So, this works so far.

I’m starting a new columnset for every chapter because I have chapters with 1-3 columns,
the example is a simplification.

HR

\usemodule[visual]
\setuppapersize[A5]
\showframe[text]
\definecolor[fakerulecolor][gray]
\setuplayout[
  grid=yes,
]
\showgrid

\setuphead[chapter][
  page=no,
  beforesection={\startcolumnset[Two]},
  aftersection={\stopcolumnset},
  before={\startcolumnsetspan[TwoSpan]},
  after={\stopcolumnsetspan},
]

\definecolumnset[Two][
  n=2,
  page=no,
]
\definecolumnsetspan[TwoSpan][n=2]

\starttext
\dorecurse{3}{

\startchapter{\fakewords{2}{5}}

\dorecurse{3}{
\section{\fakewords{3}{10}}
\fakewords{10}{50}\par
\fakewords{10}{50}\par
}
\stopchapter
}

\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
___________________________________________________________________________________

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

* Re: columnset issues
  2020-01-19 22:38 columnset issues Henning Hraban Ramm
  2020-01-19 22:40 ` Henning Hraban Ramm
  2020-01-20  6:54 ` another columnset issue (solved) Henning Hraban Ramm
@ 2020-01-26 12:07 ` Henning Hraban Ramm
  2020-01-27  9:31   ` Henning Hraban Ramm
  2 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2020-01-26 12:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Another set of columnset issues: columnset areas

(1)
In the columnsets manual, there’s a type key or a second optional parameter to \definecolumnsetarea that’s actually missing (commented code in page-cst.mkiv).

The manual doesn’t explain the setup keys; I assume x/nx is in columns, y/ny is in lines, while x/y is the start and nx/ny the size.

(2)
Since float placement doesn’t work like I need it (must make another MWE to better nail it), I thought I’d try columnset areas for the placement of ads:


\usemodule[visual]
\useMPlibrary[dum]
\definecolor[fakerulecolor][gray]
\setuplayout[
  grid=yes,
]
\showframe[text]
\showgrid

\definecolumnset[Two][
  n=2,
  page=no,
]

\definecolumnsetarea[AdSpace][
  x=1,y=20,
  nx=1,ny=20,
  state=stop
]


\starttext
\startcolumnset[Two]

\fakewords{20}{30}

\setupcolumnsetareatext[AdSpace]{\externalfigure[MyAd][width=\textwidth,height=0.45\textheight]}
\setupcolumnsetarea[AdSpace][state=start]

\fakewords{200}{200}

\stopcolumnset

\stoptext


The "AdSpace" should cover the lower left quarter of the page, y=20 should start it in line 20, and ny=20 should make it 20 lines high, right?

But "MyAd" appears always at the place where I put \setupcolumnsetareatext.

Is this an error on my side, or is the code just incomplete/buggy/not ready?



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

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

* Re: columnset issues
  2020-01-26 12:07 ` columnset issues Henning Hraban Ramm
@ 2020-01-27  9:31   ` Henning Hraban Ramm
  2020-01-27 19:28     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Henning Hraban Ramm @ 2020-01-27  9:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 2020-01-26 um 13:07 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> I thought I’d try columnset areas for the placement of ads:

This MWE shows better what’s going on:
The "area" space is reserved as requested, but its contents get placed elsewhere.


\usemodule[visual]
\useMPlibrary[dum]
\definecolor[fakerulecolor][gray]
\setuplayout[
  grid=yes,
]
\showframe[text]
\showgrid

\definecolumnset[Two][
  n=2,
  page=no,
]
%\definecolumnsetspan[TwoSpan][n=2]
\definecolumnsetarea[AdSpace][
  x=1,y=21,
  nx=1,ny=21,
  state=stop,
  frame=on,
  framecolor=magenta,
]


\starttext
\startcolumnset[Two]

\dorecurse{10}{\fakewords{100}{120}\par}

\setupcolumnsetarea[AdSpace][state=start]
\setupcolumnsetareatext[AdSpace]{\externalfigure[MyAd][width=\textwidth,height=0.45\textheight]}

\fakewords{200}{200}

\stopcolumnset

\stoptext



HR
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: columnset issues
  2020-01-27  9:31   ` Henning Hraban Ramm
@ 2020-01-27 19:28     ` Wolfgang Schuster
  2020-01-27 22:22       ` Henning Hraban Ramm
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2020-01-27 19:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 27.01.2020 um 10:31:
>> Am 2020-01-26 um 13:07 schrieb Henning Hraban Ramm <texml@fiee.net>:
>>
>> I thought I’d try columnset areas for the placement of ads:
> This MWE shows better what’s going on:
> The "area" space is reserved as requested, but its contents get placed elsewhere.
>
>
> \usemodule[visual]
> \useMPlibrary[dum]
> \definecolor[fakerulecolor][gray]
> \setuplayout[
>    grid=yes,
> ]
> \showframe[text]
> \showgrid
>
> \definecolumnset[Two][
>    n=2,
>    page=no,
> ]
> %\definecolumnsetspan[TwoSpan][n=2]
> \definecolumnsetarea[AdSpace][
>    x=1,y=21,
>    nx=1,ny=21,
>    state=stop,
>    frame=on,
>    framecolor=magenta,
> ]
>
>
> \starttext
> \startcolumnset[Two]
>
> \dorecurse{10}{\fakewords{100}{120}\par}
>
> \setupcolumnsetarea[AdSpace][state=start]
> \setupcolumnsetareatext[AdSpace]{\externalfigure[MyAd][width=\textwidth,height=0.45\textheight]}

You need brackets for both argument, i.e. 
\setupcolumnsetareatext[...][...] but even then your example only works 
when I place the areatext before \startcolumnset.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: columnset issues
  2020-01-27 19:28     ` Wolfgang Schuster
@ 2020-01-27 22:22       ` Henning Hraban Ramm
  0 siblings, 0 replies; 7+ messages in thread
From: Henning Hraban Ramm @ 2020-01-27 22:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 2020-01-27 um 20:28 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Henning Hraban Ramm schrieb am 27.01.2020 um 10:31:
>>> Am 2020-01-26 um 13:07 schrieb Henning Hraban Ramm <texml@fiee.net>:
>>> 
>>> I thought I’d try columnset areas for the placement of ads:
>> This MWE shows better what’s going on:
>> The "area" space is reserved as requested, but its contents get placed elsewhere.
>> 
>> 
>> \usemodule[visual]
>> \useMPlibrary[dum]
>> \definecolor[fakerulecolor][gray]
>> \setuplayout[
>>   grid=yes,
>> ]
>> \showframe[text]
>> \showgrid
>> 
>> \definecolumnset[Two][
>>   n=2,
>>   page=no,
>> ]
>> %\definecolumnsetspan[TwoSpan][n=2]
>> \definecolumnsetarea[AdSpace][
>>   x=1,y=21,
>>   nx=1,ny=21,
>>   state=stop,
>>   frame=on,
>>   framecolor=magenta,
>> ]
>> 
>> 
>> \starttext
>> \startcolumnset[Two]
>> 
>> \dorecurse{10}{\fakewords{100}{120}\par}
>> 
>> \setupcolumnsetarea[AdSpace][state=start]
>> \setupcolumnsetareatext[AdSpace]{\externalfigure[MyAd][width=\textwidth,height=0.45\textheight]}
> 
> You need brackets for both argument, i.e. \setupcolumnsetareatext[...][...] but even then your example only works when I place the areatext before \startcolumnset.

Ah, thank you!
But even if I put the commands before \startcolumnset, the "AdSpace" appears on the second page. While this was the intention of the example, it seems like I can’t control on which page my ads/images appear.

In my actual project, all the defined columnsetareas show up on the second page (where the first columnset starts), even though all have state=stop, and never show up again where I set state=start.

I wanted to use it like

\define[2]\Anzeige{%
  \setupcolumnsetareatext[ad#1][{\externalfigure[#2][width=\overlaywidth]}]
  \setupcolumnsetarea[ad#1][state=start]
}

I also tried to just reserve the space with columnsetareas and place the ads with \setlayer; that would work if I could control the placement of the areas...

Since I must complete this project within this week, I already started from scratch in my layout program (switched from my old InDesign to Affinity Publisher – much cheaper but even less fun). Seems like I overestimated ConTeXt’s (and my) readiness for this kind of layout. A pity.


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

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

end of thread, other threads:[~2020-01-27 22:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-19 22:38 columnset issues Henning Hraban Ramm
2020-01-19 22:40 ` Henning Hraban Ramm
2020-01-20  6:54 ` another columnset issue (solved) Henning Hraban Ramm
2020-01-26 12:07 ` columnset issues Henning Hraban Ramm
2020-01-27  9:31   ` Henning Hraban Ramm
2020-01-27 19:28     ` Wolfgang Schuster
2020-01-27 22:22       ` Henning Hraban Ramm

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).