ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* line break after \item, but not \stopitem
@ 2018-10-09  7:21 Damien Thiriet
  2018-10-09  8:28 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Damien Thiriet @ 2018-10-09  7:21 UTC (permalink / raw)
  To: ntg-context

Hi list,

I am designing a presentation for my pupils (some loooong exercices to
learn LibreOfficeDraw by doing). To be sure that they don't misview any
question, I decided to force a pagebreak after each first level item.

A question on TSE gave me the proper key to \setupitemize, but I am
facing an issue I didn't expect.

Given this MWE

\setuppapersize[S6]
\setupitemize[1][inbetween={\page}]

\starttext
\startitemize[n]
\startitem \input knuth 
\stopitem
\startitem \input ward 
   \startitemize[a]
      \startitem first point \stopitem
      \startitem second point \stopitem
      \stopitem    
   \stopitemize
\stoptext

I expected a page break after each 1 level \stopitem, that is after
knuth's text and "second point". However the text is breaking before
first point, that is at the beginning of level 2 startitemize, which is
AFAIK semantically part of a level 1 item.
Do you have any idea to force page break *after* "second point" and not
*before* "first point" ?

Thanks,

Damien Thiriet

___________________________________________________________________________________
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] 4+ messages in thread

* Re: line break after \item, but not \stopitem
  2018-10-09  7:21 line break after \item, but not \stopitem Damien Thiriet
@ 2018-10-09  8:28 ` Hans Hagen
  2018-10-09 17:41   ` Damien Thiriet
  2018-10-09 19:07   ` Wolfgang Schuster
  0 siblings, 2 replies; 4+ messages in thread
From: Hans Hagen @ 2018-10-09  8:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Damien Thiriet

On 10/9/2018 9:21 AM, Damien Thiriet wrote:
> Hi list,
> 
> I am designing a presentation for my pupils (some loooong exercices to
> learn LibreOfficeDraw by doing). To be sure that they don't misview any
> question, I decided to force a pagebreak after each first level item.
> 
> A question on TSE gave me the proper key to \setupitemize, but I am
> facing an issue I didn't expect.
> 
> Given this MWE
> 
> \setuppapersize[S6]
> \setupitemize[1][inbetween={\page}]
> 
> \starttext
> \startitemize[n]
> \startitem \input knuth
> \stopitem
> \startitem \input ward
>     \startitemize[a]
>        \startitem first point \stopitem
>        \startitem second point \stopitem
>        \stopitem
>     \stopitemize

     \stopitem
   \stopitemize

> \stoptext
> 
> I expected a page break after each 1 level \stopitem, that is after
> knuth's text and "second point". However the text is breaking before
> first point, that is at the beginning of level 2 startitemize, which is
> AFAIK semantically part of a level 1 item.
> Do you have any idea to force page break *after* "second point" and not
> *before* "first point" ?
inbetween is actually meant for spacing so there is logic deep down that 
put is between seccessive items depending on curcumstances .... hard to 
beat heuristics

you can do this:

\setuppapersize[S6]
\setupitemize[1][before={\page}]

\starttext

\startitemize[n]
     \startitem \input knuth \stopitem
\stopitemize

\startitemize[continue]
\startitem \input ward
    \startitemize[a]
       \startitem first point \stopitem
       \startitem second point \stopitem
       \stopitem
    \stopitemize
\stopitem
\stopitemize

\stoptext




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: line break after \item, but not \stopitem
  2018-10-09  8:28 ` Hans Hagen
@ 2018-10-09 17:41   ` Damien Thiriet
  2018-10-09 19:07   ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Damien Thiriet @ 2018-10-09 17:41 UTC (permalink / raw)
  To: ntg-context

Hans,

Thank you for your answer. 

> you can do this:
> 
> \setuppapersize[S6]
> \setupitemize[1][before={\page}]
> 
> \starttext
> 
> \startitemize[n]
>     \startitem \input knuth \stopitem
> \stopitemize
> 
> \startitemize[continue]
> \startitem \input ward
>    \startitemize[a]
>       \startitem first point \stopitem
>       \startitem second point \stopitem
>       \stopitem
>    \stopitemize
> \stopitem
> \stopitemize
> 
> \stoptext
>

Unfortunately, I have a huge amount of level
1 items, only 10% of them enclosing some level-2 itemization. I bet it 
would be easier to insert \page with a perl script after each first 
\stopitem than embedding those 90% items within an itemization (as far
as I understand). That's what I did when I converted my beamer
presentation into conTeXt ones. In this case however,   the code would be 
far less readable, since those \page will be only for screen mode.

Is there any key I could use to introduce page breaks after each level 1
\stopitem ? 

Best regards,

Damien Thiriet


___________________________________________________________________________________
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] 4+ messages in thread

* Re: line break after \item, but not \stopitem
  2018-10-09  8:28 ` Hans Hagen
  2018-10-09 17:41   ` Damien Thiriet
@ 2018-10-09 19:07   ` Wolfgang Schuster
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2018-10-09 19:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen; +Cc: Damien Thiriet



Hans Hagen schrieb am 09.10.18 um 10:28:
> inbetween is actually meant for spacing so there is logic deep down 
> that put is between seccessive items depending on curcumstances .... 
> hard to beat heuristics

Whether the second level \startitemize uses before or inbetween depends 
on the \c_strc_itemgroups_spacing_mode value which has no option to 
change it on the user level.

The simpler solution for the original problem is to use a enumeration 
for the first level items.

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] 4+ messages in thread

end of thread, other threads:[~2018-10-09 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09  7:21 line break after \item, but not \stopitem Damien Thiriet
2018-10-09  8:28 ` Hans Hagen
2018-10-09 17:41   ` Damien Thiriet
2018-10-09 19:07   ` Wolfgang Schuster

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