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.

widowsorphans.fo 16KB

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