Class: Typst::HtmlExperimental
Instance Attribute Summary collapse
-
#bytes ⇒ Object
Returns the value of attribute bytes.
Attributes inherited from Base
#font_paths, #input, #root, #sys_inputs
Instance Method Summary collapse
- #document ⇒ Object (also: #markup)
-
#initialize(input, root: ".", font_paths: [], sys_inputs: {}) ⇒ HtmlExperimental
constructor
A new instance of HtmlExperimental.
Methods inherited from Base
Constructor Details
#initialize(input, root: ".", font_paths: [], sys_inputs: {}) ⇒ HtmlExperimental
Returns a new instance of HtmlExperimental.
174 175 176 177 |
# File 'lib/typst.rb', line 174 def initialize(input, root: ".", font_paths: [], sys_inputs: {}) super(input, root: root, font_paths: font_paths, sys_inputs: sys_inputs) @bytes = Typst::_to_html(self.input, self.root, self.font_paths, File.dirname(__FILE__), false, sys_inputs)[0] end |
Instance Attribute Details
#bytes ⇒ Object
Returns the value of attribute bytes.
172 173 174 |
# File 'lib/typst.rb', line 172 def bytes @bytes end |
Instance Method Details
#document ⇒ Object Also known as: markup
179 180 181 |
# File 'lib/typst.rb', line 179 def document bytes.pack("C*").to_s end |