Customizing list environments |
Lists are made up of two principal ingredients: the outer list environment and the inner items. List environments may either be customized by customizing or redefining the rendering macros for these environments, or defining additional list environments which match the same abstract interface.
The rendering of the outer list environment is controlled by the
<
assign
|
render-list
|
<
macro
|
body
|
<\surround|
<no-page-break*><vspace*|0.5fn>
<right-flush><vspace|0.5fn><no-indent*>
<with|par-left|<plus|par-left|3fn>|par-right|<plus|par-right|3fn>|body>
This redefinition affects the rendering of all list environments (itemize, enumerate, etc.) by reducing the right margin with a length of 3fn:
This text, which has been made so long that it does not fit on a single line, is indented on the right hand side by 3fn.
In a similar way, you may customize the rendering of list items by
redefining the macros
<
assign
|
aligned-item
|
<
macro
|
x
|
<\concat|
<vspace*|0.5fn>
<with|par-first|-3fn|<yes-indent>>
<resize|<with|color|red|x>|r-2.5fn||r+0.5fn|>
Then items inside all list environments with compact items will appear in red:
This list and aligned descriptions have red items.
The items of compact description lists are rendered using
The std-list
d.t.d. also provides a macro
<document|<new-list|enumerate-roman|aligned-dot-item|<macro|x|<number|x|roman>>>>