Re: RFC: basic side floats

2014-11-26 Thread Luis Bernardo
As a result of the work on lists and floats we can improve current support
for lists when there is a change in IPD across pages. I have committed a
small change to do that to this branch even though it is not really float
related. An example is attached.

On Tue, Nov 25, 2014 at 1:53 PM, Luis Bernardo lmpmberna...@gmail.com
wrote:

 A new example that shows floats and footnotes in the same page.

 On Fri, Nov 14, 2014 at 9:34 AM, Luis Bernardo lmpmberna...@gmail.com
 wrote:

 A more complex example that has a float inside a list.

 On Fri, Nov 7, 2014 at 4:41 PM, Luis Bernardo lmpmberna...@gmail.com
 wrote:

 A new example that involves a list that starts after a float starts (and
 before it ends).

 On Mon, Oct 20, 2014 at 10:33 AM, Luis Bernardo lmpmberna...@gmail.com
 wrote:


 FYI, I have created a new branch where I placed a new approach to side
 floats. The idea behind the approach is that if we can handle a change in
 IPD from one page to the next we can also do the same in the middle of a
 page (where a float causes the change in IPD). This also means that the
 implementation suffers, right now, from the same limitations that the
 handling of an IPD change across pages has.

 So, in summary:

 Left and right floats are supported in the most simple cases, including
 in multi-column layouts. Below are listed the known limitations:

 -- the clear fo:float attribute is ignored; only the float attribute
 (left or right) is used
 -- overlapping of floats in the Y is not handled (even in the case
 there would not be overlap in the X direction)
 -- floats that extend beyond the body region are not properly handled
 and will overflow past the edge of the region
 -- floats next to a table or a list are not supported unless the start
 and end of the table or list happen in between the start and end of the
 float
 -- a list can extend past the end of a float but only in situations
 where the list item at the end of the (bottom of the) float does not need
 to be wrapped; but wrapping before or after the bottom edge of the float is
 supported

 Attached is an example and the output (a similar two column example is
 in the layout tests).

 Comments, suggestion and bugs are welcome. I would like to commit this
 to trunk in a few weeks but meanwhile I will investigate alternative
 approaches to some of the current limitations.







list-change-ipd-across-pages.pdf
Description: Adobe PDF document
?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master master-name=narrow page-height=200pt page-width=400pt margin=50pt
  fo:region-body background-color=#F0F0F0/
/fo:simple-page-master
fo:simple-page-master master-name=wide page-height=200pt page-width=600pt margin=50pt
  fo:region-body background-color=#F0F0F0/
/fo:simple-page-master
fo:page-sequence-master master-name=pages
  fo:single-page-master-reference master-reference=narrow/
  fo:repeatable-page-master-reference master-reference=wide/
/fo:page-sequence-master
fo:page-sequence-master master-name=alternate
  fo:repeatable-page-master-alternatives
fo:conditional-page-master-reference odd-or-even=odd master-reference=wide/
fo:conditional-page-master-reference odd-or-even=even master-reference=narrow/
  /fo:repeatable-page-master-alternatives
/fo:page-sequence-master
  /fo:layout-master-set
  fo:page-sequence master-reference=alternate
fo:flow flow-name=xsl-region-body
  fo:block widows=1 orphans=1
fo:list-block
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block(a)/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face.
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block(a)/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
In olden times when wishing still helped one, there lived a king whose daughters were all beautiful, but the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face.
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block(a)/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
In olden times when wishing still helped one, there lived 

Re: RFC: basic side floats

2014-11-25 Thread Luis Bernardo
A new example that shows floats and footnotes in the same page.

On Fri, Nov 14, 2014 at 9:34 AM, Luis Bernardo lmpmberna...@gmail.com
wrote:

 A more complex example that has a float inside a list.

 On Fri, Nov 7, 2014 at 4:41 PM, Luis Bernardo lmpmberna...@gmail.com
 wrote:

 A new example that involves a list that starts after a float starts (and
 before it ends).

 On Mon, Oct 20, 2014 at 10:33 AM, Luis Bernardo lmpmberna...@gmail.com
 wrote:


 FYI, I have created a new branch where I placed a new approach to side
 floats. The idea behind the approach is that if we can handle a change in
 IPD from one page to the next we can also do the same in the middle of a
 page (where a float causes the change in IPD). This also means that the
 implementation suffers, right now, from the same limitations that the
 handling of an IPD change across pages has.

 So, in summary:

 Left and right floats are supported in the most simple cases, including
 in multi-column layouts. Below are listed the known limitations:

 -- the clear fo:float attribute is ignored; only the float attribute
 (left or right) is used
 -- overlapping of floats in the Y is not handled (even in the case there
 would not be overlap in the X direction)
 -- floats that extend beyond the body region are not properly handled
 and will overflow past the edge of the region
 -- floats next to a table or a list are not supported unless the start
 and end of the table or list happen in between the start and end of the
 float
 -- a list can extend past the end of a float but only in situations
 where the list item at the end of the (bottom of the) float does not need
 to be wrapped; but wrapping before or after the bottom edge of the float is
 supported

 Attached is an example and the output (a similar two column example is
 in the layout tests).

 Comments, suggestion and bugs are welcome. I would like to commit this
 to trunk in a few weeks but meanwhile I will investigate alternative
 approaches to some of the current limitations.




?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master master-name=simple page-height=5in page-width=5in margin=0.2in
  fo:region-body /
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=simple
fo:flow flow-name=xsl-region-body
  fo:block font-size=12pt space-before=3pt text-indent=0.75cm text-align=justify
Footnote in normal block before a float.fo:footnote
  fo:inline font-size=60% baseline-shift=super1)/fo:inline
  fo:footnote-body
fo:block start-indent=0.5cm text-indent=-0.5cm
  fo:inline font-size=60% baseline-shift=super1)/fo:inline The footnote from the normal block before the float./fo:block
  /fo:footnote-body
/fo:footnote.
  /fo:block
  fo:list-block provisional-distance-between-starts=30pt provisional-label-separation=10pt
fo:list-item
  fo:list-item-label end-indent=label-end()
fo:block(a)/fo:block
  /fo:list-item-label
  fo:list-item-body start-indent=body-start()
fo:block
  Test for float and footnote inside a list. Test for float and footnote inside a list. Test for float and footnote inside a list. (see box)
fo:float float=end
  fo:block border=1pt solid red padding=5pt end-indent=0pt start-indent=0pt
fo:block-container inline-progression-dimension=120pt
  fo:block background-color=yellow
The former dean's house at the University of Wisconsin (this is the alt text of the image in the Wikipedia page)
  /fo:block
/fo:block-container
  /fo:block
/fo:float
  Test for float and footnote inside a list. Test for float and footnote inside a list.
/fo:block
  /fo:list-item-body
/fo:list-item
fo:list-item
  fo:list-item-label end-indent=label-end()
fo:block(b)/fo:block
  /fo:list-item-label
  fo:list-item-body start-indent=body-start()
fo:block
  Footnote in list that is being wrapped around a float.fo:footnote
  fo:inline font-size=60% baseline-shift=super2)/fo:inline
fo:footnote-body
  fo:block start-indent=0.5cm text-indent=-0.5cm
fo:inline font-size=60% baseline-shift=super2)/fo:inline The footnote from the list that is being wrapped around a float./fo:block
/fo:footnote-body
  /fo:footnote.
  Test for float and footnote inside a list. Test for float and footnote inside a list. Test for float and footnote inside a list. Test for float and footnote inside a list. Test for float and footnote 

Re: RFC: basic side floats

2014-11-14 Thread Luis Bernardo
A more complex example that has a float inside a list.

On Fri, Nov 7, 2014 at 4:41 PM, Luis Bernardo lmpmberna...@gmail.com
wrote:

 A new example that involves a list that starts after a float starts (and
 before it ends).

 On Mon, Oct 20, 2014 at 10:33 AM, Luis Bernardo lmpmberna...@gmail.com
 wrote:


 FYI, I have created a new branch where I placed a new approach to side
 floats. The idea behind the approach is that if we can handle a change in
 IPD from one page to the next we can also do the same in the middle of a
 page (where a float causes the change in IPD). This also means that the
 implementation suffers, right now, from the same limitations that the
 handling of an IPD change across pages has.

 So, in summary:

 Left and right floats are supported in the most simple cases, including
 in multi-column layouts. Below are listed the known limitations:

 -- the clear fo:float attribute is ignored; only the float attribute
 (left or right) is used
 -- overlapping of floats in the Y is not handled (even in the case there
 would not be overlap in the X direction)
 -- floats that extend beyond the body region are not properly handled and
 will overflow past the edge of the region
 -- floats next to a table or a list are not supported unless the start
 and end of the table or list happen in between the start and end of the
 float
 -- a list can extend past the end of a float but only in situations where
 the list item at the end of the (bottom of the) float does not need to be
 wrapped; but wrapping before or after the bottom edge of the float is
 supported

 Attached is an example and the output (a similar two column example is in
 the layout tests).

 Comments, suggestion and bugs are welcome. I would like to commit this to
 trunk in a few weeks but meanwhile I will investigate alternative
 approaches to some of the current limitations.





basic-floats-inside-list.pdf
Description: Adobe PDF document
?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master margin=0.25in master-name=page page-height=11in page-width=8.5in
  fo:region-body /
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=page
fo:flow flow-name=xsl-region-body
  fo:block
Did you know... (taken from Wikipedia main page on November 6th, 2014, with the order slightly changed to better show the wrapping around the float)
  /fo:block
  fo:block
From Wikipedia's new and recently improved content:
  /fo:block
  fo:block
fo:list-block
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that while testifying in a 2004 lawsuit involving the meaning of the word steakburger, a corporate CEO was grilled on the witness stand?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that the Queen Anne house (pictured) 
fo:float float=end
  fo:block border=1pt solid red padding=5pt end-indent=0pt start-indent=0pt
fo:block-container inline-progression-dimension=120pt
  fo:block background-color=yellow
The former dean's house at the University of Wisconsin (this is the alt text of the image in the Wikipedia page)
  /fo:block
/fo:block-container
  /fo:block
/fo:float
at the Allen Centennial Gardens was home to four deans of the University of Wisconsin–Madison College of Agricultural and Life Sciences?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that rhapsodomancy was so vague, Virgil wrote against it in The Aeneid?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that Australian physician Claudia Burton Bradley was one of the first diabetics to be treated with insulin?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that 

Re: RFC: basic side floats

2014-11-07 Thread Luis Bernardo
A new example that involves a list that starts after a float starts (and
before it ends).

On Mon, Oct 20, 2014 at 10:33 AM, Luis Bernardo lmpmberna...@gmail.com
wrote:


 FYI, I have created a new branch where I placed a new approach to side
 floats. The idea behind the approach is that if we can handle a change in
 IPD from one page to the next we can also do the same in the middle of a
 page (where a float causes the change in IPD). This also means that the
 implementation suffers, right now, from the same limitations that the
 handling of an IPD change across pages has.

 So, in summary:

 Left and right floats are supported in the most simple cases, including in
 multi-column layouts. Below are listed the known limitations:

 -- the clear fo:float attribute is ignored; only the float attribute
 (left or right) is used
 -- overlapping of floats in the Y is not handled (even in the case there
 would not be overlap in the X direction)
 -- floats that extend beyond the body region are not properly handled and
 will overflow past the edge of the region
 -- floats next to a table or a list are not supported unless the start and
 end of the table or list happen in between the start and end of the float
 -- a list can extend past the end of a float but only in situations where
 the list item at the end of the (bottom of the) float does not need to be
 wrapped; but wrapping before or after the bottom edge of the float is
 supported

 Attached is an example and the output (a similar two column example is in
 the layout tests).

 Comments, suggestion and bugs are welcome. I would like to commit this to
 trunk in a few weeks but meanwhile I will investigate alternative
 approaches to some of the current limitations.


?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master margin=0.25in master-name=page page-height=11in page-width=8.5in
  fo:region-body /
/fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=page
fo:flow flow-name=xsl-region-body
  fo:block
Did you know... (taken from Wikipedia main page on November 6th, 2014, with the order slightly changed to better show the wrapping around the float)
  /fo:block
  fo:block
From Wikipedia's new and recently improved content:
  /fo:block
  fo:block
fo:float float=end
  fo:block border=1pt solid red padding=5pt end-indent=0pt start-indent=0pt
fo:block-container inline-progression-dimension=120pt
  fo:block background-color=yellow
The former dean's house at the University of Wisconsin (this is the alt text of the image in the Wikipedia page)
  /fo:block
/fo:block-container
  /fo:block
/fo:float
  /fo:block
  fo:block
fo:list-block
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that the Queen Anne house (pictured) at the Allen Centennial Gardens was home to four deans of the University of Wisconsin–Madison College of Agricultural and Life Sciences?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that rhapsodomancy was so vague, Virgil wrote against it in The Aeneid?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that Australian physician Claudia Burton Bradley was one of the first diabetics to be treated with insulin?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that Green Bay Packers offensive lineman David Bakhtiari was the first rookie in Packers history to start every game at left tackle in a season since the start of the 16-game season?
  /fo:block
/fo:list-item-body
  /fo:list-item
  fo:list-item
fo:list-item-label end-indent=label-end()
  fo:block#x2022;/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
  fo:block
... that in the Byzantine Empire, the office of orphanotrophos, head of the imperial orphanage, ranked among the higher offices of state?