Dear Wolfgang,
I've made an MWE. It seems that once I changed the layout, the output would be
a little strange:
* The edgefigure (default=outer) on the odd pages can't be moved to the margin.
Those on the even pages are fine as long as I use
"leftmargindistance=-\innercombitotal"
* the marginfigure (default={outermargin, hanging}) on the odd pages are fine,
but those on the even pages have a weird offset.
* by the way, the offset of the marginfigure on the even pages are the same as
the edgefigure on the even pages if I set "leftmargindistance=-\outercombitotal"
I managed to make the marginfigure work by adding (just in this case)
leftmargindistance=\dimexpr\outercombitotal-\innercombitotal\relax,
rightmargindistance=0pt
But I could never make edgefigure work. Its different behavior on odd and even
pages really bothers me.
Although the output is acceptable now, I'm still concerned that the settings
are not logical (to a human being). I'm afraid that one day it won't work out
like that.
Here's the MWE:
===
\showframe
\setuppagenumbering
[alternative=doublesided]
\definepapersize
[911]
[width=9in,
height=11in]
\setuppapersize
[911]
\setuplayout
[backspace=1in%
,leftmargin=.5in%
,leftmargindistance=0.25in%
,width=5.5in%
,rightmargindistance=0.25in%
,rightmargin=2in%
]
\definefloat
[edgefigure]
[figure]
\setupfloat
[edgefigure]
[rightmargindistance=-\outercombitotal
,leftmargindistance=-\innercombitotal
,default={outer,low,high,none}]
\definefloat
[marginfigure]
[figure]
\setupfloat
[marginfigure]
[default={outermargin,hanging,none}]
\startbuffer[fitframe]
\framed[width=\rightmarginwidth,height=.6\rightmarginwidth,framecolor=darkgreen]{\tt
width=rightmarginwidth}
\stopbuffer
\startbuffer[wideframe]
\framed[width=2\rightmarginwidth,height=.6\rightmarginwidth,framecolor=darkred]{\tt
width=2*rightmarginwidth}
\stopbuffer
\starttext
\chapter{edge}
\dorecurse{10}{
\startplaceedgefigure
\getbuffer[fitframe]
\stopplaceedgefigure
\input knuth
}
\chapter{margin}
\dorecurse{10}{
\startplacemarginfigure
\getbuffer[fitframe]
\stopplacemarginfigure
\input knuth
}
\dorecurse{10}{
\startplacemarginfigure
\getbuffer[wideframe]
\stopplacemarginfigure
\input knuth
}
\stoptext
===
--
From:Wolfgang Schuster
Sent At:2019 May 29 (Wed.) 17:55
To:陈之初 ; mailing list for ConTeXt users
Subject:Re: [NTG-context] Extend figure to margin, or extend figure from margin
to text
Zhichu schrieb am Mi., 29. Mai 2019, 10:30:
Hi everyone,
I am writing a book, in which all figures are placed in the margin. But some
graphics are too big to fit in the margin. I was wondering whether there's an
elegant way to use some room of the text body?
Take a look into the Details manual: http://www.pragma-ade.nl/show-man-15.htm
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___