-
Notifications
You must be signed in to change notification settings - Fork 499
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
Margin for inner binding (recto/verso margins) #383
Comments
Could you describe more specifically where the inner margin would be applied? A reference to a similar feature in another system is sufficient. |
In latex, specifically in the KOMA script , page 30-31, for BCOR option, (and other classes I believe, but I would need to look) you can set an additional offset for the inner margin. (I believe KOMA script is incorrect when they state "left" margin for BCOR and it really means "inside" margin. All my KOMA documents apply the BCOR to all pages correctly. The English documentation is translated from German, so there may be a misunderstanding.) The inner margin is where a spine is in a book. So if you are reading aright hand page in a book, the inner margin is on the left and disappears into the gutter, for a left hand page the inner margin is on the right. Another way of looking at it is that the page numbers in a book (and within asciidoctor-pdf) appear on the outside of the book page, or outside margin. The inner (binding) margin is opposite the page numbers. As it stands now, asciidoctor-pdf applies the page numbers correctly to left and right hand pages, but I cannot adjust the inner margin as far as I can tell. I believe it would be beneficial to allow an adjustment to this margin, much in the same way that KOMA script gives a class option for a binding correction. As mentioned above some cheap report covers chew up a lot of margin, and it would be beneficial to apply a correction to the inner margin to overcome that, else the page content is uncomfortably close to the binding side (where you have to pry the book apart to read the text.) I have not looked at the code, but since most books consider the title page a right hand page, perhaps the convention could be to reterm the left and right margins as inside and outside margins. Then depending on the page when processed you apply the appropriate margin opposite the page number. I assume this code is already available since asciidoctor-pdf correctly places the page numbers in the correct margins. For a normally stapled report (left hand corner) or HTML, these margins could simply be set the same. Understanding Book Layouts and Page Margins EDIT: Clarified the page number in the documentation for KOMA script. |
In order to print my InfoQ mini-book with Lulu, they need us to add margins to the PDF. They want gutter/inside at least 35mm/1.38in and an outside margin at least 25mm/1in. Is it possible to do this with a |
I hadn't yet implemented recto/verso margins because, at the time, we didn't have a theme system and the focus was on desktop viewing (not printing). However, now that we have a theme system, we could easily accommodate this customization using a theme key. I might even be able to make it work with a separate key in the same theme file that is activated using an AsciiDoc attribute (e.g., media-print). That would certainly keep things simple and DRY. |
Aha! That's what I was looking for. So this request is for recto/verso margins for printing. I'll update the title accordingly. |
That is correct. That is where we stand right now. |
I can't say for sure if this can be accomplished with an extension, but in theory it seems possible. We need to tap into the page create event in Prawn and change the margins on the page. (There's an on_page_create hook, but that might be too late to adjust margins. Another approach is to override the start_new_page method) The Asciidoctor converter itself will be none the wiser since it doesn't really keep track of the dimensions of the page it's on. It just works with the canvas it has. As with all things, I'm sure there are caveats we're going to have to address. Experimentation will reveal those challenges. |
It's unfortunate that Prawn doesn't provide a nice API handle this requirement. But we can make it happen regardless. |
That's a bit different since the running (header/footer) content is done in a separate pass working on pages that have already been laid down (using the repeater API). |
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add page_margin helper
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add page_margin helper - add page_side helper
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add page_margin helper - add page_side helper
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add page_margin helper - add page_side helper
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add set_page_margin helper - add page_margin helper - add page_side helper
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add set_page_margin helper - add page_margin helper - add page_side helper
- add support for recto/verso margins when attribute media=print - add recto/verso support to running content - insert blank page after cover page when media=print and doctype is book - add set_page_margin helper - add page_margin helper - add page_side helper
- add support for recto/verso margins when attribute media=press - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=press and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers
- add support for recto/verso margins when attribute media=press - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=press and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers
- add support for recto/verso margins when attribute media=press - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=press and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers
- add support for recto/verso margins when attribute media=press - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=press and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers
- add support for recto/verso margins when attribute media=press - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=press and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide
- start parts and chapters on recto page unless nonfacing option is set on section - don't put page break before Credits in chronicles example - make Credits section in chronicles example an appendix
…idoctor#415) - add support for recto/verso margins when attribute media=prepress - introduce page_margin_inner and page_margin_outer keys to theme - calculate page margin for recto and verso pages automatically - add recto/verso support to running content - start title page, toc, and content on recto page when media=prepress and doctype=book - add set_page_margin helper - add page_margin helper - add page_side helper - add recto_page? and verso_page? helpers - resolve asciidoctor#458 add page labels for all front matter pages to fix page numbering in outline - simplify toc page nums calculation - document "prepress" publishing mode in theming guide - use term "periphery" instead of "position" to refer to running content region - fix some formatting and wording in theming guide
- start parts and chapters on recto page unless nonfacing option is set on section - don't put page break before Credits in chronicles example - make Credits section in chronicles example an appendix
Looking around through the theming website and bug tracker, I do not see a way to set an inner binding offset. I see a margin property that states it is the same as CSS, (eg, left, right, top and bottom.) I do see that the default book theme,
asciidoctor-pdf -d book
, alternates page numbers like a book, but the margins are still the same.This is useful for books, or even reports, where some of the inner margin is lost due to the binding process (such as those report covers with the plastic rail, you easily lose a quarter inch or more.)
The text was updated successfully, but these errors were encountered: