Enumeration lists
The publisher has various options for creating enumeration lists.
Enumeration lists with Ol and Ul
Numbered and unnumbered lists can be created with <Ul>
and <Ol>
:
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Record element="data">
<PlaceObject>
<Textblock>
<Ol>
<Li><Value>Lorem ipsum</Value></Li>
<Li><Value>dolor sit amet</Value></Li>
<Li><Value>consectetur adipisicing elit</Value></Li>
<Li><Value>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</Value></Li>
</Ol>
</Textblock>
</PlaceObject>
<PlaceObject>
<Textblock>
<Ul>
<Li><Value>Lorem ipsum</Value></Li>
<Li><Value>dolor sit amet</Value></Li>
<Li><Value>consectetur adipisicing elit</Value></Li>
<Li><Value>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</Value></Li>
</Ul>
</Textblock>
</PlaceObject>
</Record>
</Layout>
These enumeration lists cannot be nested within one another.
![olulstandard](../../../static/img/olulstandard.png)
Enumeration lists with textformat
You can set a left margin or a hanging indent for text formats. This allows you to output bulleted lists:
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<DefineTextformat name="li" indentation="6pt" rows="-1"/>
<Record element="data">
<PlaceObject>
<Textblock textformat="li">
<Paragraph><Value>• </Value><Value select="sd:dummytext()"></Value></Paragraph>
<Paragraph><Value>• Two</Value></Paragraph>
<Paragraph><Value>• Three</Value></Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
![olulwithtext](../../../static/img/olulwithtext.png)
Enumeration lists with tables
<Record element="data">
<PlaceObject>
<Table stretch="max">
<Columns>
<Column width="5mm"/>
<Column width="5mm"/>
<Column width="1*"/>
</Columns>
<Loop select="3" variable="i">
<Tr valign="top">
<Td>
<Paragraph>
<Value select="$i"/><Value>. </Value>
</Paragraph>
</Td>
<Td colspan="2">
<Paragraph textformat="justified">
<Value select="sd:dummytext()"/>
</Paragraph>
</Td>
</Tr>
<Loop select="3">
<Tr valign="top">
<Td></Td>
<Td><Paragraph><Value>•</Value></Paragraph></Td>
<Td><Paragraph textformat="justified">
<Value select="sd:dummytext()"/>
</Paragraph>
</Td>
</Tr>
</Loop>
</Loop>
</Table>
</PlaceObject>
</Record>
![olulwithtables](../../../static/img/olulwithtables.png)
Enumeration lists with labels in Paragraph
The command <paragraph>
can display characters to the left of the paragraph:
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Pageformat width="100mm" height="100mm" />
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph label-left="•" label-left-distance="2mm" padding-left="4mm">
<Value>Lorem ipsum</Value>
</Paragraph>
<Paragraph label-left="•" label-left-distance="2mm" padding-left="4mm">
<Value>Lorem ipsum</Value>
</Paragraph>
<Paragraph label-left="•" label-left-distance="2mm" padding-left="4mm">
<Value>dolor sit amet</Value>
</Paragraph>
<Paragraph label-left="•" label-left-distance="2mm" padding-left="4mm">
<Value>consectetur adipisicing elit</Value>
</Paragraph>
<Paragraph label-left="•" label-left-distance="2mm" padding-left="4mm">
<Value>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</Value>
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
This can also be used for bulleted lists. This has the advantage that paragraphs can also be wrapped in the <output>
command.
![olulparlabel](../../../static/img/olulparlabel.png)
Enumeration lists with HTML formatting
Here you have the option of nesting and specially formatting lists:
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Pageformat width="100mm" height="100mm" />
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value select="." />
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
<data>
<ul>
<li>Lorem ipsum</li>
<li>dolor sit amet</li>
<li>consectetur adipisicing elit</li>
<li>
<ol>
<li>sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua.</li>
<li>Lorem ipsum</li>
<li>dolor sit amet</li>
</ol>
</li>
</ul>
</data>
![olulhtmlnested](../../../static/img/olulhtmlnested.png)
For the styling, you can use CSS:
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<Pageformat width="100mm" height="100mm" />
<Stylesheet >
ul {
list-style: none;
padding-left: 1em;
}
ul li::before {
content: "\25e6";
color: red;
display: inline-block;
width:1em;
}
</Stylesheet>
<Record element="data">
<PlaceObject>
<Textblock>
<Paragraph>
<Value select="." />
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
</Layout>
and the following data file:
<data>
<ul>
<li>Lorem ipsum</li>
<li>dolor sit amet</li>
<li>consectetur adipisicing elit</li>
</ul>
</data>
![olulhtmlcolor](../../../static/img/olulhtmlcolor.png)