Skip to content

Commit

Permalink
Remove EvenSizeVolumeSplitter code
Browse files Browse the repository at this point in the history
The reason is explained in issue
https://github.com/mtmse/dotify.formatter.impl/issues/5. While an
algorithm that favours solutions with more even volumes would be
useful to have, EvenSizeVolumeSplitter (despite its name) does not
actually accomplish this. Moreover, it has many problems,
deteriorating the volume breaking more than improving it. Until we
find a way to implement it properly, the whole feature is dropped.
  • Loading branch information
bertfrees committed Dec 10, 2020
1 parent f4ae2e7 commit 3395fa9
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 841 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<footer/>
</default-template>
</layout-master>
<volume-template sheets-in-volume-max="10" use-when="(= $volume 1)">
<volume-template sheets-in-volume-max="1000" use-when="(= $volume 1)">
<pre-content>
<sequence master="main" initial-page-number="1">
<block>⠿⠿<marker class="pagenum" value="1"/>⠿⠿<marker class="pagenum" value="2"/>⠿⠿<marker class="pagenum" value="3"/></block>
</sequence>
</pre-content>
<post-content/>
</volume-template>
<volume-template sheets-in-volume-max="10" use-when="(&gt; $volume 1)">
<volume-template sheets-in-volume-max="1000" use-when="(&gt; $volume 1)">
<pre-content>
<sequence master="main" initial-page-number="1">
<block>⠤⠤<marker class="pagenum" value="4"/>⠤⠤<marker class="pagenum" value="5"/>⠤⠤<marker class="pagenum" value="6"/></block>
Expand All @@ -41,6 +41,8 @@
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
</sequence>
<sequence master="main" break-before="volume">
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<footer/>
</default-template>
</layout-master>
<volume-template sheets-in-volume-max="10" use-when="(= $volume 1)">
<volume-template sheets-in-volume-max="1000" use-when="(= $volume 1)">
<pre-content>
<sequence master="main" initial-page-number="1">
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
Expand All @@ -24,7 +24,7 @@
</pre-content>
<post-content/>
</volume-template>
<volume-template sheets-in-volume-max="10" use-when="(&gt; $volume 1)">
<volume-template sheets-in-volume-max="1000" use-when="(&gt; $volume 1)">
<pre-content>
<sequence master="main" initial-page-number="1">
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
Expand All @@ -41,6 +41,8 @@
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
</sequence>
<sequence master="main" break-before="volume">
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<footer/>
</default-template>
</layout-master>
<volume-template sheets-in-volume-max="5">
<volume-template sheets-in-volume-max="1000">
<pre-content>
<sequence master="front"><block>⠞⠊⠞⠇⠑</block></sequence>
</pre-content>
Expand All @@ -29,12 +29,18 @@
<block break-before="page">⠤⠤⠤</block>
<block break-before="page">⠤⠤⠤</block>
<block break-before="page">⠤⠤⠤</block>
</sequence>
<sequence master="body" page-number-counter="A" break-before="volume">
<block break-before="page">⠤⠤⠤</block>
<block break-before="page">⠤⠤⠤</block>
<block break-before="page">⠤⠤⠤</block>
</sequence>
<sequence master="body" page-number-counter="A" break-before="volume">
<block break-before="page">⠤⠤⠤</block>
<block break-before="page">⠤⠤⠤</block>
</sequence>
<sequence master="body" page-number-counter="A" break-before="volume">
<block break-before="page">⠤⠤⠤</block>
<block break-before="page">⠤⠤⠤</block>
</sequence>
</obfl>
</obfl>
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@
<row>⠤⠤⠀⠤⠤⠀⠤⠸</row>
</page>
</section>
</volume>
<volume cols="10" rows="6" rowgap="0" duplex="true">
<section>
<page>
<row>⠸⠤⠀⠤⠤⠀⠤⠤</row>
Expand All @@ -142,10 +140,14 @@
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠸⠤⠸⠤⠸⠤⠸⠤⠸</row>
</page>
</section>
</volume>
<volume cols="10" rows="6" rowgap="0" duplex="true">
<section>
<page>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠸⠸⠸⠤⠸⠸⠤⠸⠸⠸</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
Expand All @@ -160,6 +162,10 @@
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
</page>
<page>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
</page>
</section>
</volume>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Several break before volume test</dc:title>
<dc:description>Tests that break-before volume works when the number of volumes is increased.</dc:description>
<dc:title>???</dc:title>
<dc:description>???</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="true">
<default-template>
Expand Down Expand Up @@ -42,7 +42,8 @@
</sequence>
<sequence master="body">
<block>⠸⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤</block>
<block>⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤</block>
<block>⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤</block>
<block>⠤⠤ ⠤⠤ ⠤⠤</block>
<block>⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤</block>
<block>⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤</block>
</sequence>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Several break before volume test</dc:title>
<dc:description>Tests that break-before volume works when the number of volumes is increased.</dc:description>
<dc:title>???</dc:title>
<dc:description>???</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="false">
<default-template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Several break before volume test</dc:title>
<dc:description>Tests that break-before volume works when the number of volumes is increased.</dc:description>
<dc:title>???</dc:title>
<dc:description>???</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="true">
<default-template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Several break before volume test</dc:title>
<dc:description>Tests that break-before volume works when the number of volumes is increased.</dc:description>
<dc:title>???</dc:title>
<dc:description>???</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="true">
<default-template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Volume keep priority test</dc:title>
<dc:description>Tests that keep-with-next-sheets work. In this test, 7 sheets in each volume is optimal.
The maximum is set to 10 sheets in each volume, which (by the current configuration of the implementation)
allows for 2 pages deviation. This is sufficient to shift the balance by 1 page to accommodate
keep-with-next-sheets.</dc:description>
<dc:description>Tests that volume keep keep-with-next-sheets works.
Without the keep-with-next-sheets, the first volume would be 10 sheets (the target size) and the second would be 4 sheets.
With the keep-with-next-sheets, the first volume is 6 sheets and the second 8 sheets.</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="false">
<default-template>
Expand All @@ -23,7 +22,12 @@
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block keep-with-next-sheets="1">⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block keep-with-next-sheets="3">
⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿
</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Volume keep priority test</dc:title>
<dc:description>Tests that volume keep priority works. In this test, 7 sheets in each volume is optimal.
The maximum is set to 10 sheets in each volume, which (by the current configuration of the implementation)
allows for 2 pages deviation. This is sufficient to shift the balance by 1 page to accommodate the
volume-keep-priority.</dc:description>
<dc:description>Tests that volume keep priority works.
Without priorities, the first volume would be 10 sheets (the target size) and the second would be 4 sheets.
With the volume-keep-priority, the first volume is 6 sheets and the second 8 sheets.</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="false">
<default-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤</row>
</page>
</section>
</volume>
<volume cols="10" rows="6" rowgap="0" duplex="false">
<section>
<page>
<row>⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
Expand All @@ -72,38 +76,34 @@
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤</row>
</page>
</section>
</volume>
<volume cols="10" rows="6" rowgap="0" duplex="false">
<section>
<page>
<row>⠿⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠿</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
</page>
<page>
<row>⠿⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠿</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
</page>
<page>
<row>⠿⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠿</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
</page>
<page>
<row>⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
<row>⠤⠤⠀⠤⠤⠀⠤⠤</row>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<obfl xmlns="http://www.daisy.org/ns/2011/obfl" version="2011-1" xml:lang="en">
<meta xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Volume keep priority test</dc:title>
<dc:description>Tests that volume keep priority works. In this test, 7 sheets in each volume is optimal.
The maximum is set to 10 sheets in each volume, which (by the current configuration of the implementation)
allows for 2 pages deviation. This is sufficient to shift the balance by 1 page to accommodate the
volume-keep-priority.</dc:description>
<dc:description>Tests that volume keep priority works.
Without priorities, the first volume would be 10 sheets (the target size) and the second would be 4 sheets.
With the volume-keep-priority, the first volume is 5 sheets and the second 9 sheets.</dc:description>
</meta>
<layout-master name="body" page-width="10" page-height="6" duplex="false">
<default-template>
Expand All @@ -21,11 +20,16 @@
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block volume-keep-priority="7">⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block volume-keep-priority="7">
⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤
⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿
</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
<block>⠿⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠤ ⠤⠿</block>
</sequence>
Expand Down
2 changes: 1 addition & 1 deletion src/org/daisy/dotify/formatter/impl/FormatterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private Iterable<? extends Volume> getVolumes() {
try {
ret = new ArrayList<>();
volumeProvider.prepare();
for (int i = 1; i <= volumeProvider.getVolumeCount(); i++) {
while (volumeProvider.hasNext()) {
ret.add(volumeProvider.nextVolume());
}

Expand Down
Loading

0 comments on commit 3395fa9

Please sign in to comment.