Difference between revisions of "CD Booklet"
(embed some images to wet the appetite) |
(new section: Pages with layers only) |
||
Line 14: | Line 14: | ||
== Protrusion with mkiv == | == Protrusion with mkiv == | ||
+ | |||
+ | == Pages with layers only == | ||
+ | |||
+ | When using ConTeXt for designing some work that is not primarily focused on continuous text, it is most likely that your pages are composed of different layers only and don't contain any ''normal'' text. Only defining the layers and filling them with your content is not enough to make them appear on the page. So this easy approach doesn't work: | ||
+ | |||
+ | <texcode> | ||
+ | \definelayer[test] | ||
+ | [width=\paperwidth,height=\paperheight] | ||
+ | |||
+ | \setlayerframed[test] | ||
+ | [preset=middle] | ||
+ | [width=0.6\textwidth,align=normal] | ||
+ | {\input tufte } | ||
+ | |||
+ | \setupbackgrounds[page][background=test] | ||
+ | |||
+ | \starttext | ||
+ | \stoptext | ||
+ | </texcode> | ||
+ | |||
+ | We expect the frame with tufte just in the middle of the page. With \setupbackgrounds we have positioned our layer. But no output is generated since the OTR (Output Routine) is invoked. And because there is no content on the page (and the background is no content) an empty page will be generated. | ||
+ | |||
+ | There are some possibilities to invoke the OTR. Inside <code>\starttext \stoptext</code> call one of the following: | ||
+ | |||
+ | <texcode> | ||
+ | \page[empty] | ||
+ | </texcode> | ||
+ | |||
+ | <texcode> | ||
+ | \startstandardmakeup | ||
+ | \stopstandardmakeup | ||
+ | </texcode> | ||
+ | |||
+ | If you haven't defined you own pagelayout, the following invocations of the OTR just use the standard layout that has a pagenumber in the headerline | ||
+ | <texcode> | ||
+ | \dontleavehmode | ||
+ | </texcode> | ||
+ | |||
+ | <texcode> | ||
+ | \null | ||
+ | </texcode> | ||
+ | |||
+ | The last alternative is just to use | ||
+ | <texcode> | ||
+ | \flushlayer[test] | ||
+ | </texcode> | ||
+ | (You can discard the background definition then) But this places the layer relative to the textarea and not as intended to the pagearea. |
Revision as of 23:26, 8 July 2008
On this page I will describe the things learned while setting a CD booklet.
Contents
Fit a text into a box
Float text around a picture inside a layer
Use Delicious OTF font with luatex / mkiv
Protrusion with mkiv
Pages with layers only
When using ConTeXt for designing some work that is not primarily focused on continuous text, it is most likely that your pages are composed of different layers only and don't contain any normal text. Only defining the layers and filling them with your content is not enough to make them appear on the page. So this easy approach doesn't work:
\definelayer[test] [width=\paperwidth,height=\paperheight] \setlayerframed[test] [preset=middle] [width=0.6\textwidth,align=normal] {\input tufte } \setupbackgrounds[page][background=test] \starttext \stoptext
We expect the frame with tufte just in the middle of the page. With \setupbackgrounds we have positioned our layer. But no output is generated since the OTR (Output Routine) is invoked. And because there is no content on the page (and the background is no content) an empty page will be generated.
There are some possibilities to invoke the OTR. Inside \starttext \stoptext
call one of the following:
\page[empty]
\startstandardmakeup \stopstandardmakeup
If you haven't defined you own pagelayout, the following invocations of the OTR just use the standard layout that has a pagenumber in the headerline
\dontleavehmode
\null
The last alternative is just to use
\flushlayer[test]
(You can discard the background definition then) But this places the layer relative to the textarea and not as intended to the pagearea.