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.

footnotes.xml 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!-- $Id$ -->
  3. <!--
  4. <!DOCTYPE document SYSTEM "../../xml-docs/dtd/document-v10.dtd">
  5. -->
  6. <document>
  7. <header>
  8. <title>Implementing footnotes</title>
  9. <authors>
  10. <person name="Peter B. West" email="pbwest@powerup.com.au"/>
  11. </authors>
  12. </header>
  13. <body>
  14. <!-- one of (anchor s1) -->
  15. <s1 title="Implementing footnotes in FOP">
  16. <p>
  17. Footnotes present difficulties for page layout primarily
  18. because their point of invocation in the flow is different
  19. from their point of appearance in the area tree. All of the
  20. content lines of a footnote may appear on the same page as its
  21. invocation point, all may appear on a following page, or the
  22. lines may be split over a page or pages. (This characteristic
  23. leads to another problem when a footnote overflows the last
  24. page of flow content, but that difficulty will not be
  25. discussed here.) This note considers some aspects of the
  26. implementation of footnotes in a galley-based design.
  27. </p>
  28. <s2 title="Footnotes and galleys">
  29. <p>
  30. In the structure described in the <link href=
  31. "../galleys.html" >introduction to FOP galleys</link>,
  32. footnotes would be pre-processed as galleys themselves, but
  33. they would remain attached as subtrees to their points of
  34. invocation in the main text. Allocation to a
  35. footnote-reference-area would only occur in the resolution
  36. to Area nodes.
  37. </p>
  38. <p>
  39. When footnotes are introduced, the communication between
  40. galleys and layout manager, as mentioned <link href=
  41. "../galleys.html#pre-processing" >above</link>, would be
  42. affected. The returned information would two b-p-d values:
  43. the primary line-area b-p-d impact and the footnote b-p-d
  44. impact. The distinction is necessary for two reasons; to
  45. alert the layout manager to the first footnote of the page,
  46. and because the footnote b-p-d will always impact the
  47. main-reference-area b-p-d, whereas the primary inline-area
  48. may not, e.g. in the case of multiple span-areas.
  49. </p>
  50. </s2>
  51. <s2 title="Multiple columns and footnotes">
  52. <note>
  53. A possible method for multi-column layout and balancing
  54. with footnotes, using a galley-based approach.
  55. </note>
  56. <p>
  57. This note assumes a galley, as discussed <link href=
  58. "../galleys.html" >elsewhere</link>, flowing text with
  59. footnotes and possibly other blocks into a possibly
  60. multi-column area. The logic of flowing into multiple
  61. columns is trivially applied to a single column. The galley
  62. is manipulated within the context of the <em>layout
  63. tree</em>.
  64. </p>
  65. <p>
  66. Associated with the galley are two sets of data.
  67. One contains the maps of all "natural" break-points and
  68. the of all hyphenation break-points. This set is
  69. constructed at the time of construction of the galley and
  70. is a constant for a given galley. The second contains
  71. dynamic data which represents one possible attempt to lay
  72. out the galley. There may be multiple sets of such data
  73. to reflect varying attempts. The data of this set are,
  74. essentially, representations of line-areas, with the supporting
  75. information necessary to determine these line-areas.
  76. </p>
  77. <p>
  78. The line-area data includes the boundaries within the
  79. galley of each line-area, the boundaries of each column
  80. and the boundaries of the "page", or main area. When a
  81. line-area boundary occurs at a hyphenation point, a
  82. "virtual hyphen" is assumed and accounted for in the
  83. i-p-d. As mentioned, individual footnote galleys will
  84. hang from the parent galley. The associated data of the
  85. footnote galleys is similar: a once-only break-points map,
  86. and one or more line-area maps. No column boundaries are
  87. required, but a page boundary is required at the end of
  88. the last footnote or where a footnote breaks across a page
  89. boundary.
  90. </p>
  91. <p>
  92. A number of b-p-d values are also maintained. For each
  93. line-area, the b-p-d, the main area b-p-d increment, the
  94. footnote b-p-d increment and the footnote's page-related
  95. b-p-d increment are required. The main-area b-p-d
  96. increments for any particular line-area are dependent on
  97. the column position of the line-area. Total b-p-d's are
  98. also kept: total footnote b-p-d, total main area b-p-d,
  99. and totals for each column.<br/><br/>
  100. <strong>Figure 1</strong> Columns before first footnote.
  101. </p>
  102. <figure src="initial-column-values.png" alt="Columns before
  103. first footnote"/>
  104. </s2>
  105. <s2 title="Balancing columns">
  106. <p>
  107. <strong>Figure 2</strong> Adding a line area with first
  108. footnote.
  109. </p>
  110. <figure src="line-area-5.png"
  111. alt="Columns after adding first footnote"/>
  112. <p>
  113. Columns are balanced dynamically in the galley preliminary
  114. layout. While the galley retains its basic linear
  115. structure, the accompanying data structures accomplish
  116. column distribution and balancing. As each line-area is
  117. added, the columns are re-balanced. <strong>N.B.</strong>
  118. This re-balancing involves only some of the dynamic data
  119. associated with the participating galley(s). The data
  120. structures associating breakpoints with the beginning and
  121. end of individual line areas does not change in
  122. re-balancing; only the association of line-area with column,
  123. and, possibly, the various impact values for each line-area.
  124. <br/><br/>
  125. <strong>Figure 3</strong> Adding a line area with next
  126. footnote.
  127. </p>
  128. <figure src="line-area-6.png"
  129. alt="Columns after adding next footnote"/>
  130. </s2>
  131. <s2 title="Layout managers in the flow of control">
  132. <note>To be developed.</note>
  133. </s2>
  134. </s1>
  135. </body>
  136. </document>