Difficulties in installing asciidoctor-pdf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Difficulties in installing asciidoctor-pdf

hyperscope
ruby --version
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]

bundle --version
Bundler version 2.2.17

$ bundle config set --local path .bundle/gems && bundle
Fetching https://github.com/prawnpdf/prawn.git
Fetching https://github.com/prawnpdf/prawn-table.git
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Bundler could not find compatible versions for gem "prawn":
  In Gemfile:
    prawn

    asciidoctor-pdf was resolved to 1.5.0.alpha.7, which depends on
      prawn (= 1.2.1)

    prawn-table was resolved to 0.2.3, which depends on
      prawn (>= 1.3.0, < 3.0.0)

Bundler could not find compatible versions for gem "prawn-table":
  In Gemfile:
    prawn-table

    asciidoctor-pdf was resolved to 1.5.0.alpha.8, which depends on
      prawn-table (= 0.2.1)
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

abelsromero
Am I worng to assume there's a Gemfile created right? Can you try updating the dependencies to latests? Alpha's are quite old, a normal gem install should resolve to 1.5.4 (no alpha or beta).
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

mojavelinux
Administrator
The current stable release of Asciidoctor PDF is not compatible with Ruby 3 (a limitation inherited by the version of Prawn that it depend on), as stated in the README: https://github.com/asciidoctor/asciidoctor-pdf/tree/v1.5.x#known-limitations This has been fixed in the main branch for the upcoming 2.0 release. However, that release is not yet ready.

I recognize this has become an untenable situation. I am going to address it this weekend. Look for a new release by early next week that enables support for Ruby 3.

Until then, you either have to use Asciidoctor PDF with Ruby < 3, or you need to add the following to your Gemfile to use a preview of Asciidoctor PDF 2:

gem 'asciidoctor-pdf', github: 'asciidoctor/asciidoctor-pdf'

Best Regards,

-Dan

--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

mojavelinux
Administrator
Asciidoctor PDF 1.6.0 is now available with support for Ruby 3. See https://github.com/asciidoctor/asciidoctor-pdf/releases/tag/v1.6.0

Best Regards,

-Dan

--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

hyperscope
Thank you much. It works. I could install it without problems.

What I find good is that it is how I have read it, a standalone PDF producer, and I liked the default formatting.

I have noticed that this character does not produce: ☎, does it mean that Unicode is not supported, or I maybe lack some fonts?
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

mojavelinux
Administrator
Glad to hear you got it installed! And thanks for testing and providing feedback.

> I have noticed that this character does not produce: ☎, does it mean that Unicode is not supported, or I maybe lack some fonts?

PDF is a "bring your own font" format. We try to provide fonts that cover as many glyphs as possible, but there are few fonts in the world that provide every glyph, and those that do aren't very appealing. So Asciidoctor PDF provides a way to add more or replace the ones provided.


In this particular case, though, the emoji font (Noto Emoji) provided in the default-with-fallback-font theme will give you what you need.

asciidoctor-pdf -a pdf-theme=default-with-fallback-font doc.adoc

Best Regards,

-Dan

--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

hyperscope
In reply to this post by mojavelinux
I have noticed that the author, date is not appearing visually in the output of the Asciidoctor PDF. Is it intentional?
Reply | Threaded
Open this post in threaded view
|

Re: Difficulties in installing asciidoctor-pdf

mojavelinux
Administrator
Please ask distinct follow-up questions in a separate thread or (ideally) the community chat at https://asciidoctor.zulipchat.com.

Thanks!

-Dan

--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux