jacott/rails-latex — Issue #15: "Parse twice" default parameter issue
Author: aderouineau
Created: 2011-11-29 21:10:24+00:00
State: open

Problem:

When overriding the default parameter parce_twice (LatexToPdf.config.merge! :parse_twice => true), the TeX is parsed only once.

I believe the issue to be here:

def self.generate_pdf(code,config,parse_twice=nil)
parse_twice=config[:parse_twice] if parse_twice.nil?
config=self.config.merge(config)

In the current code, parse_twice is evaluated before merging config with the default configuration. The last two lines thus need to be interchanged.