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>s and <Ol>s break when used in multi-column <Textblock>s #185

Closed iclukas closed 2 months ago

iclukas commented 6 years ago

In <Textblock>s with more than one column, using lists with lines longer than the column width, line breaking messes up badly.

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

    <Pageformat width="100mm" height="100mm"/>
    <Pagetype test="true()" name="default">
        <Margin top="10mm" left="10mm" bottom="10mm" right="10mm"/>
    </Pagetype>

    <Record element="data">
        <PlaceObject allocate-bottom="1">
            <Textblock columns="2">
                <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 columns="2">
                <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>
        <NewPage/>
        <PlaceObject allocate-bottom="1" allocate-right="1">
            <Textblock width="{sd:number-of-columns() div 2}">
                <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 width="{sd:number-of-columns() div 2}">
                <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>
pgundlach commented 6 years ago

Oh well, the UL/LI thing is a hack anyway. But nevertheless it should work. I am on vacations at the moment, so I will be looking into this in August.

iclukas commented 6 years ago

Maybe {itemize} and \item would yield more predictable results, but that kind of LaTeX Voodo is too advanced for me.

pgundlach commented 5 years ago

While this is something that really needs to be fixed, I will close the issue for now until somebody cries out loud...

iclukas commented 2 months ago

I was really hoping for this to get fixed in almost 6 years. However, since there now exists a workaround using <Paragraph label-left="•">, it should be better documented.

Instead of

<Textblock columns="2">
    <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>

use something like

<Textblock columns="2">
    <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>
pgundlach commented 2 months ago

Fixed in 917e7b60265de73f7205472dcf8a51cd644679f8 and documented in 8e226603d247089085710d1a6cbdc401ef9dfd82

... after almost 6 years...

pgundlach commented 2 months ago

Online now with version 4.19.14