ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] How to force section title to be on same page as some of the content?
       [not found] <571061543.5120902.1730578264690.ref@mail.yahoo.com>
@ 2024-11-02 20:11 ` Joel via ntg-context
  2024-11-02 22:58   ` [NTG-context] " Henning Hraban Ramm
  0 siblings, 1 reply; 4+ messages in thread
From: Joel via ntg-context @ 2024-11-02 20:11 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 2844 bytes --]

\define[9]\event{%      \staged{#9}      \startsubsection[title={\recurselevel.\getvalue{activitynumber}~~~#9}, reference={activity_\activitynumber_\recurselevel}]%      \activitytype{#9}%      #2%      \doifsomething{#4}{%                \FrameTitle{\strut \bf Suggested Materials}%                  \StartFrame%                        \startitemize[columns,two,2]%                              #4% student's materials%                        \stopitemize%                  \StopFrame%      }%      \doifsomething{#6}{%            {\boldface #6}% student's directions%      }%      \doifsomething{#7}{%            #7 % student's task%      }%      \doifsomething{#8}{%            %\color[white]{...}%            \FrameTitle{\strut \bf Requirements}%                  \StartFrame%                        \startitemize[9]%                                    #8 % requirements%                        \stopitemize%                  \StopFrame%      }%      \stopsubsection%}%
I have a macro above. Basically it quite simply is used to define a classroom activity for students to do. Each classroom activity contains:   
   - A subsection title.
   - A list of recommended materials (like scissors, glue).
   - Instructions directed at the student.
   - Where student write their answers.
   - A list of requirements, how it will be graded.
In testing, I found students are ALWAYS very confused by page breaks:
If the assignment title, supplies, and instructions appear on one page, but the area they write/body is on the next page, split there by a page break, the students think the activity is missing. They cannot find the activity.
So basically, I need to make it such that items 1, 2, and 3 must appear with at least the start of 4, even if its just the first problem in 10, and even if this means leaving a blank area on the page in front of it.
How can I be so precise making sure the page break doesn't seperate the title from the start of the area where students write their answers?
Adding page breaks before every activity isn't a good solution, it wastes paper.
--Joel

[-- Attachment #1.2: Type: text/html, Size: 8576 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] 4+ messages in thread

* [NTG-context] Re: How to force section title to be on same page as some of the content?
  2024-11-02 20:11 ` [NTG-context] How to force section title to be on same page as some of the content? Joel via ntg-context
@ 2024-11-02 22:58   ` Henning Hraban Ramm
  2024-11-03  6:53     ` Denis Maier via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm @ 2024-11-02 22:58 UTC (permalink / raw)
  To: ntg-context

Am 02.11.24 um 21:11 schrieb Joel via ntg-context:
> How can I be so precise making sure the page break doesn't seperate the 
> title from the start of the area where students write their answers?

To force keep something together, you can use a \framed or a \vbox.

With a bit less force, use \testpage[<number of lines>], as in 
\setuphead[…][after={\testpage[5]}] to insert a page break if there are 
less than ~4 lines left on the page (you always need a bigger number 
than you think).

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

* [NTG-context] Re: How to force section title to be on same page as some of the content?
  2024-11-02 22:58   ` [NTG-context] " Henning Hraban Ramm
@ 2024-11-03  6:53     ` Denis Maier via ntg-context
  2024-11-03  9:02       ` Henning Hraban Ramm
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Maier via ntg-context @ 2024-11-03  6:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Denis Maier

[-- Attachment #1: Type: text/html, Size: 2533 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] 4+ messages in thread

* [NTG-context] Re: How to force section title to be on same page as some of the content?
  2024-11-03  6:53     ` Denis Maier via ntg-context
@ 2024-11-03  9:02       ` Henning Hraban Ramm
  0 siblings, 0 replies; 4+ messages in thread
From: Henning Hraban Ramm @ 2024-11-03  9:02 UTC (permalink / raw)
  To: ntg-context

Am 03.11.24 um 07:53 schrieb Denis Maier via ntg-context:
> Should that be be before={\testpage[5]} instead of after=?

before, sorry

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

end of thread, other threads:[~2024-11-03  9:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <571061543.5120902.1730578264690.ref@mail.yahoo.com>
2024-11-02 20:11 ` [NTG-context] How to force section title to be on same page as some of the content? Joel via ntg-context
2024-11-02 22:58   ` [NTG-context] " Henning Hraban Ramm
2024-11-03  6:53     ` Denis Maier via ntg-context
2024-11-03  9:02       ` 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).