Re: two captions for a image block
Posted by
mojavelinux on
Dec 11, 2018; 10:40pm
URL: https://discuss.asciidoctor.org/two-captions-for-a-image-block-tp6638p6645.html
In order to use slim templates, you need to add the following two gems:
* slim
* tilt
Install them in the same way that you installed the asciidoctor gem.
I also noticed that your template doesn't quite have the right syntax. I would advise consulting this documentation:
http://slim-lang.com/
It's good that you are venturing into custom templates because they give you soooooooo much control over what Asciidoctor outputs.
Cheers,
-Dan
On Tue, Dec 11, 2018 at 3:35 PM al-asciidoctor [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
As I'm new to this asciidoctor and slim stuff I hope you are not to angry for my dump questions.
Now I have tried the following.
* create a directory `templates`
* create a file `upper-caption.html.slim` as the default caption is below the image and I need one above.
* content of `upper-caption.html.slim`
.imageblock
upper-caption=testi
Now when I run the asciidoctor command I get the follwing output.
asciidoctor -a attribute-missing=warn -v --trace -T ../templates/upper-caption.html.slim Kopie.adoc
D:/APPS/msys64/mingw64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- tilt (LoadError)
from D:/APPS/msys64/mingw64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from D:/APPS/msys64/mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.8/lib/asciidoctor/cli/options.rb:243:in `parse!'
from D:/APPS/msys64/mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.8/lib/asciidoctor/cli/options.rb:37:in `parse!'
from D:/APPS/msys64/mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.8/lib/asciidoctor/cli/invoker.rb:23:in `initialize'
from D:/APPS/msys64/mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.8/bin/asciidoctor:12:in `new'
from D:/APPS/msys64/mingw64/lib/ruby/gems/2.5.0/gems/asciidoctor-1.5.8/bin/asciidoctor:12:in `<top (required)>'
from D:/APPS/msys64/mingw64/bin/asciidoctor:23:in `load'
from D:/APPS/msys64/mingw64/bin/asciidoctor:23:in `<main>'
What's my mistake?
--