ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* paragraph standing out of the normal layout comsuming the margin
@ 2021-06-25 11:19 Jan U. Hasecke
  2021-06-25 11:44 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Jan U. Hasecke @ 2021-06-25 11:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

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?

Any hints?
juh

[-- Attachment #2: paragraphexample.tex --]
[-- Type: text/x-tex, Size: 510 bytes --]

\setuplayout
  [
      cutspace=12em,
      leftmargin=2em,
      width=middle,
      backspace=8em,
      rightmargin=24em
    ]


\startsetups[paragraph:hinweis]
  \setuplayout
    [
      cutspace=2em,
      leftmargin=24em,
      backspace=8em,
      rightmargin=2em
    ]
  
\stopsetups

\defineparagraph[hinweis] [paragraph] []
\setupparagraph[hinweis] [color=red,setups=paragraph:hinweis]
\showframe
\starttext
\input knuth

\startparagraph[hinweis]
\input lorem
\stopparagraph

\input knuth

\stoptext

[-- Attachment #3: 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: paragraph standing out of the normal layout comsuming the margin
  2021-06-25 11:19 paragraph standing out of the normal layout comsuming the margin Jan U. Hasecke
@ 2021-06-25 11:44 ` Wolfgang Schuster
  2021-06-29  8:04   ` Jan U. Hasecke
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2021-06-25 11:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: paragraph standing out of the normal layout comsuming the margin
  2021-06-25 11:44 ` Wolfgang Schuster
@ 2021-06-29  8:04   ` Jan U. Hasecke
  0 siblings, 0 replies; 3+ messages in thread
From: Jan U. Hasecke @ 2021-06-29  8:04 UTC (permalink / raw)
  To: ntg-context

Hi Wolfgang,

I am late as I was busy elsewhere, but thanks a lot for your help.

Am 25.06.21 um 13:44 schrieb Wolfgang Schuster:

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

I'll try to adapt this into my project. Thanks a lot.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-29  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 11:19 paragraph standing out of the normal layout comsuming the margin Jan U. Hasecke
2021-06-25 11:44 ` Wolfgang Schuster
2021-06-29  8:04   ` Jan U. Hasecke

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).