Skip to content
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

Nil can't be coerced into a float -- happens with stylesheet #44

Closed
jxxcarlson opened this issue Sep 9, 2014 · 5 comments
Closed

Nil can't be coerced into a float -- happens with stylesheet #44

jxxcarlson opened this issue Sep 9, 2014 · 5 comments
Assignees

Comments

@jxxcarlson
Copy link

I get the error listed bellow when I use a style sheet with asciidoctor pdf. No pdf is generated.
Without the stylesheet, the pdf is generated without error.

$ asciidoctor-pdf -a pdf-style=base-theme.yml Poetry_8.ad 
/Users/carlson/.rvm/gems/ruby-2.1.1/gems/prawn-1.2.1/lib/prawn/document.rb:437:in `-': nil can't be coerced into Float (TypeError)

here is the style sheet:

base:
  font_size: 9
  line_height_length: 10

The error occurs with and without the trailing blank line.

@mojavelinux
Copy link
Member

At this point, Asciidoctor PDF doesn't work with a partial stylesheet (I'll need to overlay default values to allow this). The best way to start at the moment is to take the current default-theme.yml and change values as need. Can you try it that way?

Of course, in the long run we want to be able to support a theme with minimal settings as you have there.

@jxxcarlson
Copy link
Author

Will do !

Sent from my iPhone

On Sep 9, 2014, at 1:09 AM, Dan Allen notifications@github.com wrote:

At this point, Asciidoctor PDF doesn't work with a partial stylesheet (I'll need to overlay default values to allow this). The best way to start at the moment is to take the current default-theme.yml and change values as need. Can you try it that way?

Of course, in the long run we want to be able to support a theme with minimal settings as you have there.


Reply to this email directly or view it on GitHub.

@diniodinev
Copy link

Is that implemented in the latest version? Partial configuration support?

@mojavelinux
Copy link
Member

Yes. Asciidoctor PDF now loads a base theme, so you should only have to specify what you need to configure. However, it is still strongly recommended that you provide custom fonts (or use the built-in names seen in https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml) or else you will run into character problems.

@mojavelinux
Copy link
Member

I'm going to mark this as a duplicate of #132, which is now resolved.

@mojavelinux mojavelinux added this to the v1.5.0.alpha.9 milestone Jun 21, 2016
@mojavelinux mojavelinux self-assigned this Jun 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants