ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mike Cooper <mike@murchisondrillingschools.com>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: keeping content chunks on same page
Date: Mon, 24 Aug 2020 22:14:34 +0000	[thread overview]
Message-ID: <SN6PR11MB2576FA4B3861050935FFFE8CBD560@SN6PR11MB2576.namprd11.prod.outlook.com> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 3880 bytes --]

Just about to have these homework files finished!

My final problem (I hope) is keeping question/answer blocks together.

The questions are currently defined via \defineenumeration with a \testpage (see below).  I fiddled with the \testpage and found that \testpage[6] gave me the best results but there are still some question/answer blocks that get split across pages.  The content chunks can be as small as a single line question with T/F answer options, or as large as seven lines for the question and seven for the answer options (although I don't think both of these occur together).

In my searching for solutions, I thought I'd found something helpful with \startframed but I can't figure any way to combine the framed and enumeration...

Anyway, here's some code.  It doesn't demonstrate the page-break problem but gives an idea of the different possible sizes of question/answer chunks.

\defineenumeration[question]
   [text=,
    headstyle=normal,
    right=.,
    alternative=left,
    distance=1em,
    width=fit,
    before={\testpage[6]\blank[2em]},
    after={\blank}
]

\defineitemgroup[achoices]
   [option={packed,a,broad},
    left=(, right=), stopper=]

\starttext
\startquestion Before a joint of pipe is laid down, the thread protector should be installed.
            \startachoices
            \startitem True \stopitem
            \startitem False \stopitem
            \stopachoices
\stopquestion

\startquestion The hardest part of the drilling program for young drilling engineers to plan is the section on hole stability because they have not had much hole problem exposure and have not been told that this particular shale is a "twenty-day shale". The most likely reason for the breakdown in communications is:
            \startachoices
            \startitem Inadequate case history data and poorly completed field records and NO trend charts \stopitem
            \startitem Mud company representatives are only calling on drilling superintendents and managers \stopitem
            \startitem Drilling engineers cannot read "between the lines" on morning reports and therefore miss the point many times. \stopitem
            \startitem Too few hours to do adequate offset well record check \stopitem
            \stopachoices
\stopquestion

\startquestion If the toolpusher noted the following trend while RIH with drill pipe, what should he instruct the driller to do?
\setuptabulate[header=none]
\starttabulate[|c|c|c|]
\NC Stands \NC Increments required vs. actual \NC Trend \NC \NR
\NC 0-5 \NC 3.57 vs. 3.57 \NC ~0 \NC \NR
\NC 6-10\NC 3.57 vs. 2.57 \NC -1 \NC \NR
\NC 11-15\NC 3.57 vs. 1.57 \NC -2 \NC \NR
\stoptabulate
            \startachoices
            \startitem Continue to RIH to the casing shoe and observe the well \stopitem
            \startitem Stop and break circulation every 12 stands \stopitem
            \startitem Slow down because it looks like we are losing mud to the formation \stopitem
            \startitem RIH quickly because it looks like the hole is trying to flow \stopitem
            \stopachoices
\stopquestion

\stoptext


THANKS FOR YOUR HELP!


Mike Cooper
Technical Trainer
Murchison Drilling Schools, Inc.
2501 Juan Tabo NE
Albuquerque, NM 87112
Tel: (505) 293-6271
Fax: (505) 298-5294
Email: mike@murchisondrillingschools.com<mailto:mike@murchisondrillingschools.com>
Website: www.murchisondrillingschools.com<http://www.murchisondrillingschools.com/>
[cid:image007.jpg@01D03ADC.BD6E6850]<https://www.facebook.com/pages/Murchison-Drilling-Schools/158018484232622>  [cid:image008.jpg@01D03ADC.BD6E6850] <http://www.linkedin.com/company/murchison-drilling-schools-inc->   [cid:image009.jpg@01D03ADC.BD6E6850] <https://twitter.com/trainingmds>
Murchison Drilling Schools is now part of
[cid:image001.png@01D63515.857FD120]


[-- Attachment #1.1.2: Type: text/html, Size: 49996 bytes --]

[-- Attachment #1.2: image001.jpg --]
[-- Type: image/jpeg, Size: 812 bytes --]

[-- Attachment #1.3: image002.jpg --]
[-- Type: image/jpeg, Size: 951 bytes --]

[-- Attachment #1.4: image003.jpg --]
[-- Type: image/jpeg, Size: 937 bytes --]

[-- Attachment #1.5: image004.png --]
[-- Type: image/png, Size: 9100 bytes --]

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

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

                 reply	other threads:[~2020-08-24 22:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR11MB2576FA4B3861050935FFFE8CBD560@SN6PR11MB2576.namprd11.prod.outlook.com \
    --to=mike@murchisondrillingschools.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).