[NTG-context] images and text stacked in the margin

2012-11-12 Thread Andy Thomas
Dear list,

I am still struggling to achieve the page layout/look that I am trying to get. 
For an image of the desired page spread please look here: 
https://dl.dropbox.com/u/9089117/tufte-spread.png

The design is using the ample margin to place text (sidenotes), figures 
(images) and tables in the margin. I am unable to get both (images and text) to 
work properly. 


(1) put all in a \margintext
\margintext{...} for text
\margintext{\placefigure...} for external images

This option does not work if the position is close to a page break (cp. 
http://archive.contextgarden.net/message/2012.191529.3fbef120.en.html)


(2) use two different macros
\margintext{...} for text and
\placefigure[location=margin]{}{...} for external images 

This option does not work because they are placed on top of each other. I also 
tried \startplacefigure, but also no luck.


(3) put all in a \placefigure
\placefigure[margin,none]{}{Text Text} for text
\placefigure[margin,none]{}{...} for external images

This works best, because it starts from the top and nicely stacks the 
marginals. But it introduces a paragraph break where the sidenote is called. 
This does not work, it defeats the purpose (imagine a paragraph after every 
footnote).


(4) use (3) and postponing
\startpostponing [+1]%
\startplacefigure[location={margin,none}]%
Text text\stopplacefigure%
\stoppostponing%

Now, the paragraph break is gone, but the sidenote is on the next page, which 
does not make sense in our case (cp. 
http://tex.stackexchange.com/questions/56388/avoid-line-break-after-macro). In 
general, I do not understand, where the paragraph break at the \placefigure... 
comes from. It does not seam necessary in most cases (e.g. location=top) and 
postponing does avoid it. Can I 'gobble' it somehow?


Does anyone have an idea, how to make it work for images as well as text 
combined?

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
___


Re: [NTG-context] images and text stacked in the margin

2012-11-12 Thread Marco Patzer
2012-11-12 Andy Thomas:

 I am still struggling to achieve the page layout/look that I am
 trying to get. For an image of the desired page spread please look
 here: https://dl.dropbox.com/u/9089117/tufte-spread.png

How about this:

\useMPlibrary
[dum]

\setuplayout
[width=10cm,
 rightmargin=5cm]

\setupmargindata
[inouter]
[location=outer,
 stack=continue]

\definefloat
[marginfigure]
[marginfigures]
[figure]

\setupfloat
[marginfigure]
[default=margin]

\definefloat
[margintext]
[margintexts]

\setupfloat
[margintext]
[default=margin]

\setupcaption
[margintext]
[location=none]

\starttext

\input knuth

\startplacemarginfigure [title=Foo]
\externalfigure [dum] [width=\rightmarginwidth]
\stopplacemarginfigure

\startplacemargintext
\input ward
\stopplacemargintext

\input knuth

\startplacemarginfigure [title=Bar]
\externalfigure [dum] [width=\rightmarginwidth]
\stopplacemarginfigure

\stoptext


You need to put the \placemargintext at the beginning of a
paragraph, otherwise it will cause an unwanted break.


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
___


Re: [NTG-context] images and text stacked in the margin

2012-11-12 Thread Andy Thomas

On Nov 12, 2012, at 3:10 PM, Marco Patzer wrote:

 You need to put the \placemargintext at the beginning of a
 paragraph, otherwise it will cause an unwanted break.
:(

Unfortunately, this is not an option. The citations have to be referenced at 
the end of particular sentences. The first link (showing the spread) makes it 
more obvious. 

Also, I tried marginblocks now, but they show the same bug as margintext if a 
page break occurs close by. 
___
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
___


Re: [NTG-context] images and text stacked in the margin

2012-11-12 Thread Alan BRASLAU
On Mon, 12 Nov 2012 20:49:38 +0100
Andy Thomas andytho...@web.de wrote:

  You need to put the \placemargintext at the beginning of a
  paragraph, otherwise it will cause an unwanted break.  
 :(
 
 Unfortunately, this is not an option. The citations have to be
 referenced at the end of particular sentences. The first link
 (showing the spread) makes it more obvious. 

One trick used with floats to avoid the unwanted break that may or may
not work here with margintext is

\startpostponing [+0]
\startplacemargintext
\stoplacemargintext
\stoppostponing

Alan
___
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
___