About the REML markup language

The REML markup language can be used to format any extra information you want to associate with a code snippet. It is entered on the Extra Information tab of the Snippets Editor dialog box.

Using plain text

First note that you do not have to use REML to markup your extra text – you can use plain text (with a couple of exceptions: see character entities below). CodeSnip will convert your text into a simple REML paragraph by surrounding it in suitable <p> and </p> tags that you will see the next time you edit the text.

Using markup

The REML language is a simple SGML language like a very simple version of HTML. The are a small number of tags you can use. Firstly there are two block-level tags that render text in paragraphs, while the other tags format text inline.

Block level tags

<p>...</p>
Renders the enclosed markup as a simple paragraph.
<heading>...</heading>
Renders the enclosed markup as a heading.

The following rules apply to the use of <p> and <heading>

  1. These tags must not be nested.
  2. Furthermore, all your markup should be enclosed in one or more pairs of these block level tags – that means that markup must start with one of these tags and end with a suitable closing tags.
  3. The tags must be matched, e.g. <p> must have a matching </p>.

Here are some valid examples:

  1. <p>Hello World</p>
  2. <heading>Hello</heading> <p>Hello World</p>

And here's an example of invalid code – the highlighted sections are in error, because they are not contained within block tags.

blah <heading>blah</heading> blah <p>blah</p> blah

Inline tags

Here are the available inline tags:

<strong>...</strong>
Renders the enclosed markup with strong emphasis.
Example: <p>Make stuff <strong>stand out</strong>.</p>
<em>...</em>
Emphasises the enclosed markup.
Example: <p>Draw <em>attention</em> to something.</p>
<var>...</var>
Used to indicate the enclosed markup is a variable.
Example: <p>Refer to a function <var>parameter</var>.</p>
<warning>...</warning>
Used for warning text.
Example: <p><warning>Warning:</warning> Don't do it!</p>
<mono>...</mono>
Renders markup in a mono-spaced font.
Example: <p>Use the: <mono>Windows:</mono> unit.</p>
<a href="url">...</a>
Creates a hyperlink. The href attribute must specify the required URL, which must use either the http: or file: protocols; others are not permitted. If you use the file: protocol it must reference a valid local or network file and the file:// component of the URL must be supplied. Warning:. Be aware that if you submit or export a snippet containing a hyperlink that uses the file: protocol it will not work on the recipient's system unless the required file can be found in the same location.
Example: <p><a href="http://www.delphidabbler.com">Visit DelphiDabbler.com</a></p>..

Character Entities

The "<" and "&" characters are special within the markup and must not be used directly, even when you are just entering plain text. You must use the &lt; character entity in place of "<" and &amp; instead of "&".

You may also use &quot; instead of double quotes and &gt; in place of ">". No other symbolic character entities are supported.

However, numeric character entities can be used to insert other characters by specifying its code. For example &#64; is equivalent to "@".

By way of an example, if you want to display x < y, use:

x &lt; y