Re: [NTG-context] multi-page floats

2012-06-07 Thread Henning Hraban Ramm

Am 2012-06-06 um 11:52 schrieb luigi scarso:


And maybe this is what you want

errata/corrige


Thank you for your effort, I’ll test it this weekend, but I resolved  
to Wolfgang’s solution using \offset instead of backgrounds, since  
that’s much easier and enough for my needs.



Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] multi-page floats

2012-06-06 Thread luigi scarso
On Tue, Jun 5, 2012 at 8:25 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 18:17 schrieb luigi scarso:


 ! File ended while scanning use of \buff_gobble.

 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.

 Ah, it 's a side effect of the previous code



 What did you change?
Who knows... I'm always try to use the latest beta, and sometime I
make some confusion.

 I also overlooked that there is no image, i.e. layer is not visible.
True: The next one
I've a problem with the pagenumber on header, but I can use
\setupbackgrounds[page][background={foreground,bg}]

%%
\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]
\setupbackgrounds[page][background={bg}]
%\setupbackgrounds[page][background={foreground,bg}]

\def\DoublePicAt#1{
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
  \strut
  \page
}

\starttext
\startpostponing[5]
\DoublePicAt{hacker}
\stoppostponing
\startpostponing[6]
\DoublePicAt{hacker-back}
\stoppostponing


\dorecurse{30}{
  \section{Knuth \recurselevel}
  \input knuth
}

\stoptext



-- 
luigi
___
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
___


Re: [NTG-context] multi-page floats

2012-06-06 Thread luigi scarso
On Wed, Jun 6, 2012 at 9:37 AM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Jun 5, 2012 at 8:25 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 18:17 schrieb luigi scarso:


 ! File ended while scanning use of \buff_gobble.

 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.

 Ah, it 's a side effect of the previous code



 What did you change?
 Who knows... I'm always try to use the latest beta, and sometime I
 make some confusion.

 I also overlooked that there is no image, i.e. layer is not visible.
And maybe this is what you want

\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]
\setupbackgrounds[page][background={bg}]

\def\DoublePicAt#1{
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
  \strut
  \page\stoppostponing
}

\newcount\AtPageCnt

\def\PostPoneA#1#2{%
\startpostponing[#2]%
\DoublePicAt{#1}}

\def\PostPone#1#2{%
\AtPageCnt=#2
\PostPoneA{#1}{\the\AtPageCnt}\stoppostponing
\advance\AtPageCnt by 1%
\PostPoneA{#1-back}{\the\AtPageCnt}\stoppostponing
}


\starttext

\PostPone{hacker}{5}

\dorecurse{30}{
  \section{Knuth \recurselevel}
  \input knuth
}
\stoppostponing
\stoptext


-- 
luigi
___
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
___


Re: [NTG-context] multi-page floats

2012-06-06 Thread luigi scarso
On Wed, Jun 6, 2012 at 11:39 AM, luigi scarso luigi.sca...@gmail.com wrote:
 On Wed, Jun 6, 2012 at 9:37 AM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Jun 5, 2012 at 8:25 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 18:17 schrieb luigi scarso:


 ! File ended while scanning use of \buff_gobble.

 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.

 Ah, it 's a side effect of the previous code



 What did you change?
 Who knows... I'm always try to use the latest beta, and sometime I
 make some confusion.

 I also overlooked that there is no image, i.e. layer is not visible.
 And maybe this is what you want
errata/corrige
 \def\DoublePicAt#1{
      \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
      \strut
      \page\stoppostponing
 }


\def\DoublePicAt#1{
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
  \strut
  \page
}




 \newcount\AtPageCnt

 \def\PostPoneA#1#2{%
 \startpostponing[#2]%
 \DoublePicAt{#1}}

 \def\PostPone#1#2{%
 \AtPageCnt=#2
 \PostPoneA{#1}{\the\AtPageCnt}\stoppostponing
 \advance\AtPageCnt by 1%
 \PostPoneA{#1-back}{\the\AtPageCnt}\stoppostponing
 }


 \starttext

 \PostPone{hacker}{5}

 \dorecurse{30}{
      \section{Knuth \recurselevel}
      \input knuth
 }
 \stoppostponing
 \stoptext


 --
 luigi



-- 
luigi
___
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
___

Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm
Sorry for coming back again and again, but I’m still stuck, and my  
deadline is overdue.


* I need full-page pictures on defined pages in the middle of a chapter.

* I don’t care if I must define on page x or on the next right page  
after the current paragraph.


- The only way for full-page pictures (i.e. bleeding over the page)  
that I know of is layers.
- The only way to interrupt a story with full-page content that I know  
of is postponing.
(makeups were a dead end so far - maybe they can help to get to a  
right page withput using \page[right])


While each works for itself, I can’t get layers working within  
postponing.


And when that works, I need to wrap it in a macro, since I alway need  
to define and postpone three sequential pages.



Without postponing, this works:

--- *** ---
\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height= 
\dimexpr(\paperheight+6mm)]

%\definemakeup[rightpage][page=right]

\def\DoublePic#1{
%\startmakeup[rightpage] % error!
\page[right]
\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut

%\stopmakeup

	% empty back of the first picture, since it’s printed on transparent  
paper

%\startmakeup[rightpage] % error!
\page[right]

\resetlayer[bg]
	\setlayer[bg]{\externalfigure[#1-hg][height=\dimexpr(\paperheight 
+6mm)]}

\setupbackgrounds[page][background=bg]
\strut

%\stopmakeup
\page
}

\starttext

\input tufte

\DoublePic{koe}

\input knuth

\stoptext

--- *** ---

This doesn’t:

--- *** ---
\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height= 
\dimexpr(\paperheight+6mm)]


\def\DoublePicAt#1#2{
\startpostponing[#2]
\page[right] % tried also makeups...

\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut

\page[right]
\setuppagenumber[state=start]

\resetlayer[bg]
	\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight 
+6mm)]}

\setupbackgrounds[page][background=bg]
\strut
\page
\stoppostponing
}

\starttext

\DoublePicAt{hacker}{5}

\dorecurse{30}{
\section{Knuth \recurselevel}
\input knuth
}

\stoptext

--- *** ---

Can you show me a way to use layers within postponing, please?



Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 2:00 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Sorry for coming back again and again, but I’m still stuck, and my deadline
 is overdue.

 * I need full-page pictures on defined pages in the middle of a chapter.

 * I don’t care if I must define on page x or on the next right page after
 the current paragraph.

 - The only way for full-page pictures (i.e. bleeding over the page) that I
 know of is layers.
 - The only way to interrupt a story with full-page content that I know of is
 postponing.
 (makeups were a dead end so far - maybe they can help to get to a right page
 withput using \page[right])

 While each works for itself, I can’t get layers working within postponing.

 And when that works, I need to wrap it in a macro, since I alway need to
 define and postpone three sequential pages.


 Without postponing, this works:

 --- *** ---
 \setuppagenumbering[alternative=doublesided]
 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]
 %\definemakeup[rightpage][page=right]

 \def\DoublePic#1{
        %\startmakeup[rightpage] % error!
        \page[right]

        \resetlayer[bg]
        \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
        \setupbackgrounds[page][background=bg]
        \strut

        %\stopmakeup

        % empty back of the first picture, since it’s printed on transparent
 paper
        %\startmakeup[rightpage] % error!
        \page[right]


        \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-hg][height=\dimexpr(\paperheight+6mm)]}
        \setupbackgrounds[page][background=bg]
        \strut

        %\stopmakeup
        \page
 }

 \starttext

 \input tufte

 \DoublePic{koe}


 \input knuth

 \stoptext

 --- *** ---

 This doesn’t:

 --- *** ---
 \setuppagenumbering[alternative=doublesided]
 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

 \def\DoublePicAt#1#2{
        \startpostponing[#2]
        \page[right] % tried also makeups...


        \resetlayer[bg]
        \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
        \setupbackgrounds[page][background=bg]
        \strut

        \page[right]
        \setuppagenumber[state=start]

        \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

        \setupbackgrounds[page][background=bg]
        \strut
        \page
        \stoppostponing
 }

 \starttext

 \DoublePicAt{hacker}{5}


 \dorecurse{30}{
        \section{Knuth \recurselevel}
        \input knuth
 }

 \stoptext

 --- *** ---

 Can you show me a way to use layers within postponing, please?
A first step --- still quite similar to your macro. Hope it helps just for now.

\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

\def\DoublePicAt#1#2{
   %\startpostponing[#2]
   \page[right] % tried also makeups...
   \resetlayer[bg]
   \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
   \setupbackgrounds[page][background=bg]
   \strut

   \page[right]
   \setuppagenumber[state=start]

   \resetlayer[bg]
   
\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

   \setupbackgrounds[page][background=bg]
   \strut
   \page
   %\stoppostponing
}

\starttext
\startpostponing[5]
\DoublePicAt{hacker}{5}
\stoppostponing

\dorecurse{30}{
   \section{Knuth \recurselevel}
   \input knuth
}

\stoptext

-- 
luigi
___
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
___

Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
Another one



\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

\unexpanded\def\DoDoublePicAt#1{
   \page[right] % tried also makeups...
   \resetlayer[bg]
   \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
   \setupbackgrounds[page][background=bg]
   \strut

   \page[right]
   \setuppagenumber[state=start]

   \resetlayer[bg]
   
\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

   \setupbackgrounds[page][background=bg]
   \strut
   \page
}

\def\DoublePicAt#1#2{
\startpostponing[#2]
\DoDoublePicAt{#1}
\stoppostponing
}



\starttext
\DoublePicAt{hacker}{5}

\dorecurse{30}{
   \section{Knuth \recurselevel}
   \input knuth
}

\stoptext

-- 
luigi
___
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
___


Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm

Am 2012-06-05 um 14:33 schrieb luigi scarso:

Can you show me a way to use layers within postponing, please?
A first step --- still quite similar to your macro. Hope it helps  
just for now.


Thank you! Good hint to de-couple postponing and the rest.

\page[right] doesn’t work with this version, but \page\strut\page does.


Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm

Am 2012-06-05 um 14:42 schrieb luigi scarso:


Another one



\setuppagenumbering[alternative=doublesided]
\definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height= 
\dimexpr(\paperheight+6mm)]


\unexpanded\def\DoDoublePicAt#1{
  \page[right] % tried also makeups...
  \resetlayer[bg]
  \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight 
+6mm)]}

  \setupbackgrounds[page][background=bg]
  \strut

  \page[right]
  \setuppagenumber[state=start]

  \resetlayer[bg]
  \setlayer[bg]{\externalfigure[#1-back][height= 
\dimexpr(\paperheight+6mm)]}


  \setupbackgrounds[page][background=bg]
  \strut
  \page
}

\def\DoublePicAt#1#2{
\startpostponing[#2]
\DoDoublePicAt{#1}
\stoppostponing
}



\starttext
\DoublePicAt{hacker}{5}

\dorecurse{30}{
  \section{Knuth \recurselevel}
  \input knuth
}

\stoptext


Thank you again, but, did you test that? I get:

)
Runaway argument?
\dorecur\section{\ETC.r} \stoppostponing
! File ended while scanning use of \buff_gobble.

system   tex  error on line 4 in file /Users/hraban/Library/ 
texmf/tex/texmf-context/tex/context/base/cont-yes.mkiv: File ended  
while scanning use of \buff_gobble ...


 1 %D \module
 2 %D   [   file=cont-yes,
 3 %Dversion=2012.06.01,
 4   %D  title=\CONTEXT\ Miscellaneous Macros,
 5 %D   subtitle=Startup Stub,
 6 %D author=Hans Hagen,
 7 %D   date=\currentdate,
 8 %D  copyright={PRAGMA ADE \ \CONTEXT\ Development Team}]
 9 %C
10 %C This module is part of the \CONTEXT\ macro||package and is
11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12 %C details.
13
14 % At some point I will reconsider the \starttext .. \stoptext

inserted text
\par
l.4 }

}   context.finishjob()

\luat_start_lua_code_indeed ...ua \zerocount {#1}}

l.70 \stopluacode

?


Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 6:01 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 14:42 schrieb luigi scarso:


 Another one


 \setuppagenumbering[alternative=doublesided]

 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

 \unexpanded\def\DoDoublePicAt#1{
      \page[right] % tried also makeups...
      \resetlayer[bg]
      \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
      \setupbackgrounds[page][background=bg]
      \strut

      \page[right]
      \setuppagenumber[state=start]

      \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

      \setupbackgrounds[page][background=bg]
      \strut
      \page
 }

 \def\DoublePicAt#1#2{
 \startpostponing[#2]
 \DoDoublePicAt{#1}
 \stoppostponing
 }



 \starttext
 \DoublePicAt{hacker}{5}

 \dorecurse{30}{
      \section{Knuth \recurselevel}
      \input knuth
 }

 \stoptext


 Thank you again, but, did you test that? I get:

 )
 Runaway argument?
 \dorecur\section{\ETC.r} \stoppostponing

 ! File ended while scanning use of \buff_gobble.
Uhm I've tested but maybe I've made a wrong cut and paste.
Re-check now.
-- 
luigi
___
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
___

Re: [NTG-context] multi-page floats

2012-06-05 Thread luigi scarso
On Tue, Jun 5, 2012 at 6:08 PM, luigi scarso luigi.sca...@gmail.com wrote:
 On Tue, Jun 5, 2012 at 6:01 PM, Henning Hraban Ramm hra...@fiee.net wrote:
 Am 2012-06-05 um 14:42 schrieb luigi scarso:


 Another one


 \setuppagenumbering[alternative=doublesided]

 \definelayer[bg][x=0mm,y=-3mm,width=\dimexpr(\paperwidth+3mm),height=\dimexpr(\paperheight+6mm)]

 \unexpanded\def\DoDoublePicAt#1{
      \page[right] % tried also makeups...
      \resetlayer[bg]
      \setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
      \setupbackgrounds[page][background=bg]
      \strut

      \page[right]
      \setuppagenumber[state=start]

      \resetlayer[bg]

  \setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}

      \setupbackgrounds[page][background=bg]
      \strut
      \page
 }

 \def\DoublePicAt#1#2{
 \startpostponing[#2]
 \DoDoublePicAt{#1}
 \stoppostponing
 }



 \starttext
 \DoublePicAt{hacker}{5}

 \dorecurse{30}{
      \section{Knuth \recurselevel}
      \input knuth
 }

 \stoptext


 Thank you again, but, did you test that? I get:

 )
 Runaway argument?
 \dorecur\section{\ETC.r} \stoppostponing

 ! File ended while scanning use of \buff_gobble.
 Uhm I've tested but maybe I've made a wrong cut and paste.
 Re-check now.
Ah, it 's a side effect of the previous code


-- 
luigi
___
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
___

Re: [NTG-context] multi-page floats

2012-06-05 Thread Wolfgang Schuster

Am 05.06.2012 um 14:00 schrieb Henning Hraban Ramm:

 Sorry for coming back again and again, but I’m still stuck, and my deadline 
 is overdue.
 
 * I need full-page pictures on defined pages in the middle of a chapter.
 
 * I don’t care if I must define on page x or on the next right page after 
 the current paragraph.
 
 - The only way for full-page pictures (i.e. bleeding over the page) that I 
 know of is layers.
 - The only way to interrupt a story with full-page content that I know of is 
 postponing.
 (makeups were a dead end so far - maybe they can help to get to a right page 
 withput using \page[right])
 
 While each works for itself, I can’t get layers working within postponing.
 
 And when that works, I need to wrap it in a macro, since I alway need to 
 define and postpone three sequential pages.

\starttext

\dorecurse{3}{\input tufte\par}

\startpostponing
\offset
  [x=-\the\dimexpr\backspace+1cm\relax,
   y=-\the\dimexpr\topspace+\headerheight+\headerdistance+1cm\relax]
  
{\externalfigure[mill][width=\the\dimexpr\paperwidth+2cm\relax,height=\the\dimexpr\paperheight+2cm\relax]}
\page
\stoppostponing

\dorecurse{5}{\input tufte\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
___


Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm

Am 2012-06-05 um 18:17 schrieb luigi scarso:


! File ended while scanning use of \buff_gobble.

Uhm I've tested but maybe I've made a wrong cut and paste.
Re-check now.

Ah, it 's a side effect of the previous code



What did you change?
I also overlooked that there is no image, i.e. layer is not visible.

Greetlings,
Hraban
___
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
___


Re: [NTG-context] multi-page floats

2012-06-05 Thread Henning Hraban Ramm

Am 2012-06-05 um 19:55 schrieb Wolfgang Schuster:

Sorry for coming back again and again, but I’m still stuck, and my  
deadline is overdue.


* I need full-page pictures on defined pages in the middle of a  
chapter.


* I don’t care if I must define on page x or on the next right  
page after the current paragraph.


- The only way for full-page pictures (i.e. bleeding over the page)  
that I know of is layers.
- The only way to interrupt a story with full-page content that I  
know of is postponing.
(makeups were a dead end so far - maybe they can help to get to a  
right page withput using \page[right])


While each works for itself, I can’t get layers working within  
postponing.


And when that works, I need to wrap it in a macro, since I alway  
need to define and postpone three sequential pages.


\starttext

\dorecurse{3}{\input tufte\par}

\startpostponing
\offset
 [x=-\the\dimexpr\backspace+1cm\relax,
  y=-\the\dimexpr\topspace+\headerheight+\headerdistance+1cm\relax]
 {\externalfigure[mill][width=\the\dimexpr\paperwidth+2cm 
\relax,height=\the\dimexpr\paperheight+2cm\relax]}

\page
\stoppostponing

\dorecurse{5}{\input tufte\par}

\stoptext


Great, I didn’t know \offset (or I forgot)!
This way it’s much easier!
Thank you very much!

Of course, the \offset stuff works in a macro, but not postponing. But  
I can live with three lines of code per insertion.


Greetlings,
Hraban
___
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
___


Re: [NTG-context] multi-page floats

2012-06-04 Thread Henning Hraban Ramm

Am 2012-05-31 um 23:48 schrieb Hans Hagen:


On 31-5-2012 20:25, Henning Hraban Ramm wrote:
Ok, some days later I'm still not where I'd like to be (and my  
deadline

is overdue).
Let’s resume:

A running text is to be interrupted by spans of 3 pages.
Postponing (\startpostponing) works well for that, but I need to  
switch

off page numbering on two of that 3 pages - as far as I tried,
\setuppagenumbering as well as \setuppagenumber doesn’t work within
postponed sections.

Further, these pages contain full-page pictures, i.e. I need them
bleeding off the paper.
Normally, \setlayer works well for that, but I couldn’t get layers
working within postponed sections.

Since I need these interruptions several times in a very similar  
way, I
\def’ed that postponing stuff as a macro, but get errors that point  
to

expanding problems (I never get those).

I’d appreciate some pointers in which direction I should
think/investigate further.
E.g.
- are there alternatives to postponing? perhaps multi-page floats  
(but

at defined pages)?
- is there a possibility for bleeding full-page pictures without  
layers?
- can it work at all to change page numbering within a postponed  
page span?


maybe

\startmakeup[page]
   page a
\stopmakeup



Good hint. I setup:

\definemakeup[rightpage][page=right]
\definemakeup[leftpage][page=left]

and get empty right/left pages from within my macro.

Can I control if the content after a markup starts on a right or left  
page?



Further, if I try to use postponing in a macro, I get errors:

--- *** ---
Runaway argument?
\dorecur\section{K\ETC. \stoppostponing
! File ended while scanning use of \buff_gobble.

system   tex  error on line 0 in file : File ended while  
scanning use of \buff_gobble ...


empty file

inserted text
\par
* ./postpone
   \stoptext
--- *** ---

I guess I need to unexpand something?

My example:

--- *** ---

\def\TestPostpone#1{
\startpostponing[#1]
\strut
\page
\stoppostponing
}

\starttext

\TestPostpone{3}

\dorecurse{30}{
\section{Knuth \recurselevel}
\input knuth
}

\stoptext

--- *** ---


Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] multi-page floats

2012-05-31 Thread Henning Hraban Ramm
Ok, some days later I'm still not where I'd like to be (and my  
deadline is overdue).

Let’s resume:

A running text is to be interrupted by spans of 3 pages.
Postponing (\startpostponing) works well for that, but I need to  
switch off page numbering on two of that 3 pages - as far as I tried,  
\setuppagenumbering as well as \setuppagenumber doesn’t work within  
postponed sections.


Further, these pages contain full-page pictures, i.e. I need them  
bleeding off the paper.
Normally, \setlayer works well for that, but I couldn’t get layers  
working within postponed sections.


Since I need these interruptions several times in a very similar way,  
I \def’ed that postponing stuff as a macro, but get errors that point  
to expanding problems (I never get those).


I’d appreciate some pointers in which direction I should think/ 
investigate further.

E.g.
- are there alternatives to postponing? perhaps multi-page floats (but  
at defined pages)?

- is there a possibility for bleeding full-page pictures without layers?
- can it work at all to change page numbering within a postponed page  
span?



Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] multi-page floats

2012-05-31 Thread Hans Hagen

On 31-5-2012 20:25, Henning Hraban Ramm wrote:

Ok, some days later I'm still not where I'd like to be (and my deadline
is overdue).
Let’s resume:

A running text is to be interrupted by spans of 3 pages.
Postponing (\startpostponing) works well for that, but I need to switch
off page numbering on two of that 3 pages - as far as I tried,
\setuppagenumbering as well as \setuppagenumber doesn’t work within
postponed sections.

Further, these pages contain full-page pictures, i.e. I need them
bleeding off the paper.
Normally, \setlayer works well for that, but I couldn’t get layers
working within postponed sections.

Since I need these interruptions several times in a very similar way, I
\def’ed that postponing stuff as a macro, but get errors that point to
expanding problems (I never get those).

I’d appreciate some pointers in which direction I should
think/investigate further.
E.g.
- are there alternatives to postponing? perhaps multi-page floats (but
at defined pages)?
- is there a possibility for bleeding full-page pictures without layers?
- can it work at all to change page numbering within a postponed page span?


maybe

\starttext

page 1

\page

\startmakeup[page]
page a
\stopmakeup

\startmakeup[page]
page b
\stopmakeup

\startmakeup[page]
page d
\stopmakeup

page 2

\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] multi-page floats

2012-05-28 Thread Hans Hagen

On 27-5-2012 16:06, Henning Hraban Ramm wrote:

Hi again,
in my current book project there are sets of full-page graphics, where
there’s first a drawing, to be printed on transparent paper, followed by
a water colour picture as background, i.e. a series of

right page: foreground graphic
right page: background graphic

The transparent pages are left out in pagination.
Between chapters (i.e. stories), the following macro does what I want:

\def\DoublePic#1{
\page[right] % foreground picture on transparent paper

\setuppagenumbering[state=stop]\setuppagenumber[state=stop]\par
\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1-fore][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut\par % page needs some content

\page[right] % background picture on normal paper

\setuppagenumber[state=start]\par
\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1-back][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut\par

\page
\setuppagenumbering[state=start]
}


Now, the publisher would like to move the picture pages in the middle of
the stories, i.e. I need them to float here without manual page breaking.
How can I achieve that?

I’d also appreciate enhancements to my macro above.

(MkIV latest beta on OSX Intel.)

Thank you very much in advance!


\startpostponing

might help (you can add [pagenumber] or [+pagenumber] if needed)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] multi-page floats

2012-05-28 Thread Henning Hraban Ramm

Am 2012-05-28 um 19:27 schrieb Hans Hagen:


\startpostponing

might help (you can add [pagenumber] or [+pagenumber] if needed)


Oh, of course, Philipp Gesang recently reminded me.
I would like to use \startpostponing[right], but fixed pages are ok.


This works:

\starttext

\startpostponing[3]
\section{Tufte}
\input tufte
\strut

\page
\strut

\page

\section{More Tufte}
\input tufte

\page
\stoppostponing

\dorecurse{30}{
\section{Knuth \recurselevel}
\input knuth
}

\stoptext


But if I try to put graphics in layers within the postponing, I get  
empty pages.
Further, if I put that postponing stuff into a macro (see below), I  
get errors about \par ending the buffer. I guess I’d need some  
unexpanding, but where?
Without \def, I get 2 (instead of 3) empty pages, but with page  
numbers. I need to switch off the pagenumbering for the first two  
pages (because it’s a transparent page that doesn’t count); it’s  
probably also a problem fixed-page postponing...


\def\DoublePicAt#1#2{
\startpostponing[#2]
\setuppagenumbering[state=stop]\setuppagenumber[state=stop]

\resetlayer[bg]
\setlayer[bg]{\externalfigure[#1][height=\dimexpr(\paperheight+6mm)]}
\setupbackgrounds[page][background=bg]
\strut

\page %[right] doesn’t work
\strut

\page

\setuppagenumber[state=start]

\resetlayer[bg]
	\setlayer[bg]{\externalfigure[#1-hg][height=\dimexpr(\paperheight 
+6mm)]}

\setupbackgrounds[page][background=bg]
\strut

\page
\setuppagenumbering[state=start]
\stoppostponing
}

Thanks in advance!

Greetlings, Hraban

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