ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Figures protruding into the margin in double-sided document
@ 2007-01-23  1:44 Tim Eyre ティム
  2007-01-23 12:36 ` Hans Hagen
  2007-01-23 14:55 ` Sanjoy Mahajan
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Eyre ティム @ 2007-01-23  1:44 UTC (permalink / raw)


I am composing a double-sided document with wide outer margins to
allow space for figures. One type of figure is in-line with the text
and protrudes into the wide margin. This is easy to do on left-hand
pages by saying \setupfloats[location=right] and on right-hand pages
by saying \setupfloats[location=left].

Is there any way to automate this so that inserting a new page does
not mean I have to fix all the figures? I tried using a macro along
the lines of

\ifoff\pageno\\setupfloats[location=right]\else\\setupfloats[location=left]\fi
but the asynchronousness of output routines means that the page number
is usually wrong.

Any help much appreciated.

Tim

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Figures protruding into the margin in double-sided document
  2007-01-23  1:44 Figures protruding into the margin in double-sided document Tim Eyre ティム
@ 2007-01-23 12:36 ` Hans Hagen
  2007-01-23 14:55 ` Sanjoy Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2007-01-23 12:36 UTC (permalink / raw)


Tim Eyre ^[$B%F%#%`^[ wrote:
> I am composing a double-sided document with wide outer margins to
> allow space for figures. One type of figure is in-line with the text
> and protrudes into the wide margin. This is easy to do on left-hand
> pages by saying \setupfloats[location=right] and on right-hand pages
> by saying \setupfloats[location=left].
>
> Is there any way to automate this so that inserting a new page does
> not mean I have to fix all the figures? I tried using a macro along
> the lines of
>
> \ifoff\pageno\\setupfloats[location=right]\else\\setupfloats[location=left]\fi
> but the asynchronousness of output routines means that the page number
> is usually wrong.
>   
there are inner and outer related keys; see details.pdf

-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Figures protruding into the margin in double-sided document
  2007-01-23  1:44 Figures protruding into the margin in double-sided document Tim Eyre ティム
  2007-01-23 12:36 ` Hans Hagen
@ 2007-01-23 14:55 ` Sanjoy Mahajan
  2007-01-24  9:26   ` Tim Eyre ティム
  1 sibling, 1 reply; 4+ messages in thread
From: Sanjoy Mahajan @ 2007-01-23 14:55 UTC (permalink / raw)


> One type of figure is in-line with the text and protrudes into the
> wide margin.

I use the following with a single-sided layout, for figures in the
right part of the text, bleeding 0.5 inches into the margin (with no
captions):

\definefloat[bleedfig][figure]
\setupfloat[bleedfig][rightmargindistance=-0.5in,default={force,none}]
\def\rfig#1{\placebleedfig[right,none]{}{\externalfigure[#1]}}

I learnt this method from Hans's details.pdf manual, which also has
information on getting the same idea to work using a double-sided
layout.  I'll eventually do that.

Menwahile, to use it:

  \rfig{somefile.pdf}

  Begin a paragraph, here's some text, and more text etc.

and the paragraph will be typeset around somefile.pdf, with
somefile.pdf bleeding into the right margin.

See chapters 3 and 4 at <http://web.mit.edu/18.098/> for examples.  I
learnt how to bleed the figures between writing chapters 2 and 3, so
chapters 1 and 2 don't have the 0.5in protrusion.  The source code is
at the same location (see env.tex in it).

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Figures protruding into the margin in double-sided document
  2007-01-23 14:55 ` Sanjoy Mahajan
@ 2007-01-24  9:26   ` Tim Eyre ティム
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Eyre ティム @ 2007-01-24  9:26 UTC (permalink / raw)
  To: ntg-context

On 23/01/07, Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> wrote:
> > One type of figure is in-line with the text and protrudes into the
> > wide margin.
>
> I use the following with a single-sided layout, for figures in the
> right part of the text, bleeding 0.5 inches into the margin (with no
> captions):

Thank you Hans and Sanjoy for your help with this. I've added a note
to ContextGarden. Sanjoy, your document is very elegant and your
format has helped me to enhance my own.

Tim

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-24  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-23  1:44 Figures protruding into the margin in double-sided document Tim Eyre ティム
2007-01-23 12:36 ` Hans Hagen
2007-01-23 14:55 ` Sanjoy Mahajan
2007-01-24  9:26   ` Tim Eyre ティム

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).