speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
296 stars 36 forks source link

Ul attribute to customize symbol for bullet in unordered lists #349

Closed OliverAut closed 2 years ago

OliverAut commented 2 years ago

New attribute for Ul to replace the default symbol for bullet points e.g. with a hyphen.

https://doc.speedata.de/publisher/de/grundlagen/textformatierung/index.html#ch-aufzaehlungslisten https://tex.stackexchange.com/questions/62496/itemize-with-a-dash-instead-of-a-bullet/62497

pgundlach commented 2 years ago

Thank you very much for your report. I'll put this on my to do list.

You can use something like this in HTML mode:

mystyle.css:

ul {
  list-style: none;
  padding-left: 1em;
 }

 ul li::before {
  content: "-";
  display: inline-block;
  width: 1em;
  margin-left: -1em;
 }

layout.xml:

<Layout xmlns="urn:speedata.de:2009/publisher/en"
    xmlns:sd="urn:speedata:2009/publisher/functions/en">

    <Stylesheet filename="mystyle.css"/>

    <Record element="data">
        <PlaceObject>
            <Textblock>
                <Paragraph>
                    <Value select="."></Value>
                </Paragraph>
            </Textblock>
        </PlaceObject>
    </Record>
</Layout>

and the data file (data.xml):

<?xml version="1.0" encoding="UTF-8"?>
<data>
   <ul>
      <li>Hello</li>
      <li>nice</li>
      <li>world</li>
   </ul>
</data>

which gives you:

hnw

I know that the use case is limited, but perhaps its already suitable for your document.

OliverAut commented 2 years ago

Thank you for your fast response and perfect support. The proposed solution works for me. The feature request is nice to have. But maybe this request could be combined with #311 for enumerations.

pgundlach commented 2 years ago

Lists will be handled some day. Currently there is no need besides HTML support. Thank you for the bug report.