Class: Coradoc::Markdown::Math
- Defined in:
- lib/coradoc/markdown/model/math.rb
Overview
Represents a math block (block or inline)
Block math syntax: $$…$$ on its own lines Inline math syntax: $$…$$ within text
Examples:
$$\lambda_\alpha > 5$$
$$1 + 1$$
Class Method Summary collapse
- .block(content) ⇒ Object
-
.inline(content) ⇒ Math
Create an inline math element.
Instance Method Summary collapse
-
#inline? ⇒ Boolean
Check if this is inline math.
Methods inherited from Base
Class Method Details
.block(content) ⇒ Object
31 32 33 |
# File 'lib/coradoc/markdown/model/math.rb', line 31 def self.block(content) new(content: content, inline: false) end |
.inline(content) ⇒ Math
Create an inline math element
27 28 29 |
# File 'lib/coradoc/markdown/model/math.rb', line 27 def self.inline(content) new(content: content, inline: true) end |
Instance Method Details
#inline? ⇒ Boolean
Check if this is inline math
20 21 22 |
# File 'lib/coradoc/markdown/model/math.rb', line 20 def inline? inline == true end |