Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9239179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:55:41+00:00 2026-06-18T07:55:41+00:00

I’m trying to use nanoc 3.5.0 with the pandoc filter that uses pandoc-ruby .

  • 0

I’m trying to use nanoc 3.5.0 with the pandoc filter that uses pandoc-ruby. Specifically, I’m not able to pass several options from my Rules file such that the final call to PandocRuby.convert() looks like this:

PandocRuby.convert(content,
                   {:from => :markdown, :to => :html}, :no_wrap, 
                   :table_of_contents, :mathjax, :standalone,
                   {"template" => Dir.getwd + '/layouts/pandocTemplate.html'})

When I place the above call in a custom filter, everything works fine. However, I would like to specify pandoc options in Rules such that I don’t have to create a special filter for every set of options.

The default pandoc filter is defined as the function run(content, params={}) and simply calls PandocRuby.convert(content, params). How can I set params such that PandocRuby.convert() gets called correctly? The following directives in Rules do not work:

filter :pandoc, :params => { :from => :markdown, :to => :html, :no_wrap, :table_of_contents, :mathjax, :standalone, "template" => Dir.getwd + '/layouts/pandocTemplate.html' }
filter :pandoc, :params => { :from => :markdown, :to => :html, :no_wrap => true, :table_of_contents => true, :mathjax => true, :standalone => true, "template" => Dir.getwd + '/layouts/pandocTemplate.html' }

The first directive results in a Ruby error, the second directive runs but gives me a blank page, indicating that pandoc did not get called right. I’m not really familiar with Ruby, so my current efforts are just stabs in the dark.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:55:42+00:00Added an answer on June 18, 2026 at 7:55 am

    The pandoc filter that comes with nanoc can’t properly do that at this point. The params given to the filter are passed through directly to PandocRuby.convert:

    def run(content, params={})
      PandocRuby.convert(content, params)
    end
    

    (source)

    Your invocation of the filter has more than two arguments, which is why it crashes. The filter certainly needs to be updated (My idea of how it could be called was too naïve). If you want to take a shot at improving the filter, you are certainly welcome to submit a pull request! I have reported this as an issue in the mean time (link).

    (And hopefully I can update this answer with a proper answer soon!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.