ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* margintext and placefigure
@ 2012-11-11 19:15 Andy Thomas
  2012-11-11 19:52 ` Marco Patzer
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Thomas @ 2012-11-11 19:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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)
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: margintext and placefigure
  2012-11-11 19:15 margintext and placefigure Andy Thomas
@ 2012-11-11 19:52 ` Marco Patzer
  2012-11-11 20:05   ` Andy Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2012-11-11 19:52 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


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

* Re: margintext and placefigure
  2012-11-11 19:52 ` Marco Patzer
@ 2012-11-11 20:05   ` Andy Thomas
  2012-11-11 20:23     ` Marco Patzer
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Thomas @ 2012-11-11 20:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: margintext and placefigure
  2012-11-11 20:05   ` Andy Thomas
@ 2012-11-11 20:23     ` Marco Patzer
  2012-11-11 21:10       ` Andy Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2012-11-11 20:23 UTC (permalink / raw)
  To: ntg-context

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

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: margintext and placefigure
  2012-11-11 20:23     ` Marco Patzer
@ 2012-11-11 21:10       ` Andy Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Thomas @ 2012-11-11 21:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2012-11-11 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11 19:15 margintext and placefigure Andy Thomas
2012-11-11 19:52 ` Marco Patzer
2012-11-11 20:05   ` Andy Thomas
2012-11-11 20:23     ` Marco Patzer
2012-11-11 21:10       ` Andy Thomas

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).