quarto
quarto copied to clipboard
PDF not generated
This likely has more to do with my system than a problem with quarto but my PDFs are not being created. Here's what I'm seeing:
pandoc --table-of-contents --standalone build/master/master.xhtml | xmlstarlet sel -I -t -c "//*[@id='TOC']" > build/prince/toc.xml
Attempt to load network entity http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
rake aborted!
Command failed with status (1): [pandoc --table-of-contents --standalone bu...]
/Users/jim/Projects/quarto/lib/quarto/prince.rb:62:in `block in define_tasks'
/Users/jim/.gem/ruby/2.2.0/bin/ruby_executable_hooks:15:in `eval'
/Users/jim/.gem/ruby/2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => deliverables => build/deliverables/ruby-dsl-handbook.pdf => build/master/prince_master.xhtml => build/prince/toc.xml
Here's my relevant config:
require 'quarto/tasks'
require 'quarto'
Quarto.configure do |config|
config.author = "Jim Gay"
config.title = "Ruby DSL Handbook"
config.name = 'ruby-dsl-handbook'
# config.stylesheets.clear
config.metadata = true
# config.use :git
config.use :markdown
# config.use :doc_raptor
config.use :pandoc_epub
config.use :epubcheck
config.use :kindlegen
config.use :bundle
config.use :site
config.use :prince
config.source_files = %w[ files listed here ]
config.bitmap_cover_image = "images/cover-large.png"
config.vector_cover_image = "images/cover.svg"
config.stylesheets.cover_color = "#222"
config.stylesheets.heading_font = '"PT Sans", sans-serif'
config.stylesheets.font = '"PT Serif", serif
What can I do to debug this?
I'm on OS X and using homebrew. My prince
install wasn't linked properly. After fixing it (I think) the error changes:
create build/master/prince_master.xhtml from build/master/master.xhtml
rake aborted!
NoMethodError: undefined method `first_element_child' for nil:NilClass
/Users/jim/Projects/quarto/lib/quarto/prince.rb:134:in `create_prince_master_file'
/Users/jim/Projects/quarto/lib/quarto/prince.rb:50:in `block in define_tasks'
/Users/jim/.gem/ruby/2.2.0/bin/ruby_executable_hooks:15:in `eval'
/Users/jim/.gem/ruby/2.2.0/bin/ruby_executable_hooks:15:in `<main>'
The toc.xml
file generated in build/prince is completely blank.
The following command is operating on a blank toc file.
pandoc --table-of-contents --standalone build/master/master.xhtml | xmlstarlet sel -I -t -c "//*[@id='TOC']" > build/prince/toc.xml
When I looked at the contents of the generate xml file, there was not element with an id of "TOC"
pandoc --table-of-contents --standalone build/master/master.xhtml | less
I'm looking into pandoc to find out why it's not creating that element. I'm not sure if there's something that I need to do or if pandoc makes assumptions and creates the TOC automatically