ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Pavneet Arora <pavneet_arora@waroc.com>
Subject: Re: Orphans and widows for specific paragraph groups
Date: Fri, 17 Jun 2016 16:26:28 -0400 (EDT)	[thread overview]
Message-ID: <alpine.OSX.2.02.1606171624390.96507@nqv-znpobbx> (raw)
In-Reply-To: <5764033F.3010406@gmail.com>

On Fri, 17 Jun 2016, Wolfgang Schuster wrote:

>> Pavneet Arora <mailto:pavneet_arora@waroc.com>
>> 17. Juni 2016 um 14:22
>> I tried to use Aditya's suggestion (which was for Natural Tables) to
>> keep paragraphs on the same page:
>> 
>> \noindent{\blank[samepage]}
>> 
>> but I don't seem to have much success with the MWE I posted earlier.
>> 
>> Try as a might, I cannot seem to keep the paragraph head "{\ss\tfc
>> English (Grade 12)}" and the hairline together. I can, however, keep
>> the hairline and the following lorem text together, but I need all three
>> elements to float as a group: the paragraph header, hairline, and
>> paragraph body.
>> 
>> Would anyone have any suggestions on how to accomplish this?
> You can put everything in a framedtext to keep it together.

Or, just put everything in a TABLE (that does not split, by default):

\setupbodyfont[9pt]
\setupindenting[yes,medium,next]
\setupwhitespace[small]

\startsetups subjects
   \setupTABLE[frame=off, align={normal,hyphenated}]
   \setupTABLE[column][1][width=0.3\textwidth]
   \setupTABLE[column][2][width=0.7\textwidth]
   \setupTABLE[row][1][style=\ssc, bottomframe=on, toffset={2\bigskipamount}]
\stopsetups

\starttext

\blank[8*big, force]

\dorecurse{10}
   {\startTABLE[setups=subjects]}]
      \NC ENG4U \NC English (Grade 12) \NC\NR
      \NC[nc=2] \input{lorem.tex}      \NC\NR
    \stopTABLE}

\stoptext

Aditya
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2016-06-17 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 20:18 Pavneet Arora
2016-06-17 12:22 ` Pavneet Arora
2016-06-17 14:03   ` Wolfgang Schuster
2016-06-17 20:26     ` Aditya Mahajan [this message]

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=alpine.OSX.2.02.1606171624390.96507@nqv-znpobbx \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    --cc=pavneet_arora@waroc.com \
    /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).