ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* creating and placing floats with both text and graphics
@ 2007-04-27 21:25 Hamid Kamrani
  0 siblings, 0 replies; only message in thread
From: Hamid Kamrani @ 2007-04-27 21:25 UTC (permalink / raw)
  To: ntg-context

Is it possible to create and place a float in ConTeXt containing both
text and graphics?

In the following sample code a framedtext is created containing a
figuretext but when placing the framedtext as a float on a doublesided
page layout the placement at bottom of the odd page has extra white
spaces below the box and is completely off on the even page (does not
obey the "location=inner" directive. Please advise.

\showframe \showgrid
\setupcolors[state=start]
\enableregime[mac]
\setuplayout[height=10.25in,width=4.75in,margin=2.625in,backspace=.5in,topspace=.75in,header=.25in,footer=.25in,location=middle]

\setuppagenumbering[alternative=doublesided,align=broad,location=]
\setuppapersize[US Letter][US Letter]
\setupbodyfont[rm,10pt]

\starttext

\startbuffer[MyFloat]
\startframedtext[][margin=yes,background=screen,backgroundscreen=.8,width=\dimexpr(\makeupwidth+\marginwidth+\rightmargindistance)]
 {\definedfont[Regular sa 3]  \framed[frame=off,bottomframe=on,strut=no]{Knuth}}

\startfiguretext
	[right]
	[]
	{none}
	{\framed[width=5cm,height=3cm]{!}}

 \blank[big]
 \par	
\input knuth
\par
\stopfiguretext
\input knuth
\par
\stopframedtext
\stopbuffer
\placefigure[bottom,location=inner,nonumber][]{none}{\externalfigure[MyFloat.tmp][]}
\dorecurse{3}{\input tufte \par \input knuth \par}
\placefigure[bottom,location=inner,nonumber][]{none}{\externalfigure[MyFloat.tmp][]}

\stoptext
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-27 21:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-27 21:25 creating and placing floats with both text and graphics Hamid Kamrani

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