module Jekyll::Antex
Constants
- Alias
- Guard
- VERSION
Attributes
jobs[RW]
Public Class Methods
inject_style_attributes(output)
click to toggle source
# File lib/jekyll/antex.rb, line 23 def self.inject_style_attributes(output) output.gsub(/data-antex="(?<hash>.*?)"/) do job = Jekyll::Antex.jobs[Regexp.last_match[:hash]] Jekyll::Antex::Block.render_style_attribute(job.set_box) end end
run_jobs()
click to toggle source
# File lib/jekyll/antex.rb, line 11 def self.run_jobs jobs_count = Jekyll::Antex.jobs.count Jekyll.logger.writer << "Compiling TeX: ".rjust(20) Jekyll::Antex.jobs.values.each_with_index do |job, i| progress = "job " + i.next.to_s.rjust(jobs_count.to_s.length) + " of #{jobs_count} " Jekyll.logger.writer << progress job.run! Jekyll.logger.writer << "\b" * progress.length end Jekyll.logger.writer << "#{jobs_count} jobs completed.\n" end