Re: asciidoctor-pdf: pdf-page-size: xx gives an error

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

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

mojavelinux
Administrator
I just switched to using manual parsing for the pdf-page-size attribute instead of delegating to YAML. I wanted to do that anyway. See https://github.com/asciidoctor/asciidoctor-pdf/commit/29b32931b38e844b7d59cd80ee0c9b4f73cb1362.

However, I think you're still going to have a problem when it comes time to load the theme because the theme loader also uses SafeYAML. Perhaps this is a problem with SafeYAML on Debian?

You can try with the latest master of Asciidoctor PDF to find out.

Cheers,

-Dan

On Sun, Jun 7, 2015 at 10:29 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

trying the example on the asciidoctor-pdf side an uncommenting the page size setting gives following error on my system (Linux Mint 17.1 with Mate-Desktop, asciidoctor(-pdf) installes via gem.):
undefined method `safe_load' for Psych:Module
  Use --trace for backtrace

With trace, more output:

mv@mv-ThinkCentre-M70e ~/Dokumente/Asciidoctor $ asciidoctor --trace  -r asciidoctor-pdf -b pdf example01.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:201:in `build_pdf_options': undefined method `safe_load' for Psych:Module (NoMethodError)
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:168:in `init_pdf'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:101:in `convert_document'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
	from /usr/local/bin/asciidoctor:23:in `load'
	from /usr/local/bin/asciidoctor:23:in `<main>'

This comes with any value for pdf-page-size. Only uncommenting gives success.
Is it a problem of my Linux Mint (Ubuntu 14.04) or anything else? (I don't know Ruby inside...)

Regards


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3329.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

LightGuardjp
When you're talking about speed of YAML, what kind of performance are you seeing? YAML in Ruby should pretty quick. It's a native library that is being used after all. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I just switched to using manual parsing for the pdf-page-size attribute instead of delegating to YAML. I wanted to do that anyway. See https://github.com/asciidoctor/asciidoctor-pdf/commit/29b32931b38e844b7d59cd80ee0c9b4f73cb1362.

However, I think you're still going to have a problem when it comes time to load the theme because the theme loader also uses SafeYAML. Perhaps this is a problem with SafeYAML on Debian?

You can try with the latest master of Asciidoctor PDF to find out.

Cheers,

-Dan

On Sun, Jun 7, 2015 at 10:29 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

trying the example on the asciidoctor-pdf side an uncommenting the page size setting gives following error on my system (Linux Mint 17.1 with Mate-Desktop, asciidoctor(-pdf) installes via gem.):
undefined method `safe_load' for Psych:Module
  Use --trace for backtrace

With trace, more output:

mv@mv-ThinkCentre-M70e ~/Dokumente/Asciidoctor $ asciidoctor --trace  -r asciidoctor-pdf -b pdf example01.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:201:in `build_pdf_options': undefined method `safe_load' for Psych:Module (NoMethodError)
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:168:in `init_pdf'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:101:in `convert_document'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
	from /usr/local/bin/asciidoctor:23:in `load'
	from /usr/local/bin/asciidoctor:23:in `<main>'

This comes with any value for pdf-page-size. Only uncommenting gives success.
Is it a problem of my Linux Mint (Ubuntu 14.04) or anything else? (I don't know Ruby inside...)

Regards


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3329.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ml-node%2Bs49171n1h37@n6.nabble.com&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

mojavelinux
Administrator
Jason,

Speed is not really my concern here (though, admittedly, it's often my concern). The allowed values don't map directly to a type in YAML, so I wanted to switch to parsing the value myself. Plus, it's sort of overkill I think to load YAML to parse a single value.

Indeed, YAML is very quick in Ruby. I've been doing benchmarks for the theme loader and the results are basically too small to measure (something like 0.002s). I'm going to setup proper benchmarks when I finally merge the test suite :)

Cheers,

-Dan

On Sun, Jun 7, 2015 at 3:47 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
When you're talking about speed of YAML, what kind of performance are you seeing? YAML in Ruby should pretty quick. It's a native library that is being used after all. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I just switched to using manual parsing for the pdf-page-size attribute instead of delegating to YAML. I wanted to do that anyway. See https://github.com/asciidoctor/asciidoctor-pdf/commit/29b32931b38e844b7d59cd80ee0c9b4f73cb1362.

However, I think you're still going to have a problem when it comes time to load the theme because the theme loader also uses SafeYAML. Perhaps this is a problem with SafeYAML on Debian?

You can try with the latest master of Asciidoctor PDF to find out.

Cheers,

-Dan

On Sun, Jun 7, 2015 at 10:29 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

trying the example on the asciidoctor-pdf side an uncommenting the page size setting gives following error on my system (Linux Mint 17.1 with Mate-Desktop, asciidoctor(-pdf) installes via gem.):
undefined method `safe_load' for Psych:Module
  Use --trace for backtrace

With trace, more output:

mv@mv-ThinkCentre-M70e ~/Dokumente/Asciidoctor $ asciidoctor --trace  -r asciidoctor-pdf -b pdf example01.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:201:in `build_pdf_options': undefined method `safe_load' for Psych:Module (NoMethodError)
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:168:in `init_pdf'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:101:in `convert_document'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
	from /usr/local/bin/asciidoctor:23:in `load'
	from /usr/local/bin/asciidoctor:23:in `<main>'

This comes with any value for pdf-page-size. Only uncommenting gives success.
Is it a problem of my Linux Mint (Ubuntu 14.04) or anything else? (I don't know Ruby inside...)

Regards


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3329.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3333.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

LightGuardjp
You could use a tag, so it'll deserialize into the correct Ruby object, but like you said, for one object it is a bit overkill. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Jason,

Speed is not really my concern here (though, admittedly, it's often my concern). The allowed values don't map directly to a type in YAML, so I wanted to switch to parsing the value myself. Plus, it's sort of overkill I think to load YAML to parse a single value.

Indeed, YAML is very quick in Ruby. I've been doing benchmarks for the theme loader and the results are basically too small to measure (something like 0.002s). I'm going to setup proper benchmarks when I finally merge the test suite :)

Cheers,

-Dan

On Sun, Jun 7, 2015 at 3:47 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
When you're talking about speed of YAML, what kind of performance are you seeing? YAML in Ruby should pretty quick. It's a native library that is being used after all. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I just switched to using manual parsing for the pdf-page-size attribute instead of delegating to YAML. I wanted to do that anyway. See https://github.com/asciidoctor/asciidoctor-pdf/commit/29b32931b38e844b7d59cd80ee0c9b4f73cb1362.

However, I think you're still going to have a problem when it comes time to load the theme because the theme loader also uses SafeYAML. Perhaps this is a problem with SafeYAML on Debian?

You can try with the latest master of Asciidoctor PDF to find out.

Cheers,

-Dan

On Sun, Jun 7, 2015 at 10:29 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

trying the example on the asciidoctor-pdf side an uncommenting the page size setting gives following error on my system (Linux Mint 17.1 with Mate-Desktop, asciidoctor(-pdf) installes via gem.):
undefined method `safe_load' for Psych:Module
  Use --trace for backtrace

With trace, more output:

mv@mv-ThinkCentre-M70e ~/Dokumente/Asciidoctor $ asciidoctor --trace  -r asciidoctor-pdf -b pdf example01.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:201:in `build_pdf_options': undefined method `safe_load' for Psych:Module (NoMethodError)
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:168:in `init_pdf'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:101:in `convert_document'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
	from /usr/local/bin/asciidoctor:23:in `load'
	from /usr/local/bin/asciidoctor:23:in `<main>'

This comes with any value for pdf-page-size. Only uncommenting gives success.
Is it a problem of my Linux Mint (Ubuntu 14.04) or anything else? (I don't know Ruby inside...)

Regards


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3329.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3333.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3334.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ml-node%2Bs49171n1h37@n6.nabble.com&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

mojavelinux
Administrator
It's interesting that you mention tags because I recently dug deeper into the YAML spec while designing the theme language for Asciidoctor PDF. Aside from the YAML that we use, YAML is a completely insane data language. Tags make no sense to me. That's why in the theme language I created my own postprocessor that layers on data types in a way that is actually made for humans.

Now I get why mojombo created toml. So much of YAML is just junk. I think that SafeYAML is a step in the right direction because it cuts most of the garbage out of YAML (YAML the good parts), but I still think we could use a new data language that is YAML-like but the YAML we actually use. I do like the overall philosophy and structure of YAML...I just don't like anything outside of the basics.

Okay, enough ranting about YAML :)

-Dan

On Mon, Jun 8, 2015 at 12:01 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
You could use a tag, so it'll deserialize into the correct Ruby object, but like you said, for one object it is a bit overkill. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Jason,

Speed is not really my concern here (though, admittedly, it's often my concern). The allowed values don't map directly to a type in YAML, so I wanted to switch to parsing the value myself. Plus, it's sort of overkill I think to load YAML to parse a single value.

Indeed, YAML is very quick in Ruby. I've been doing benchmarks for the theme loader and the results are basically too small to measure (something like 0.002s). I'm going to setup proper benchmarks when I finally merge the test suite :)

Cheers,

-Dan

On Sun, Jun 7, 2015 at 3:47 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
When you're talking about speed of YAML, what kind of performance are you seeing? YAML in Ruby should pretty quick. It's a native library that is being used after all. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I just switched to using manual parsing for the pdf-page-size attribute instead of delegating to YAML. I wanted to do that anyway. See https://github.com/asciidoctor/asciidoctor-pdf/commit/29b32931b38e844b7d59cd80ee0c9b4f73cb1362.

However, I think you're still going to have a problem when it comes time to load the theme because the theme loader also uses SafeYAML. Perhaps this is a problem with SafeYAML on Debian?

You can try with the latest master of Asciidoctor PDF to find out.

Cheers,

-Dan

On Sun, Jun 7, 2015 at 10:29 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

trying the example on the asciidoctor-pdf side an uncommenting the page size setting gives following error on my system (Linux Mint 17.1 with Mate-Desktop, asciidoctor(-pdf) installes via gem.):
undefined method `safe_load' for Psych:Module
  Use --trace for backtrace

With trace, more output:

mv@mv-ThinkCentre-M70e ~/Dokumente/Asciidoctor $ asciidoctor --trace  -r asciidoctor-pdf -b pdf example01.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:201:in `build_pdf_options': undefined method `safe_load' for Psych:Module (NoMethodError)
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:168:in `init_pdf'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:101:in `convert_document'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
	from /usr/local/bin/asciidoctor:23:in `load'
	from /usr/local/bin/asciidoctor:23:in `<main>'

This comes with any value for pdf-page-size. Only uncommenting gives success.
Is it a problem of my Linux Mint (Ubuntu 14.04) or anything else? (I don't know Ruby inside...)

Regards


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3329.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3333.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3334.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3335.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

mave
In reply to this post by mojavelinux
... Perhaps this is a problem with SafeYAML on Debian?
You can try with the latest master of Asciidoctor PDF to find out.
I know only this: Ubuntu-Packages  are not the latest asciidoctor version. I installed it via gem, additionally asciidoctor-pdf pre-version. Installing Ubuntus SafeYAML-Package has no effect and I can't say, wether a mix of DEBs and gem-installed versions gives problems or not.

I'm using the latest asciidoctor but ':pdf-page-size: xx' breaks the conversion. Unfortunately it may be to complex playing ruby with some libraries if the exact matching of the components is difficult  (particularly because Ubuntu is still really normal...)

Regards from Germany
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

LightGuardjp
In reply to this post by mojavelinux
If you're using it for config, why not just use a ruby dsl?

On Monday, June 8, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
It's interesting that you mention tags because I recently dug deeper into the YAML spec while designing the theme language for Asciidoctor PDF. Aside from the YAML that we use, YAML is a completely insane data language. Tags make no sense to me. That's why in the theme language I created my own postprocessor that layers on data types in a way that is actually made for humans.

Now I get why mojombo created toml. So much of YAML is just junk. I think that SafeYAML is a step in the right direction because it cuts most of the garbage out of YAML (YAML the good parts), but I still think we could use a new data language that is YAML-like but the YAML we actually use. I do like the overall philosophy and structure of YAML...I just don't like anything outside of the basics.

Okay, enough ranting about YAML :)

-Dan

On Mon, Jun 8, 2015 at 12:01 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
You could use a tag, so it'll deserialize into the correct Ruby object, but like you said, for one object it is a bit overkill. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Jason,

Speed is not really my concern here (though, admittedly, it's often my concern). The allowed values don't map directly to a type in YAML, so I wanted to switch to parsing the value myself. Plus, it's sort of overkill I think to load YAML to parse a single value.

Indeed, YAML is very quick in Ruby. I've been doing benchmarks for the theme loader and the results are basically too small to measure (something like 0.002s). I'm going to setup proper benchmarks when I finally merge the test suite :)

Cheers,

-Dan

On Sun, Jun 7, 2015 at 3:47 PM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
When you're talking about speed of YAML, what kind of performance are you seeing? YAML in Ruby should pretty quick. It's a native library that is being used after all. 

On Sunday, June 7, 2015, mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I just switched to using manual parsing for the pdf-page-size attribute instead of delegating to YAML. I wanted to do that anyway. See https://github.com/asciidoctor/asciidoctor-pdf/commit/29b32931b38e844b7d59cd80ee0c9b4f73cb1362.

However, I think you're still going to have a problem when it comes time to load the theme because the theme loader also uses SafeYAML. Perhaps this is a problem with SafeYAML on Debian?

You can try with the latest master of Asciidoctor PDF to find out.

Cheers,

-Dan

On Sun, Jun 7, 2015 at 10:29 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

trying the example on the asciidoctor-pdf side an uncommenting the page size setting gives following error on my system (Linux Mint 17.1 with Mate-Desktop, asciidoctor(-pdf) installes via gem.):
undefined method `safe_load' for Psych:Module
  Use --trace for backtrace

With trace, more output:

mv@mv-ThinkCentre-M70e ~/Dokumente/Asciidoctor $ asciidoctor --trace  -r asciidoctor-pdf -b pdf example01.adoc
/var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:201:in `build_pdf_options': undefined method `safe_load' for Psych:Module (NoMethodError)
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:168:in `init_pdf'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:101:in `convert_document'
	from /var/lib/gems/1.9.1/gems/asciidoctor-pdf-1.5.0.alpha.7/lib/asciidoctor-pdf/converter.rb:76:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/document.rb:1028:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor.rb:1499:in `convert'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:94:in `block in invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `each'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/lib/asciidoctor/cli/invoker.rb:86:in `invoke!'
	from /var/lib/gems/1.9.1/gems/asciidoctor-1.5.2/bin/asciidoctor:10:in `<top (required)>'
	from /usr/local/bin/asciidoctor:23:in `load'
	from /usr/local/bin/asciidoctor:23:in `<main>'

This comes with any value for pdf-page-size. Only uncommenting gives success.
Is it a problem of my Linux Mint (Ubuntu 14.04) or anything else? (I don't know Ruby inside...)

Regards


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3329.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3333.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3334.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#[hidden email]&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3335.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3336.html
To start a new topic under Asciidoctor :: Discussion, email <a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;ml-node%2Bs49171n1h37@n6.nabble.com&#39;);" target="_blank">ml-node+s49171n1h37@...
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Sent from Gmail Mobile
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-pdf: pdf-page-size: xx gives an error

mojavelinux
Administrator
In reply to this post by mave
I'm positive this problem will be fixed once 1.5.0.alpha.8 is released. I see where the error is in 1.5.0.alpha.7 and it has since been resolved. I expect that 1.5.0.alpha.8 will work fine with the SafeYAML package provided in Debian-based distributions.

Cheers,

-Dan

On Mon, Jun 8, 2015 at 5:58 AM, mave [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... Perhaps this is a problem with SafeYAML on Debian?
You can try with the latest master of Asciidoctor PDF to find out.
I know only this: Ubuntu-Packages  are not the latest asciidoctor version. I installed it via gem, additionally asciidoctor-pdf pre-version. Installing Ubuntus SafeYAML-Package has no effect and I can't say, wether a mix of DEBs and gem-installed versions gives problems or not.

I'm using the latest asciidoctor but ':pdf-page-size: xx' breaks the conversion. Unfortunately it may be to complex playing ruby with some libraries if the exact matching of the components is difficult  (particularly because Ubuntu is still really normal...)

Regards from Germany



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Re-asciidoctor-pdf-pdf-page-size-xx-gives-an-error-tp3332p3337.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--