Skip to content
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

Landscape pages for wide diagrams / images with float/nofloat #250

Closed
wolandscat opened this issue Jun 29, 2015 · 8 comments
Closed

Landscape pages for wide diagrams / images with float/nofloat #250

wolandscat opened this issue Jun 29, 2015 · 8 comments

Comments

@wolandscat
Copy link

This would be an enhancement: support landscape pages in the PDF output for wide diagrams that have been made with that intention - which is pretty common. Since some diagrams might simply be wide because they were obtained in some strange way (e.g. very high-res screenshot), there's no way to infer whether a landscape page would be needed or not. Therefore it would have to be indicated explicitly, perhaps in the image macro with 'orientation="landscape"'.

In Frame, I always did wide diagrams on landscape pages such that the diagram takes the entire page, so no need to worry about text flows or complicated measuring - just inject a new landscape page and put that diagram and its caption on it. Actually, it's not quite as simple as that, because you may have blank space remaining on the current portrait page at the point you hit the image macro for the landscape diagram. There are two ways to deal with this:

  • always fill up the remainder of the portrait page in the normal way, then process any pending landscape page image directives
  • allow images to be declared 'floating' or not. Floating images is the normal default you want, so If there is nothing special in the macro line, do 1. above; but if there is a (say) 'nofloat' parameter, output the landscape page immediately with the diagram + caption, and then keep going.

For interactive HTML, large images can be obtained by normal means in a browser. Concepts like 'nofloat' and 'landscape' can be ignored (although if you wanted to be super smart, 'landscape' might lead to a button being added to pop out the image in original size, or some pre-defined wider size).

@mojavelinux
Copy link
Member

Thanks for posting. I'll start thinking about how to handle this in the processor.

We'll need to use different terminology than "float" since that term already has a different meaning in AsciiDoc as it relates to images (it means to allow text to wrap around images, which, incidentally, we cannot easily support right now...but that's another matter). My gut tells me that either "canvas" or "cover" are the role names we're looking for...but I'll give it some more thought. In fact, I had already been thinking about adding this feature because I was thinking about how to make slide decks with Asciidoctor PDF and realized we'd need this behavior.

@wolandscat
Copy link
Author

Well it's a related concept - maybe 'floatpage'?

@dsisnero
Copy link

I need this not only for images, but for certain sections of a document.
How could I achieve this?

[.landscape]
<<<

[.normal]
<<<

Thanks,

On Mon, Jun 29, 2015 at 6:35 AM, Thomas Beale notifications@github.com
wrote:

Well it's a related concept - maybe 'floatpage'?


Reply to this email directly or view it on GitHub
#250 (comment)
.

@dsisnero
Copy link

dsisnero commented Jul 9, 2015

I am working on this by having each start_page take options. I check pdf-page-layout attribute during each page addition

@mojavelinux mojavelinux added this to the future milestone Oct 8, 2015
@mojavelinux
Copy link
Member

Options on the page break is very interesting. In Asciidoctor, the page break can have attributes, so that's entirely possible. I don't think manual page breaks will always result in the behavior you want, but it may catch 80-90% of the cases, so it's a reasonable idea.

We could consider whether an option makes more sense then a role. Either way, I see the values as:

  • landscape
  • portrait
  • default (document default)

@r0ckarong
Copy link
Contributor

Is this implemented yet? I'm getting requests on how to do this.

@MGrohrock
Copy link

Hi. I'm intrested in this feature, too. How is the current situation?

@mojavelinux
Copy link
Member

We implemented layout control on the page break in #490. Hence, I'm going to mark this as a duplicate.

@mojavelinux mojavelinux removed this from the future milestone Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants