PML Nodes Reference Manual

PML Version

PMLC 4.0.0 2023-02-23

License

CC BY-ND 4.0

Author and Copyright

Christian Neumanns

Website

https://www.pml-lang.dev/

Introduction

This document describes all standard PML nodes. For each type of node, its tag and attributes are listed, and an example shows how to use it.

Block Nodes

A block node is a section that starts at a given line in the document and ends at a subsequent line.

For example, a chapter, a paragraph, and a list are all block nodes.

Fundamental Nodes

Document

Name: doc

Kind: Node with child nodes

Description

Every PML document must start with a 'doc' node. It is the root node of the document.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [doc [title A Nice Surprise]
    
        Author: Giovanni Spiridigliotsky
    
        Lorem ipsum blah blah blah
    ]
  • Result:

    A Nice Surprise

    Author: Giovanni Spiridigliotsky

    Lorem ipsum blah blah blah

  • HTML code generated:

    <h1 class="pml-doc-title">A Nice Surprise</h1>
    <p class="pml-paragraph">Author: Giovanni Spiridigliotsky</p>
    <p class="pml-paragraph">Lorem ipsum blah blah blah </p>
    

Paragraph

Name: p

Kind: Node with child nodes

Description

A paragraph is a set of one or more sentences.
It is not required to embed a paragraph within a node. Text not explicitly embedded in a node is automatically converted to a paragraph node.
A double-new-line creates a paragraph break. All other whitespace is converted to a single space. Hence, two sentences separated by a single new-line will result in a single paragraph composed of two sentences.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    First sentence of first paragraph. Second sentence of first paragraph.
    
    First sentence of second paragraph.
    Second sentence of second paragraph.
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    [p Third paragraph.]
    
  • Result:

    First sentence of first paragraph. Second sentence of first paragraph.

    First sentence of second paragraph. Second sentence of second paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Third paragraph.

  • HTML code generated:

    <p class="pml-paragraph">First sentence of first paragraph. Second sentence of first paragraph.</p>
    <p class="pml-paragraph">First sentence of second paragraph. Second sentence of second paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p>
    <p class="pml-paragraph">Third paragraph.</p>
    

Chapter

Name: ch

Kind: Node with child nodes

Description

A chapter or sub-chapter in the document.
A chapter can have any number of sub-chapters. Chapters can be nested to any level.

Note: The idiomatic way of identifying a chapter for cross-referencing is to assign an 'id' to the chapter node (and not to the chapter's title or subtitle node).

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [ch (id=intro) [title Introduction]
         [ch [title What is This About?]
             blah blah blah
         ]
         [ch [title Why is This Important?]
             blah blah blah
         ]
    ]
  • Result:

    Introduction

    What is This About?

    blah blah blah

    Why is This Important?

    blah blah blah

  • HTML code generated:

    <section id="intro" class="pml-chapter">
        <h2 class="pml-chapter-title">Introduction</h2>
        <section id="ch__2" class="pml-chapter">
            <h3 class="pml-chapter-title">What is This About?</h3>
            <p class="pml-paragraph">blah blah blah</p>
    
        </section>
        <section id="ch__3" class="pml-chapter">
            <h3 class="pml-chapter-title">Why is This Important?</h3>
            <p class="pml-paragraph">blah blah blah</p>
    
        </section>
    
    </section>
    

Chapter Title

Name: title

Kind: Node with child nodes

Description

A title for a chapter. This node must be the first child-node of a chapter. The text of this node is used in the table of contents.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [ch [title Some [i Big] Advantages]
         ...
    ]
  • Result:

    Some Big Advantages

    ...

  • HTML code generated:

    <section id="ch__1" class="pml-chapter">
        <h2 class="pml-chapter-title">Some <i class="pml-italic">Big</i> Advantages</h2>
        <p class="pml-paragraph">... </p>
    
    </section>
    

Chapter Subtitle

Name: subtitle

Kind: Node with child nodes

Description

A subtitle for a chapter, displayed on a separate line after a chapter's title. If present, this node must follow a 'title' (chapter title) node. The subtitle is not displayed in the table of contents.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [ch [title My Life as a Gardener]
        [subtitle Why I Left the Corporate World]
        ...
    ]
  • Result:

    My Life as a Gardener

    Why I Left the Corporate World

    ...

  • HTML code generated:

    <section id="ch__1" class="pml-chapter">
        <h2 class="pml-chapter-title">My Life as a Gardener</h2>
        <h2 class="pml-chapter-subtitle">Why I Left the Corporate World</h2>
        <p class="pml-paragraph">... </p>
    
    </section>
    

Common Nodes

List

List

Name: list

Kind: Node with child nodes

Description

A bulleted list of nodes.
CSS can be used to change the item marker's appearance (e.g. use numbers). The CSS must be assigned to attribute 'html_style'. See examples.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Standard list:
    [list
        [el item 1]
        [el item 2]
    ]
    
    Numbered list:
    [list (html_style="list-style-type:decimal")
        [el item 1]
        [el item 2]
    ]
    
    No markers:
    [list (html_style="list-style-type:none")
        [el item 1]
        [el item 2]
    ]
    
    Picture for marker:
    [list (html_style="list-style-image: url('images/gold_star.png')")
        [el item 1]
        [el item 2]
    ]
    
    Text for marker:
    [list (html_style="list-style-type: 'x '")
        [el item 1]
        [el item 2]
    ]
  • Result:

    Standard list:

    • item 1

    • item 2

    Numbered list:

    • item 1

    • item 2

    No markers:

    • item 1

    • item 2

    Picture for marker:

    • item 1

    • item 2

    Text for marker:

    • item 1

    • item 2

  • HTML code generated:

    <p class="pml-paragraph">Standard list: </p>
    <ul class="pml-list">
        <li class="pml-list-element">
            <p class="pml-paragraph">item 1</p>
    
        </li>
        <li class="pml-list-element">
            <p class="pml-paragraph">item 2</p>
    
        </li>
    
    </ul>
    <p class="pml-paragraph">Numbered list: </p>
    <ul class="pml-list" style="list-style-type:decimal">
        <li class="pml-list-element">
            <p class="pml-paragraph">item 1</p>
    
        </li>
        <li class="pml-list-element">
            <p class="pml-paragraph">item 2</p>
    
        </li>
    
    </ul>
    <p class="pml-paragraph">No markers: </p>
    <ul class="pml-list" style="list-style-type:none">
        <li class="pml-list-element">
            <p class="pml-paragraph">item 1</p>
    
        </li>
        <li class="pml-list-element">
            <p class="pml-paragraph">item 2</p>
    
        </li>
    
    </ul>
    <p class="pml-paragraph">Picture for marker: </p>
    <ul class="pml-list" style="list-style-image: url('images/gold_star.png')">
        <li class="pml-list-element">
            <p class="pml-paragraph">item 1</p>
    
        </li>
        <li class="pml-list-element">
            <p class="pml-paragraph">item 2</p>
    
        </li>
    
    </ul>
    <p class="pml-paragraph">Text for marker: </p>
    <ul class="pml-list" style="list-style-type: 'x '">
        <li class="pml-list-element">
            <p class="pml-paragraph">item 1</p>
    
        </li>
        <li class="pml-list-element">
            <p class="pml-paragraph">item 2</p>
    
        </li>
    
    </ul>
    
List Element

Name: el

Kind: Node with child nodes

Description

An element of a list.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Some planets:
    [list
        [el [header Jupiter]
            Jupiter is ...
        ]
        [el [header Uranus]
            Uranus is ...
        ]
        [el [header Neptun]
            Neptun is ...
        ]
    ]
  • Result:

    Some planets:

    • Jupiter

      Jupiter is ...

    • Uranus

      Uranus is ...

    • Neptun

      Neptun is ...

  • HTML code generated:

    <p class="pml-paragraph">Some planets: </p>
    <ul class="pml-list">
        <li class="pml-list-element">
            <div class="pml-header">Jupiter</div>
            <p class="pml-paragraph">Jupiter is ...</p>
    
        </li>
        <li class="pml-list-element">
            <div class="pml-header">Uranus</div>
            <p class="pml-paragraph">Uranus is ...</p>
    
        </li>
        <li class="pml-list-element">
            <div class="pml-header">Neptun</div>
            <p class="pml-paragraph">Neptun is ...</p>
    
        </li>
    
    </ul>
    

Table

Simple Table

Name: sim_table

Kind: Node with raw text content

Description

Simple table data defined as plain text, and rendered as a table.
Each line of text represents a row.
All cell values in all rows are separated by the same character which can be: a vertical bar (|), a semicolon (;), or a comma (,).
The content of each cell can only be plain text. If formatted text or complex cell content (e.g. picture in a cell, or table in a table) is needed, then please use the 'table' tag.
A header and footer can optionally be defined.
The horizontal alignment (left, center, or right) can be specified for each column.
The data will be rendered as a table.
The following format rules apply:
- Rows are separated by a line break. Empty lines are ignored.
- Cells can be separated by a comma or a TAB character, but both separators cannot be mixed in a table.
- Spaces before or after cell values are ignored.
- If the second line is a dash (-) then the first line is a header.
- If the second-last line is a dash (-) then the last line is a footer.

Attributes
  • Horizontal Alignments for Table Columns

    Name

    halign

    Is positional parameter

    No

    Description

    This optional parameter specifies the horizontal alignment for each column in a table.
    The alignments are defined as a comma-separated list, in the order of the columns.
    For each column the following values can be specified:
    - left or l
    - center or c
    - right or r
    - {empty} (default alignment (usually left-aligned) will be used)
    The values are case-insensitive. Uppercase letters are allowed.

    Type

    string or null

    Required

    no

    Default Value

    null

    Example(s)

    halign = "Left, Center, , Right"
    short from:
    halign = "L, C, , R

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Simple table:
    [sim_table
        ~~~
        cell 1.1, cell 1.2
        cell 2.1, cell 2.2
        ~~~
    ]
    
    Table with header, footer, and column alignments:
    
    [sim_table (halign="C,L,R")
        ~~~
        Position, Product, Price
        -
        1, Organic food, 12.50
        2, Meditation lessons, 150.00
        -
        ,,Total: 162.50
        ~~~
    ]
  • Result:

    Simple table:

    cell 1.1cell 1.2
    cell 2.1cell 2.2

    Table with header, footer, and column alignments:

    PositionProductPrice
    1Organic food12.50
    2Meditation lessons150.00
  • HTML code generated:

    <p class="pml-paragraph">Simple table: </p>
    <table class="pml-table">
        <tbody class="pml-table-body">
            <tr class="pml-table-body-row">
    <td class="pml-table-body-cell">cell 1.1</td><td class="pml-table-body-cell">cell 1.2</td></tr>
            <tr class="pml-table-body-row">
    <td class="pml-table-body-cell">cell 2.1</td><td class="pml-table-body-cell">cell 2.2</td></tr>
        </tbody>
    </table>
    <p class="pml-paragraph">Table with header, footer, and column alignments:</p>
    <table class="pml-table">
        <thead class="pml-table-header">
            <tr class="pml-table-header-row">
    <th class="pml-table-header-cell">Position</th><th class="pml-table-header-cell">Product</th><th class="pml-table-header-cell">Price</th></tr>
        </thead>
        <tbody class="pml-table-body">
            <tr class="pml-table-body-row">
    <td class="pml-table-body-cell pml-text-align-center">1</td><td class="pml-table-body-cell pml-text-align-left">Organic food</td><td class="pml-table-body-cell pml-text-align-right">12.50</td></tr>
            <tr class="pml-table-body-row">
    <td class="pml-table-body-cell pml-text-align-center">2</td><td class="pml-table-body-cell pml-text-align-left">Meditation lessons</td><td class="pml-table-body-cell pml-text-align-right">150.00</td></tr>
        </tbody>
        <tfoot class="pml-table-footer">
            <tr class="pml-table-footer-row">
    <td class="pml-table-footer-cell pml-text-align-center"></td><td class="pml-table-footer-cell pml-text-align-left"></td><td class="pml-table-footer-cell pml-text-align-right">Total: 162.50</td></tr>
        </tfoot>
    </table>
    
Table

Name: table

Kind: Node with child nodes

Description

A table consisting of rows and columns.
The content of each cell can be just plain text or any complex node, such as formatted text, a picture, a table (table in a table), etc.
The table's structure is similar to a HTML table.
HTML 'class' and 'style' attributes can be use to format the table with CSS.
The table can optionally have a header and a footer.

Attributes
  • Horizontal Alignments for Table Columns

    Name

    halign

    Is positional parameter

    No

    Description

    This optional parameter specifies the horizontal alignment for each column in a table.
    The alignments are defined as a comma-separated list, in the order of the columns.
    For each column the following values can be specified:
    - left or l
    - center or c
    - right or r
    - {empty} (default alignment (usually left-aligned) will be used)
    The values are case-insensitive. Uppercase letters are allowed.

    Type

    string or null

    Required

    no

    Default Value

    null

    Example(s)

    halign = "Left, Center, , Right"
    short from:
    halign = "L, C, , R

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Simple table:
    
    [table
        [tr [tc cell 1.1] [tc cell 1.2]]
        [tr [tc cell 2.1] [tc cell 2.2]]
    ]
    
    Table with header and footer:
    
    [table
        [theader
            [tr [tc Position] [tc Product] [tc Price]]
        ]
        [tr [tc 1] [tc [i Organic] food] [tc (html_style="text-align:right;") 12.50]]
        [tr [tc 2] [tc Meditation lessons] [tc (html_style="text-align:right;") 150.00]]
        [tfooter
            [tr [tc] [tc (html_style="text-align:right;") Total:] [tc (html_style="text-align:right;") 162.50]]
        ]
    ]
  • Result:

    Simple table:

    cell 1.1

    cell 1.2

    cell 2.1

    cell 2.2

    Table with header and footer:

    Position

    Product

    Price

    1

    Organic food

    12.50

    2

    Meditation lessons

    150.00

  • HTML code generated:

    <p class="pml-paragraph">Simple table:</p>
    <table class="pml-table">
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.2</p>
    
            </td>
    
        </tr>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.2</p>
    
            </td>
    
        </tr>
    
    </table>
    <p class="pml-paragraph">Table with header and footer:</p>
    <table class="pml-table">
        <thead class="pml-table-header">
            <tr class="pml-table-header-row">
                <th class="pml-table-header-cell">
                    <p class="pml-paragraph">Position</p>
    
                </th>
                <th class="pml-table-header-cell">
                    <p class="pml-paragraph">Product</p>
    
                </th>
                <th class="pml-table-header-cell">
                    <p class="pml-paragraph">Price</p>
    
                </th>
    
            </tr>
    
        </thead>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph"><i class="pml-italic">Organic</i> food</p>
    
            </td>
            <td class="pml-table-body-cell" style="text-align:right;">
                <p class="pml-paragraph">12.50</p>
    
            </td>
    
        </tr>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">Meditation lessons</p>
    
            </td>
            <td class="pml-table-body-cell" style="text-align:right;">
                <p class="pml-paragraph">150.00</p>
    
            </td>
    
        </tr>
        <tfoot class="pml-table-footer">
            <tr class="pml-table-footer-row">
                <td class="pml-table-footer-cell">
    
                </td>
                <td class="pml-table-footer-cell" style="text-align:right;">
                    <p class="pml-paragraph">Total:</p>
    
                </td>
                <td class="pml-table-footer-cell" style="text-align:right;">
                    <p class="pml-paragraph">162.50</p>
    
                </td>
    
            </tr>
    
        </tfoot>
    
    </table>
    
Table Header

Name: theader

Kind: Node with child nodes

Description

A header in a table.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Table with header:
    
    [table
        [theader
            [tr [tc Header 1] [tc Header 2] [tc Header 3]]
        ]
        [tr [tc cell 1.1] [tc cell 1.2] [tc cell 1.3]]
        [tr [tc cell 2.1] [tc cell 2.2] [tc cell 2.3]]
    ]
  • Result:

    Table with header:

    Header 1

    Header 2

    Header 3

    cell 1.1

    cell 1.2

    cell 1.3

    cell 2.1

    cell 2.2

    cell 2.3

  • HTML code generated:

    <p class="pml-paragraph">Table with header:</p>
    <table class="pml-table">
        <thead class="pml-table-header">
            <tr class="pml-table-header-row">
                <th class="pml-table-header-cell">
                    <p class="pml-paragraph">Header 1</p>
    
                </th>
                <th class="pml-table-header-cell">
                    <p class="pml-paragraph">Header 2</p>
    
                </th>
                <th class="pml-table-header-cell">
                    <p class="pml-paragraph">Header 3</p>
    
                </th>
    
            </tr>
    
        </thead>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.3</p>
    
            </td>
    
        </tr>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.3</p>
    
            </td>
    
        </tr>
    
    </table>
    
Table Footer

Name: tfooter

Kind: Node with child nodes

Description

A footer in a table.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Table with footer:
    
    [table
        [tr [tc cell 1.1] [tc cell 1.2] [tc cell 1.3]]
        [tr [tc cell 2.1] [tc cell 2.2] [tc cell 2.3]]
        [tfooter
            [tr [tc Footer 1] [tc Footer 2] [tc Footer 3]]
        ]
    ]
  • Result:

    Table with footer:

    cell 1.1

    cell 1.2

    cell 1.3

    cell 2.1

    cell 2.2

    cell 2.3

  • HTML code generated:

    <p class="pml-paragraph">Table with footer:</p>
    <table class="pml-table">
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.3</p>
    
            </td>
    
        </tr>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.3</p>
    
            </td>
    
        </tr>
        <tfoot class="pml-table-footer">
            <tr class="pml-table-footer-row">
                <td class="pml-table-footer-cell">
                    <p class="pml-paragraph">Footer 1</p>
    
                </td>
                <td class="pml-table-footer-cell">
                    <p class="pml-paragraph">Footer 2</p>
    
                </td>
                <td class="pml-table-footer-cell">
                    <p class="pml-paragraph">Footer 3</p>
    
                </td>
    
            </tr>
    
        </tfoot>
    
    </table>
    
Table Row

Name: tr

Kind: Node with child nodes

Description

A row in a table.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Table with 2 rows:
    
    [table
        [tr [tc cell 1.1] [tc cell 1.2] [tc cell 1.3]]
        [tr [tc cell 2.1] [tc cell 2.2] [tc row 2.3]]
    ]
  • Result:

    Table with 2 rows:

    cell 1.1

    cell 1.2

    cell 1.3

    cell 2.1

    cell 2.2

    row 2.3

  • HTML code generated:

    <p class="pml-paragraph">Table with 2 rows:</p>
    <table class="pml-table">
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.3</p>
    
            </td>
    
        </tr>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">row 2.3</p>
    
            </td>
    
        </tr>
    
    </table>
    
Table Cell

Name: tc

Kind: Node with child nodes

Description

A cell in a table row.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    Table with 2 rows and 3 columns:
    
    [table
        [tr [tc cell 1.1] [tc cell 1.2] [tc cell 1.3]]
        [tr [tc cell 2.1] [tc cell 2.2] [tc cell 2.3]]
    ]
  • Result:

    Table with 2 rows and 3 columns:

    cell 1.1

    cell 1.2

    cell 1.3

    cell 2.1

    cell 2.2

    cell 2.3

  • HTML code generated:

    <p class="pml-paragraph">Table with 2 rows and 3 columns:</p>
    <table class="pml-table">
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 1.3</p>
    
            </td>
    
        </tr>
        <tr class="pml-table-body-row">
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.1</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.2</p>
    
            </td>
            <td class="pml-table-body-cell">
                <p class="pml-paragraph">cell 2.3</p>
    
            </td>
    
        </tr>
    
    </table>
    

Header

Name: header

Kind: Node with child nodes

Description

A header (small title) displayed on a separate line. A header is not included in the table of contents. Headers can be inserted anywhere in a document.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [ch [title Advantages]
        [header Simple]
        ...
        [header Fast]
        ...
        [header Effective]
        ...
    ]
  • Result:

    Advantages

    Simple

    ...

    Fast

    ...

    Effective

    ...

  • HTML code generated:

    <section id="ch__1" class="pml-chapter">
        <h2 class="pml-chapter-title">Advantages</h2>
        <div class="pml-header">Simple</div>
        <p class="pml-paragraph">...</p>
        <div class="pml-header">Fast</div>
        <p class="pml-paragraph">...</p>
        <div class="pml-header">Effective</div>
        <p class="pml-paragraph">... </p>
    
    </section>
    

Caption

Name: caption

Kind: Node with child nodes

Description

A small title that is not part of the table of contents, typically displayed below a block element (image, video, table, etc.).

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [caption Figure 1: Top Brain Boosters]
  • Result:

    Figure 1: Top Brain Boosters
  • HTML code generated:

    <div class="pml-caption">Figure 1: Top Brain Boosters</div>
    

Admonition

Name: admon

Kind: Node with child nodes

Description

A labeled piece of advice, such as a note, tip, warning, etc.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [admon
        [alabel Tip]
        Later you'll see some [i striking] examples.
    ]
  • Result:

    Tip

    Later you'll see some striking examples.

  • HTML code generated:

    <div class="pml-admonition">
        <div class="pml-admonition-label">
            <p class="pml-paragraph">Tip</p>
    
        </div>
        <div class="pml-admonition-content">
            <p class="pml-paragraph">Later you'll see some <i class="pml-italic">striking</i> examples. </p>
        </div>
    </div>
    

Note

Name: note

Kind: Node with child nodes

Description

A note is an admonition with label 'Note'.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [note Please remember that ...]
  • Result:

    Note

    Please remember that ...

  • HTML code generated:

    <div class="pml-admonition">
        <div class="pml-admonition-label">
            <p class="pml-paragraph">Note</p>
    
        </div>
        <div class="pml-admonition-content">
            <p class="pml-paragraph">Please remember that ...</p>
        </div>
    </div>
    

Quote

Name: quote

Kind: Node with child nodes

Description

The exact words said or written by somebody else.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [quote
        Everything should be as simple as possible, but not simpler.
        [qsource [i Albert Einstein, physicist]]
    ]
  • Result:

    Everything should be as simple as possible, but not simpler.

    Albert Einstein, physicist

  • HTML code generated:

    <blockquote class="pml-quote">
        <div class="pml-quote-text-block">
            <div class="pml-quote-text-prefix"></div>
            <div class="pml-quote-text">
                <p class="pml-paragraph">Everything should be as simple as possible, but not simpler.</p>
            </div>
            <div class="pml-quote-text-suffix"></div>
        </div>
        <div class="pml-quote-source">
            <p class="pml-paragraph"><i class="pml-italic">Albert Einstein, physicist</i></p>
    
        </div>
    </blockquote>
    

Monospace

Name: monospace

Kind: Node with child nodes

Description

A paragraph in which whitespace is preserved, and a fixed-width font is used. The text will be rendered exactly as written in the PML document.
The following rules apply to the text in a 'monospace' block:
- The width of each character (letter, digit, symbol) is the same.
- All spaces and line-breaks in the text are preserved and rendered in the final document.
Inline nodes can be used within a 'monospace' block. Hence standard character escape rules are applied.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [header A Pascal Triangle]
    [monospace
          1
        1   1
      1   2   1
    1   3   3   1
    ]
    
  • Result:

    A Pascal Triangle
          1
        1   1
      1   2   1
    1   3   3   1
    
  • HTML code generated:

    <div class="pml-header">A Pascal Triangle</div>
    <pre class="pml-monospace">
          1
        1   1
      1   2   1
    1   3   3   1
    </pre>
    

Division

Name: div

Kind: Node with child nodes

Description

A division or section in the document. This node is typically used to render a HTML <div>...</div> block with a specific set of HTML attributes.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [div (html_style="color:red;")
        Important message: ...
    ]
  • Result:

    Important message: ...

  • HTML code generated:

    <div class="pml-division" style="color:red;">
        <p class="pml-paragraph">Important message: ... </p>
    
    </div>
    

HTML Code

Name: html

Kind: Node with raw text content

Description

A node that contains HTML code.
The HTML code is not processed in any way by the PML converter. It is passed as is to the resulting HTML document.
This allows you to embed arbitrary HTML code in your final document.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [html
        ~~~
        <p>This is pure <b>HTML</b> code.</p>
        ~~~
    ]
  • Result:

    This is pure HTML code.

  • HTML code generated:

    <div class="pml-html"><p>This is pure <b>HTML</b> code.</p></div>
    

Media Nodes

Image

Name: image

Kind: Node without child nodes

Description

An image, such as a .jpg or .png file.
Note: Attribute 'html_alt' can be used to add an explicit 'alt' attribute in the resulting HTML (see example).

Attributes
  • Horizontal Alignment

    Name

    align

    Is positional parameter

    No

    Description

    The horizontal alignment of the media. Valid values are: left, center, and right.

    Type

    htextalign

    Required

    no

    Default Value

    LEFT

    Allowed Values

    left, center, right (case-insensitive)

    Example(s)

    align = center

  • Border

    Name

    border

    Is positional parameter

    No

    Description

    This parameter can be set to 'yes' to draw a border around the media.

    Type

    boolean

    Required

    no

    Default Value

    false

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    border = yes

  • Image Height

    Name

    height

    Is positional parameter

    No

    Description

    The height of the media, expressed in pixels.

    Type

    integer32 or null

    Required

    no

    Default Value

    null

    Example(s)

    height = 150

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

  • Link

    Name

    link

    Is positional parameter

    No

    Description

    A link (e.g. URL) to the media. If the user clicks on the media, the specified link will be opened in the browser.

    Type

    string or null

    Required

    no

    Default Value

    null

    Example(s)

    link = http://www.example.com/path/image.png

  • Image Source

    Name

    source

    Is positional parameter

    No

    Description

    The source (location) of the media asset.
    The source can be a relative path, an URL, or any other string that denotes a valid source in the generated target code (e.g. HTML).
    Note: The validity/existence of the source is not checked by PML. It is the users responsibility to provide a valid source.

    Type

    string

    Required

    yes

    Default Value

    none

    Example(s)

    source = images/ball.png

  • Image Width

    Name

    width

    Is positional parameter

    No

    Description

    The width of the media, expressed in pixels.

    Type

    integer32 or null

    Required

    no

    Default Value

    null

    Example(s)

    width = 200

HTML Attributes: allowed

Example
  • PML code:

    [header Strawberries (Photo by Jacek Dylag on Unsplash)]
    [image ( source = media/strawberries.jpg
        link = https://unsplash.com/photos/kH3Sr9K8EBA
        html_alt = "Delicious strawberries" ) ]
    
  • Result:

    Strawberries (Photo by Jacek Dylag on Unsplash)
    Delicious strawberries
  • HTML code generated:

    <div class="pml-header">Strawberries (Photo by Jacek Dylag on Unsplash)</div>
    <figure style="text-align: left">
        <a href="https://unsplash.com/photos/kH3Sr9K8EBA">
            <img class="pml-image" alt="Delicious strawberries" src="media/strawberries.jpg">
        </a>
    </figure>
    

Audio (Sound)

Name: audio

Kind: Node without child nodes

Description

An audio stream (sound), such as an .mp3 or .wav file.

Attributes
  • Horizontal Alignment

    Name

    align

    Is positional parameter

    No

    Description

    The horizontal alignment of the media. Valid values are: left, center, and right.

    Type

    htextalign

    Required

    no

    Default Value

    LEFT

    Allowed Values

    left, center, right (case-insensitive)

    Example(s)

    align = center

  • Border

    Name

    border

    Is positional parameter

    No

    Description

    This parameter can be set to 'yes' to draw a border around the media.

    Type

    boolean

    Required

    no

    Default Value

    false

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    border = yes

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

  • Audio Source

    Name

    source

    Is positional parameter

    No

    Description

    The source (location) of the media asset.
    The source can be a relative path, an URL, or any other string that denotes a valid source in the generated target code (e.g. HTML).
    Note: The validity/existence of the source is not checked by PML. It is the users responsibility to provide a valid source.

    Type

    string

    Required

    yes

    Default Value

    none

    Example(s)

    source = audios/violin.mp3

HTML Attributes: allowed

Example
  • PML code:

    [header Bird talk]
    [audio source=media/bird_talk.mp3]
    
  • Result:

    Bird talk
  • HTML code generated:

    <div class="pml-header">Bird talk</div>
    <figure style="text-align: left">
        <audio class="pml-audio" controls="controls">
            <source src="media/bird_talk.mp3">
            Your browser does not support the audio element.
        </audio>
    </figure>
    

Video

Name: video

Kind: Node without child nodes

Description

A video, such as an .mp4 or .webm file.

Attributes
  • Horizontal Alignment

    Name

    align

    Is positional parameter

    No

    Description

    The horizontal alignment of the media. Valid values are: left, center, and right.

    Type

    htextalign

    Required

    no

    Default Value

    LEFT

    Allowed Values

    left, center, right (case-insensitive)

    Example(s)

    align = center

  • Border

    Name

    border

    Is positional parameter

    No

    Description

    This parameter can be set to 'yes' to draw a border around the media.

    Type

    boolean

    Required

    no

    Default Value

    false

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    border = yes

  • Video Height

    Name

    height

    Is positional parameter

    No

    Description

    The height of the media, expressed in pixels.

    Type

    integer32 or null

    Required

    no

    Default Value

    null

    Example(s)

    height = 150

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

  • Video Source

    Name

    source

    Is positional parameter

    No

    Description

    The source (location) of the media asset.
    The source can be a relative path, an URL, or any other string that denotes a valid source in the generated target code (e.g. HTML).
    Note: The validity/existence of the source is not checked by PML. It is the users responsibility to provide a valid source.

    Type

    string

    Required

    yes

    Default Value

    none

    Example(s)

    source = videos/happy_kids.mp4

  • Video Width

    Name

    width

    Is positional parameter

    No

    Description

    The width of the media, expressed in pixels.

    Type

    integer32 or null

    Required

    no

    Default Value

    null

    Example(s)

    width = 200

HTML Attributes: allowed

Example
  • PML code:

    [header Beautiful Nature]
    [video source = media/red_flower.mp4]
    
  • Result:

    Beautiful Nature
  • HTML code generated:

    <div class="pml-header">Beautiful Nature</div>
    <figure style="text-align: left">
        <video class="pml-video" controls="controls">
            <source src="media/red_flower.mp4">
            Your browser does not support the video element.
        </video>
    </figure>
    

Embedded Youtube Video

Name: youtube_video

Kind: Node without child nodes

Description

A Youtube video embedded in the document.

Attributes
  • Horizontal Alignment

    Name

    align

    Is positional parameter

    No

    Description

    The horizontal alignment of the media. Valid values are: left, center, and right.

    Type

    htextalign

    Required

    no

    Default Value

    LEFT

    Allowed Values

    left, center, right (case-insensitive)

    Example(s)

    align = center

  • Border

    Name

    border

    Is positional parameter

    No

    Description

    This parameter can be set to 'yes' to draw a border around the media.

    Type

    boolean

    Required

    no

    Default Value

    false

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    border = yes

  • Video Height

    Name

    height

    Is positional parameter

    No

    Description

    The height of the media, expressed in pixels.

    Type

    integer32 or null

    Required

    no

    Default Value

    null

    Example(s)

    height = 150

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

  • Video Width

    Name

    width

    Is positional parameter

    No

    Description

    The width of the media, expressed in pixels.

    Type

    integer32 or null

    Required

    no

    Default Value

    null

    Example(s)

    width = 200

  • Youtube Video Id

    Name

    yid

    Is positional parameter

    No

    Description

    The identifier of the Youtube video.
    This identifier is displayed in the video's URL on Youtube.
    Example: If the URL of the Youtube video is https://www.youtube.com/watch?v=NUDhA4hXdS8 then the identifier is NUDhA4hXdS8.

    Type

    string

    Required

    yes

    Default Value

    none

    Example(s)

    yid = NUDhA4hXdS8

HTML Attributes: allowed

Example
  • PML code:

    [header Hellzapoppin 1941 - [i Enjoy!]]
    [youtube_video (
        yid = qrcZqnICYbs
        width = 600
        height = 400 ) ]
    
  • Result:

    Hellzapoppin 1941 - Enjoy!
  • HTML code generated:

    <div class="pml-header">Hellzapoppin 1941 - <i class="pml-italic">Enjoy!</i></div>
    <figure style="text-align: left">
        <iframe class="pml-youtube-video" src="https://www.youtube.com/embed/qrcZqnICYbs" width="600" height="400" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; fullscreen"></iframe>
    </figure>
    

Footnotes

Footnotes Placeholder

Name: fnotes

Kind: Node without child nodes

Description

Node 'fnotes' is used as a placeholder for printing/displaying footnotes.
All footnotes not yet displayed will be displayed as soon as an 'fnotes' node is encountered. This includes inline and non-inline footnotes.
A document can have any number of 'fnotes' nodes. This allows different sets of footnotes to be printed at different locations. For example, instead of displaying all footnotes at the end of the document, the footnotes contained in each chapter could be displayed at the end of each chapter.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [ch [title Chapter 1]
        text [fnote footnote 1] text
    
        text [fnote footnote 2] text
    
        [header Footnotes of Chapter 1]
        [fnotes]
    ]
    
    [ch [title Chapter 2]
        text [fnote_ref did=f3] text
    
        text [fnote footnote 4] text
    
        [fnote_def (id=f3)
            footnote 3
        ]
    
        [header Footnotes of Chapter 2]
        [fnotes]
    ]
    
  • Result:

    Chapter 1

    text 1 text

    text 2 text

    Footnotes of Chapter 1
    1.

    footnote 1

    2.

    footnote 2

    Chapter 2

    text 1 text

    text 2 text

    Footnotes of Chapter 2
    1.

    footnote 3

    2.

    footnote 4

  • HTML code generated:

    <section id="ch__1" class="pml-chapter">
        <h2 class="pml-chapter-title">Chapter 1</h2>
        <p class="pml-paragraph">text <sup id="fnr__1" class="pml-footnote-ref"><a href="#fnd__1">1</a></sup> text</p>
        <p class="pml-paragraph">text <sup id="fnr__2" class="pml-footnote-ref"><a href="#fnd__2">2</a></sup> text</p>
        <div class="pml-header">Footnotes of Chapter 1</div>
        <div class="pml-footnotes">
            <table>
                <tr id="fnd__1" class="pml-footnote">
                    <td style="vertical-align: top;">1.</td>
                    <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__1">^</a></td>
                    <td>
                        <p class="pml-paragraph">footnote 1</p>
                    </td>
                </tr>
                <tr id="fnd__2" class="pml-footnote">
                    <td style="vertical-align: top;">2.</td>
                    <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__2">^</a></td>
                    <td>
                        <p class="pml-paragraph">footnote 2</p>
                    </td>
                </tr>
            </table>
        </div>
    
    </section>
    <section id="ch__2" class="pml-chapter">
        <h2 class="pml-chapter-title">Chapter 2</h2>
        <p class="pml-paragraph">text <sup id="fnr__3" class="pml-footnote-ref"><a href="#f3">1</a></sup> text</p>
        <p class="pml-paragraph">text <sup id="fnr__4" class="pml-footnote-ref"><a href="#fnd__3">2</a></sup> text</p>
        <div class="pml-header">Footnotes of Chapter 2</div>
        <div class="pml-footnotes">
            <table>
                <tr id="f3" class="pml-footnote">
                    <td style="vertical-align: top;">1.</td>
                    <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__3">^</a></td>
                    <td>
                        <p class="pml-paragraph">footnote 3</p>
                    </td>
                </tr>
                <tr id="fnd__3" class="pml-footnote">
                    <td style="vertical-align: top;">2.</td>
                    <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__4">^</a></td>
                    <td>
                        <p class="pml-paragraph">footnote 4</p>
                    </td>
                </tr>
            </table>
        </div>
    
    </section>
    

Footnote Definition

Name: fnote_def

Kind: Node with child nodes

Description

'fnote_def' is used to define the content of a footnote.
Every 'fnote_def' node must have a unique identifier, explicitly specified by attribute 'id'. This identifier is used in 'fnote_ref' nodes to insert a link to the footnote in the text, using attribute 'did'.
Several references to the same footnote can exist in the document. This is done by re-using the identifier of an 'fnote_def' node in several 'fnote_ref' nodes.
'fnote_def' nodes can be defined anywhere in the document, but they must be defined before the 'fnotes' node used to display the footnotes. For example, the content of all footnotes could be defined at the beginning or the end of the document. Or, footnotes could be defined at the end of the paragraph in which they are used.
'fnote_def' nodes can contain block nodes (besides inline nodes), for example to include lists, tables, images etc. in a footnote.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [fnote_def (id=fn_1)
        Text of [i footnote 1]
    
        Second paragraph.
    ]
    
    [fnote_def (id=fn_2)
        [sim_table
            ~~~
            c11 | c12 | c13
            c21 | c22 | c23
            ~~~
        ]
    ]
    
    text [fnote_ref did=fn_1] text
    
    text [fnote_ref did=fn_2] text [fnote_ref did=fn_1] text
    
    [header Footnotes]
    [fnotes]
  • Result:

    text 1 text

    text 2 text 1 text

    Footnotes
    1.

    Text of footnote 1

    Second paragraph.

    2.
    c11c12c13
    c21c22c23
  • HTML code generated:

    <p class="pml-paragraph">text <sup id="fnr__1" class="pml-footnote-ref"><a href="#fn_1">1</a></sup> text</p>
    <p class="pml-paragraph">text <sup id="fnr__2" class="pml-footnote-ref"><a href="#fn_2">2</a></sup> text <sup id="fnr__3" class="pml-footnote-ref"><a href="#fn_1">1</a></sup> text</p>
    <div class="pml-header">Footnotes</div>
    <div class="pml-footnotes">
        <table>
            <tr id="fn_1" class="pml-footnote">
                <td style="vertical-align: top;">1.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__1">^</a><a href="#fnr__3">^</a></td>
                <td>
                    <p class="pml-paragraph">Text of <i class="pml-italic">footnote 1</i></p>
                    <p class="pml-paragraph">Second paragraph. </p>
                </td>
            </tr>
            <tr id="fn_2" class="pml-footnote">
                <td style="vertical-align: top;">2.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__2">^</a></td>
                <td>
                    <table class="pml-table">
                        <tbody class="pml-table-body">
                            <tr class="pml-table-body-row">
    <td class="pml-table-body-cell">c11</td><td class="pml-table-body-cell">c12</td><td class="pml-table-body-cell">c13</td></tr>
                            <tr class="pml-table-body-row">
    <td class="pml-table-body-cell">c21</td><td class="pml-table-body-cell">c22</td><td class="pml-table-body-cell">c23</td></tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    

Software Development

Source Code

Name: code

Kind: Node with raw text content

Description

A block of source code.

Attributes
  • Use Source Code Syntax Highlighter

    Name

    highlight

    Is positional parameter

    No

    Description

    Specifies whether the source code should be highlighted or not.

    Type

    boolean

    Required

    no

    Default Value

    true

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    highlight = no

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

  • Language

    Name

    lang

    Is positional parameter

    No

    Description

    The name of the language used in the source code.
    This value is used primarily for syntax highlighting.
    Specify 'auto' to request automatic language detection (works only if this feature is supported by the highlighter).
    Specify 'text' for simple plain text (without highlighting).
    To get the list of supported languages please consult the documentation of the syntax highlighter used. Some frequently used values are: c, css, java, javascript, html.

    Type

    string or null

    Required

    no

    Default Value

    null

    Example(s)

    lang = java

HTML Attributes: allowed

Example
  • PML code:

    [code
        ~~~
        repeat 3 times
            write_line ( "Hello" )
        .
        ~~~
    ]
    
  • Result:

    repeat 3 times
        write_line ( "Hello" )
    .
  • HTML code generated:

    <pre class="pml-code"><code>repeat 3 times
        write_line ( &quot;Hello&quot; )
    .</code></pre>
    

Insert Source Code

Name: insert_code

Kind: Node without child nodes

Description

Insert source code stored in an external file.

Attributes
  • File

    Name

    file

    Is positional parameter

    No

    Description

    Absolute or relative path to the source code file.
    In case of a relative path, it is relative to the working directory at the time of running the application.

    Type

    file_path

    Required

    yes

    Default Value

    none

    Example(s)

    file = code_examples/hello.ppl

  • From Regex

    Name

    from_regex

    Is positional parameter

    No

    Description

    If this parameter is not defined (set to null by default) then the source code inserted into the document starts at the beginning of the file content.
    A regular expression can be assigned to this parameter. In that case the source code inserted into the document starts at the first match of the regular expression in the source code file.

    If parameter 'include_from_regex' is set to 'true/yes' (default value), then the string that matches the regex is included in the document's source code.
    If parameter 'include_from_regex' is set to 'false/no' then the string that matches the regex is not included in the document's source code.

    Type

    regex or null

    Required

    no

    Default Value

    null

    Example(s)

    from_regex = "function foo ( name string )"
    from_regex = "[ \t]*// start insert.*\r?\n" include_from_regex = no

  • Use Source Code Syntax Highlighter

    Name

    highlight

    Is positional parameter

    No

    Description

    Specifies whether the source code should be highlighted or not.

    Type

    boolean

    Required

    no

    Default Value

    true

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    highlight = no

  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

  • Include From Regex

    Name

    include_from_regex

    Is positional parameter

    No

    Description

    Please refer to the description of parameter 'from_regex' for an explanation of this parameter.

    Type

    boolean

    Required

    no

    Default Value

    true

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    from_regex = "// start insert.*\r?\n" include_from_regex = no

  • Include To Regex

    Name

    include_to_regex

    Is positional parameter

    No

    Description

    Please refer to the description of parameter 'to_regex' for an explanation of this parameter.

    Type

    boolean

    Required

    no

    Default Value

    true

    Allowed Values

    yes, no, true, false (case-insensitive)

    Example(s)

    to_regex = "\s*// end insert" include_to_regex = no

  • Language

    Name

    lang

    Is positional parameter

    No

    Description

    The name of the language used in the source code.
    This value is used primarily for syntax highlighting.
    Specify 'auto' to request automatic language detection (works only if this feature is supported by the highlighter).
    Specify 'text' for simple plain text (without highlighting).
    To get the list of supported languages please consult the documentation of the syntax highlighter used. Some frequently used values are: c, css, java, javascript, html.

    Type

    string or null

    Required

    no

    Default Value

    null

    Example(s)

    lang = java

  • To Regex

    Name

    to_regex

    Is positional parameter

    No

    Description

    If this parameter is not defined (set to null by default) then the source code inserted into the document ends at the end of the file content.
    A regular expression can be assigned to this parameter. In that case the source code inserted into the document ends at the first match of the regular expression in the source code file.

    If parameter 'from_regex' is also defined, then the search for this regex starts after the match of 'from_regex'.
    If parameter 'include_to_regex' is set to 'true/yes' (default value), then the string that matches the regex is included in the document's source code.
    If parameter 'include_to_regex' is set to 'false/no' then the string that matches the regex is not included in the document's source code.

    Type

    regex or null

    Required

    no

    Default Value

    null

    Example(s)

    to_regex = "\\}\r?\n"
    to_regex = "\\s*// end insert" include_to_regex = no

HTML Attributes: allowed

Example
  • PML code:

    [insert_code file=resources/source_code/hello_world.ppl]
  • Result:

    // Hello world program written in PPL
    // www.ppl-lang.dev
    
    function start
        OS.out.write_line ( "Hello world" )
    .
    
  • HTML code generated:

    <pre class="pml-code"><code>// Hello world program written in PPL
    // www.ppl-lang.dev
    
    function start
        OS.out.write_line ( &quot;Hello world&quot; )
    .
    </code></pre>
    

Input

Name: input

Kind: Node with raw text content

Description

Any input provided to a software application, such as a command typed in a terminal, text contained in a config file, etc.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [input
        ~~~
        pmlc pml_to_html article.pml
        ~~~
    ]
  • Result:

    pmlc pml_to_html article.pml
  • HTML code generated:

    <pre class="pml-input">pmlc pml_to_html article.pml</pre>
    

Output

Name: output

Kind: Node with raw text content

Description

Any output created by a software application, such as a result written to the OS's standard output device.

Attributes
  • Node Identifier

    Name

    id

    Is positional parameter

    No

    Description

    A unique identifier for the node.

    An id can be used to:
    - identify a node so that an internal link can be done with an 'xref' (cross reference) node.
    - identify a node so that it can be styled individually with CSS
    - create an HTML anchor so that it can be accessed with the # (hash) sign (e.g. writing id=foo will enable you to have an HTML link ending with #foo.

    An identifier must start with a letter or an underscore (_), and can be followed by any number of letters, digits, underscores (_), dots (.), and hyphens (-).. Note for programmers: The regex of an identifier is: [a-zA-Z_][a-zA-Z0-9_\.-]*. Identifiers are case-sensitive. The following identifiers are all different: name, Name, and NAME.

    Type

    id or null

    Required

    no

    Default Value

    null

    Example(s)

    id = basic_concept

HTML Attributes: allowed

Example
  • PML code:

    [output
        ~~~
        Congratulations!
        The new database has been created successfully.
        ~~~
    ]
  • Result:

    Congratulations!
    The new database has been created successfully.
  • HTML code generated:

    <pre class="pml-output">Congratulations!
    The new database has been created successfully.</pre>
    

Inline Nodes

An inline node represents a part of a paragraph (a span of text). All nodes contained in a paragraph are inline nodes.

For example, the italic node is an inline node. All text contained in it is written in italics.

Font

Bold Text

Name: b

Kind: Node with child nodes

Description
Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    This is a [b huge] advantage.
  • Result:

    This is a huge advantage.

  • HTML code generated:

    <p class="pml-paragraph">This is a <b class="pml-bold">huge</b> advantage.</p>
    

Italic Text

Name: i

Kind: Node with child nodes

Description
Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    We want [i simplicity].
    
    This is a [b [i very] important] point.
  • Result:

    We want simplicity.

    This is a very important point.

  • HTML code generated:

    <p class="pml-paragraph">We want <i class="pml-italic">simplicity</i>.</p>
    <p class="pml-paragraph">This is a <b class="pml-bold"><i class="pml-italic">very</i> important</b> point.</p>
    

Subscript Text

Name: sub

Kind: Node with child nodes

Description

Subscript text is rendered in a smaller font below the normal text line.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    Water: H[sub 2]O
    
    This is [sub subscript], and this is [sup superscript]
  • Result:

    Water: H2O

    This is subscript, and this is superscript

  • HTML code generated:

    <p class="pml-paragraph">Water: H<sub class="pml-subscript">2</sub>O</p>
    <p class="pml-paragraph">This is <sub class="pml-subscript">subscript</sub>, and this is <sup class="pml-superscript">superscript</sup></p>
    

Superscript Text

Name: sup

Kind: Node with child nodes

Description

Superscript text is rendered in a smaller font above the normal text line.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    2[sup 4] = 16
    
    This is [sup superscript], and this is [sub subscript]
  • Result:

    24 = 16

    This is superscript, and this is subscript

  • HTML code generated:

    <p class="pml-paragraph">2<sup class="pml-superscript">4</sup> = 16</p>
    <p class="pml-paragraph">This is <sup class="pml-superscript">superscript</sup>, and this is <sub class="pml-subscript">subscript</sub></p>
    

Strikethrough Text

Name: strike

Kind: Node with child nodes

Description

Strikethrough text is rendered with a line through it.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    [strike Only 50 tickets left.]
    
    SOLD OUT!
  • Result:

    Only 50 tickets left.

    SOLD OUT!

  • HTML code generated:

    <p class="pml-paragraph"><s class="pml-strikethrough">Only 50 tickets left.</s></p>
    <p class="pml-paragraph">SOLD OUT!</p>
    

Inline Source Code

Name: c

Kind: Node with raw text content

Description

Source code embedded within text.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    The assignment [c pi = 3.1415] means we are using [i four] decimals for [c pi].
  • Result:

    The assignment pi = 3.1415 means we are using four decimals for pi.

  • HTML code generated:

    <p class="pml-paragraph">The assignment <code class="pml-inline-code">pi = 3.1415</code> means we are using <i class="pml-italic">four</i> decimals for <code class="pml-inline-code">pi</code>.</p>
    

Verbatim Text

Name: verbatim

Kind: Node with raw text content

Description

Raw, verbatim text that is rendered as is, without any transformations.
Note: The text still has to be escaped, according to the standard PML escaping rules.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    Math's ring operator is [verbatim &#x2218;].
  • Result:

    Math's ring operator is ∘.

  • HTML code generated:

    <p class="pml-paragraph">Math's ring operator is &#x2218;.</p>
    

Cross-Reference

Name: xref

Kind: Node with child nodes

Description

A cross-reference (link) to another node in the same document.

Attributes
  • Referenced Node Id

    Name

    ref_id

    Is positional parameter

    No

    Description

    The identifier of the node that is referenced.

    Type

    string

    Required

    yes

    Default Value

    none

    Example(s)

    node_id = chapter_1

HTML Attributes: allowed

Example
  • PML code:

    [ch (id=solution) [title A Beautiful Solution]
        text text text
    ]
    
    [ch [title Conclusion]
        As we saw in chapter [xref (ref_id=solution)], ...
        ...
        As we saw [xref (ref_id=solution) previously], ...
    ]
    
  • Result:

    A Beautiful Solution

    text text text

    Conclusion

    As we saw in chapter A Beautiful Solution, ... ... As we saw previously, ...

  • HTML code generated:

    <section id="solution" class="pml-chapter">
        <h2 class="pml-chapter-title">A Beautiful Solution</h2>
        <p class="pml-paragraph">text text text </p>
    
    </section>
    <section id="ch__2" class="pml-chapter">
        <h2 class="pml-chapter-title">Conclusion</h2>
        <p class="pml-paragraph">As we saw in chapter <a class="pml-xref" href="#solution">A Beautiful Solution</a>, ... ... As we saw <a class="pml-xref" href="#solution">previously</a>, ... </p>
    
    </section>
    

Span

Name: span

Kind: Node with child nodes

Description

This inline node is typically used to render a HTML <span>...</span> inline element with a specific set of HTML attributes.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    This is a [span (html_style="color:red;background-color:yellow") huge] advantage.
  • Result:

    This is a huge advantage.

  • HTML code generated:

    <p class="pml-paragraph">This is a <span class="pml-span" style="color:red;background-color:yellow">huge</span> advantage.</p>
    

New Line

Name: nl

Kind: Node without child nodes

Description

An explicit new line (line break) inserted in the document.

Attributes

This node doesn't have attributes.

HTML Attributes: not allowed

Example
  • PML code:

    Line 1[nl][nl]Line 2
  • Result:

    Line 1

    Line 2

  • HTML code generated:

    <p class="pml-paragraph">Line 1<br /><br />Line 2</p>
    

Space Character

Name: sp

Kind: Node without child nodes

Description

An explicit space character inserted in the document. Whitespace composed of several characters (such as two spaces) is always converted into a single space (as in HTML). Hence, this node can be used to explicitly insert two or more spaces.

Attributes

This node doesn't have attributes.

HTML Attributes: not allowed

Example
  • PML code:

    This is  g  o  o  d !  [- 2 spaces will result in ONE space -]
    
    This is [sp]g[sp][sp]o[sp][sp]o[sp][sp]d[sp]!
  • Result:

    This is g o o d !

    This is  g  o  o  d !

  • HTML code generated:

    <p class="pml-paragraph">This is g o o d !</p>
    <p class="pml-paragraph">This is &nbsp;g&nbsp;&nbsp;o&nbsp;&nbsp;o&nbsp;&nbsp;d&nbsp;!</p>
    

Text

Name: text

Kind: Node with raw text content

Description

A node containing text.
Normally this node is not used in hand-written documents, because free text is implicitly contained in a 'text' node.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    [text All is very well.]
    All is very well.
    
  • Result:

    All is very well. All is very well.

  • HTML code generated:

    <p class="pml-paragraph">All is very well. All is very well. </p>
    

Footnotes

Inline Footnote

Name: fnote

Kind: Node with child nodes

Description

Inline footnotes are footnotes whose content is defined inline. They are displayed later in the document, as soon as an 'fnotes' node is encountered.
Inline footnotes can contain text and other inline nodes to style the footnote. They cannot contain block nodes.

Attributes

This node doesn't have attributes.

HTML Attributes: allowed

Example
  • PML code:

    text text [fnote text of footnote 1] text
    
    text [fnote text of footnote 2 with [i italic] and [b bold] words] text text
    
    text text [fnote
        text of footnote 3
    ] text text
    
    [fnotes]
    
  • Result:

    text text 1 text

    text 2 text text

    text text 3 text text

    1.

    text of footnote 1

    2.

    text of footnote 2 with italic and bold words

    3.

    text of footnote 3

  • HTML code generated:

    <p class="pml-paragraph">text text <sup id="fnr__1" class="pml-footnote-ref"><a href="#fnd__1">1</a></sup> text</p>
    <p class="pml-paragraph">text <sup id="fnr__2" class="pml-footnote-ref"><a href="#fnd__2">2</a></sup> text text</p>
    <p class="pml-paragraph">text text <sup id="fnr__3" class="pml-footnote-ref"><a href="#fnd__3">3</a></sup> text text</p>
    <div class="pml-footnotes">
        <table>
            <tr id="fnd__1" class="pml-footnote">
                <td style="vertical-align: top;">1.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__1">^</a></td>
                <td>
                    <p class="pml-paragraph">text of footnote 1</p>
                </td>
            </tr>
            <tr id="fnd__2" class="pml-footnote">
                <td style="vertical-align: top;">2.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__2">^</a></td>
                <td>
                    <p class="pml-paragraph">text of footnote 2 with <i class="pml-italic">italic</i> and <b class="pml-bold">bold</b> words</p>
                </td>
            </tr>
            <tr id="fnd__3" class="pml-footnote">
                <td style="vertical-align: top;">3.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__3">^</a></td>
                <td>
                    <p class="pml-paragraph"> text of footnote 3 </p>
                </td>
            </tr>
        </table>
    </div>
    

Footnote Reference

Name: fnote_ref

Kind: Node without child nodes

Description

Node 'fnote_ref' is used to insert a footnote defined with an 'fnote_def' node.
Attribute 'did' must be explicitly defined, and must be equal to the 'id' attribute defined in node 'fnote_def'.
The same 'fnote_def' node can be re-used in several 'fnote_ref' nodes.

Attributes
  • Footnote Definition Id

    Name

    did

    Is positional parameter

    No

    Description

    The identifier of the footnote definition.

    Type

    string

    Required

    yes

    Default Value

    none

    Example(s)

    did = fn_7

  • Inline Text

    Name

    text

    Is positional parameter

    No

    Description

    The text to be displayed inline.
    By default, the index in the list of footnotes is used.

    Type

    string or null

    Required

    no

    Default Value

    null

    Example(s)

    text = "Bloch, 2017"

HTML Attributes: allowed

Example
  • PML code:

    text [fnote_ref did=f1] text
    
    Advice for life [fnote_ref did=f2 text="Rodegast 1987"].
    
    text [fnote_ref did=f1] [fnote_ref did=f2] text
    
    [fnote_def (id=f1)
        Text of [i footnote 1]
    ]
    
    [fnote_def (id=f2)
        Rodegast, P. (1987). [i Emmanuel's Book: A Manual for Living Comfortably in the Cosmos.] Bantam.
    ]
    
    [header Footnotes]
    [fnotes]
  • Result:

    text 1 text

    Advice for life Rodegast 1987.

    text 1 2 text

    Footnotes
    1.

    Text of footnote 1

    2.

    Rodegast, P. (1987). Emmanuel's Book: A Manual for Living Comfortably in the Cosmos. Bantam.

  • HTML code generated:

    <p class="pml-paragraph">text <sup id="fnr__1" class="pml-footnote-ref"><a href="#f1">1</a></sup> text</p>
    <p class="pml-paragraph">Advice for life <sup id="fnr__2" class="pml-footnote-ref"><a href="#f2">Rodegast 1987</a></sup>.</p>
    <p class="pml-paragraph">text <sup id="fnr__3" class="pml-footnote-ref"><a href="#f1">1</a></sup> <sup id="fnr__4" class="pml-footnote-ref"><a href="#f2">2</a></sup> text</p>
    <div class="pml-header">Footnotes</div>
    <div class="pml-footnotes">
        <table>
            <tr id="f1" class="pml-footnote">
                <td style="vertical-align: top;">1.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__1">^</a><a href="#fnr__3">^</a></td>
                <td>
                    <p class="pml-paragraph">Text of <i class="pml-italic">footnote 1</i></p>
                </td>
            </tr>
            <tr id="f2" class="pml-footnote">
                <td style="vertical-align: top;">2.</td>
                <td class="pml-footnote-backlink" style="vertical-align: top;"><a href="#fnr__2">^</a><a href="#fnr__4">^</a></td>
                <td>
                    <p class="pml-paragraph">Rodegast, P. (1987). <i class="pml-italic">Emmanuel's Book: A Manual for Living Comfortably in the Cosmos.</i> Bantam. </p>
                </td>
            </tr>
        </table>
    </div>