Re: [NTG-context] columnset issues

2020-01-27 Thread Henning Hraban Ramm

> Am 2020-01-27 um 20:28 schrieb Wolfgang Schuster 
> :
> 
> Henning Hraban Ramm schrieb am 27.01.2020 um 10:31:
>>> Am 2020-01-26 um 13:07 schrieb Henning Hraban Ramm :
>>> 
>>> 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
___


Re: [NTG-context] columnset issues

2020-01-27 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 27.01.2020 um 10:31:

Am 2020-01-26 um 13:07 schrieb Henning Hraban Ramm :

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
___


Re: [NTG-context] columnset issues

2020-01-27 Thread Henning Hraban Ramm

> Am 2020-01-26 um 13:07 schrieb Henning Hraban Ramm :
> 
> 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
___


Re: [NTG-context] columnset issues

2020-01-26 Thread Henning Hraban Ramm
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
___


Re: [NTG-context] columnset issues

2020-01-19 Thread Henning Hraban Ramm

> Am 2020-01-19 um 23:38 schrieb Henning Hraban Ramm :
> – 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
___


[NTG-context] columnset issues

2020-01-19 Thread Henning Hraban Ramm
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
___