ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
68 stars 38 forks source link

improved placement of page breaks in the PDF #463

Closed ietf-svn-bot closed 7 months ago

ietf-svn-bot commented 4 years ago

owner:henrik@levkowetz.com type_enhancement | by arusso@amsl.com


Hoping for automatic prevention of

a) page break between reference tag and reference entry ex: p. 12-13 of https://www.rfc-editor.org/rfc/rfc8689.pdf p. 12-13 of https://www.rfc-editor.org/authors/rfc8663.pdf

b) page break after section title ex: section 4 (p. 13-14) of https://www.rfc-editor.org/authors/rfc8695.pdf


Issue migrated from trac:463 at 2022-02-08 07:04:07 +0000

ietf-svn-bot commented 4 years ago

@henrik@levkowetz.com changed component from Version 2 cli to v3 vocabulary v2 xml2rfc

ietf-svn-bot commented 4 years ago

@henrik@levkowetz.com changed status from new to assigned

ietf-svn-bot commented 4 years ago

@henrik@levkowetz.com commented


This is waiting for an RPC server upgrade, so we can deprecate Python 2.7 support. This will let us move up to the most recent PDF generation library, which may fix the issue.

ietf-svn-bot commented 4 years ago

@arusso@amsl.com commented


Just a note that this issue is still present when running xml2rfc 2.38.1 with software library changes made today (including libcairo).

ietf-svn-bot commented 4 years ago

@henrik@levkowetz.com changed status from assigned to closed

ietf-svn-bot commented 4 years ago

@henrik@levkowetz.com changed resolution from ` tofixed`

ietf-svn-bot commented 4 years ago

@henrik@levkowetz.com commented


Fixed in bcceafd1702fcf357abd4eb2eb4e5b66caff7154:

Changed the approach to avoiding page breaks inside artwork etc., and added styling to prevent page breaks between

and
in a
. Fixes issues #461, #463, and #491

ietf-svn-bot commented 4 years ago

@rjsparks@nostrum.com changed status from closed to reopened

ietf-svn-bot commented 4 years ago

@rjsparks@nostrum.com changed resolution from fixed to ``

ietf-svn-bot commented 4 years ago

@rjsparks@nostrum.com commented


Reopening so we revisit after the issue with WeasyPrint is addressed.

ietf-svn-bot commented 4 years ago

@rjsparks@nostrum.com changed status from reopened to waiting

ietf-svn-bot commented 4 years ago

@rjsparks@nostrum.com commented


Waiting for changes to WeasyPrint

ietf-svn-bot commented 4 years ago

@sginoza@amsl.com commented


Note: Based on discussion with John Levine, the RFC publication process can proceed despite this issue.

ietf-svn-bot commented 4 years ago

@arusso@amsl.com commented


A page breaking oddity in the PDF output -- see page 18/19. https://www.rfc-editor.org/v3test/rfc8851v2.pdf https://www.rfc-editor.org/v3test/rfc8851v2.xml (source)

There's a single sentence on page 19, which precedes a long . Attempts to force the single sentence onto the previous or next page were unsuccessful (tried keepWithPrevious and keepWithNext).

ietf-svn-bot commented 4 years ago

@rvanrheenen@amsl.com commented


Another page breaking oddity. We see large chunks of whitespace on pp. 5/6 and 9/10, which come before sourcecode. We usually expect such immediately before sourcecode, but the extra whitespace appears on the two pages before sourcecode. Seems similar to issue in 8851 above.

https://www.rfc-editor.org/v3test/rfc8916.pdf https://www.rfc-editor.org/v3test/rfc8916.xml (source)

ietf-svn-bot commented 3 years ago

@mahoney@nostrum.com commented


Spotted a page break between a dt and dd (newline="false") in RFC 8949, Section 7.1, page 37:

https://www.rfc-editor.org/v3test/rfc8949.pdf https://www.rfc-editor.org/v3test/rfc8949.xml

ietf-svn-bot commented 3 years ago

@arusso@amsl.com commented


Another example. Odd page break placement between two s (when the second is followed by large ). See pages 54 and 55 in the PDF - the one line of text on page 55 ("A possible description for that scenario could be the following:") should be on page 54.

files: https://www.rfc-editor.org/authors/rfc8846.xml https://www.rfc-editor.org/authors/rfc8846.pdf

Tried addding , but it had an odd effect -- splitting the preceding paragraph: https://www.rfc-editor.org/v3test/test8846.pagebreak.pdf

Also tried on the preceding paragraph -- same result: https://www.rfc-editor.org/v3test/test8846.pagebreak2.pdf

(A paragraph being unnecessarily split by a page break seems similar to #566, but that one didn't use keepWithPrevious or keepWithNext.)

ietf-svn-bot commented 3 years ago

@rjsparks@nostrum.com changed priority from medium to major

rjsparks commented 2 years ago

@alicerusso - I think this may be OBE by the recent changes to pagebreak behavior. Is there anything here still relevant?

kesara commented 7 months ago

Examples of the original issue seem to have gone away.

kesara commented 7 months ago

The following issues have gone away:

I think this is still an issue:

kesara commented 7 months ago

I've created #1119 for https://github.com/ietf-tools/xml2rfc/issues/463#issuecomment-1032275706 because it's a bit different to the other page break issues.

Other issues mentioned here seem OBE. Please comment if that's not the case.