Class: Giblish::PdfMathPostbuilder
- Inherits:
-
Object
- Object
- Giblish::PdfMathPostbuilder
- Defined in:
- lib/giblish/layout_config/pdf_layout_config.rb
Overview
AIDEV-NOTE: Combined docattr provider and post-processor for asciidoctor-mathematical
Instance Method Summary collapse
-
#document_attributes(src_node, dst_node, dst_top) ⇒ Hash{String => String}
Provides document attributes for mathematical formula rendering.
-
#on_postbuild(src_topdir, dst_tree, converter) ⇒ void
Cleans up temporary SVG files created by asciidoctor-mathematical.
Instance Method Details
#document_attributes(src_node, dst_node, dst_top) ⇒ Hash{String => String}
Provides document attributes for mathematical formula rendering.
30 31 32 |
# File 'lib/giblish/layout_config/pdf_layout_config.rb', line 30 def document_attributes(src_node, dst_node, dst_top) {"mathematical-format" => "svg"} end |
#on_postbuild(src_topdir, dst_tree, converter) ⇒ void
This method returns an undefined value.
Cleans up temporary SVG files created by asciidoctor-mathematical.
14 15 16 17 18 19 20 21 22 |
# File 'lib/giblish/layout_config/pdf_layout_config.rb', line 14 def on_postbuild(src_topdir, dst_tree, converter) dst_top = src_topdir.pathname dst_top.each_child do |c| if c.basename.to_s.match?(/^stem-[0-9a-f]*\.svg$/) Giblog.logger.debug("will remove #{c}") c.delete end end end |