Changes

Jump to navigation Jump to search
17 bytes removed ,  09:01, 11 October 2010
m
continuing
# add ConTeXt setup commands for the <code>\startlinenumbering</code> environment.
Things become even more interesting at the next level. When you look at our xml document, you will see that the entire body consists of different divisions in <codett><div</codett> elements; the different levels are distinguished by different <tt>type</tt> attributes. This means we cannot simply add the <codett><div</codett> element to our general <code>\xmlsetsetup</code>, but have to add a specific <code>\xmlsetsetup</code> for every type. Fortunately, ConTeXt makes it easy to address these different elements. We begin with the <tt>book</tt> level: (for clarity, I will now only show the new steps, not the entire style document):
<texcode>
</texcode>
 What happens here? We want a blank line before the title of the book. Then, we take the value of the <tt>n</tt> attribute (that's what the construct <code>\xmlatt{#1}{n}</code> expands to: the value of the attribute <tt>n</tt> of the current tag) and typeset it midaligned. We add another, smaller blank. And don't forget to "flush" the content of the <codett><div></codett> element!
For the next level, the <tt>chapter</tt>, we need again three steps: add it to the setsetup, define a setup command and a ConTeXt macro for it:
gardener
111

edits

Navigation menu