Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What is the correct way of placing floats that span the text width and the margin?

If the width of the float content is increased, ConTeXt does not reserve space in the margin which leads to overlapping content. At the moment I adjust the vertical placement manually using \godown, but that can't be the right way.

\startplacefigure [location=margin]
  \godown [7cm]
  \externalfigure [dummy] [width=\marginwidth]
\stopplacefigure

Here the example code.

\useMPlibrary [dum]

\setupfloat
  [figure]
  [location=inner]

\showframe
\starttext

\startplacefigure
  \externalfigure [dummy]
    [height=4cm,
     width=\dimexpr\textwidth+\rightmargintotal\relax]
\stopplacefigure

\startplacefigure [location=margin]
  \externalfigure [dummy] [width=\marginwidth]
\stopplacefigure

\stoptext

result

share|improve this question
    
(untested) have you tried adding the bleed option to the big figure. See the details manual fod example. –  Aditya Nov 19 '12 at 13:32
    
Do you mean the \bleed[…]{…} command? AFAIK this reserves the same bounding box as the original figure but scales it or prints it at a different spot. –  Marco Nov 20 '12 at 9:15

1 Answer 1

Here is another work around: place an extra margin figure containing a rule of the height of the first figure. Of coures you have to remember to not give the new figure a number.

\useMPlibrary [dum]

\setupfloat
  [figure]
  [location=inner]

\showframe
\starttext

\startplacefigure
  \externalfigure [example-image-a]
    [height=4cm,
     width=\dimexpr\textwidth+\rightmargintotal\relax]
\stopplacefigure

\startplacefigure [location=margin,number=none]
  \vrule height 4cm width 0pt
\stopplacefigure

\startplacefigure [location=margin]
  \externalfigure [example-image-b] [width=\marginwidth]
\stopplacefigure

\stoptext

Sample output

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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