29.05.2014 Views

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>The</strong> core data structure that we need to deal with is a number, which can be constructed<br />

in several ways.<br />

sectioning 1.A.2.II some title<br />

pagenumber page 1.A – 23<br />

reference in chapter 2.II<br />

marking A : some title with preceding number<br />

contents 2.II some title with some page number 1.A – 23<br />

index some word 23 , A – 42 — B – 48<br />

itemize a rst item a.1 subitem item<br />

enumerate example 1.A.2.II . a<br />

oatcaption gure 1 – 2<br />

footnotes note ⋆<br />

In this table we see how numbers are composed:<br />

section number<br />

separator<br />

page number<br />

counter<br />

symbol<br />

It has several components, separated by symbols and with an optional<br />

nal symbol<br />

This can be different for each level and can have dedicated rendering<br />

options<br />

That can be preceded by a (partial) sectionnumber and separated<br />

from the page number by another symbol<br />

It can be preceded by a (partial) sectionnumber and can also have<br />

subnumbers with its own separation properties<br />

Sometimes numbers get represented by symbols in which case we<br />

use pagewise restarting symbol sets<br />

Say that at some point we store a section number and/or page number. With the number<br />

we need to store information about the conversion (number, character, roman numeral,<br />

etc) and the separators, including their rendering. However, when we reuse that<br />

stored information we might want to discard some components and/or use a different<br />

rendering. In traditional ConTEXt we have control over some aspects but due to the way<br />

numbers are stored for later reuse this control is limited.<br />

Say that we have cloned a subsection head as follows:<br />

\definehead[MyHead][section]<br />

This is used as:<br />

\MyHead[example]{Example}<br />

In MkII we save a list entry (which has the number, the title and a reference to the page)<br />

and a reference to the the number, the title and the page (tagged example). Page numbers<br />

are stored in such a way that we can lter at specic section levels. This permits local<br />

tables <strong>of</strong> contents.<br />

244 Everything structure

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!