-
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
How to render document header at top of first main page (like a journal article) #95
Comments
This is a limitation to how Asciidoctor PDF is currently implemented. It always creates a title page. There is one hack, though. You can disable the title (which also disabled the title page), and then you can add a discrete h1 heading that only shows for the PDF backend. This gives you to open to create a mini title bar at the top of the first page.
Let me know if that works for you. We should probably still consider having a way to display the document title on the same page as the content. How do you think we should specify that behavior? |
I'll give your workaround a try when I return to work next week. I think it will be satisfactory for many cases. Having your notes here in the docs is probably good enough. Thanks. I'll have to look into what you do in latex when you want this -- the back of my mind is saying that an article type does this by default, and it is only the book type that has a title page. but the back of my mind is unreliable. A journal article is usually all of this in-line
Abstract and two-column support and in-line bibliography may be asking more than the system is intended to provide. And, it may not be worth the effort since journals all have specific requirements that would require you to tweak things. |
Very likely. This is probably what we should be doing in Asciidoctor PDF. It is the way it is right now because I developed Asciidoctor PDF with a magazine output in mind...so I may not have thought the article scenario through properly. I also need to check what the DocBook output does, because we're trying to be consistent with that for people migrating. Again, I'll need to refresh my memory.
I think two-column support belongs in the AsciiDoc -> LaTeX -> PDF chain. I'd like to avoid going down that road in Asciidoctor PDF because it's already hard enough to manage the layouts with Prawn :)
This I want to see supported consistently throughout the Asciidoctor toolchain because it's critical behavior. |
Sorry it took me so long to get back to you on this. The workaround you suggested in your original response to this issue doesn't seem to work for me (asciidoctorj-pdf 1.5.0-alpha.6). I'll look at the related issue #105. |
Okay... poked at this a little more, and after correcting some erroneous blank lines it basically works. I can't get the Two problems
Here's an example:
Which turns out a pdf that looks like: http://kas.d.pr/iZsX |
That perfectly describes the state of things at the moment. It's clear what we need to do now to remove the need for these workarounds. |
Depending on how things go for 1.5.0, we can consider making this part of that release or perhaps a micro release following it. |
The hack from mojavelinux works fine, if you do use this:
Your two problems are solved. |
@MaWiMa That gets my immediate problem solved. Thanks! |
For the record, this is the same issue as #105. |
Hello, any news? :-) |
This issue also affects me. I’d like to show the main title and the subtitle on two different lines. Therefore, I adapted the workaround proposed here as follows.
I have copied the main title and subtitle because I ignore how to access those as variables. It would be more elegant to be able to customize this using a theme or in-document variables. |
A more sleek solution:
And some remarks:
(Still the proper solution would be #105) |
This has been solved by PR #975. There is still some follow-up work to do, but the basic functionality is now in place. |
I've searched, but I can't find a way to get the document's title and author data to just be at the top of the first page. PDF backend always renders the title info as a cover page, even for the article doc type -- is there a way? Not finding one, I submit this as an enhancement.
I know I can just skip the document header and use the level one section as the title of the doc, but then numbering is strange because all my first level headings look like second level headings.
The text was updated successfully, but these errors were encountered: