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

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