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.

textdeko.fo 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- simple example for text-decoration -->
  3. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4. <fo:layout-master-set>
  5. <!-- layout for the first page -->
  6. <fo:simple-page-master master-name="first"
  7. page-height="29.7cm"
  8. page-width="21cm"
  9. margin-top="1cm"
  10. margin-bottom="2cm"
  11. margin-left="2.5cm"
  12. margin-right="2.5cm">
  13. <fo:region-body margin-top="3cm"/>
  14. <fo:region-before extent="3cm"/>
  15. <fo:region-after extent="1.5cm"/>
  16. </fo:simple-page-master>
  17. <!-- layout for the other pages -->
  18. <fo:simple-page-master master-name="rest"
  19. page-height="29.7cm"
  20. page-width="21cm"
  21. margin-top="1cm"
  22. margin-bottom="2cm"
  23. margin-left="2.5cm"
  24. margin-right="2.5cm">
  25. <fo:region-body margin-top="2.5cm"/>
  26. <fo:region-before extent="2.5cm"/>
  27. <fo:region-after extent="1.5cm"/>
  28. </fo:simple-page-master>
  29. <fo:page-sequence-master master-name="basicPSM" >
  30. <fo:repeatable-page-master-alternatives>
  31. <fo:conditional-page-master-reference master-reference="first"
  32. page-position="first" />
  33. <fo:conditional-page-master-reference master-reference="rest"
  34. page-position="rest" />
  35. <!-- recommended fallback procedure -->
  36. <fo:conditional-page-master-reference master-reference="rest" />
  37. </fo:repeatable-page-master-alternatives>
  38. </fo:page-sequence-master>
  39. </fo:layout-master-set>
  40. <!-- end: defines page layout -->
  41. <!-- actual layout -->
  42. <fo:page-sequence master-reference="basicPSM">
  43. <fo:flow flow-name="xsl-region-body">
  44. <fo:block font-size="18pt" font-family="sans-serif" line-height="24pt" space-after.optimum="15pt"
  45. background-color="blue" color="white" text-align="center" padding-top="3pt">
  46. Simple example for text-decoration
  47. </fo:block>
  48. <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" text-align="justify" space-after.optimum="10pt">
  49. The "text-decoration"-property describes decorations that are added to the text of an element.
  50. If the property is specified for a block-level element, it should affect all inline-level descendants
  51. of the element (does not work yet!).
  52. If it is specified for (or affects) an inline-level
  53. element, it affects all boxes generated by the element.
  54. </fo:block>
  55. <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" space-after.optimum="13pt">
  56. Example: <fo:inline text-decoration="underline">underline</fo:inline>
  57. </fo:block>
  58. <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" space-after.optimum="10pt">
  59. <fo:inline font-family="monospace"><![CDATA[<fo:inline text-decoration="underline">underline</fo:inline>]]></fo:inline>
  60. </fo:block>
  61. <fo:block font-size="12pt"
  62. font-family="serif"
  63. line-height="15pt"
  64. space-after.optimum="10pt"
  65. text-align="start">
  66. This is simple test of the text-decoration<fo:inline text-decoration="underline">underline</fo:inline>.
  67. </fo:block>
  68. <fo:block font-size="22pt"
  69. font-family="sans-serif"
  70. line-height="15pt"
  71. space-after.optimum="10pt"
  72. text-align="start">
  73. This is simple test with a <fo:inline text-decoration="underline">bigger</fo:inline> font-size.
  74. </fo:block>
  75. <fo:block font-size="12pt"
  76. font-family="monospace"
  77. line-height="15pt"
  78. space-after.optimum="20pt"
  79. text-align="start">
  80. This is simple test with a <fo:inline text-decoration="underline">monospaced</fo:inline> font.
  81. </fo:block>
  82. <fo:block font-size="12pt" font-family="sans-serif" line-height="15pt" text-align="justify" space-after.optimum="3pt">
  83. The following text decorations are defined in the CR:
  84. </fo:block>
  85. <fo:list-block space-after.optimum="13pt">
  86. <fo:list-item>
  87. <fo:list-item-label end-indent="label-end()">
  88. <fo:block>&#x2022;</fo:block>
  89. </fo:list-item-label>
  90. <fo:list-item-body start-indent="body-start()">
  91. <fo:block>
  92. <fo:inline text-decoration="none">none</fo:inline>
  93. </fo:block>
  94. </fo:list-item-body>
  95. </fo:list-item>
  96. <fo:list-item>
  97. <fo:list-item-label end-indent="label-end()">
  98. <fo:block>&#x2022;</fo:block>
  99. </fo:list-item-label>
  100. <fo:list-item-body start-indent="body-start()">
  101. <fo:block>
  102. <fo:inline text-decoration="underline">underline</fo:inline>
  103. </fo:block>
  104. </fo:list-item-body>
  105. </fo:list-item>
  106. <fo:list-item>
  107. <fo:list-item-label end-indent="label-end()">
  108. <fo:block>&#x2022;</fo:block>
  109. </fo:list-item-label>
  110. <fo:list-item-body start-indent="body-start()">
  111. <fo:block>
  112. <fo:inline text-decoration="overline">overline</fo:inline>
  113. </fo:block>
  114. </fo:list-item-body>
  115. </fo:list-item>
  116. <fo:list-item>
  117. <fo:list-item-label end-indent="label-end()">
  118. <fo:block>&#x2022;</fo:block>
  119. </fo:list-item-label>
  120. <fo:list-item-body start-indent="body-start()">
  121. <fo:block>
  122. <fo:inline text-decoration="line-through">line-through</fo:inline>
  123. </fo:block>
  124. </fo:list-item-body>
  125. </fo:list-item>
  126. <fo:list-item>
  127. <fo:list-item-label end-indent="label-end()">
  128. <fo:block>&#x2022;</fo:block>
  129. </fo:list-item-label>
  130. <fo:list-item-body start-indent="body-start()">
  131. <fo:block>
  132. <fo:inline text-decoration="blink">blink</fo:inline>
  133. </fo:block>
  134. </fo:list-item-body>
  135. </fo:list-item>
  136. <fo:list-item>
  137. <fo:list-item-label end-indent="label-end()">
  138. <fo:block>&#x2022;</fo:block>
  139. </fo:list-item-label>
  140. <fo:list-item-body start-indent="body-start()">
  141. <fo:block>
  142. <fo:inline text-decoration="no-underline">no-underline</fo:inline>
  143. </fo:block>
  144. </fo:list-item-body>
  145. </fo:list-item>
  146. <fo:list-item>
  147. <fo:list-item-label end-indent="label-end()">
  148. <fo:block>&#x2022;</fo:block>
  149. </fo:list-item-label>
  150. <fo:list-item-body start-indent="body-start()">
  151. <fo:block>
  152. <fo:inline text-decoration="no-overline">no-overline</fo:inline>
  153. </fo:block>
  154. </fo:list-item-body>
  155. </fo:list-item>
  156. <fo:list-item>
  157. <fo:list-item-label end-indent="label-end()">
  158. <fo:block>&#x2022;</fo:block>
  159. </fo:list-item-label>
  160. <fo:list-item-body start-indent="body-start()">
  161. <fo:block>
  162. <fo:inline text-decoration="no-line-through">no-line-through</fo:inline>
  163. </fo:block>
  164. </fo:list-item-body>
  165. </fo:list-item>
  166. <fo:list-item>
  167. <fo:list-item-label end-indent="label-end()">
  168. <fo:block>&#x2022;</fo:block>
  169. </fo:list-item-label>
  170. <fo:list-item-body start-indent="body-start()">
  171. <fo:block>
  172. <fo:inline text-decoration="no-blink">no-blink</fo:inline>
  173. </fo:block>
  174. </fo:list-item-body>
  175. </fo:list-item>
  176. </fo:list-block>
  177. <fo:block font-size="12pt" space-after.optimum="3pt">
  178. <fo:inline text-decoration="underline overline">Combination</fo:inline> of property
  179. values should also be possible, but does not work in FOP at the moment.
  180. </fo:block>
  181. <fo:block font-size="12pt" space-after.optimum="13pt">
  182. <fo:inline font-family="monospace"><![CDATA[<fo:inline text-decoration="underline overline">
  183. Combination</fo:inline>]]></fo:inline>
  184. </fo:block>
  185. <fo:block space-after.optimum="13pt">
  186. And now <fo:inline text-decoration="underline">more than a word...</fo:inline>
  187. </fo:block>
  188. <fo:block space-after.optimum="13pt" font-size="14pt" >
  189. <fo:inline text-decoration="underline">
  190. This is a whole block wrapped in fo:inline with the property text-decoration="underline".
  191. Some more Text to get at least two lines.
  192. </fo:inline>
  193. </fo:block>
  194. <fo:block font-size="22pt"
  195. font-family="sans-serif"
  196. line-height="22pt"
  197. space-after.optimum="10pt"
  198. text-align="start">
  199. This is simple test with a <fo:inline text-decoration="overline">bigger font-size</fo:inline>.
  200. </fo:block>
  201. <fo:block font-size="15pt"
  202. font-family="monospace"
  203. line-height="15pt"
  204. space-after.optimum="10pt"
  205. text-align="start">
  206. This is simple test with a <fo:inline text-decoration="line-through">monospaced font</fo:inline>.
  207. </fo:block>
  208. <fo:block font-size="15pt"
  209. line-height="15pt"
  210. space-after.optimum="10pt"
  211. text-align="start">
  212. What about underlining of whitespace only<fo:inline text-decoration="underline"> </fo:inline>?
  213. </fo:block>
  214. </fo:flow>
  215. </fo:page-sequence>
  216. </fo:root>