Andreas L. Delmelle (JIRA | 12 Feb 20:39 2016
Picon

[jira] [Comment Edited] (FOP-2402) footnotes overlap regular content


    [
https://issues.apache.org/jira/browse/FOP-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141518#comment-15141518
] 

Andreas L. Delmelle edited comment on FOP-2402 at 2/12/16 7:38 PM:
-------------------------------------------------------------------

More info:
As I was playing with the sample, trying to reduce it further to the absolute minimum required to trigger the
bug, I noticed that the nested list structure is also a factor, i.e. removing the outer list also resolves
the spacing issue. Using either a regular block or a table instead of a list, the issue cannot be reproduced.
All the space specifiers can be removed, save for those on the list-items.

Guess it will be key to determine exactly what differs in processing between a plain one level list, and a
nested list structure, where one list is an item in the other.

EDIT - In the meantime, I have traced said difference to the space adjustment ratio that is used when adding
the areas. The page-breaks themselves are computed using the optimum space, so nothing wrong there, but
it is only when adding the areas that the space is stretched, based on the adjustment ratio assigned to the
break possibility.
For some reason -- I am not quite there yet -- that ratio, in case of a nested list, is 1.0, which results in the
full amount of stretch being applied. This basically comes down to: space-before.maximum is used.
When the outer list is removed, the adjustment ratio when adding the areas for that same list item is only
0.05, which results in a much smaller stretch, which makes everything fit nicely.

Still TODO: dive deeper in the page-breaking algorithm to find out why exactly this adjustment ratio is
much higher in case the list is nested.

EDIT 2 - Aha! I think I see the big difference now... In case of the nested list, the page-breaking algorithm
(Continue reading)

Andreas L. Delmelle (JIRA | 12 Feb 20:16 2016
Picon

[jira] [Comment Edited] (FOP-2402) footnotes overlap regular content


    [
https://issues.apache.org/jira/browse/FOP-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141518#comment-15141518
] 

Andreas L. Delmelle edited comment on FOP-2402 at 2/12/16 7:16 PM:
-------------------------------------------------------------------

More info:
As I was playing with the sample, trying to reduce it further to the absolute minimum required to trigger the
bug, I noticed that the nested list structure is also a factor, i.e. removing the outer list also resolves
the spacing issue. Using either a regular block or a table instead of a list, the issue cannot be reproduced.
All the space specifiers can be removed, save for those on the list-items.

Guess it will be key to determine exactly what differs in processing between a plain one level list, and a
nested list structure, where one list is an item in the other.

EDIT - In the meantime, I have traced said difference to the space adjustment ratio that is used when adding
the areas. The page-breaks themselves are computed using the optimum space, so nothing wrong there, but
it is only when adding the areas that the space is stretched, based on the adjustment ratio assigned to the
break possibility.
For some reason -- I am not quite there yet -- that ratio, in case of a nested list, is 1.0, which results in the
full amount of stretch being applied. This basically comes down to: space-before.maximum is used.
When the outer list is removed, the adjustment ratio when adding the areas for that same list item is only
0.05, which results in a much smaller stretch, which makes everything fit nicely.

Still TODO: dive deeper in the page-breaking algorithm to find out why exactly this adjustment ratio is
much higher in case the list is nested.

EDIT 2 - Aha! I think I see the big difference now... In case of the nested list, the page-breaking algorithm
(Continue reading)

Andreas L. Delmelle (JIRA | 12 Feb 19:51 2016
Picon

[jira] [Comment Edited] (FOP-2402) footnotes overlap regular content


    [
https://issues.apache.org/jira/browse/FOP-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141518#comment-15141518
] 

Andreas L. Delmelle edited comment on FOP-2402 at 2/12/16 6:50 PM:
-------------------------------------------------------------------

More info:
As I was playing with the sample, trying to reduce it further to the absolute minimum required to trigger the
bug, I noticed that the nested list structure is also a factor, i.e. removing the outer list also resolves
the spacing issue. Using either a regular block or a table instead of a list, the issue cannot be reproduced.
All the space specifiers can be removed, save for those on the list-items.

Guess it will be key to determine exactly what differs in processing between a plain one level list, and a
nested list structure, where one list is an item in the other.

EDIT - In the meantime, I have traced said difference to the space adjustment ratio that is used when adding
the areas. The page-breaks themselves are computed using the optimum space, so nothing wrong there, but
it is only when adding the areas that the space is stretched, based on the adjustment ratio assigned to the
break possibility.
For some reason -- I am not quite there yet -- that ratio, in case of a nested list, is 1.0, which results in the
full amount of stretch being applied. This basically comes down to: space-before.maximum is used.
When the outer list is removed, the adjustment ratio when adding the areas for that same list item is only
0.05, which results in a much smaller stretch, which makes everything fit nicely.

Still TODO: dive deeper in the page-breaking algorithm to find out why exactly this adjustment ratio is
much higher in case the list is nested.

was (Author: adelmelle):
(Continue reading)

Andreas L. Delmelle (JIRA | 12 Feb 02:22 2016
Picon

[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly


    [
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143843#comment-15143843
] 

Andreas L. Delmelle commented on FOP-2574:
------------------------------------------

I assume, by "wrapper", you refer to the inner block, and yes, I admit it does not automatically take care of
the case where you have lines of varying width, where some are larger and others do fit.

As to your question, the answer is: it depends... :)

If that is the appropriate thing to do, then yes, but it is definitely not always that way. While a
fo:block-container is _similar to_ a div, it is not really the same.

Simple example of where the behaviour differs is the "margin-left", or the XSL-FO correlate "start-indent".
Without actually rendering, try to take a stab at what the following should look like:

{code:language=xml}
  <fo:block-container margin-left="2em" border="1pt solid black" width="10em">
    <fo:block>MMMM</fo:block>
	<fo:block-container><fo:block>MMMM</fo:block></fo:block-container>
  </fo:block-container>
{code}

Now, try to render it with FOP to see if that matches your expectation...

However unexpected the result, be sure that we double-checked this with the XSL-FO WG, and the result
produced by FOP is exactly as intended. All other FO processors at that time rendered it more as expected,
(Continue reading)

Đorđe Zeljić (JIRA | 11 Feb 22:28 2016
Picon

[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly


    [
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143535#comment-15143535
] 

Đorđe Zeljić commented on FOP-2574:
-----------------------------------

Yes, CSS/HTML works that way. Your solution looks fine, except when size of "wrapper" is smaller than textbox.
One question, does FOP want to fit html/css behavior? If yes I think there is no regression in 1.1 and this is
probably bug in 2.1.

> Right alignment doesn't work correctly
> --------------------------------------
>
>                 Key: FOP-2574
>                 URL: https://issues.apache.org/jira/browse/FOP-2574
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1
>         Environment: Window 7 x64, Java build 1.8.0_72-b15
>            Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.

--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
(Continue reading)

Andreas L. Delmelle (JIRA | 11 Feb 22:06 2016
Picon

[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly


    [
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143505#comment-15143505
] 

Andreas L. Delmelle commented on FOP-2574:
------------------------------------------

Seems like somehow, I cannot edit my own reply, so to amend my previous answer: the nested
fo:block-container is actually not even needed, and you can just do:

{code:language=xml}
  <fo:block-container text-align="right" border-color="black" border-style="solid"
border-width="1pt" overflow="hidden" width="70px" white-space="nowrap">
    <fo:block>AAA</fo:block>
    <fo:block text-align="left">Lorem ipsum oposum!</fo:block>
  </fo:block-container>
{code}

> Right alignment doesn't work correctly
> --------------------------------------
>
>                 Key: FOP-2574
>                 URL: https://issues.apache.org/jira/browse/FOP-2574
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1
>         Environment: Window 7 x64, Java build 1.8.0_72-b15
>            Reporter: Đorđe Zeljić
>
(Continue reading)

Andreas L. Delmelle (JIRA | 11 Feb 21:53 2016
Picon

[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly


    [
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143488#comment-15143488
] 

Andreas L. Delmelle commented on FOP-2574:
------------------------------------------

*scratches head* 
After looking at the sample rendered in HTML, I must admit that that does looks a bit unexpected... 
Still, all browsers I tried, rendered it exactly the same way. The CSS spec -- and by extension also XSL-FO --
does state that the alignment is not with respect to the viewport, though, so not sure if that means we are
implementing it wrongly ( ? )

That said, suppose one adds one line above that just contains the string 'AAA', you would end up with a
right-aligned first line and a second line that _appears_ to be left-aligned ( ? )

Example in HTML:
{code:language=html}
  <div style="width: 70px; text-align: right; white-space:nowrap; display: block; overflow: hidden;
border: 1px solid #323232;">AAA<br>Lorem ipsum oposum!</div>
{code}

If that is the intended rendering, it can be obtained via FOP by means of a nested fo:block-container. Note
that "text-align" is an inherited property, so can be set at the level of the outer fo:block-container,
and then overridden on an inner fo:block-container.

Example rendering similarly in XSL-FO:
{code:language=xml}
  <fo:block-container text-align="right" border-color="black" border-style="solid"
(Continue reading)

Pascal Sancho (JIRA | 11 Feb 11:31 2016
Picon

[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly


    [
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142530#comment-15142530
] 

Pascal Sancho commented on FOP-2574:
------------------------------------

Hi,

This can be done by using IF intermediate format (Cf. [1]):
Setting text/ <at> x attribute to 0 where it's negative.

[1] http://xmlgraphics.apache.org/fop/2.1/intermediate.html

> Right alignment doesn't work correctly
> --------------------------------------
>
>                 Key: FOP-2574
>                 URL: https://issues.apache.org/jira/browse/FOP-2574
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1
>         Environment: Window 7 x64, Java build 1.8.0_72-b15
>            Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.

(Continue reading)

Đorđe Zeljić (JIRA | 11 Feb 09:52 2016
Picon

[jira] [Commented] (FOP-2574) Right alignment doesn't work correctly


    [
https://issues.apache.org/jira/browse/FOP-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142435#comment-15142435
] 

Đorđe Zeljić commented on FOP-2574:
-----------------------------------

Is there option to FOP fit behavior from this simple HTML example?
https://gist.github.com/zeljic/9b9edcf12b7d231ae724

> Right alignment doesn't work correctly
> --------------------------------------
>
>                 Key: FOP-2574
>                 URL: https://issues.apache.org/jira/browse/FOP-2574
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.0, 2.1
>         Environment: Window 7 x64, Java build 1.8.0_72-b15
>            Reporter: Đorđe Zeljić
>
> Simple .fo example at 
> https://gist.github.com/zeljic/d83ecee965ce89b79c2e
> doesn't work the same in 1.1 and (2.0 or 2.1) versions.

--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

(Continue reading)

Andreas L. Delmelle (JIRA | 10 Feb 20:44 2016
Picon

[jira] [Commented] (FOP-2402) footnotes overlap regular content


    [
https://issues.apache.org/jira/browse/FOP-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141518#comment-15141518
] 

Andreas L. Delmelle commented on FOP-2402:
------------------------------------------

More info:
As I was playing with the sample, trying to reduce it further to the absolute minimum required to trigger the
bug, I noticed that the nested list structure is also a factor, i.e. removing the outer list also resolves
the spacing issue. Using either a regular block or a table instead of a list, the issue cannot be reproduced.
All the space specifiers can be removed, save for those on the list-items.

Guess it will be key to determine exactly what differs in processing between a plain one level list, and a
nested list structure, where one list is an item in the other.

> footnotes overlap regular content
> ---------------------------------
>
>                 Key: FOP-2402
>                 URL: https://issues.apache.org/jira/browse/FOP-2402
>             Project: FOP
>          Issue Type: Bug
>          Components: layout/block
>    Affects Versions: trunk
>         Environment: Ubuntu 14.04, Java 1.7.0_55
>            Reporter: Alexey Neyman
>         Attachments: FOP-2402.fo, FOP-2402.pdf, bad.fo, bad.pdf, footnotes-fit.pdf
>
(Continue reading)

Andreas L. Delmelle (JIRA | 9 Feb 22:17 2016
Picon

[jira] [Updated] (FOP-2402) footnotes overlap regular content


     [
https://issues.apache.org/jira/browse/FOP-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas L. Delmelle updated FOP-2402:
-------------------------------------
    Attachment: FOP-2402.fo

Corrected - initially attached only the PDF, while I intended to share the FO...

> footnotes overlap regular content
> ---------------------------------
>
>                 Key: FOP-2402
>                 URL: https://issues.apache.org/jira/browse/FOP-2402
>             Project: FOP
>          Issue Type: Bug
>          Components: layout/block
>    Affects Versions: trunk
>         Environment: Ubuntu 14.04, Java 1.7.0_55
>            Reporter: Alexey Neyman
>         Attachments: FOP-2402.fo, FOP-2402.pdf, bad.fo, bad.pdf, footnotes-fit.pdf
>
>
> We've noticed yet another issue with the rendering of the footnotes where the footnote is rendered over
the regular content. Verified with top-of-trunk FOP, r1615966. Please refer to the attached FO/PDF files.
>  
> Curiously, if the last fo:list-item is commented out, the preceding fo:list-items are placed more
tightly and as a result, the footnotes do not overlap with the regular content. This suggests that there's
a bug in how the space between blocks is calculated, but I haven't debugged it further yet.
(Continue reading)


Gmane