2

Currently I have a following page

\useMPlibrary[dum]

\showframe
\tracingall

\starttext

% layer for the whole page 
\definelayer[picbg]  % name of the layer
            [x=0mm, y=0mm,  % from upper left corner of paper
             width=\paperwidth, height=\paperheight] 
\setlayer[picbg]
         [hoffset=\backspace,voffset=0mm]
         {\externalfigure[dummy][width=\textwidth,
             height=0.3\textheight]}
\setupbackgrounds[page][background=picbg]
         
\ \godown[0.1\textheight]

\samplefile{ward}

\startplacefloat
  [figure]
  [location={left,nonumber}]
  \startcombination
    [nx=1,
     ny=3,     
     after={\blank[2*big]}]
    {\externalfigure[cow][width=1.5in]}{}
    {\externalfigure[cow][width=1.5in]}{}
    {\externalfigure[cow][width=1.5in]}{}
  \stopcombination
\stopplacefloat

\blank[enable]

\startitemize[n]
  \startitem
    \samplefile{ward}
  \stopitem
  \startitem
    \samplefile{ward}
  \stopitem
  \startitem
    \samplefile{knuth}
  \stopitem
\stopitemize

\stoptext

Which looks like this

enter image description here

It is pretty much what I want. The problem is that I have manually added \ \godown[0.1\textheight] in order to move text down. Is there a way to position text automatically ?

Perhaps there's another way, without using layers to place an image so, that it runs into topspace?

1

1 Answer 1

3

I assume below that you can control with \page when such a page is about to appear. If so, then you might be able to use a different page layout instead of adding a layer. (If you still want to use layers, you could still use a different page layout, where the topspace and headers add up so that you automatically start where you want.)

Example code:

\useMPlibrary[dum]

\setuplayout
  [topspace=2cm,
   header=1cm,
   headerdistance=1cm,
   footer=1cm,
   footerdistance=1cm,
   bottomspace=1cm,
   height=fit]

\definelayout
  [special]
  [topspace=0pt,
   header=0pt,
   headerdistance=0pt,
   height=fit]

\showframe

\starttext

\dorecurse{3}{\samplefile{knuth}\par}

\page[yes]

\setuplayout
  [special]

\startplacefloat
  [figure]
  [location={force,nonumber}]
  \externalfigure
    [dummy]
    [width=\textwidth,
     height=0.3\textheight]
\stopplacefloat

\samplefile{ward}

\startplacefloat
  [figure]
  [location={left,nonumber}]
  \startcombination
    [nx=1,
     ny=3,
     after={\blank[2*big]}]
    {\externalfigure[cow][width=1.5in]}{}
    {\externalfigure[cow][width=1.5in]}{}
    {\externalfigure[cow][width=1.5in]}{}
  \stopcombination
  \blank[9*big]% Added to keep the "columns"
\stopplacefloat

\blank[enable]

\startitemize[n]
  \startitem
    \samplefile{ward}
  \stopitem
  \startitem
    \samplefile{ward}
  \stopitem
  \startitem
    \samplefile{knuth}
  \stopitem
\stopitemize

\page[yes]

\setuplayout[reset]

\dorecurse{3}{\samplefile{knuth}\par}

\stoptext

Output:

pages with different layouts

Even if this is not exactly what you ask for, I hope it may help.

1
  • That's great! I like setting up and resetting layout of pages. Commented Jul 11 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .