-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
476 landscape #478
476 landscape #478
Conversation
Sorry about the merge conflicts. Sorry about leaving the PR for several months. :-( I've got a branch where I have it working, I think, but I'm not able to get the output to be in landscape. What PDF formatter are you using? |
I am using Antenna House Formatter.Testing takes some time on my side, since i am doing development on a Linux system, but AH Formatter license is for windows only. But i will try to find out about the merge conflicts this weekend. I'm not sure, but i think i have also successfully tested with the Oxygen PDF Chemistry Formatter which converts to XSL-FO. |
Don't worry too much about the merge conflicts, I have a branch where I've resolved them. Can you send me a |
Yes, but it takes some time. |
No rush. I'm trying to do a 2.2.1 today but I'll cleanup and do another release more promptly this time :-) |
In this archive you will find
I hope it helps. Greetings, Frank |
f20301b
to
e6ff150
Compare
The only thing that I'm still confused by is I'm still using AntennaHouse 7.3, so I guess it could be a bug. |
No, putting the |
Can you send me the |
Hi Norm,
I don’t have access to my development environment yet, since I am in the office.
I will take care of it tonight / tomorrow morning
Mit freundlichen Grüßen
i. A. Frank Steimke, KoSIT
Tel. +49 421 361 59 195
E-Mail: ***@***.******@***.***>
Von: Norman Walsh ***@***.***>
Gesendet: Mittwoch, 2. Oktober 2024 09:13
An: docbook/xslTNG ***@***.***>
Cc: Steimke, Frank (Finanzen) 44-A ***@***.***>; Comment ***@***.***>
Betreff: [EXTERN] Re: [docbook/xslTNG] 476 landscape (PR #478)
Can you send me the article.016.pdf.html and article.016.pdf output that you get?
—
Reply to this email directly, view it on GitHub<#478 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ATX5HFDWMV5Y2N25TECLKQDZZOMHFAVCNFSM6AAAAABDWV4V52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBXG43TQMBWGU>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I am still in my office, but ... i'm afraid that the book016.html expected file misses the link to the docbook-paged.css stylesheet for the print media type. |
I think the "expected results" are all HTML, not PDF. Have to think about how to fix that. I upgraded my AHF to 7.4 and I'm still getting portrait output for |
Archive contains HTML and PDF file for book.016. The link to the |
I can reproduce some of the expected results. I can get the two landscape pages in But |
e6ff150
to
c8b8fa6
Compare
I did not understand that recent activity in my forked repository does affect the pull request that i made months ago. But i have learned now. Sorry if that has caused additional confusion. This is what i did for the attached archive:
book.019 (the former book.014) has blank first and last pages in portrait orientation. I have checked with the "PDF Option / Page orientation: landscape" setting in AH Formatter. I got also the first and last page blank, but landscape oriented. |
I'm not sure why we aren't converging on the problem with |
I am still very confused. If I follow the command-line instructions to checkout your PR:
Then neither |
Yes. Because when you run Can you please check this? run
in the Norm, i simply dont know how to use you test mechanism in a way that the generated HTML files do contain the link to the
When i would render this file, it would be in portrait, since the whole magic for landscape is part of |
Ah. Okay. Sorry the build system is largely undocumented :-( The build targets for PDF examples are test-name
That uses There's a whole lot of CSS for managing page sizes, recto- and verso-pages, page breaks, blank pages, etc. that's included if you use |
Regarding to your last comment, i have some questions:
|
If you just want the HTML output for print, you can use test-name Testing for print output is definitely not as robust as it could be. |
On closer inspection over lunch, it's even worse than I thought. If you want to generate a landscape page in the middle of a flow (for a table, for example), you have to select the
you get a landscape page, but you don't get any of the headers or footers that should be on the page. I suppose you might want that, but chances are you do usually want the page number. (If you'd like the headers and footers to be portrait on the otherwise landscape page, that's something else entirely.) |
I have just checked, and you are right. That's not the desired result. This effect did not show up in the test-cases I will withdraw this PR. But perhaps you can give me a tip on how to achieve the desired result. Is it a matter of CSS? Or do ihave to work with HTML tables that contain one row each for the header, footer and body? |
I'm trying to sort that out. Getting the correct headers and footers in landscape orientation (so lefters and righters from a portrait perspective) would be a little tricky, but it's easy to see how to do that. Getting the headers and footers on the top and bottom of the (portrait) page while the content is landscape is either difficult or impossible, I'm not sure which just yet. |
For rotating tables and figures in an otherwise portrait flow, it looks like changing the |
I try to understand the test mechanism: how could i customize the transformation that generates the expected result for particular test-cases? For example, set parameters to be used for transformation of particular files. This is motivated by the test-cases for landscape. I found your test-case customization layer for book.014 in the recent 2.2.1 release at I made some tests with a result that puzzles me:
Is that intended? |
No, that sounds like a bug in the test driver. sigh The expected results are complicated by the fact that they are built with "xspec" specific customizations. These customizations avoid a bunch of differences (the stylesheet version, dates and times, etc.) that aren't relevant but would show up as differences in the report. It's probably time to refactor the whole test aparatus and try to resolve some of those things, and the customizations, in a less completely ad hoc, tangled way. |
My current idea for how to deal with landscape is to add a |
The main motivation for landscape support in DocBook documentation is (at least for me and my staff) the existence of tables or images that are just to wide for A4 portrait pages. We would appreciate the PDF version of out Documents in portrait as default, with the exception of some pages in landscape. The "master page" solution seems to be sufficient for this use-case, as in my very naive approach. I admit that headers and footers would be nice. The complication arises when you try to put landscape oriented graphics or tables in portrait pages, correct? |
I think the real complication is headers and footers. I imagine that this is what most users would expect. But if you rotate the page using CSS @page instructions, you'll get the headers and footers rotated as well. |
I think most people would read the generated PDF online. If you want to read page 4 of your Book 16, you have to rotate either your head or the monitor for 90 degrees. Why not rotate the whole page with headers, footers and content? See page 5 of the following example: This would be totally fine for me and my staff. In my opinion a good enough solution for "Landscape support in DocBook Documents". CSS code is simple (as a proof-of-concept it lacks differentiation between left and right side in a book)
|
Supporting both flavors makes sense. I think for actual, physically printed books, preserving the running headers and footers in portrait on the page is very, very highly desirable. |
Sounds good. But it means that we need to distinguish between these two flavors of landscape somehow:
I have updated this PR. Maybe it's not as bad as it looked at first glance for the first flavor (online PDF). But i am still unable to generate the expected files with the link to the I have also raised an issue for the possible bug in the test machinery (ignored test customization). |
I've just pushed #520 which I think addresses the use cases. I'll merge it into main after it passes tests (he says, optimistically :-) ). Please give it a try and let me know what you think. |
Looks very good. Problem solved, after all. Thank you very much. |
Support for landscape orientation for books / articles or individual elements (chapters, tables, figures ...).
Using the role attribute as discussed in issue #476 .