ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pavneet Arora <pavneet_arora@waroc.com>
To: ConTeXt Mailing list <ntg-context@ntg.nl>
Subject: Re: Orphans and widows for specific paragraph groups
Date: Fri, 17 Jun 2016 08:22:49 -0400	[thread overview]
Message-ID: <20160617122249.GD34324@lahore> (raw)
In-Reply-To: <20160609201811.GM39769@lahore>

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?

Many thanks.

On 09Jun16, Pavneet Arora wrote:
...

>>>> MWE

\definefontfamily[mainface][rm][Latin Modern Roman]
\definefontfamily[mainface][ss][Latin Modern Sans]
\definefontfamily[mainface][tt][Latin Modern Typewriter]
\definefontfamily[mainface][mm][Latin Modern Math]

\setupbodyfont[mainface,9pt]

% Set up default paragraph indenting and spacing.
\setupindenting[yes,
    medium,
    next]
\setupwhitespace[small]

% Set up paragraph environment for subject header.
\defineparagraphs 
    [subjectpar][
        n=2,
        before={\blank[2*big]}]
\setupparagraphs
    [subjectpar]
        [1]
        [width=.3\textwidth]

\starttext
    \blank[8*big, force]
    \dorecurse{10}{
        \blank[2*big]
        \noindentation
        \startsubjectpar
        {\ss\tfc ENG4U}
        \subjectpar
        %% Need to keep the following together as a unit.
        {\ss\tfc English (Grade 12)}
        \stopsubjectpar
        \noindentation
        \vskip-2em\hairline
        \setupindenting[yes,
            medium,
            next]
        \dorecurse{1}{
        \input lorem.tex
        
        }
    }
\stoptext

<<<< MWE

-- 
Pavneet Arora           m: +1 (647) 406-6843
Waroc Informatik        t: +1 (416) 937-9276
___________________________________________________________________________________
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 12:22 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 [this message]
2016-06-17 14:03   ` Wolfgang Schuster
2016-06-17 20:26     ` Aditya Mahajan

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=20160617122249.GD34324@lahore \
    --to=pavneet_arora@waroc.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).