You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

corresprop.fo 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- example for a simple fo file. At the beginning the page layout is set.
  3. Below fo:root there is always
  4. - a single fo:layout-master-set which defines one or more page layouts
  5. - an optional fo:declarations,
  6. - and a sequence of one or more fo:page-sequences containing the text and formatting instructions -->
  7. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  8. <fo:layout-master-set>
  9. <!-- layout for the first page -->
  10. <fo:simple-page-master master-name="first"
  11. page-height="29.7cm"
  12. page-width="21cm"
  13. margin-top="1cm"
  14. margin-bottom="2cm"
  15. margin-left="2.0cm + 0.5cm"
  16. margin-right="(5cm * 1cm) div 2cm">
  17. <fo:region-body margin-top="3cm"/>
  18. <fo:region-before extent="3cm"/>
  19. <fo:region-after extent="1.5cm"/>
  20. </fo:simple-page-master>
  21. <!-- layout for the other pages -->
  22. <fo:simple-page-master master-name="rest"
  23. page-height="abs(-30cm + .3cm)"
  24. page-width="(10cm * 2) + 1cm"
  25. margin-top="round(.5) * 1cm"
  26. margin-bottom="round(2.4) * 1cm"
  27. margin-left="2.5 * 1cm"
  28. margin-right="5.5cm - 3cm">
  29. <fo:region-body margin-top="2.5cm"/>
  30. <fo:region-before extent="2.5cm"/>
  31. <fo:region-after extent="1.5cm"/>
  32. </fo:simple-page-master>
  33. <fo:page-sequence-master master-name="basicPSM" >
  34. <fo:repeatable-page-master-alternatives>
  35. <fo:conditional-page-master-reference master-reference="first"
  36. page-position="first" />
  37. <fo:conditional-page-master-reference master-reference="rest"
  38. page-position="rest" />
  39. <!-- recommended fallback procedure -->
  40. <fo:conditional-page-master-reference master-reference="rest" />
  41. </fo:repeatable-page-master-alternatives>
  42. </fo:page-sequence-master>
  43. </fo:layout-master-set>
  44. <!-- end: defines page layout -->
  45. <!-- actual layout -->
  46. <fo:page-sequence master-reference="basicPSM">
  47. <!-- header -->
  48. <fo:static-content flow-name="xsl-region-before">
  49. <fo:block text-align="end"
  50. font-size="10pt"
  51. font-family="serif"
  52. line-height="1em + 4pt" >
  53. Corresponding Property Tests - p. <fo:page-number/>
  54. </fo:block>
  55. </fo:static-content>
  56. <fo:flow flow-name="xsl-region-body">
  57. <!-- defines text title level 1-->
  58. <fo:block font-size="min(18pt,20pt)"
  59. font-family="sans-serif"
  60. line-height="max(24pt,18pt)"
  61. space-after.optimum="5 mod 3 * 7.5pt"
  62. background-color="rgb(0,0,255)"
  63. color="rgb(255,255,255)"
  64. text-align="center"
  65. padding-top="3pt">
  66. Corresponding Property Tests
  67. </fo:block>
  68. <!-- Normal text -->
  69. <fo:block font-size="12pt"
  70. font-family="sans-serif"
  71. line-height="1.25em"
  72. space-after="12pt"
  73. text-align="start"
  74. background-color="rgb(200,200,200)"
  75. start-indent="3mm" end-indent="3mm"
  76. padding-left="3mm" padding-right="3mm"
  77. padding-top="4mm" padding-bottom="4mm"
  78. border-left-width="1pt" border-right-width="1pt"
  79. border-top-width="2pt" border-bottom-width="2pt"
  80. border-top-color="red" border-bottom-color="blue">
  81. In this example, padding and border properties are specified using absolute properties:
  82. padding-left, padding-right, padding-top, and padding-bottom, etc.
  83. According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified.
  84. </fo:block>
  85. <!-- Normal text -->
  86. <fo:block font-size="12pt"
  87. font-family="sans-serif"
  88. line-height="1.25em"
  89. space-after="3pt"
  90. text-align="start"
  91. background-color="rgb(200,200,200)"
  92. start-indent="3mm" end-indent="3mm"
  93. padding-before="4mm" padding-after="4mm"
  94. padding-start.length="3mm" padding-end.length="3mm"
  95. border-start-width="1pt" border-end-width="1pt"
  96. border-before-width="2pt" border-after-width="2pt"
  97. border-before-color="red" border-after-color="blue">
  98. In this example, padding and border properties are specified using writing-mode relative properties:
  99. padding-before, padding-after, padding-start, and padding-end, etc.
  100. According to the specification, a request for the absolute (top, bottom, left, right) versions of these properties should use the relative ones if they are specified.
  101. </fo:block>
  102. <fo:block font-size="12pt"
  103. font-family="sans-serif"
  104. line-height="1.25em"
  105. space-before="12pt"
  106. space-after="3pt"
  107. text-align="start"
  108. start-indent="1cm">
  109. This block has a start-indent of 1cm and no borders or padding. It has
  110. no margin-left set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  111. </fo:block>
  112. <fo:block font-size="12pt"
  113. font-family="sans-serif"
  114. line-height="1.25em"
  115. space-before="12pt"
  116. space-after="3pt"
  117. text-align="start"
  118. margin-left="1cm">
  119. This block has a margin-left of 1cm and no borders or padding. It has
  120. no start-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  121. </fo:block>
  122. <fo:block font-size="12pt"
  123. font-family="sans-serif"
  124. line-height="1.25em"
  125. space-before="12pt"
  126. space-after="3pt"
  127. text-align="start"
  128. start-indent="1cm"
  129. padding-left="4mm" border-left-width="1mm">
  130. This block has a start-indent of 1cm, padding-left of 4mm and border-left-width of 1mm. It has
  131. no margin-left set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  132. </fo:block>
  133. <fo:block font-size="12pt"
  134. font-family="sans-serif"
  135. line-height="1.25em"
  136. space-before="12pt"
  137. space-after="3pt"
  138. text-align="start"
  139. margin-left="5mm"
  140. padding-left="4mm" border-left-width="1mm">
  141. This block has a margin-left of 5mm, padding-left of 4mm and border-left-width of 1mm. (Margin is outside the border rectangle.) It has
  142. no start-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  143. </fo:block>
  144. <!-- defines text title level 1-->
  145. <fo:block font-size="14pt"
  146. font-family="serif"
  147. font-weight="bold"
  148. line-height="16pt"
  149. space-after="6pt"
  150. text-align="center"
  151. break-before="page">
  152. End-indent tests
  153. </fo:block>
  154. <fo:block font-size="12pt"
  155. font-family="sans-serif"
  156. line-height="1.25em"
  157. space-before="12pt"
  158. space-after="3pt"
  159. text-align="end"
  160. end-indent="1cm">
  161. This block has an end-indent of 1cm and no borders or padding. It has
  162. no margin-right set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  163. </fo:block>
  164. <fo:block font-size="12pt"
  165. font-family="sans-serif"
  166. line-height="1.25em"
  167. space-before="12pt"
  168. space-after="3pt"
  169. text-align="end"
  170. margin-right="1cm">
  171. This block has a margin-right of 1cm and no borders or padding. It has
  172. no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  173. </fo:block>
  174. <fo:block font-size="12pt"
  175. font-family="sans-serif"
  176. line-height="1.25em"
  177. space-before="12pt"
  178. space-after="3pt"
  179. text-align="end"
  180. end-indent="1cm"
  181. padding-end="4mm" border-end-width="1mm">
  182. This block has an end-indent of 1cm, padding-end of 4mm and border-end-width of 1mm. It has
  183. no margin-right set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  184. </fo:block>
  185. <fo:block font-size="12pt"
  186. font-family="sans-serif"
  187. line-height="1.25em"
  188. space-before="12pt"
  189. space-after="3pt"
  190. text-align="end"
  191. margin-right="5mm"
  192. padding-right="4mm" border-right-width="1mm">
  193. This block has a margin-right of 5mm, padding-right of 4mm and
  194. border-right-width of 1mm. (Margin is outside the border rectangle.) It has
  195. no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  196. </fo:block>
  197. <fo:block font-size="12pt"
  198. font-family="sans-serif"
  199. line-height="1.25em"
  200. space-before="12pt"
  201. space-after="3pt"
  202. text-align="end"
  203. margin-right="5mm"
  204. padding-end="4mm" border-end-width="1mm">
  205. This block has a margin-right of 5mm, padding-end of 4mm and
  206. border-end-width of 1mm. (Margin is outside the border rectangle.) It has
  207. no end-indent set. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text. Here is some more text to fill out the block. Here is some more text to fill out the block. Here is some more text to fill out the block.
  208. </fo:block>
  209. </fo:flow>
  210. </fo:page-sequence>
  211. </fo:root>