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

Tests for horizontal positioning and leaders #20

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 83 additions & 6 deletions src/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
</li>
</ul>
</li>
<li class="requirement priority_1" id="4.4:57">
<li class="requirement priority_1 changed" id="4.4:57">
<h3>
<a class="req-nr" href="#4.4:57">4.4:57</a>
There shall be the option to reformat a table into a list,
Expand All @@ -592,15 +592,53 @@
<li> It must be possible to prepend cells with their column header. </li>
</ul>
</h3>
<p>
<a class="test-src" href="test/tables/test.xprocspec#test3">
SBS example: Large tables can be rendered row-wise with a special symbol
<samp>::</samp> to indicate the beginning of a new column. (This method can always be
used as a fallback unless the table contains paragraphs/lists in its cells.)
</a>
</p>
</li>
<li class="requirement priority_1" id="4.4:58">
<li class="requirement priority_1 changed" id="4.4:58">
<h3>
<a class="req-nr" href="#4.4:58">4.4:58</a>
There shall be the option to render a table in matrix format, thereby mimicking the
original form. This feature shall be supported at least for small tables that fit on a
page horizontally without the need for text wrapping in cells, and that have no column-
or rowspan. The matrix format supports borders and padding on rows, columns and cells.
</h3>
<p>
SBS examples: Small tables can be rendered as in the print (matrix).
</p>
<ul>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test1">
Example 1
</a>
</li>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test2">
Example 2
</a>
</li>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test4">
Example 3
</a>
</li>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test5">
Example 4: A wide table is split vertically into several parts. Row headers are
repeated for each part.
</a>
</li>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test6">
Example 5
</a>
</li>
</ul>
</li>
<li class="requirement priority_2" id="4.4:56">
<h3>
Expand All @@ -615,12 +653,17 @@
repeating the table heading at the top of each page.
</h3>
</li>
<li class="requirement priority_2" id="4.4:60">
<li class="requirement priority_2 changed" id="4.4:60">
<h3>
<a class="req-nr" href="#4.4:60">4.4:60</a>
There shall be the possibility of transposing tables, that is, treat rows as if they
were columns and columns as if they were rows.
</h3>
<p>
<a class="test-src" href="test/tables/test.xprocspec#test2">
SBS example: Some tables can be mirrored to fit on the page.
</a>
</p>
</li>
<li class="requirement priority_2" id="4.4:61">
<h3>
Expand All @@ -629,12 +672,18 @@
to render a certain table by trying several alternatives.
</h3>
</li>
<li class="requirement priority_3" id="4.4:62">
<li class="requirement priority_3 changed" id="4.4:62">
<h3>
<a class="req-nr" href="#4.4:62">4.4:62</a>
The system shall be able to cope with column- and rowspan in tables (in a yet undefined
way).
</h3>
<p>
<a class="test-src" href="test/tables/test.xprocspec#test6">
SBS example: In the case of matrix layout, a possibility is to fill up empty space in
a cell that spans several columns with some dot pattern.
</a>
</p>
</li>
<li class="requirement priority_3" id="4.4:63">
<h3>
Expand All @@ -643,20 +692,48 @@
wrapping of text in cells and automatic computing of optimal column widths.
</h3>
</li>
<li class="requirement priority_3" id="4.4:64">
<li class="requirement priority_3 changed" id="4.4:64">
<h3>
<a class="req-nr" href="#4.4:64">4.4:64</a>
There shall be the option to render a wide table on facing pages.
</h3>
<p>
<a class="test-src" href="test/tables/test.xprocspec#test4">
SBS example: A table can span across 2 pages (left-hand page and right-hand page).
</a>
</p>
</li>
<li class="requirement priority_1" id="4.4:65">
<li class="requirement priority_1 changed" id="4.4:65">
<h3>
<a class="req-nr" href="#4.4:65">4.4:65</a>
The system shall be able to render tables of contents, list of images, index,
glossaries, etc. in a two-column format with the entries on the left and other content
such as page numbers aligned on the right. Optionally leaders may be used to connect the
two columns.
</h3>
<p>
SBS examples:
</p>
<ul>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test2">
Two-column table with second column left-aligned and with leaders.
</a>
</li>
<li class="example">
<a class="test-src" href="test/horizontal-positioning/test.xprocspec#test">
Two two-column tables below each other with same alignment of second columns and
with leaders.
</a>
</li>
<li class="example">
<a class="test-src" href="test/tables/test.xprocspec#test5">
Leaders may also be used in tables with <strong>more than two columns</strong>. In
this example a wide table is split vertically into several parts each existing of 4
columns.
</a>
</li>
</ul>
</li>
<li class="requirement priority_1" id="4.4:66">
<h3>
Expand Down
31 changes: 31 additions & 0 deletions src/resources/horizontal-positioning/example_1.pef
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<pef xmlns="http://www.daisy.org/ns/2008/pef" version="2008-1">
<head>
<meta xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dp2="http://www.daisy.org/ns/pipeline">
<dc:date>2015-06-03</dc:date>
<dc:format>application/x-pef+xml</dc:format>
<dc:identifier>AUTO_ID_865467957</dc:identifier>
<dp2:ascii-table>(liblouis-table:"http://www.sbs.ch/pipeline/liblouis/tables/sbs.dis")</dp2:ascii-table>
</meta>
</head>
<body>
<volume cols="35" rows="12" rowgap="0" duplex="false">
<section>
<page>
<row>⠁⠶</row>
<row>⠀⠀⠨⠧⠕⠗⠎⠊⠉⠓⠞⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠨⠺⠊⠑⠢</row>
<row>⠀⠀⠳⠃⠑⠗⠟⠥⠑⠗⠞⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠨⠧⠑⠗⠃</row>
<row>⠀⠀⠙⠊⠑⠀⠨⠅⠁⠞⠵⠑⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠨⠺⠑⠗⠢</row>
<row>⠀⠀⠧⠕⠗⠀⠙⠑⠍⠀⠨⠎⠉⠓⠥⠇⠓⠁⠥⠎⠀⠄⠄⠀⠨⠺⠕⠢</row>
<row>⠀⠀⠙⠊⠑⠀⠨⠎⠞⠗⠁⠎⠎⠑⠄⠀⠄⠄⠄⠄⠄⠄⠄⠀⠨⠺⠑⠝⠐⠂⠨⠺⠁⠎⠢</row>
<row>⠃⠶</row>
<row>⠀⠀⠨⠛⠑⠛⠑⠝⠀⠨⠁⠃⠑⠝⠙⠀⠄⠄⠄⠄⠄⠄⠄⠀⠤⠤⠤</row>
<row>⠀⠀⠃⠑⠅⠁⠍⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠤⠤⠤</row>
<row>⠀⠀⠤⠤⠤⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠤⠤⠤</row>
<row>⠀⠀⠤⠤⠤⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠤⠤⠤</row>
<row>⠀⠀⠤⠤⠤⠀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠀⠤⠤⠤</row>
</page>
</section>
</volume>
</body>
</pef>
13 changes: 13 additions & 0 deletions src/resources/horizontal-positioning/example_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pA=
$VORSICHT ........... $WIE?
8BERQUERT ........... $VERB
DIE $KATZE .......... $WER?
VOR DEM $SCHULHAUS .. $WO?
DIE $STRASSE. ....... $WEN!,$WAS?
B=
$GEGEN $ABEND ....... ---
BEKAM ............... ---
--- ................. ---
--- ................. ---
--- ................. ---

53 changes: 53 additions & 0 deletions src/resources/horizontal-positioning/example_1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns="http://www.daisy.org/z3986/2005/dtbook/">
<li>
a)
<list>
<li>
<lic>Vorsicht</lic>
<lic>Wie?</lic>
</li>
<li>
<lic>¸berquert</lic>
<lic>Verb</lic>
</li>
<li>
<lic>die Katze</lic>
<lic>Wer?</lic>
</li>
<li>
<lic>vor dem Schulhaus</lic>
<lic>Wo?</lic>
</li>
<li>
<lic>die Strasse.</lic>
<lic>Wen/Was?</lic>
</li>
</list>
</li>
<li>
b)
<list>
<li>
<lic>Gegen Abend</lic>
<lic></lic>
</li>
<li>
<lic>bekam</lic>
<lic></lic>
</li>
<li>
<lic></lic>
<lic></lic>
</li>
<li>
<lic></lic>
<lic></lic>
</li>
<li>
<lic></lic>
<lic></lic>
</li>
</list>
</li>
</list>
47 changes: 47 additions & 0 deletions src/resources/tables/example_1.pef
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<pef xmlns="http://www.daisy.org/ns/2008/pef" version="2008-1">
<head>
<meta xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dp2="http://www.daisy.org/ns/pipeline">
<dc:date>2015-09-17</dc:date>
<dc:format>application/x-pef+xml</dc:format>
<dc:identifier>AUTO_ID_694691136</dc:identifier>
<dp2:ascii-table>(liblouis-table:'http://www.sbs.ch/pipeline/liblouis/tables/sbs.dis')</dp2:ascii-table>
</meta>
</head>
<body>
<volume cols="28" rows="28" rowgap="0" duplex="false">
<section>
<page>
<row>⠍⠥⠇⠞⠊⠏⠇⠊⠅⠁⠞⠊⠕⠝⠎⠞⠁⠃⠑⠇⠇⠑</row>
<row/>
<row>⠍⠁⠇⠀⠀⠼⠁⠀⠀⠀⠼⠃⠀⠀⠀⠼⠉⠀⠀⠀⠼⠙⠀⠀⠀⠼⠑</row>
<row>⠒⠒⠒⠀⠀⠒⠒⠒⠀⠀⠒⠒⠒⠀⠀⠒⠒⠒⠀⠀⠒⠒⠒⠀⠀⠒⠒⠒</row>
<row>⠼⠁⠀⠀⠀⠼⠁⠀⠀⠀⠼⠃⠀⠀⠀⠼⠉⠀⠀⠀⠼⠙⠀⠀⠀⠼⠑</row>
<row>⠼⠃⠀⠀⠀⠼⠃⠀⠀⠀⠼⠙⠀⠀⠀⠼⠋⠀⠀⠀⠼⠓⠀⠀⠀⠼⠁⠚</row>
<row>⠼⠉⠀⠀⠀⠼⠉⠀⠀⠀⠼⠋⠀⠀⠀⠼⠊⠀⠀⠀⠼⠁⠃⠀⠀⠼⠁⠑</row>
<row>⠼⠙⠀⠀⠀⠼⠙⠀⠀⠀⠼⠓⠀⠀⠀⠼⠁⠃⠀⠀⠼⠁⠋⠀⠀⠼⠃⠚</row>
<row>⠼⠑⠀⠀⠀⠼⠑⠀⠀⠀⠼⠁⠚⠀⠀⠼⠁⠑⠀⠀⠼⠃⠚⠀⠀⠼⠃⠑</row>
<row>⠼⠋⠀⠀⠀⠼⠋⠀⠀⠀⠼⠁⠃⠀⠀⠼⠁⠓⠀⠀⠼⠃⠙⠀⠀⠼⠉⠚</row>
<row>⠼⠛⠀⠀⠀⠼⠛⠀⠀⠀⠼⠁⠙⠀⠀⠼⠃⠁⠀⠀⠼⠃⠓⠀⠀⠼⠉⠑</row>
<row>⠼⠓⠀⠀⠀⠼⠓⠀⠀⠀⠼⠁⠋⠀⠀⠼⠃⠙⠀⠀⠼⠉⠃⠀⠀⠼⠙⠚</row>
<row>⠼⠊⠀⠀⠀⠼⠊⠀⠀⠀⠼⠁⠓⠀⠀⠼⠃⠛⠀⠀⠼⠉⠋⠀⠀⠼⠙⠑</row>
<row>⠼⠁⠚⠀⠀⠼⠁⠚⠀⠀⠼⠃⠚⠀⠀⠼⠉⠚⠀⠀⠼⠙⠚⠀⠀⠼⠑⠚</row>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row/>
<row>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠼⠁</row>
</page>
</section>
</volume>
</body>
</pef>
58 changes: 58 additions & 0 deletions src/resources/tables/example_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
pMULTIPLIKATIONSTABELLE

MAL #A #B #C #D #E
::: ::: ::: ::: ::: :::
#A #A #B #C #D #E
#B #B #D #F #H #AJ
#C #C #F #I #AB #AE
#D #D #H #AB #AF #BJ
#E #E #AJ #AE #BJ #BE
#F #F #AB #AH #BD #CJ
#G #G #AD #BA #BH #CE
#H #H #AF #BD #CB #DJ
#I #I #AH #BG #CF #DE
#AJ #AJ #BJ #CJ #DJ #EJ













#A
p



























p
p
Loading