Glyph - Block Macros

box

Creates a titled box (<div> tag).

Example

1box[Why boxes?|
2  Boxes can be used to make a section of text stand out from the rest of the document.
3]

Parameters

Parameter Description
0 The box title.
1 The box text.

codeblock

Used to render a block of code within <pre> and <code> tags.

Example

1code[
2  def hello
3    puts "Hello World"
4  end
5]

Parameters

Parameter Description
0 The code to be formatted.

Remarks

For code highlighting, see the highlight macro.

figure

Includes an image in the document, with an optional caption (see Images and Figures).

Example

1figure[
2  graph.png|Monthly Pageviews
3  @width[90%]
4]

Parameters

Parameter Description
0 The name of the image file (relative to the images/ folder).
1 The image caption (optional).

Attributes

Attribute Description
* Any attribute supported by the img tag.

image

Includes an image in the document

Example

1img[
2  holidays/landscape.jpg
3  @class[photo]
4  @style[border: 1px solid black;]
5]

Parameters

Parameter Description
0 The name of the image file (relative to the images/ folder).

Attributes

Attribute Description
* Any attribute supported by the img tag.

Displays links to the document’s TOC and the previous/next topic (used only in layouts).

Parameters

Parameter Description
0 The ID of the current topic.

note

Creates a note div containing the value.

Aliases: important, caution, tip

Example: note[This is a note.]

Parameters

Parameter Description
0 The text of the note.

pubdate

Evaluates to a date string (in the format: current_month current_year; i.e. %B %Y), within a <div> tag. If a parameter is supplied, its value is used instead of the current date.

Example: pubdate[]

Parameters

Parameter Description
0 An alternative content for the _pubdate_ @div@.

revision

Renders the revision of the document (based on the document.revision setting) within a <div> tag.

Example: revision[]

subtitle

Renders the subtitle of the document (based on the document.subtitle setting) within a <h2> tag.

Example: subtitle[]

title

Renders the title of the document (based on the document.title setting) within a <h1> tag.

Example: title[]