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.

space.fo 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3. <fo:layout-master-set>
  4. <fo:simple-page-master master-name="first"
  5. margin-right="1.5cm"
  6. margin-left="1.5cm"
  7. margin-bottom="2cm"
  8. margin-top="1cm"
  9. page-width="21cm"
  10. page-height="29.7cm">
  11. <fo:region-body margin-top="1cm"/>
  12. <fo:region-before extent="1cm"/>
  13. <fo:region-after extent="1.5cm"/>
  14. </fo:simple-page-master>
  15. </fo:layout-master-set>
  16. <fo:page-sequence master-reference="first">
  17. <fo:static-content flow-name="xsl-region-before">
  18. <fo:block line-height="14pt" font-size="10pt"
  19. text-align="end">table examples</fo:block>
  20. </fo:static-content>
  21. <fo:static-content flow-name="xsl-region-after">
  22. <fo:block line-height="14pt" font-size="10pt"
  23. text-align="end">Page <fo:page-number/></fo:block>
  24. </fo:static-content>
  25. <fo:flow flow-name="xsl-region-body">
  26. <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
  27. Table 1: spaces around cells
  28. </fo:block>
  29. <fo:table border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  30. <fo:table-column column-width="3cm"/>
  31. <fo:table-column column-width="3cm"/>
  32. <fo:table-column column-width="3cm"/>
  33. <fo:table-body>
  34. <fo:table-row>
  35. <fo:table-cell border-style="solid" border-width="0.5pt">
  36. <fo:block text-align="center">
  37. first
  38. </fo:block>
  39. </fo:table-cell>
  40. <fo:table-cell border-style="solid" border-width="0.5pt">
  41. <fo:block text-align="center">
  42. table
  43. </fo:block>
  44. </fo:table-cell>
  45. <fo:table-cell border-style="solid" border-width="0.5pt">
  46. <fo:block text-align="center">
  47. row
  48. </fo:block>
  49. </fo:table-cell>
  50. </fo:table-row>
  51. <fo:table-row>
  52. <fo:table-cell border-style="solid" border-width="0.5pt">
  53. <fo:block text-align="center">
  54. </fo:block>
  55. </fo:table-cell>
  56. <fo:table-cell padding-left="5pt" border-style="solid" border-width="0.5pt">
  57. <fo:block text-align="center">
  58. left 5pt
  59. </fo:block>
  60. </fo:table-cell>
  61. <fo:table-cell border-style="solid" border-width="0.5pt">
  62. <fo:block text-align="center">
  63. </fo:block>
  64. </fo:table-cell>
  65. </fo:table-row>
  66. <fo:table-row>
  67. <fo:table-cell space-before.optimum="5pt" border-style="solid" border-width="0.5pt">
  68. <fo:block text-align="center">
  69. before 5pt
  70. </fo:block>
  71. </fo:table-cell>
  72. <fo:table-cell padding-right="5pt" border-style="solid" border-width="0.5pt">
  73. <fo:block text-align="center">
  74. right 5pt
  75. </fo:block>
  76. </fo:table-cell>
  77. <fo:table-cell space-after.optimum="5pt" border-style="solid" border-width="0.5pt">
  78. <fo:block text-align="center">
  79. after 5pt
  80. </fo:block>
  81. </fo:table-cell>
  82. </fo:table-row>
  83. <fo:table-row>
  84. <fo:table-cell border-style="solid" border-width="0.5pt">
  85. <fo:block text-align="center">
  86. last
  87. </fo:block>
  88. </fo:table-cell>
  89. <fo:table-cell border-style="solid" border-width="0.5pt">
  90. <fo:block text-align="center">
  91. table
  92. </fo:block>
  93. </fo:table-cell>
  94. <fo:table-cell border-style="solid" border-width="0.5pt">
  95. <fo:block text-align="center">
  96. row
  97. </fo:block>
  98. </fo:table-cell>
  99. </fo:table-row>
  100. </fo:table-body>
  101. </fo:table>
  102. <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
  103. Table 2: spaces around rows
  104. </fo:block>
  105. <fo:table border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  106. <fo:table-column column-width="3cm"/>
  107. <fo:table-column column-width="3cm"/>
  108. <fo:table-column column-width="3cm"/>
  109. <fo:table-body>
  110. <fo:table-row border-style="solid" border-width="0.5pt" padding-left="5pt">
  111. <fo:table-cell>
  112. <fo:block text-align="center">
  113. padding
  114. </fo:block>
  115. </fo:table-cell>
  116. <fo:table-cell>
  117. <fo:block text-align="center">
  118. left
  119. </fo:block>
  120. </fo:table-cell>
  121. <fo:table-cell>
  122. <fo:block text-align="center">
  123. 5pt
  124. </fo:block>
  125. </fo:table-cell>
  126. </fo:table-row>
  127. <fo:table-row border-style="solid" border-width="0.5pt" space-before.optimum="5pt">
  128. <fo:table-cell>
  129. <fo:block text-align="center">
  130. space
  131. </fo:block>
  132. </fo:table-cell>
  133. <fo:table-cell>
  134. <fo:block text-align="center">
  135. before
  136. </fo:block>
  137. </fo:table-cell>
  138. <fo:table-cell>
  139. <fo:block text-align="center">
  140. 5pt
  141. </fo:block>
  142. </fo:table-cell>
  143. </fo:table-row>
  144. <fo:table-row border-style="solid" border-width="0.5pt" space-after.optimum="5pt">
  145. <fo:table-cell>
  146. <fo:block text-align="center">
  147. space
  148. </fo:block>
  149. </fo:table-cell>
  150. <fo:table-cell>
  151. <fo:block text-align="center">
  152. after
  153. </fo:block>
  154. </fo:table-cell>
  155. <fo:table-cell>
  156. <fo:block text-align="center">
  157. 5pt
  158. </fo:block>
  159. </fo:table-cell>
  160. </fo:table-row>
  161. <fo:table-row border-style="solid" border-width="0.5pt" padding-right="5pt">
  162. <fo:table-cell>
  163. <fo:block text-align="center">
  164. padding
  165. </fo:block>
  166. </fo:table-cell>
  167. <fo:table-cell>
  168. <fo:block text-align="center">
  169. right
  170. </fo:block>
  171. </fo:table-cell>
  172. <fo:table-cell>
  173. <fo:block text-align="center">
  174. 5pt
  175. </fo:block>
  176. </fo:table-cell>
  177. </fo:table-row>
  178. </fo:table-body>
  179. </fo:table>
  180. <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
  181. Table 3: spaces around body
  182. </fo:block>
  183. <fo:table border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  184. <fo:table-column column-width="3cm"/>
  185. <fo:table-column column-width="3cm"/>
  186. <fo:table-column column-width="3cm"/>
  187. <fo:table-body border-style="solid" border-width="0.5pt" padding-left="5pt">
  188. <fo:table-row>
  189. <fo:table-cell>
  190. <fo:block text-align="center">
  191. padding
  192. </fo:block>
  193. </fo:table-cell>
  194. <fo:table-cell>
  195. <fo:block text-align="center">
  196. left
  197. </fo:block>
  198. </fo:table-cell>
  199. <fo:table-cell>
  200. <fo:block text-align="center">
  201. 5pt
  202. </fo:block>
  203. </fo:table-cell>
  204. </fo:table-row>
  205. </fo:table-body>
  206. <fo:table-body border-style="solid" border-width="0.5pt" space-before.optimum="5pt">
  207. <fo:table-row>
  208. <fo:table-cell>
  209. <fo:block text-align="center">
  210. space
  211. </fo:block>
  212. </fo:table-cell>
  213. <fo:table-cell>
  214. <fo:block text-align="center">
  215. before
  216. </fo:block>
  217. </fo:table-cell>
  218. <fo:table-cell>
  219. <fo:block text-align="center">
  220. 5pt
  221. </fo:block>
  222. </fo:table-cell>
  223. </fo:table-row>
  224. </fo:table-body>
  225. <fo:table-body border-style="solid" border-width="0.5pt" space-after.optimum="5pt">
  226. <fo:table-row>
  227. <fo:table-cell>
  228. <fo:block text-align="center">
  229. space
  230. </fo:block>
  231. </fo:table-cell>
  232. <fo:table-cell>
  233. <fo:block text-align="center">
  234. after
  235. </fo:block>
  236. </fo:table-cell>
  237. <fo:table-cell>
  238. <fo:block text-align="center">
  239. 5pt
  240. </fo:block>
  241. </fo:table-cell>
  242. </fo:table-row>
  243. </fo:table-body>
  244. <fo:table-body border-style="solid" border-width="0.5pt" padding-right="5pt">
  245. <fo:table-row>
  246. <fo:table-cell>
  247. <fo:block text-align="center">
  248. padding
  249. </fo:block>
  250. </fo:table-cell>
  251. <fo:table-cell>
  252. <fo:block text-align="center">
  253. right
  254. </fo:block>
  255. </fo:table-cell>
  256. <fo:table-cell>
  257. <fo:block text-align="center">
  258. 5pt
  259. </fo:block>
  260. </fo:table-cell>
  261. </fo:table-row>
  262. </fo:table-body>
  263. </fo:table>
  264. <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
  265. Table 4: spaces around table
  266. </fo:block>
  267. <fo:block border-style="solid" border-width="0.5pt">
  268. <fo:table space-before.optimum="5pt" border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  269. <fo:table-column column-width="3cm"/>
  270. <fo:table-column column-width="3cm"/>
  271. <fo:table-column column-width="3cm"/>
  272. <fo:table-body>
  273. <fo:table-row>
  274. <fo:table-cell>
  275. <fo:block text-align="center">
  276. table
  277. </fo:block>
  278. </fo:table-cell>
  279. <fo:table-cell>
  280. <fo:block text-align="center">
  281. space before
  282. </fo:block>
  283. </fo:table-cell>
  284. <fo:table-cell>
  285. <fo:block text-align="center">
  286. 5pt
  287. </fo:block>
  288. </fo:table-cell>
  289. </fo:table-row>
  290. </fo:table-body>
  291. </fo:table>
  292. </fo:block>
  293. <fo:block border-style="solid" border-width="0.5pt">
  294. <fo:table padding-left="5pt" border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  295. <fo:table-column column-width="3cm"/>
  296. <fo:table-column column-width="3cm"/>
  297. <fo:table-column column-width="3cm"/>
  298. <fo:table-body>
  299. <fo:table-row>
  300. <fo:table-cell>
  301. <fo:block text-align="center">
  302. table
  303. </fo:block>
  304. </fo:table-cell>
  305. <fo:table-cell>
  306. <fo:block text-align="center">
  307. padding left
  308. </fo:block>
  309. </fo:table-cell>
  310. <fo:table-cell>
  311. <fo:block text-align="center">
  312. 5pt
  313. </fo:block>
  314. </fo:table-cell>
  315. </fo:table-row>
  316. </fo:table-body>
  317. </fo:table>
  318. </fo:block>
  319. <fo:block border-style="solid" border-width="0.5pt">
  320. <fo:table padding-right="5pt" border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  321. <fo:table-column column-width="3cm"/>
  322. <fo:table-column column-width="3cm"/>
  323. <fo:table-column column-width="3cm"/>
  324. <fo:table-body>
  325. <fo:table-row>
  326. <fo:table-cell>
  327. <fo:block text-align="center">
  328. table
  329. </fo:block>
  330. </fo:table-cell>
  331. <fo:table-cell>
  332. <fo:block text-align="center">
  333. padding right
  334. </fo:block>
  335. </fo:table-cell>
  336. <fo:table-cell>
  337. <fo:block text-align="center">
  338. 5pt
  339. </fo:block>
  340. </fo:table-cell>
  341. </fo:table-row>
  342. </fo:table-body>
  343. </fo:table>
  344. </fo:block>
  345. <fo:block border-style="solid" border-width="0.5pt">
  346. <fo:table space-after.optimum="5pt" border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  347. <fo:table-column column-width="3cm"/>
  348. <fo:table-column column-width="3cm"/>
  349. <fo:table-column column-width="3cm"/>
  350. <fo:table-body>
  351. <fo:table-row>
  352. <fo:table-cell>
  353. <fo:block text-align="center">
  354. table
  355. </fo:block>
  356. </fo:table-cell>
  357. <fo:table-cell>
  358. <fo:block text-align="center">
  359. space after
  360. </fo:block>
  361. </fo:table-cell>
  362. <fo:table-cell>
  363. <fo:block text-align="center">
  364. 5pt
  365. </fo:block>
  366. </fo:table-cell>
  367. </fo:table-row>
  368. </fo:table-body>
  369. </fo:table>
  370. </fo:block>
  371. <fo:block space-before.optimum="3pt" space-after.optimum="15pt">
  372. Table 5: combinations
  373. </fo:block>
  374. <fo:block border-style="solid" border-width="0.5pt">
  375. <fo:table space-after.optimum="20pt" border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  376. <fo:table-column column-width="3cm"/>
  377. <fo:table-column column-width="3cm"/>
  378. <fo:table-column column-width="3cm"/>
  379. <fo:table-body space-after.optimum="15pt" border-style="solid" border-width="0.5pt" border-color="green">
  380. <fo:table-row space-after.optimum="10pt" border-style="solid" border-width="0.5pt" border-color="blue">
  381. <fo:table-cell space-after.optimum="5pt" border-style="solid" border-width="0.5pt" border-color="yellow">
  382. <fo:block text-align="center">
  383. after 5pt
  384. </fo:block>
  385. </fo:table-cell>
  386. <fo:table-cell>
  387. <fo:block text-align="center">
  388. and row
  389. </fo:block>
  390. </fo:table-cell>
  391. <fo:table-cell>
  392. <fo:block text-align="center">
  393. after 10pt
  394. </fo:block>
  395. </fo:table-cell>
  396. </fo:table-row>
  397. <fo:table-row>
  398. <fo:table-cell>
  399. <fo:block text-align="center">
  400. and
  401. </fo:block>
  402. </fo:table-cell>
  403. <fo:table-cell>
  404. <fo:block text-align="center">
  405. body
  406. </fo:block>
  407. </fo:table-cell>
  408. <fo:table-cell>
  409. <fo:block text-align="center">
  410. after 15pt
  411. </fo:block>
  412. </fo:table-cell>
  413. </fo:table-row>
  414. </fo:table-body>
  415. <fo:table-body>
  416. <fo:table-row>
  417. <fo:table-cell>
  418. <fo:block text-align="center">
  419. and
  420. </fo:block>
  421. </fo:table-cell>
  422. <fo:table-cell>
  423. <fo:block text-align="center">
  424. table
  425. </fo:block>
  426. </fo:table-cell>
  427. <fo:table-cell>
  428. <fo:block text-align="center">
  429. after 20pt
  430. </fo:block>
  431. </fo:table-cell>
  432. </fo:table-row>
  433. </fo:table-body>
  434. </fo:table>
  435. </fo:block>
  436. <fo:block border-style="solid" border-width="0.5pt">
  437. <fo:table space-after.optimum="5pt" border-style="solid" border-width="0.5pt" border-color="red" table-layout="fixed" width="100%">
  438. <fo:table-column column-width="3cm"/>
  439. <fo:table-column column-width="3cm"/>
  440. <fo:table-column column-width="3cm"/>
  441. <fo:table-body space-after.optimum="10pt" border-style="solid" border-width="0.5pt" border-color="green">
  442. <fo:table-row space-after.optimum="15pt" border-style="solid" border-width="0.5pt" border-color="blue">
  443. <fo:table-cell space-after.optimum="20pt" border-style="solid" border-width="0.5pt" border-color="yellow">
  444. <fo:block text-align="center">
  445. after 20pt
  446. </fo:block>
  447. </fo:table-cell>
  448. <fo:table-cell>
  449. <fo:block text-align="center">
  450. and row
  451. </fo:block>
  452. </fo:table-cell>
  453. <fo:table-cell>
  454. <fo:block text-align="center">
  455. after 15pt
  456. </fo:block>
  457. </fo:table-cell>
  458. </fo:table-row>
  459. <fo:table-row>
  460. <fo:table-cell>
  461. <fo:block text-align="center">
  462. and
  463. </fo:block>
  464. </fo:table-cell>
  465. <fo:table-cell>
  466. <fo:block text-align="center">
  467. body
  468. </fo:block>
  469. </fo:table-cell>
  470. <fo:table-cell>
  471. <fo:block text-align="center">
  472. after 10pt
  473. </fo:block>
  474. </fo:table-cell>
  475. </fo:table-row>
  476. </fo:table-body>
  477. <fo:table-body>
  478. <fo:table-row>
  479. <fo:table-cell>
  480. <fo:block text-align="center">
  481. and
  482. </fo:block>
  483. </fo:table-cell>
  484. <fo:table-cell>
  485. <fo:block text-align="center">
  486. table
  487. </fo:block>
  488. </fo:table-cell>
  489. <fo:table-cell>
  490. <fo:block text-align="center">
  491. after 5pt
  492. </fo:block>
  493. </fo:table-cell>
  494. </fo:table-row>
  495. </fo:table-body>
  496. </fo:table>
  497. </fo:block>
  498. </fo:flow>
  499. </fo:page-sequence>
  500. </fo:root>