margintext and placefigure
![](https://secure.gravatar.com/avatar/27c1c71e7f33a726d8482564897867c6.jpg?s=120&d=mm&r=g)
Dear all. I am having some trouble with figure placement in the margin. If you use the following code, please try to comment out first one and then both '\input knuth'. Somehow, the figure is not placed in the margin, but the center of the page, if a page breaks occurs close by. Is there a way to avoid that and have the figure always placed in the margin? Thanks, Andy -- code starts --- \useMPlibrary[dum] % To get dummy figures \definepapersize[wissenschaft][width=170mm, height=240mm] \setuppapersize [wissenschaft] \setuplayout[topspace=40pt, header=0pt, headerdistance=0pt, height=560pt, footer=0pt, % backspace=42pt, leftmargin=0pt, width=280pt, rightmargindistance=20pt, rightmargin=100pt] \setupmargindata [margintext] [location=outer, width=100pt, stack=continue] \starttext % \chapter{One} \input tufte \input knuth \input knuth \section{Figures} % \margintext {\startplacefigure[ title={A small rectangle put in the margin.}] \externalfigure[dummy] \stopplacefigure} \input tufte \stoptext -- code ends --- background: I started working on my module (caesar) again, since the ipad is supposed to render mathml now. That means, I could try the context epub output with formulas on an actual device (cp. http://support.apple.com/kb/HT5321)
![](https://secure.gravatar.com/avatar/27c1c71e7f33a726d8482564897867c6.jpg?s=120&d=mm&r=g)
That was my first choice as well. But it does not play nice with margintext. Try putting \margintext{bla} directly after the chapter. stack=continue is somehow ignored. Also, the figure is moved all the way up, which is strange. On Nov 11, 2012, at 8:52 PM, Marco Patzer wrote:
2012-11-11 Andy Thomas:
Is there a way to avoid that and have the figure always placed in the margin?
\startplacefigure [title=Foo, location=margin] \stopplacefigure
Marco
___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/d39338246f50cca667c8256c313d7cfd.jpg?s=120&d=mm&r=g)
2012-11-11 Andy Thomas:
That was my first choice as well. But it does not play nice with margintext.
The both use two different mechanisms AFAIK, and there's no or not much communication between them. Mixing both leads to overprinted content.
Also, the figure is moved all the way up, which is strange.
That's intended. The margin texts stack up from the top to the bottom. For figures this usually does makes sense since the figures are referred to by number anyway. Marco
![](https://secure.gravatar.com/avatar/27c1c71e7f33a726d8482564897867c6.jpg?s=120&d=mm&r=g)
On Nov 11, 2012, at 9:23 PM, Marco Patzer wrote:
2012-11-11 Andy Thomas:
That was my first choice as well. But it does not play nice with margintext.
The both use two different mechanisms AFAIK, and there's no or not much communication between them. Mixing both leads to overprinted content.
So, can I modify the original code to work as intended?
Also, the figure is moved all the way up, which is strange.
That's intended. The margin texts stack up from the top to the bottom. For figures this usually does makes sense since the figures are referred to by number anyway.
That would even be preferred, if all marginals stack from the top down (http://archive.contextgarden.net/message/20120529.093731.5306286a.en.html) Andy
participants (2)
-
Andy Thomas
-
Marco Patzer