<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
* Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
*
* Help topic describing REML markup language.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text-html; charset=Windows-1252">
<title>
About REML
</title>
<link rel="stylesheet" href="../css/codesnip.css" type="text/css">
<style type="text/css">
dl {
margin: 6px 0 0 0;
}
dl dt {
margin: 3px 0 0 0;
}
dl dd {
margin-left: 24px;
}
.code {
font-family: "Courier New";
color: purple;
}
.hilite {
background-color: #ff9;
}
</style>
</head>
<body>
<object
type="application/x-oleobject"
classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"
>
<param name="ALink Name" value="REML">
</object>
<h1>
<a name="reml"></a>About the REML markup language
</h1>
<p>
<em>REML</em> is <em>CodeSnip</em>'s own little markup language that can
be used to style the text of a snippet's description and / or extra
information.
</p>
<h2>
Language Details
</h2>
<p>
The <em>REML</em> language is a SGML language similar to a greatly
simplified XHTML. 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 or embed hyplerlinks.
</p>
<h3>
Block level tags
</h3>
<dl>
<dt class="code"><p>...</p></dt>
<dd>
Renders the enclosed markup as a simple paragraph.
</dd>
<dt class="code"><heading>...</heading></dt>
<dd>
Renders the enclosed markup as a heading.
</dd>
</dl>
<p>
The following rules apply to the use of
<span class="code"><p></span> and
<span class="code"><heading></span>
</p>
<ol>
<li>
The tags must not be nested.
</li>
<li>
The tags must be matched, e.g.
<span class="code"><p></span> must have a matching
<span class="code"></p></span>.
</li>
<li>
All text should be embedded within block level tags, e.g. <span
class="code"
><heading>heading</heading> <p>text</p></span>
or simply <span
class="code"
><p>text</p></span>.
</li>
</ol>
<p>
Here are some valid examples:
</p>
<ol>
<li class="extra-spacing">
<span class="code"><p>Hello World</p></span>
</li>
<li>
<span class="code"><heading>Hello</heading><br>
<p>Hello World</p></span>
</li>
</ol>
<p>
Srictly speaking, the following example is invalid code – the
highlighted sections are in error, because they are not contained within
block tags.
</p>
<p class="indent code">
<span class="hilite">blah</span>
<heading>blah</heading>
<span class="hilite">blah</span>
<p>blah</p>
<span class="hilite">blah</span>
</p>
<p>
However, <em>CodeSnip</em> is quite permissive and, in many cases,
automatically adds
<span class="code"><p></span>...<span class="code"></p></span>
tags for text that is not enclosed in block level tags. The above code is
interpreted as:
</p>
<p class="indent code">
<p><span class="hilite">blah</span> </p><br>
<heading>blah</heading><br>
<p><span class="hilite">blah</span> </p><br>
<p>blah</p><br>
<p><span class="hilite">blah</span></p>
</p>
<h3>
Inline tags
</h3>
<p>
Here are the available inline tags:
</p>
<dl>
<dt class="code"><strong>...</strong></dt>
<dd>
Renders the enclosed markup with strong emphasis.<br>
<em>Example:</em> <span class="code"><p>Make stuff
<strong>stand out</strong>.</p></span>
</dd>
<dt class="code"><em>...</em></dt>
<dd>
Emphasises the enclosed markup.<br>
<em>Example:</em> <span class="code"><p>Draw
<em>attention</em> to something.</p></span>
</dd>
<dt class="code"><var>...</var></dt>
<dd>
Used to indicate the enclosed markup is a variable.<br>
<em>Example:</em> <span class="code"><p>Refer to a function
<var>parameter</var>.</p></span>
</dd>
<dt class="code"><warning>...</warning></dt>
<dd>
Used for warning text.<br>
<em>Example:</em>
<span class="code"><p><warning>Warning:</warning>
Don't do it!</p></span>
</dd>
<dt class="code"><mono>...</mono></dt>
<dd>
Renders markup in a mono-spaced font.<br>
<em>Example:</em> <span class="code"><p>Use the:
<mono>Windows</mono> unit.</p></span>
</dd>
<dt class="code"><a href="url">...</a></dt>
<dd>
Creates a hyperlink. The <span class="code">href</span> attribute must
specify the required URL, which must use one of the <em>http:</em>,
<em>https:</em> or <em>file:</em> protocols; others are not permitted.
If you use the <em>file:</em> protocol it must reference a valid local
or network file. Be aware that if you submit or export a snippet
containing a hyperlink that uses the <em>file:</em> protocol it will
only work on the recipient's system if the specified file exists in the
same location.<br>
<em>Example:</em> <span class="code"><p><a
href="http://www.delphidabbler.com">Visit
DelphiDabbler.com</a></p>.</span>.
</dd>
</dl>
<h3 id="entities">
Character Entities
</h3>
<p>
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 <span class="code">&lt;</span> character
entity in place of "<" and
<span class="code">&amp;</span> instead of "&".
</p>
<p>
A few other character entities are supported for convenience. Here is the
complete list:
</p>
<ul class="unspaced">
<li>
<code>&lt;</code> for <code><</code>
</li>
<li>
<code>&gt;</code> for <code>></code>
</li>
<li>
<code>&quot;</code> for <code>"</code>
</li>
<li>
<code>&amp;</code> for <code>&</code>
</li>
<li>
<code>&copy;</code> for <code>©</code>
</li>
</ul>
<p>
By way of an example, if you want to display
<span class="code">x < y</span>, use:
</p>
<p class="indent">
<code>x &lt; y</code>
</p>
<p>
No other symbolic character entities are supported.
However, numeric character entities can be used to insert other characters
by specifying its code. For example <span class="code">&#64;</span> is
equivalent to "@".
</p>
<p>
Numeric entities should be used with caution. Using a code that is
specific to an ANSI character set may cause unexpected results because
<em>CodeSnip</em> uses Unicode internally and the specified character code
may not represent the same character in ANSI and Unicode.
</p>
</body>
</html>