Module MaRuKu::Out::HTML
In: lib/maruku.rb
lib/maruku/ext/div.rb
lib/maruku/ext/math/to_html.rb
lib/maruku/ext/math/mathml_engines/blahtex.rb
lib/maruku/ext/math/mathml_engines/none.rb
lib/maruku/ext/math/mathml_engines/ritex.rb
lib/maruku/ext/math/mathml_engines/itex2mml.rb
lib/maruku/output/to_html.rb

This module groups all functions related to HTML export.

Methods

Classes and Modules

Class MaRuKu::Out::HTML::HTMLElement

Constants

PNG = Struct.new(:src, :depth, :height)
Xhtml11_mathml2_svg11 = '<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> '
HTML4Attributes = {}  

begin maruku_doc

 Attribute: style
 Scope: element
 Output: HTML

 It is copied as a standard HTML attribute.

end

Public Class methods

Escape text for use in HTML (content or attributes) by running it through standard XML escaping (quotes and angle brackets and ampersands)

Public Instance methods

Convert each child to html

returns "st","nd","rd" or "th" as appropriate

Pretty much the same as the HTMLElement constructor except it copies standard attributes out of the Maruku Element‘s attributes hash.

formats a nice date

Email address

Creates an xml Mathml document of this node‘s TeX code.

@return [MaRuKu::Out::HTML::HTMLElement]

Renders a PNG image of this node‘s TeX code. Returns

@return [MaRuKu::Out::HTML::PNG, nil]

  A struct describing the location and size of the image,
  or nil if no library is loaded that can render PNGs.

nil if not applicable, else SPAN element

nil if not applicable, else string

Render as an HTML fragment (no head, just the content of BODY). (returns a string)

begin maruku_doc

 Attribute: code_background_color
 Scope: global, document, element
 Summary: Background color for code blocks.

 The format is either a named color (`green`, `red`) or a CSS color
 of the form `#ff00ff`.

 * for **HTML output**, the value is put straight in the `background-color` CSS
   property of the block.

 * for **LaTeX output**, if it is a named color, it must be a color accepted
   by the LaTeX `color` packages. If it is of the form `#ff00ff`, Maruku
   defines a color using the `\color[rgb]{r,g,b}` macro.

   For example, for `#0000ff`, the macro is called as: `\color[rgb]{0,0,1}`.

end

Definition lists ###

Render to a complete HTML document (returns a string)

Render to a complete HTML document (returns an HTMLElement document tree)

begin maruku_doc

 Attribute: filter_html
 Scope: document

 If true, raw HTML is discarded from the output.

end

renders children as html and wraps into an element of given name

Sets ‘id’ if meta is set

Helper to create an element

Helper to create a text node

[Validate]