eideticrml 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +55 -0
  3. data/lib/erml.rb +345 -0
  4. data/lib/erml_layout_managers.rb +667 -0
  5. data/lib/erml_rules.rb +104 -0
  6. data/lib/erml_styles.rb +304 -0
  7. data/lib/erml_support.rb +105 -0
  8. data/lib/erml_widget_factories.rb +38 -0
  9. data/lib/erml_widgets.rb +1895 -0
  10. data/samples/test10_rich_text.erml +17 -0
  11. data/samples/test11_table_layout.erml +30 -0
  12. data/samples/test12_shapes.erml +32 -0
  13. data/samples/test13_polygons.erml +28 -0
  14. data/samples/test14_images.erml +19 -0
  15. data/samples/test15_lines.erml +43 -0
  16. data/samples/test16_classes.erml +34 -0
  17. data/samples/test17_rules.erml +24 -0
  18. data/samples/test18_preformatted_text.erml +9 -0
  19. data/samples/test19_erb.erml.erb +26 -0
  20. data/samples/test1_empty_doc.erml +2 -0
  21. data/samples/test20_haml.erml.haml +20 -0
  22. data/samples/test21_shift_widgets.erml +47 -0
  23. data/samples/test22_multipage_flow_layout.erml +40 -0
  24. data/samples/test23_pageno.erml +17 -0
  25. data/samples/test24_headers_footers.erml.erb +37 -0
  26. data/samples/test25_overflow.erml.erb +37 -0
  27. data/samples/test26_columns.erml.erb +42 -0
  28. data/samples/test28_landscape.erml.erb +17 -0
  29. data/samples/test29_pages_up.erml.erb +17 -0
  30. data/samples/test2_empty_page.erml +6 -0
  31. data/samples/test30_encodings.erml.haml +35 -0
  32. data/samples/test3_hello_world.erml +7 -0
  33. data/samples/test4_two_pages.erml +10 -0
  34. data/samples/test5_rounded_rect.erml +10 -0
  35. data/samples/test6_bullets.erml +16 -0
  36. data/samples/test7_flow_layout.erml +20 -0
  37. data/samples/test8_vbox_layout.erml +23 -0
  38. data/samples/test9_hbox_layout.erml +22 -0
  39. data/samples/testimg.jpg +0 -0
  40. data/test/test_erml_layout_managers.rb +106 -0
  41. data/test/test_erml_rules.rb +116 -0
  42. data/test/test_erml_styles.rb +415 -0
  43. data/test/test_erml_support.rb +140 -0
  44. data/test/test_erml_widget_factories.rb +46 -0
  45. data/test/test_erml_widgets.rb +1235 -0
  46. data/test/test_helpers.rb +18 -0
  47. metadata +102 -0
@@ -0,0 +1,17 @@
1
+ <erml>
2
+ <styles>
3
+ <layout id="vbox" padding="18" />
4
+ <pen id="blue_dash" color="Blue" width="2" pattern="dashed" />
5
+ <pen id="red_dash" color="Red" width="2" pattern="dashed" />
6
+ </styles>
7
+ <pages>
8
+ <define id="i" tag="span" font.style="Italic" />
9
+ <define id="bi" tag="span" font.weight="Bold" font.style="Italic" />
10
+ <define id="red" tag="span" font.color="Red" />
11
+ <page units="in" margin="1">
12
+ <p underline="true">Rich Text</p>
13
+ <p text_align="justify">Lorem <b>ipsum</b> dolor sit amet, <i>consectetur</i> adipisicing elit, <b>sed do <i>eiusmod</i> tempor</b> incididunt ut labore et dolore magna aliqua. <red>Ut enim ad minim veniam</red>, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
14
+ <p text_align="justify"><u>Lorem ipsum dolor sit amet</u>, consectetur adipisicing elit, sed do eiusmod <bi>tempor incididunt</bi> ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
15
+ </page>
16
+ </pages>
17
+ </erml>
@@ -0,0 +1,30 @@
1
+ <erml>
2
+ <styles>
3
+ <pen id="dotted" color="Red" />
4
+ <layout id="vbox" padding="5" />
5
+ </styles>
6
+ <pages>
7
+ <define id="table" tag="div" layout="table" />
8
+ <define id="td" tag="p" border="solid" padding="3pt" />
9
+ <page margin="1in">
10
+ <table order="rows" cols="3" border="dotted" padding="5pt">
11
+ <td>Lorem ipsum dolor sit amet,</td>
12
+ <td>consectetur adipisicing elit,</td>
13
+ <td>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</td>
14
+ <td>Ut enim ad minim veniam,</td>
15
+ <td>quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
16
+ <td>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</td>
17
+ <td>Excepteur sint occaecat cupidatat non proident,</td>
18
+ <td colspan="2">sunt in culpa qui officia deserunt mollit anim id est laborum.</td>
19
+ </table>
20
+ <table order="rows" cols="3" border="dotted" padding="5pt">
21
+ <td width="40%">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</td>
22
+ <td width="140pt">sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</td>
23
+ <td rowspan="2">Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</td>
24
+ <td>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</td>
25
+ <td>Excepteur sint occaecat cupidatat non proident,</td>
26
+ <td colspan="2">sunt in culpa qui officia deserunt mollit anim id est laborum.</td>
27
+ </table>
28
+ </page>
29
+ </pages>
30
+ </erml>
@@ -0,0 +1,32 @@
1
+ <erml>
2
+ <styles>
3
+ <pen id="dotted" color="Red" />
4
+ <brush id="bg" color="LightSteelBlue" />
5
+ <brush id="fg" color="White" />
6
+ <layout id="table" padding="0.5in" />
7
+ </styles>
8
+ <pages>
9
+ <page units="in" margin="0.75">
10
+ <table order="cols" rows="4">
11
+ <rect width="2" height="2" border="solid" />
12
+ <rect width="2" height="2" border="solid" fill="bg" />
13
+ <rect width="2" height="2" fill="bg" />
14
+ <rect width="2" height="2" border="solid" fill="bg" padding="0.5">
15
+ <rect width="100%" height="100%" border="solid" fill="fg" />
16
+ </rect>
17
+ <circle width="2" height="2" border="solid" />
18
+ <circle width="2" height="2" border="solid" fill="bg" />
19
+ <circle width="2" height="2" fill="bg" />
20
+ <circle width="2" height="2" border="solid" fill="bg" padding="0.5">
21
+ <circle width="100%" height="100%" border="solid" fill="fg" />
22
+ </circle>
23
+ <ellipse width="2" height="2" rx="0.75" border="solid" />
24
+ <ellipse width="2" height="2" rx="0.75" border="solid" fill="bg" />
25
+ <ellipse width="2" height="2" rx="0.75" fill="bg" />
26
+ <ellipse width="2" height="2" rx="0.75" border="solid" fill="bg" padding="0.5">
27
+ <ellipse width="100%" height="100%" rx="0.25" border="solid" fill="fg" />
28
+ </ellipse>
29
+ </table>
30
+ </page>
31
+ </pages>
32
+ </erml>
@@ -0,0 +1,28 @@
1
+ <erml>
2
+ <styles>
3
+ <pen id="dotted" color="Red" />
4
+ <brush id="bg" color="LightSteelBlue" />
5
+ <brush id="fg" color="White" />
6
+ <layout id="flow" padding="0.5in" />
7
+ <layout id="table" padding="0.5in" />
8
+ </styles>
9
+ <pages>
10
+ <define id="table" tag="div" layout="table" />
11
+ <page units="in" margin="0.75">
12
+ <table order="rows" cols="3">
13
+ <polygon width="2" height="2" r="1" sides="3" border="solid" fill="bg" />
14
+ <polygon width="2" height="2" r="1" sides="4" border="Blue" fill="bg" />
15
+ <polygon width="2" height="2" r="1" sides="5" border="ForestGreen" fill="bg" />
16
+ <polygon width="2" height="2" r="1" sides="6" border="Crimson" fill="bg" />
17
+ <polygon width="2" height="2" r="1" sides="7" border="Gray" fill="bg" />
18
+ <polygon width="2" height="2" r="1" sides="8" border="solid" fill="bg" />
19
+ <polygon width="2" height="2" r="1" sides="3" border="solid" fill="DarkSlateGray" rotation="60" />
20
+ <polygon width="2" height="2" r="1" sides="4" border="solid" fill="DarkTurquoise" rotation="45" />
21
+ <polygon width="2" height="2" r="1" sides="5" border="solid" fill="DeepSkyBlue" rotation="36" />
22
+ <polygon width="2" height="2" r="1" sides="6" border="solid" fill="ForestGreen" rotation="30" />
23
+ <polygon width="2" height="2" r="1" sides="7" border="solid" fill="DarkSlateBlue" rotation="25.7" />
24
+ <polygon width="2" height="2" r="1" sides="8" border="solid" fill="bg" rotation="22.2" />
25
+ </table>
26
+ </page>
27
+ </pages>
28
+ </erml>
@@ -0,0 +1,19 @@
1
+ <erml>
2
+ <styles>
3
+ <layout id="flow" padding="0.5in" />
4
+ <layout id="vbox" padding="0.5in" />
5
+ </styles>
6
+ <pages>
7
+ <page units="in" margin="0.75">
8
+ <p underline="true">Images</p>
9
+ <div layout="flow">
10
+ <image url="samples/testimg.jpg" />
11
+ <image url="samples/testimg.jpg" />
12
+ <image url="samples/testimg.jpg" width="7">
13
+ <p>Rose</p>
14
+ </image>
15
+ <image url="samples/testimg.jpg" height="1" />
16
+ </div>
17
+ </page>
18
+ </pages>
19
+ </erml>
@@ -0,0 +1,43 @@
1
+ <erml>
2
+ <styles>
3
+ <layout id="flow" padding="0.5in" />
4
+ <layout id="vbox" padding="0.25in" />
5
+ <layout id="hbox" padding="0.25in" />
6
+ <pen id="solid3" width="3" pattern="solid" color="Orange" />
7
+ <pen id="dotted3" width="3" pattern="dotted" color="Orange" />
8
+ <pen id="dashed3" width="3" pattern="dashed" color="Orange" />
9
+ <pen id="solid5" width="5" pattern="solid" color="Teal" cap="round_cap" />
10
+ <pen id="dotted5" width="5" pattern="dotted" color="Teal" cap="round_cap" />
11
+ <pen id="dashed5" width="5" pattern="dashed" color="Teal" cap="round_cap" />
12
+ <pen id="custom" width="2" pattern="[2 2 4 4 6 6 8 8] 0" color="Black" />
13
+ <pen id="thin" width="0.5" color="Black" />
14
+ <pen id="thinner" width="0.25" color="Black" />
15
+ <pen id="thinnest" width="0.05" color="Black" />
16
+ </styles>
17
+ <pages>
18
+ <define id="hline" tag="line" angle="3" width="100%" height="0.5in" />
19
+ <define id="vline" tag="line" angle="90" height="100%" width = "1pt" />
20
+ <page margin="0.75in" layout="vbox">
21
+ <p underline="true">Lines</p>
22
+ <vbox>
23
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
24
+ <hline />
25
+ <hbox>
26
+ <p text_align="justify" border="dotted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
27
+ <vline />
28
+ <p text_align="justify" border="dotted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
29
+ </hbox>
30
+ <line width="100%" style="solid3" />
31
+ <line width="100%" style="dotted3" />
32
+ <line width="100%" style="dashed3" />
33
+ <line width="100%" style="solid5" />
34
+ <line width="100%" style="dotted5" />
35
+ <line width="100%" style="dashed5" />
36
+ <line width="100%" style="custom" />
37
+ <line width="100%" style="thin" />
38
+ <line width="100%" style="thinner" />
39
+ <line width="100%" style="thinnest" />
40
+ </vbox>
41
+ </page>
42
+ </pages>
43
+ </erml>
@@ -0,0 +1,34 @@
1
+ <erml>
2
+ <styles>
3
+ <font id="helv12" name="Helvetica" size="12" />
4
+ <font id="co14" name="Courier" size="14" />
5
+ <pen id="blue_dash" color="DeepSkyBlue" width="2" pattern="dashed" cap="round_cap" />
6
+ <pen id="gray_dot" color="DarkGray" width="1" pattern="dashed" />
7
+ <layout id="vbox" padding="10" />
8
+ <layout id="hbox" padding="10" />
9
+ </styles>
10
+ <rules>
11
+ <!--
12
+ p.hi { font: helv12; border: blue_dash; padding: 5pt; }
13
+ p.lo { font: co14; border: gray_dot; padding: 5pt; }
14
+ #howdy em { underline: true }
15
+ #howdy>strong { underline: true }
16
+ #howdy p { text_align: justify }
17
+ .hi em { font.color: BlueViolet }
18
+ .lo em { font.color: Maroon }
19
+ -->
20
+ </rules>
21
+ <pages>
22
+ <define id="em" tag="span" font.weight="Bold" />
23
+ <define id="strong" tag="span" font.weight="Bold" />
24
+ <page margin="1in">
25
+ <p underline="true">Classes</p>
26
+ <p class="hi">Lorem ipsum dolor sit <em>amet</em>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
27
+ <p class="lo">Lorem ipsum dolor sit <em>amet</em>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
28
+ <hbox id="howdy">
29
+ <p>Lorem ipsum dolor sit amet, <em>consectetur</em> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
30
+ <p>Lorem ipsum dolor sit amet, <strong>consectetur</strong> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
31
+ </hbox>
32
+ </page>
33
+ </pages>
34
+ </erml>
@@ -0,0 +1,24 @@
1
+ <erml>
2
+ <styles>
3
+ <font id="lbl20" name="Courier" size="20" />
4
+ <layout id="vbox" padding="5" />
5
+ </styles>
6
+ <rules url="samples/test17_rules.erls" />
7
+ <pages>
8
+ <page units="in" margin="1">
9
+ <label underline="true">Labels</label>
10
+ <table cols="3" width="100%">
11
+ <label text_align="left">Top Left</label>
12
+ <label text_align="center">Top Center</label>
13
+ <label text_align="right">Top Right</label>
14
+ <label text_align="left">Middle Left</label>
15
+ <label text_align="center" class="trouble">Middle Center</label>
16
+ <label text_align="right">Middle Right</label>
17
+ <label text_align="left">Bottom Left</label>
18
+ <label text_align="center">Bottom Center</label>
19
+ <label text_align="right">Bottom Right</label>
20
+ </table>
21
+ <label class="reverse rotated" left="0" bottom="1.25" font="lbl20">Label</label>
22
+ </page>
23
+ </pages>
24
+ </erml>
@@ -0,0 +1,9 @@
1
+ <erml>
2
+ <pages>
3
+ <page units="in" margin="1" layout="vbox">
4
+ <label underline="true">Preformatted Text</label>
5
+ <br />
6
+ <pre url="samples/test18_preformatted_text.txt" border="Gray" padding="5pt" />
7
+ </page>
8
+ </pages>
9
+ </erml>
@@ -0,0 +1,26 @@
1
+ <erml>
2
+ <styles>
3
+ <layout id="table" padding="0" />
4
+ <pen id="solid" color="Gray" />
5
+ </styles>
6
+ <rules>
7
+ <!--
8
+ td { border: solid; padding: 3pt; }
9
+ -->
10
+ </rules>
11
+ <pages>
12
+ <define id="td" tag="p" text_align="right" />
13
+ <page units="in" margin="1" layout="vbox">
14
+ <hbox width="100%">
15
+ <label underline="true">ERB Table</label>
16
+ <label text_align="right"><%= Time.now.strftime('%Y.%m.%d %H:%M:%S') %></label>
17
+ </hbox>
18
+ <br />
19
+ <table order="cols" rows="25">
20
+ <% 1.upto(100) do |i| %>
21
+ <td><%= i %></td>
22
+ <% end %>
23
+ </table>
24
+ </page>
25
+ </pages>
26
+ </erml>
@@ -0,0 +1,2 @@
1
+ <erml>
2
+ </erml>
@@ -0,0 +1,20 @@
1
+ %erml
2
+ %styles
3
+ %layout{ :id => 'table', :padding => 0 }
4
+ %pen{ :id => 'solid', :color => 'Gray' }
5
+ %rules
6
+ /
7
+ :sass
8
+ td
9
+ :border solid
10
+ :padding 3pt
11
+ %pages
12
+ %define{ :id => 'td', :tag => 'p', :text_align => 'right' }
13
+ %page{ :units => 'in', :margin => 1, :layout => 'vbox' }
14
+ %hbox{ :width => '100%' }
15
+ %p <u>Haml Table</u>
16
+ %label{ :text_align => 'right' }= Time.now.strftime('%Y.%m.%d %H:%M:%S')
17
+ %br/
18
+ %table{ :order => 'cols', :rows => 25, :width => '100%' }
19
+ - 1.upto(100) do |i|
20
+ %td= i
@@ -0,0 +1,47 @@
1
+ <erml>
2
+ <styles>
3
+ <layout id="table" padding="0.5in" />
4
+ </styles>
5
+ <rules>
6
+ <!--
7
+ rect { width: 2.5; height: 1.5; border: Black }
8
+ rect.green { fill: MediumSeaGreen }
9
+ rect.gold { fill: Gold }
10
+ .relative { position: relative; width: 100%; height: 100%; }
11
+ circle { border: Black; width: 1 }
12
+ circle.red { fill: Crimson }
13
+ circle.gold { fill: Gold }
14
+ -->
15
+ </rules>
16
+ <pages>
17
+ <page units="in" layout="absolute">
18
+ <label underline="true" left="1" top="1">Shift Widgets</label>
19
+ <rect class="green" left="1" top="1.5" />
20
+ <rect class="gold" left="1" top="1.5" shift="0.25,0.25" z_index="-1" />
21
+ <div left="1" top="4" width="5" height="5">
22
+ <table cols="3" class="relative">
23
+ <circle class="red" />
24
+ <circle class="red" />
25
+ <circle class="red" />
26
+ <circle class="red" />
27
+ <circle class="red" />
28
+ <circle class="red" />
29
+ <circle class="red" />
30
+ <circle class="red" />
31
+ <circle class="red" />
32
+ </table>
33
+ <table cols="3" class="relative" shift="0.1,0.1" z_index="-1">
34
+ <circle class="gold" />
35
+ <circle class="gold" />
36
+ <circle class="gold" />
37
+ <circle class="gold" />
38
+ <circle class="gold" />
39
+ <circle class="gold" />
40
+ <circle class="gold" />
41
+ <circle class="gold" />
42
+ <circle class="gold" />
43
+ </table>
44
+ </div>
45
+ </page>
46
+ </pages>
47
+ </erml>
@@ -0,0 +1,40 @@
1
+ <erml>
2
+ <styles>
3
+ <layout id="flow" padding="0.5in" />
4
+ </styles>
5
+ <rules>
6
+ <!--
7
+ rect { width: 2.5; height: 1.5; border: Black }
8
+ rect.green { fill: MediumSeaGreen }
9
+ rect.gold { fill: Gold }
10
+ circle { border: Black; width: 1.5 }
11
+ circle.red { fill: Crimson }
12
+ circle.gold { fill: Gold }
13
+ -->
14
+ </rules>
15
+ <pages>
16
+ <page units="in" margin="1" layout="flow">
17
+ <label underline="true" width="100%">Multi-Page Flow Layout</label>
18
+ <rect class="green" />
19
+ <rect class="gold" />
20
+ <circle class="red" />
21
+ <circle class="red" />
22
+ <circle class="red" />
23
+ <circle class="red" />
24
+ <circle class="red" />
25
+ <circle class="red" />
26
+ <circle class="red" />
27
+ <circle class="red" />
28
+ <circle class="red" />
29
+ <circle class="gold" />
30
+ <circle class="gold" />
31
+ <circle class="gold" />
32
+ <circle class="gold" />
33
+ <circle class="gold" />
34
+ <circle class="gold" />
35
+ <circle class="gold" />
36
+ <circle class="gold" />
37
+ <circle class="gold" />
38
+ </page>
39
+ </pages>
40
+ </erml>
@@ -0,0 +1,17 @@
1
+ <erml>
2
+ <pages units="in" margin="1">
3
+ <page>
4
+ <h>Page <pageno /></h>
5
+ </page>
6
+ <page>
7
+ <h>Page <pageno /></h>
8
+ </page>
9
+ <page layout="vbox">
10
+ <h>Page <pageno>10</pageno></h>
11
+ <label align="bottom" angle="45">This is page <pageno /></label>
12
+ </page>
13
+ <page>
14
+ <h>Page <pageno /></h>
15
+ </page>
16
+ </pages>
17
+ </erml>
@@ -0,0 +1,37 @@
1
+ <erml>
2
+ <styles>
3
+ <font id="title" name="Clarendon" size="14" />
4
+ <font id="body" name="Clarendon-Light" size="12" />
5
+ <font id="copyright" name="Helvetica" size="8" />
6
+ <font id="pageno" name="Helvetica" size="12" />
7
+ <layout id="vbox" padding="10pt" />
8
+ </styles>
9
+ <rules>
10
+ <!--
11
+ p { font: body; text-align: justify }
12
+ header { display: always; margin-bottom: 12pt }
13
+ footer { display: always; layout: hbox }
14
+ .title { font: title }
15
+ .subtitle { display: first; text-align: center; width: 100% }
16
+ .copyright { font: copyright }
17
+ pageno { font: pageno }
18
+ -->
19
+ </rules>
20
+ <pages>
21
+ <define id="header" tag="div" align="top" width="100%" />
22
+ <define id="footer" tag="div" align="bottom" />
23
+ <page units="in" margin="1" layout="vbox" overflow="true">
24
+ <header>
25
+ <h class="title">Some Title</h>
26
+ <p class="subtitle">The sub-title would go here.</p>
27
+ </header>
28
+ <% 10.times do |i| %>
29
+ <p><%= i + 1 %>. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
30
+ <% end %>
31
+ <footer>
32
+ <p class="copyright">Copyright (c) 2008 Eidetic Software. All rights reserved.</p>
33
+ <p width="1in" text_align="right">Page <pageno /></p>
34
+ </footer>
35
+ </page>
36
+ </pages>
37
+ </erml>