Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balancing and ht_max #240

Closed
pgundlach opened this issue Nov 5, 2019 · 0 comments
Closed

Balancing and ht_max #240

pgundlach opened this issue Nov 5, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@pgundlach
Copy link
Member

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


    <SetGrid nx="12" dx="3.8mm" height="13pt"/>

    <Pagetype name="standardseite" test="true()">
        <Margin left="15mm" right="9.2mm" top="43.6mm" bottom="20mm"/>
        <PositioningArea name="a">
            <PositioningFrame width="6" height="26" row="1" column="1"/>
            <PositioningFrame width="6" height="26" row="1" column="7"/>
        </PositioningArea>
    </Pagetype>

    <Record element="Table">
        <PlaceObject area="a">
            <Table stretch="max" padding="1pt" width="6" balance="yes">
                <ForAll select="tr">
                    <SetVariable variable="pos" select="position()"/>
                    <Switch>
                        <Case test="th">
                            <SetVariable variable="drawRule" select="false()"/>
                            <Tr sethead="yes" break-below="yes" minheight="4.5mm">
                                <ForAll select="th">
                                    <Td backgroundcolor="gray">
                                        <Paragraph><Value select="$pos"/><Value select="."/></Paragraph>
                                    </Td>
                                </ForAll>
                            </Tr>
                        </Case>
                        <Otherwise>
                            <Switch>
                                <Case test="position() != 1 and $drawRule">
                                    <Tablerule color="gray" rulewidth="0.5pt" start="1" break-below="yes"/>
                                </Case>
                                <Otherwise>
                                    <SetVariable variable="drawRule" select="true()"/>
                                </Otherwise>
                            </Switch>
                            <Tr>
                                <ForAll select="td">
                                    <Td>
                                        <Paragraph>
                                            <Value select="$pos"/>
                                            <Value select="."/>
                                        </Paragraph>
                                    </Td>
                                </ForAll>
                            </Tr>
                        </Otherwise>
                    </Switch>
                </ForAll>
            </Table>
        </PlaceObject>
    </Record>


    <DefineFontfamily name="text" fontsize="8" leading="10">
        <Regular fontface="sans"/>
    </DefineFontfamily>

</Layout>

and data.xml:

<?xml version="1.0" encoding="utf-8"?>
<Table>
    <tr><th>head</th></tr>
    <tr><td>row</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
    <tr>
        <th>head</th>
    </tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>a<br/>b</td></tr>
    <tr><td>row</td></tr>
    <tr><td>row</td></tr>
</Table>

Give a page overflow.

@pgundlach pgundlach added the Bug label Nov 5, 2019
@pgundlach pgundlach added this to the Version 3.8 milestone Nov 5, 2019
@pgundlach pgundlach self-assigned this Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant