Glyph - Filter Macros

markdown

Uses a Markdown converter (BlueCloth, RDiscount, Maruku or Kramdown) to transform the value into HTML if the output.*.filter_target setting is set to html.

If the options.filters_by_file_extension setting is true, this macro is called automatically on included files with a .markdown or a .md extension.

Aliases: md

Example: markdown[This is *emphasized* text.]

Parameters

Parameter Description
0 The Markdown text to filter.

markdown_section

Creates a section (see section macro) whose content can be formatted with markdown markup.

Aliases: §md, md_section

Example

1markdown_section[
2  @title[Test Section]
3  @id[test]
4Some *markdown* text.
5]

Parameters

Parameter Description
0 The text of the section

Attributes

Attribute Description
title The title of the section (optional)
id The ID of the section (optional)
notoc If not blank, the header will not appear in the Table of Contents. (optional)

textile

Uses the RedCloth gem to transform the value into HTML or LaTeX, depending on the value of the output.*.filter_target.

If the options.filters_by_file_extension setting is true, this macro is called automatically on included files with a .textile or a .txt extension.

Aliases: txt

Example: textile[This is a *strong emphasis*.]

Parameters

Parameter Description
0 The Textile text to filter.

textile_section

Creates a section (see section macro) whose content can be formatted with textile markup.

Aliases: §txt, txt_section

Example

1textile_section[
2  @title[Test Section]
3  @id[test]
4Some *textile* text.
5]

Parameters

Parameter Description
0 The text of the section

Attributes

Attribute Description
title The title of the section (optional)
id The ID of the section (optional)
notoc If not blank, the header will not appear in the Table of Contents. (optional)

highlight

Highlights a piece of source code according to the specified language. for more information on code highligting, see Source Code.

Example

1highlight[ruby|
2  def hello
3    puts "Hello World"
4  end
5]

Parameters

Parameter Description
0 A programming language supported by the underlying highlighter.
1 The code to highlight.