5

I want to put some text in the outer margin (by which I mean on the left side of the page of even pages and on the right side of odd pages) of the page. My naive approach of using \inoutermargin{Text} fails when I use it with columns. Then the text is printed in the outer margin of the first column. Can somebody point me into the right direction?

I am using ConTeXt ver: 2012.05.30 11:26 MKIV

\starttext

\setuppagenumbering[alternative=doublesided]

\startcolumns
\inoutermargin{More text}
\input knuth
\stopcolumns

\page[yes]

\startcolumns
\inoutermargin{Text}
\input knuth
\stopcolumns

\stoptext
1
  • I deleted my answer. I always count the margin to be the second column. So in a sense you want two text plus one margin column?
    – Andy
    Aug 15, 2012 at 7:08

1 Answer 1

4

Looking at the mailing list, it seems that \inoutermargin is deprecated in ConTeXt MkIV (that said, I see exactly the same issue in MkII). Taking that plus the ConTeXt wiki page on \inoutermargin, it seems that you want \inmargin to place material on the left or \inother to place it on the right:

\setuppagenumbering[alternative=doublesided]

\starttext

\startcolumns
\inmargin{Text}
\input knuth
\inother{More text}
\stopcolumns

\hairline

\inother{Text}
\input knuth

\stoptext

Further testing suggests to me that the requested behaviour is not so easy to achieve. If you look at typo-mar.mkiv, you will find the definitions

% text

\definemargindata [inleft]     [\v!left ]    [\c!margin=\v!margin,\c!width=\leftmarginwidth ,\c!align=\v!flushright]
\definemargindata [inright]    [\v!right]    [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]
\definemargindata [inouter]    [\v!outer]    [\c!margin=\v!margin,\c!width=\outermarginwidth,\c!align=\v!inner]
\definemargindata [ininner]    [\v!inner]    [\c!margin=\v!margin,\c!width=\innermarginwidth,\c!align=\v!outer]

% no longer auto auto-other

\definemargindata [inmargin]   [\v!left]     [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright]
\definemargindata [inother]    [\v!right]    [\c!margin=\v!margin,\c!width=\rightmarginwidth,\c!align=\v!flushleft]

\definemargindata [margintext] [\v!left]     [\c!margin=\v!margin,\c!width=\leftmarginwidth, \c!align=\v!flushright,\c!stack=\v!yes]

Thus you might be led to try

\setuppagenumbering[alternative=doublesided]

\starttext

\startcolumns
\inouter{Text}
\input knuth
\inouter{More text}
\stopcolumns

\hairline

\inouter{Text}
\input knuth

\stoptext

which does indeed place material in the outer margin (there is \ininner for the inner margin). However, this does not seem to account for the presence of multiple columns, i.e it is in the 'margin' of the column not the page.

In typo-mar.lua, line 434 (in the realign) function suggests the margintext's box is moved by hsize:

            if location == v_left then
                move_x = (reference.x or 0) - (blob.x or 0)
            elseif location == v_right then
                move_x = (reference.x or 0) - (blob.x or 0) + (reference.w or 0) - hsize
            else

The hsize is as wide as the column one is currently in, and the variable columns is defined once and used never in the file. So that, too, suggests columns are not taken into account.

0

You must log in to answer this question.

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