Changes

Jump to navigation Jump to search
1,280 bytes added ,  22:03, 10 July 2008
→‎Float text around a picture inside a layer: added the description of hangaround feature
[[image:CD08-p11.png|120px]]
Floating Text around a picture inside any vbox environment is not possible and so the next two examples show text that runs through the graphical element.
 
The variant with a simple framedtext
<texcode>
\startbuffer[text]
\placefigure[left,none]{}{\framed[height=1cm]{graphic}}%
\input tufte
\stopbuffer
 
\starttext
\startstandardmakeup
\startframedtext[width=0.8\textwidth]
\getbuffer[text]
\stopframedtext
\stopstandardmakeup
\stoptext
</texcode>
 
And the variant with layers:
<texcode>
\definelayer[test]
[width=\paperwidth,height=\paperheight]
 
\startbuffer[text]
\placefigure[left,none]{}{\framed[height=1cm]{graphic}}%
\input tufte
\stopbuffer
 
\setlayerframed[test]
[preset=middle]
[width=0.6\textwidth,align=normal]
{\getbuffer[text]}
 
\setupbackgrounds[page][background=test]
 
\starttext
\startstandardmakeup
\stopstandardmakeup
\stoptext
</texcode>
 
But as always with ConTeXt: Hans to the rescue! He has just some time before my trials made a nice macro available in cont-new.tex with the adequate name \starthangaround. With this macro it is quite easy to float the text around the graphic. You only has to change the buffer-code:
<texcode>
\startbuffer[text]
\starthangaround{\framed[height=1cm]{graphic}}%
\input tufte
\stophangaround
\stopbuffer
</texcode>
== Use Delicious OTF font with luatex / mkiv ==
8

edits

Navigation menu