3

After reading a lot of the manuals, docs and wiki articles provided by the ConteXt developers, I still have no clue how to achieve this. I want to set up a newsletter title page. On the top it contains a graphic as title. Next follows a framed box on the left, and next to this box is a two-column article. Underneath the framed box is a small picture, and the two-column article an empty space.

[ Title Graphic ]
[Framed][ 2-col ]
[ Box  ][ umn a ]
[      ][ rticle]
        [       ]
[Pic]

With LaTeX I would use two minipages for the framed box and the article and just place the picture. \hfill and \vfill would do some adjustments.

Thanks for your help.

2

Sure, but with ConTeXt you could do the same. In fact, the first example is just a sum of my mistakes, before I realized, that a TABLE can be used to accomplish what you want.

\def\framedbox#1#2
{\hbox to 2em\bgroup
\setupframed[height=10cm,width=3cm,framed=off]
\framed[width=2cm,align=left]{#1}
\egroup} 

\setupcolumns[n=2,]
\starttext
\title{\hfil A test}
\framedbox{}
\vskip -4in 
\hskip 2.5cm{\lbox to 2.5cm{
        \bTABLE
        \setupTABLE[,2,3][frame=off, distance=4pt,align=vfil]
\bTR \bTD \input zapf \eTD \eTR 
    \bTD \input zapf \par \input linden \eTD \eTR 
    \bTD \input tufte \eTD \eTR
\eTABLE
}} 
\stoptext

And here is the almost-complete example. Just change some of the values accordingly please.

\setuplayout[width=130mm,]

\def\framedbox#1#2
{\hbox to 1em\bgroup
\setupframed[height=10cm,width=4cm,framed=off]
\framed[width=4cm,align=left]{#1}
\egroup}

\setuppagenumbering[state=stop]
\setupcolumns[n=2,]
\starttext
\title{\hfil \externalfigure[http://tug.org/images/logobw.jpg][width=6cm]}
\framedbox{}
\vskip -4in 
\hskip 4.5cm{\rbox to 0.5cm{
        \bTABLE
        \setupTABLE[1,2][frame=off, distance=4pt,align=vfil]
\bTR \bTD \input zapf \eTD \eTR 
    \bTD \input tufte \eTD \eTR
\eTABLE


\externalfigure[context_logo.jpg]
}} 
\stoptext

enter image description here

Second edit

What I had in mind, was to have a TABLEhead and TABLEfoot, respectively. Not this, really, since the former would eliminate the need to specify a setup for said footer, earlier in the document.

\showframe
\starttext 

\setuplayout[footer=\textwidth]
\setuphead[chapter][header=none]
\setupfooter[chapter][]
\setupfootertexts[][{\dorecurse{8}{\framed{\externalfigure[context_logo.jpg]}}}]
\title{\dorecurse{1}{\externalfigure[mill.png][width=\textwidth,height=7cm]}}
{\lbox to 0.5cm{
        \bTABLE
        \setupTABLE[2,3][frame=off, distance=4pt,align=vfil,option=stretch] 
        \bTR \bTD \dorecurse{8}{\externalfigure[context_logo.jpg]\par} \eTD \eTR
        \bTD \dorecurse{1}{\input zapf }\eTD \eTR 
    \bTD \dorecurse{1}{\input linden }\eTD \eTR
\eTABLE
}


\framed{\dorecurse{8}{\externalfigure[context_logo.jpg]\par}
}

\input cervantes-es

\externalfigure[mill.png]
\stoptext

enter image description here enter image description here

  • Thanks, why did you use the TABLE and not simplecolumns or a columnset? After posting my question, I also stumbled the layers concept in the serial letter manual, when I was actually interested in XML. Why didn't you make use of it? – Singulaere Entitaet May 4 '15 at 15:20
  • @SingulaereEntitaet good point, but isn't columnset a work in progress? Without checking, and if memory serves me right, there's an outstanding question about it, still in the unanswered queue. In the question, I think, a width of same value was requested by the op. I played with it but gave up. And I'm unsure the layers would have the clean approach as a table does. The latter, is my opinion, of course. If you were to ask me, I'm definitely biased. But who wouldn't be, when in our ol' friend LaTeX, only one package supports this remote possibility that with ConTeXt is accomplished easily. – doed May 5 '15 at 11:44
3

If you are willing to mark up the title page separately, here is one possibility. I change the margins of the first page, and set the frames and picture as layers.

% To visualize the page areas
% Needs to be placed on the top, because it resets the page backgrounds
\showframe

% Layout for regular pages
\setuplayout
  [
    topspace=1cm,
    backspace=1.5cm, 
    leftmargin=1cm,
    width=middle,
    height=middle,
    bottomspace=1cm,
    header=2\lineheight,
    headerdistance=2\lineheight,
    footer=2\lineheight,
  ]

\definemeasure[marginspace][0.4\paperwidth]
\definemeasure[marginwidth][0.35\paperwidth]

% Different layout for the title page:
\definelayout
  [1]
  [
    topspace=6\lineheight,
    header=\zeropoint,
    backspace=\measure{marginspace},
    leftmargin=\measure{marginwidth},
    cutspace=1.5cm,
    rightmargin=1cm,
  ]


\definelayer[titlelayer]
\definelayer[marginlayer]
\definelayer[footerlayer]

\setupbackgrounds[text][leftmargin][background=marginlayer]
\setupbackgrounds[footer][leftmargin][background=footerlayer]
\setupbackgrounds[text][background=titlelayer]


% Dummy text and figures
\usemodule[visual]
\useMPlibrary[dum]


% To make it easier to show the output on TeX.SX
\setuppapersize[A4][A3,landscape]
\setuparranging[2SIDE]


\starttext

\setlayer[marginlayer]
    {\externalfigure[marginimage]
                    [width=\measure{marginwidth}, height=12\lineheight]}

\setlayer[footerlayer]
    {\externalfigure[footerimage]
                    [width=\measure{marginwidth}, height=2\lineheight]}

\setlayer[titlelayer]
         [
           x=-\dimexpr(\measure{marginwidth}+\leftmargindistance)\relax,
           y=-4\lineheight,
         ] 
    {\externalfigure[titleimage]
                    [
                      width=\dimexpr(\measure{marginwidth}+\leftmargindistance+\textwidth)\relax, 
                      height=3\lineheight,
                    ]}

\startsimplecolumns
  \dorecurse{3}{\fakewords{120}{120}\par}
\stopsimplecolumns

\page

\dorecurse{5}{\fakewords{120}{120}\par}

\stoptext

This is how the two page spread looks like.

enter image description here

  • Looking good @Aditya. Do you caluculate/guesstimate the positions by hand, or do you use any another method to plan the layout, e.g. a kind of wireframe model, which shows the measurements? – Singulaere Entitaet May 7 '15 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.