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 all,
I tried to customize the output of asciidoctor-pdf a bit and I got intro trouble. My little test.adoc looks ok, since standard converting it looks good: ⌁68% [lmeier:] ppc ‡ ~/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/bin/asciidoctor-pdf -r asciidoctor-diagram --trace -a data-uri -o test_r.pdf test.adoc But if I use a simple theme file, I got this error: ⌁68% [lmeier:] ppc ‡ ~/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/bin/asciidoctor-pdf -r asciidoctor-diagram --trace -a pdf-stylesdir=themes -a pdf-style=basic.yml -a data-uri -o test_r.pdf test.adoc /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/prawn_ext/extensions.rb:170:in `calc_line_metrics': undefined method `*' for nil:NilClass (NoMethodError) from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1451:in `layout_heading' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1371:in `block (2 levels) in layout_title_page' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1923:in `block in theme_font' from /home/lmeier/.gem/ruby/2.2.0/gems/prawn-1.2.1/lib/prawn/font.rb:63:in `block in font' from /home/lmeier/.gem/ruby/2.2.0/gems/prawn-1.2.1/lib/prawn/font.rb:208:in `save_font' from /home/lmeier/.gem/ruby/2.2.0/gems/prawn-1.2.1/lib/prawn/font.rb:61:in `font' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/prawn_ext/extensions.rb:115:in `font' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1922:in `theme_font' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1370:in `block in layout_title_page' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1923:in `block in theme_font' from /home/lmeier/.gem/ruby/2.2.0/gems/prawn-1.2.1/lib/prawn/font.rb:63:in `block in font' from /home/lmeier/.gem/ruby/2.2.0/gems/prawn-1.2.1/lib/prawn/font.rb:208:in `save_font' from /home/lmeier/.gem/ruby/2.2.0/gems/prawn-1.2.1/lib/prawn/font.rb:61:in `font' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/prawn_ext/extensions.rb:115:in `font' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1922:in `theme_font' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:1363:in `layout_title_page' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:118:in `convert_document' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!' from /home/lmeier/.gem/ruby/2.2.0/gems/asciidoctor-pdf-1.5.0.alpha.7/bin/asciidoctor-pdf:14:in `<main>' This is the content of the theme file: footer: font_color: $base_font_color Any hints? |
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
|
Wilhelm, Currently, you have to specify all the keys in your custom theme for which a default value is not provided. This is one of the primary reasons Asciidoctor PDF is still alpha. The plan is to load a base theme so that a custom theme only needs to declare keys that it wants to override from the base theme (like CSS). (Related issue: https://github.com/asciidoctor/asciidoctor-pdf/issues/132). To make your custom theme work today, you need to start with the minimal theme recommended in the theming guide (warning: there are still some keys missing even from that sample, but it should work for most documents). Look for the basic-theme.yml in this section of the guide: http://gist.asciidoctor.org/?github-asciidoctor%2Fasciidoctor-pdf%2F%2Fdocs%2Ftheming-guide.adoc#language-overview Cheers, -Dan On Wed, Jun 17, 2015 at 6:48 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi all, ... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen |
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 the hints! Looks ok now.
The problem was that I used an old theme file from an older asciidoctor-pdf installation. -- Wilhelm |
Free forum by Nabble | Edit this page |