Glyph - Structure Macros

article

Used to create a simple article. By default, it includes the following macros:

  • document
    • head
      • style[default.css]
    • body
      • halftitlepage
        • title
        • pubdate
        • subtitle
        • author

Parameters

Parameter Description
0 The article contents.

Attributes

Attribute Description
pre-title Contents to include before the title macro.
post-title Contents to include after the title macro.
head Contents to include instead of the default head macro.
pubdate Contents to include instead of the default pubdate macro.
halftitlepage Contents to include instead of the default halftitlepage macro.

book

Used to create a book. By default, it includes the following macros:

  • document
    • head
      • style[default.css]
    • body
      • titlepage
        • title
        • pubdate
        • subtitle
        • revision
        • author

Parameters

Parameter Description
0 The article contents.

Attributes

Attribute Description
pre-title Contents to include before the title macro.
post-title Contents to include after the title macro.
head Contents to include instead of the default head macro.
pubdate Contents to include instead of the default pubdate macro.
titlepage Contents to include instead of the default titlepage macro.
frontmatter Contents to include within a frontmatter macro.
bodymatter Contents to include within a bodymatter macro.
backmatter Contents to include within a backmatter macro.

document

Creates an <html> tag and a DOCTYPE declaration. Called internally by the book macro and the article macro.

Parameters

Parameter Description
0 The document contents.

head

Creates a <head> tag, pre-populated with title and author/copyright <meta> tags.

Parameters

Parameter Description
0 The head contents.

section

Creates a section (<div> or <section> tag).

Aliases: acknowledgement, addendum, afterword, appendix, bibliography, chapter, colophon, dedication, epilogue, foreword, glossary, imprint, index, inspiration, introduction, lof, lot, part, postscript, preface, prologue, promotion, references, section, section, volume

Example

1section[
2  @title[Test Section]
3  @id[test]
4...
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)

style

Embeds the content of a CSS or Sass file within a <style> tag (for more information on stylesheets, see Adding Stylesheets).

Example: style[default.css]

Parameters

Parameter Description
0 The stylesheet file to embed.

toc

Generates a Table of Contents based on how sections are nested in the current document.

Example: toc[1]

Parameters

Parameter Description
0 The maximum header depth of the TOC (optional).