Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi,
I'm currently evaluating asciidoc as possible new format for our project documentation.
Most things worked like a charm with only a little effort.
Still there is one problem I haven't found a solution for yet:
when converting my document to pdf (with asciidoctorj-pdf-maven plugin) my running header and footer has no content.
I studied the theming guide and I already see border lines at the top and bottom of my pages as I configured them in the yaml. I can change the layout of those border lines, e.g. make the border appear dashed. But the content I enter is never rendered.
I have set <pagenums/> as attribute in the configuration of the asciidoctor-maven-plugin. In the footer of my document there is a border line (configured by the yaml) and the page number (not configured by me - this is the default when the content is empty).
Here is an extract from my theme.yaml:
header: height: 1in line_height: 1 border_color: CCCCCC border_width: 0.5 border_style: dashed recto: center: content: '{document-title}' verso: center: content: $header_recto_center_contentThis is my toolchain:
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Given the setup you mention I assume you already saw the example (https://github.com/asciidoctor/asciidoctor-maven-examples/tree/master/asciidoctor-pdf-with-theme-example).
I am no expert, but I have played with it and I've seen some syntax differences that in my case allowed me to make your extract work. Still, according to the documentation (https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc) I think that your extract should also work. Instead of : I used I also added the footer from the example and it showed fine. Right now I don't have a Ruby environment and I won't be able to replicate this directly in Ruby until tomorrow. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Forgot to mention, I tried the example from the documentation:
... [show rest of quote]
And the text did not show either.
My setup: Windows 7 Java 8 Maven 3.3.9 jruby version: 9.0.5.0 prawn-version: 2.1.0 (the last) asciidoctor-j-pdf: 1.5.0-alpha.11 asciidoctor-j:1.5.4.1 |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Aaaahhh, you made my day!
Your solution recto : content : rightinstead of recto : right : contentworks in both of my environments. The sequence in the theming guide (and also some examples I found on the internet) is wrong - at least for the current version, maybe it was correct with earlier versions. Many thanks for your help ![]() |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
The version of AsciidoctorJ PDF is significantly behind the upstream version, hence the behavior difference from what the documentation describes. We're working on getting that released. Until then, you need to use the legacy configuration you discovered (or configure the build to use the upstream gem directly).
So keep the first running content configuration on hand because you'll need it soon. Cheers, -Dan |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Just in case you want to work on the final version or, just as part of the evaluation add that "Java integration does not limit usage of last version" :P, I created an example using the gem directly and you extract.
And obviously it works as the documentation says. https://github.com/abelsromero/asciidoctor-maven-examples/tree/pdf-gem-usage/asciidoctor-pdf-with-theme-example Steps are simple, using the original example: 1 · Removed AsciidoctorJ dependency from plugin 2 · Added asciidoctor-pdf (gem) depedency 3 · Enjoy Note there's no need to use the <require> attribute here because this is done by AsciidoctorJ automatically. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks for your help, now I am able to generate documents as I need them and I am aware of parts to modify later when we are able to use a newer asciidoctor-pdf version.
Since we're stuck with java 6 in our toolchain at the moment I can not switch right away to using the ruby gems directly as you suggested, abelsromero, so I will use the legacy configuration and syntax until we can make the move to a more current java (newer jruby needs at least java 7). My sincere thanks for your kind help! Eike |
Free forum by Nabble | Edit this page |