.TH "KRAMDOWN" 1 "July 2010" .SH NAME kramdown \- a fast, pure-Ruby Markdown-superset converter .SH SYNOPSIS .B kramdown [\fIoptions\fR] [\fIFILE\fR ...] .SH DESCRIPTION kramdown is primarily used for parsing a superset of Markdown and converting it to different output formats. It supports standard Markdown (with some minor modifications) and various extensions like tables and definition lists. Due to its modular architecture it also allows other input formats than Markdown, for example, HTML. If \fIFILE\fR is not specified, kramdown reads from the standard input. The result is written to the standard output. There are two sets of options that kramdown accepts: The first one includes the options that are used directly by the kramdown binary. The second set of options controls how kramdown parses and converts its input. .SH OPTIONS .TP .B \-i, \-\-input ARG Specify the input format. Available input formats: kramdown (this is the default) or html. .TP .B \-o, \-\-output ARG Specify the output format. Available output formats: html (this is the default), kramdown or latex. .TP .B \-v, \-\-version Show the version of kramdown. .TP .B \-h, \-\-help Show the help. .SH KRAMDOWN OPTIONS .TP .B \-\-template ARG The name of an ERB template file that should be used to wrap the output This is used to wrap the output in an environment so that the output can be used as a stand-alone document. For example, an HTML template would provide the needed header and body tags so that the whole output is a valid HTML file. If no template is specified, the output will be just the converted text. When resolving the template file, the given template name is used first. If such a file is not found, the converter extension is appended. If the file still cannot be found, the templates name is interpreted as a template name that is provided by kramdown (without the converter extension). kramdown provides a default template named 'default' for each converter. Default: '' Used by: all converters .TP .B \-\-[no\-]auto-ids Use automatic header ID generation If this option is `true`, ID values for all headers are automatically generated if no ID is explicitly specified. Default: true Used by: HTML/Latex converter .TP .B \-\-auto-id-prefix ARG Prefix used for automatically generated heaer IDs This option can be used to set a prefix for the automatically generated header IDs so that there is no conflict when rendering multiple kramdown documents into one output file separately. The prefix should only contain characters that are valid in an ID! Default: '' Used by: HTML/Latex converter .TP .B \-\-[no\-]parse-block-html Process kramdown syntax in block HTML tags If this option is `true`, the kramdown parser processes the content of block HTML tags as text containing block level elements. Since this is not wanted normally, the default is `false`. It is normally better to selectively enable kramdown processing via the markdown attribute. Default: false Used by: kramdown parser .TP .B \-\-[no\-]parse-span-html Process kramdown syntax in span HTML tags If this option is `true`, the kramdown parser processes the content of span HTML tags as text containing span level elements. Default: true Used by: kramdown parser .TP .B \-\-[no\-]html-to-native Convert HTML elements to native elements If this option is `true`, the parser converts HTML elements to native elements. For example, when parsing `hallo` the emphasis tag would normally be converted to an `:html` element with tag type `:em`. If `html_to_native` is `true`, then the emphasis would be converted to a native `:em` element. This is useful for converters that cannot deal with HTML elements. Default: false Used by: kramdown parser .TP .B \-\-footnote-nr ARG The number of the first footnote This option can be used to specify the number that is used for the first footnote. Default: 1 Used by: HTML converter .TP .B \-\-coderay-wrap ARG Defines how the highlighted code should be wrapped The possible values are :span, :div or nil. Default: :div Used by: HTML converter .TP .B \-\-coderay-line-numbers ARG Defines how and if line numbers should be shown The possible values are :table, :inline, :list or nil. If this option is nil, no line numbers are shown. Default: :inline Used by: HTML converter .TP .B \-\-coderay-line-number-start ARG The start value for the line numbers Default: 1 Used by: HTML converter .TP .B \-\-coderay-tab-width ARG The tab width used in highlighted code Used by: HTML converter .TP .B \-\-coderay-bold-every ARG Defines how often a line number should be made bold Default: 10 Used by: HTML converter .TP .B \-\-coderay-css ARG Defines how the highlighted code gets styled Possible values are :class (CSS classes are applied to the code elements, one must supply the needed CSS file) or :style (default CSS styles are directly applied to the code elements). Default: style Used by: HTML converter .TP .B \-\-[no\-]numeric-entities DEPRECATED: Defines whether entities are output using names or numeric values Note that this option is deprecated and replaced by the entities option. This option will be removed in a future release. Default: false Used by: HTML converter, kramdown converter .TP .B \-\-entity-output ARG Defines how entities are output The possible values are :as_input (entities are output in the same form as found in the input), :numeric (entities are output in numeric form), :symbolic (entities are output in symbolic form if possible) or :as_char (entities are output as characters if possible, only available on Ruby 1.9). Default: :as_char Used by: HTML converter, kramdown converter .TP .B \-\-toc-depth ARG Defines the maximum level of headers which will be used to generate the table of contents. For instance, with a value of 2, toc entries will be generated for h1 and h2 headers but not for h3, h4, etc. A value of 0 uses all header levels. Default: 0 Used by: HTML/Latex converter .SH EXIT STATUS The exit status is 0 if no error happened. Otherwise it is 1. .SH SEE ALSO The kramdown website, http://kramdown.rubyforge.org/ for more information, especially on the supported input syntax. .SH AUTHOR kramdown was written by Thomas Leitner . .PP This manual page was written by Thomas Leitner .