class Paru::PandocFilter::Math
A Math
Inline
node with the type of math node and the mathematical contents
@!attribute math_type
@return [Hash] @see http://hackage.haskell.org/package/pandoc-types-1.17.0.4/docs/Text-Pandoc-Definition.html#t:MathType
@!attribute string
@return [String]
Attributes
Public Class Methods
Source
# File lib/paru/filter/math.rb, line 38 def initialize(contents) @math_type, @string = contents end
Create a new Math
node with contents
@param contents [Array] an array with the type and contents
Public Instance Methods
Source
# File lib/paru/filter/math.rb, line 72 def ast_contents() [ @math_type, @string ] end
Create an AST representation of this Math
node
Source
# File lib/paru/filter/math.rb, line 65 def display!() @math_type = { "t" => "DisplayMath" } end
Make this Math
node’s content display as a block
Source
# File lib/paru/filter/math.rb, line 60 def display?() "DisplayMath" == @math_type["t"] end
Should this math be displayed as a block?
@return [Boolean] true if type is “DisplayMath”
Source
# File lib/paru/filter/math.rb, line 89 def has_inline?() false end
Has this Math
node inline contents?
@return [Boolean] false
Source
# File lib/paru/filter/math.rb, line 82 def has_string?() true end
Has this Math
node string contents?
@return [Boolean] true
Source
Source
# File lib/paru/filter/math.rb, line 46 def inline?() "InlineMath" == @math_type["t"] end
Is this an inline node?
@return [Boolean] true if math type is “InlineMath”, false
otherwise