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 13KB

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