ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: paragraph standing out of the normal layout comsuming the margin
Date: Fri, 25 Jun 2021 13:44:32 +0200	[thread overview]
Message-ID: <89c204c3-bade-ba81-1596-5072a7fb4ef2@gmail.com> (raw)
In-Reply-To: <d14a771c-96d5-349b-798a-ce1266d7cc96@mailbox.org>

Jan U. Hasecke schrieb am 25.06.2021 um 13:19:
> Dear all,
> 
> the mwe shows my try to define a paragraph that stand out like this:
> 
> 
> On right pages
> 
> xxxxxxx
> xxxxxxx
>     xxxxxx
>     xxxxxx
> xxxxxxx
> xxxxxxx
> 
> 
> On left pages
> 
>    xxxxxxx
>    xxxxxxx
> xxxxxx
> xxxxxx
>    xxxxxxx
>    xxxxxxx
> 
> 
> My try with setups does not work. The textcolor is restored but not the 
> layout. Can I reset to the standard layout with an \after command?


You can't change to a different layout in the middle of a page.

What you're looking for is the narrower environment where you can
change the margins in the left and right side.


\startsetups [userdata:shiftblock]
     \signalrightpage
     \doifelserightpage {
         \startnarrower[2*left,-2*right]
         \getuserdata
         \stopnarrower
     } {
         \startnarrower[-2*left,2*right]
         \getuserdata
         \stopnarrower
     }
\stopsetups

\defineuserdataalternative
     [shiftblock]
     [renderingsetup=userdata:shiftblock]

\defineuserdata
     [shiftblock]
     [before=\blank,
      after=\blank,
      alternative=shiftblock]

\setuppagenumbering
     [alternative=doublesided]

\starttext

\startbuffer
     \dorecurse{2}{\input knuth\par}
     \startuserdata[shiftblock]
     \input ward
     \stopuserdata
     \dorecurse{2}{\input zapf\par}
\stopbuffer

\dorecurse{10}{\getbuffer}

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2021-06-25 11:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 11:19 Jan U. Hasecke
2021-06-25 11:44 ` Wolfgang Schuster [this message]
2021-06-29  8:04   ` Jan U. Hasecke

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=89c204c3-bade-ba81-1596-5072a7fb4ef2@gmail.com \
    --to=wolfgang.schuster.lists@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).