Class: Pandoku::Formats::HTML

Inherits:
Pandoku::Format show all
Includes:
InputFormat, OutputFormat
Defined in:
lib/pandoku/formats/html.rb

Overview

HTML format.

Available Options

:standalone

Produce output with an appropriate header and footer.

:parse_raw

Parse untranslatable HTML codes as raw HTML, instead of ignoring them.

latexmathml

Use LaTeXMathML to display embedded TeX math in HTML output. To insert a link to a local copy of the LaTeXMathML.js script, provide a URL string. If just true is provided, the contents of the script will be inserted directly into the HTML header.

:jsmath

Use jsMath to display embedded TeX math in HTML output. The URL should point to the jsMath load script; if provided, it will be linked to in the header of standalone HTML documents.

:gladtex

Enclose TeX math in <eq> tags in HTML output. These can then be processed by gladTeX to produce links to images of the typeset formulas.

:mimetex

Render TeX math using the mimeTeX CGI script. If URL is not specified, it is assumed that the script is at /cgi-bin/mimetex.cgi.

:no_wrap

Disable text wrapping in output. (Default is to wrap text.)

:sanitize_html

Sanitizes HTML using a whitelist. Unsafe tags are replaced by HTML comments; unsafe attributes are omitted. URIs in links and images are also checked against a whitelist of URI schemes.

:email_obfuscation (nil|:javascript|:references)

Specify a method for obfuscating mailto: links in HTML documents.

  • :nil leaves mailto: links as they are.

  • :javascript obfuscates them using javascript.

  • :references obfuscates them by printing their letters as decimal or hexadecimal character references. If :strict => true is specified, references is used regardless of the presence of this option.

:toc

Include an automatically generated table of contents.

:css

Link to a CSS style sheet. The pathname of the style sheet goes value.

:include_in_header

Include contents of the given filename at the end of the header. Implies :standalone.

:include_before_body

Include contents of the given filename at the beginning of the document body.

:include_after_body

Include contents of the given filename at the end of the document body.

:custom_header

Use contents of the given filename as the document header. Implies :standalone.

Instance Attribute Summary

Attributes inherited from Pandoku::Format

#options

Class Method Summary collapse

Methods included from InputFormat

#parse

Methods included from OutputFormat

#compile

Methods inherited from Pandoku::Format

#cliopts, inherited, #initialize

Constructor Details

This class inherits a constructor from Pandoku::Format

Class Method Details

.default_optionsObject



62
63
64
65
66
67
68
# File 'lib/pandoku/formats/html.rb', line 62

def self.default_options
  { :standalone => false, :parse_raw => false, :latexmathml => nil,
    :jsmath => nil, :gladtex => false, :mimetex => nil, :no_wrap => false,
    :sanitize_html => false, :email_obfuscation => false, :toc => false,
    :css => nil, :include_in_header => nil, :include_before_body => nil,
    :include_after_body => nil, :custom_header => nil }
end

.nameObject



58
59
60
# File 'lib/pandoku/formats/html.rb', line 58

def self.name
  :html
end