Class: Hackademic::Compile
- Inherits:
-
Thor
- Object
- Thor
- Hackademic::Compile
- Includes:
- Thor::Actions
- Defined in:
- lib/hackademic/compile.rb
Instance Method Summary collapse
- #all ⇒ Object
- #docx ⇒ Object
- #latex ⇒ Object
- #pdf ⇒ Object
- #show_docx_command ⇒ Object
- #show_pdf_command ⇒ Object
Instance Method Details
#all ⇒ Object
7 8 9 10 11 |
# File 'lib/hackademic/compile.rb', line 7 def all latex docx pdf end |
#docx ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/hackademic/compile.rb', line 33 def docx check_installation read_draft_file write_master_markdown_file system docx_command say "Writing out DOCX file: #{config.output_directory}/#{config.draft_name.gsub(/\..*$/, '')}.docx" end |
#latex ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/hackademic/compile.rb', line 42 def latex check_installation read_draft_file write_master_markdown_file %x[pandoc #{config.output_directory}/#{config.transcluded_draft} --from=markdown+#{.join("+")} --filter pandoc-citeproc --bibliography=#{config.bibliography} --csl=#{config.citation_style} --latex-engine=xelatex --template=#{config.latex_template} -s -o "#{latex_file}"] say "Writing out LaTeX file: #{config.output_directory}/#{config.draft_name.gsub(/\..*$/, '')}.tex" end |
#pdf ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/hackademic/compile.rb', line 14 def pdf check_installation read_draft_file write_master_markdown_file system(pdf_command) say "Writing out PDF file: #{config.output_directory}/#{config.transcluded_draft.gsub(/\..*$/, '')}.pdf" end |
#show_docx_command ⇒ Object
28 29 30 |
# File 'lib/hackademic/compile.rb', line 28 def show_docx_command say docx_command, :blue end |
#show_pdf_command ⇒ Object
23 24 25 |
# File 'lib/hackademic/compile.rb', line 23 def show_pdf_command say pdf_command, :blue end |