ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Deactivating Grid-Setting for a single paragraph
Date: Tue, 30 Apr 2013 08:49:52 +0200	[thread overview]
Message-ID: <D348EA86-32EC-40AB-BBE8-2431044D6983@gmail.com> (raw)
In-Reply-To: <517BB8CA.1010701@mmnetz.de>


Am 27.04.2013 um 13:38 schrieb H. Özoguz <h.oezoguz@mmnetz.de>:

> Hi there, speaking code:
> 
> \setuplayout[grid=yes]
> \showgrid
> \starttext
> {This is a line without a big-sized font.\\
> And this one has it: {\tfa THÜS}.}
> \blank
> 
> Perfectly I good disable gridsetting for a complete paragraph. I can do so by “placeongrid”. But then another problem arises; if the paragraph is (without placeongrid) half at the end of a page, and half at the beginning of the next page, than WITH placeongrid the page-break of the paragraph is impossible, so the complete paragraph is set on the next page – resulting in many blank lines on the first page, at the buttom, of course. I tried to disable gridsetting for one paragraph only by “setuplayout” (“off”, and after the paragraph “on” again), but that does not work, too, see here:\blank
> 
> {\setuplayout[grid=no]
> This is a line without a big-sized font.\\
> And this one has it: {\tfa THÜS}.
> \setuplayout[grid=yes]}
> \blank
> 
> So no effect again. My last try was to change “setupinterlinespace” before the paragraph, and change it back to default after the paragraph, but that does not work, too:\blank
> 
> {\setupinterlinespace[line=4ex]
> This is a line without a big-sized font.\\
> And this one has it: {\tfa THÜS}.
> \setupinterlinespace[line=2.8ex] }
> \blank
> 
> But that does not work, too. How to make this work, disabling grid-set for a paragraph? Perfectly like “placeongrid”, but with the possibility to break it into to pages:\blank
> 
> \placeongrid[top]{
> This is a line without a big-sized font.\\
> And this one has it: {\tfa THÜS}.}
> \blank
> 
> The problem comes here from setting arabic words into the german text, for arabic I have to use a bigger font, and so the problem simulated here arises.

When you use the grid you have to restrict yourself and use fixed values for the interlinespace. The correction of the whitespace after the increased linespace can be calculated and compensated by half lines in the \blank command.

\setuplayout[grid=yes]

\setupinterlinespace[line=14pt]

\showgrid

\starttext

\dorecurse{3}{\input knuth\par}

\blank[line]
%\blank[2*line]

\start \setupinterlinespace[line=21pt]

\input knuth\par

\stop

\ifodd\cldcontext{math.round(\number\pagetotal/\number\dimexpr21pt\relax)}
  \blank[line,halfline]
\else
  \blank[line]
\fi

\dorecurse{2}{\input knuth\par}

\stoptext

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


  reply	other threads:[~2013-04-30  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-27 11:38 "H. Özoguz"
2013-04-30  6:49 ` Wolfgang Schuster [this message]
2013-04-29  5:24 "H. Özoguz"
     [not found] <mailman.3.1367316001.15575.ntg-context@ntg.nl>
2013-04-30 10:17 ` "H. Özoguz"

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=D348EA86-32EC-40AB-BBE8-2431044D6983@gmail.com \
    --to=schuster.wolfgang@gmail.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).