- Tags + About REML
- There are two types of tags: block level and in-line. -
- -- If an unrecognised tag is encountered an REML code the interpreter should report an error. However, providing start and end tags are matched, the interpreter may choose to simply ignore the tags. -
- -- Block Level Tags -
- -- Block level tags separate the enclosed text into paragraphs of some description. The supported tags are: -
--
-
-
-
<p>...</p>
– Renders the enclosed markup as a simple paragraph. -
- -
-
<heading>...</heading>
– Renders the enclosed markup as a heading. -
- -
-
<ol>...</ol>
– Renders the enclosed markup as an ordered list. -
- -
-
<ul>...</ul>
– Renders the enclosed markup as an unordered list. -
- -
-
<li>...</li>
– Renders the enclosed markup as a list item. -
-
- The following rules apply to the use of block level tags: -
--
-
-
- Must be matched, e.g.
<p>
must have a matching</p>
. -
- -
-
<p>...</p>
and<heading>...</heading>
blocks must not contain other block level tags. -
- -
-
<ol>...</ol>
and<ul>...</ul>
blocks must only contain one or more<li>...</li>
blocks. -
- -
-
<li>...</li>
blocks must only be used within<ol>...</ol>
and<ul>...</ul>
blocks. May contain<p>...</p>
and<heading>...</heading>
blocks, but it is permitted to include text and inline tags directly without enclosing them one of the permitted blocks. Nested lists are permitted by including further<ul>...</ul>
and<ol>...</ol>
blocks. -
- -
- All text should be embedded within
<p>...</p>
,<heading>...</heading>
or<li>...</li>
block level tags, e.g.<heading>heading</heading><p>text</p>
or simply<p>text</p>
. -
- - - White space between blocks must be ignored. - -
- Here is a valid example: -
-<heading>Hello</heading> -<p>Hello World</p> -<ol> - <li>one</li> - <li><p>two</p></li> - <ul> - <li>two A</li> - <li>two B</li> - <ul> - <li>three</li> -</ol>-
- Strictly speaking, the following example is invalid code – all occurrences of wrong
are in error because they are not contained within block tags.
-
wrong <heading>blah</heading> wrong <p>blah</p> wrong-
- However interpreting code may interpret this permissively. If this is done the text outside blocks should be interpreted as if it was enclosed in <p>
and </p>
tags. Therefore the above code would be interpreted as:
+ REML is a little markup language that can be used to style text. It is a SGML language similar to HTML, albeit much smaller. A small number of tags and character entities are supported.
<p>wrong </p><heading>blah</heading><p>wrong </p><p>blah</p><p>wrong</p>- -
- Inline Tags -
- -- In-line tags format the text enclosed between the start and end tags. -
- Here are the available in-line tags: + See the REML v6 language definition for full details.
--
-
-
-
<strong>...</strong>
– Renders the enclosed markup with strong emphasis. -
- -
-
<em>...</em>
– Emphasises the enclosed markup. -
- -
-
<var>...</var>
– Used to indicate the enclosed markup is a variable. -
- -
-
<warning>...</warning>
– Used for warning text. -
- -
-
<mono>...</mono>
– Renders markup in a mono-spaced font. -
- -
-
<a href="url">...</a>
– Creates a hyper-link. Thehref
attribute must specify the required URL, which must use one of thehttp
,https
orfile
protocols; others are not permitted. If you use thefile
protocol it must reference a valid local or network file. -
-
- The following rules apply to the use of in-line tags: -
--
-
-
- In-line tags must be embedded inside a valid block level tag. E.g.
<p>one<strong>two</strong>three</p>
. -
- -
- Tags must match. E.g.
<em>
must be matched with</em>
. -
- -
- Tags may be nested, providing the tags are balanced. E.g.
<em>blah <var>blah</var></em>
is valid but<em>blah <var>blah</em></var>
is not. -
-
- Examples: -
-<p>Make stuff <strong>stand out</strong>.</p> -<p><em>Emphasised <warning>warning!</warning></em></p> -<p>Refer to a function <var>parameter</var>.</p> -<p>Use the: <mono>Windows</mono> unit.</p> -<p>See this <a href="https://example.com">example</a>.</p>
- Character Entities + REML in CodeSnip
- Some symbolic character entities are supported in REML. Many symbols, but not all, have analogues in the list of supported character entities in XHTML or HTML 5. Some entities have alternate symbols. Here is the complete list. + Code snippets include REML to format snippets' description and extra fields. CodeSnip interprets and renders the REML when displaying snippets in its UI and when printing them.
-Character Entity | -Actual Character | -
---|---|
& |
- & | -
" |
- " | -
> |
- > | -
< |
- < | -
© |
- © | -
× |
- × | -
÷ or ÷ |
- ÷ | -
± |
- ± | -
≠ or &neq; |
- ≠ | -
∑ |
- ∑ | -
∞ |
- ∞ | -
£ |
- £ | -
¤ |
- ¤ | -
¥ |
- ¥ | -
€ |
- € | -
¢ |
- ¢ | -
† |
- † | -
‡ or ‡ |
- ‡ | -
… |
- … | -
¶ |
- ¶ | -
§ |
- § | -
® |
- ® | -
¼ |
- ¼ | -
½ or ½ |
- ½ | -
¾ |
- ¾ | -
µ |
- µ | -
° |
- ° | -
¢ |
- ¢ | -
« |
- « | -
» |
- » | -
¿ |
- ¿ | -
' |
- ' | -
- To express other special symbols for which there is no symbolic character entity, numeric character entities can be used. For example to display the 'Ω' character (Unicode Greek capital letter Omega) use Ω
.
+ CodeSnip currently supports REML v6. Earlier versions of CodeSnip supported different versions of REML:
Change Log
- -- This section notes the changes in the various versions of REML. -
- -- v1 of 2008-12-31 -
- -- Introduced in CodeSnip v2.2.5 -
- --
-
-
- Supported tags:
<strong>
and<a>
. -
- -
- Supported entities:
>
,<
,"
and&
. -
- -
- Supported protocols for use in
<a>
tags:http
. -
-
- v2 of 2009-06-29 -
- -- Introduced in CodeSnip v3.0 -
- --
-
-
- Added tags:
<em>
,<var>
,<warning>
,<mono>
,<p>
and<heading>
. -
- -
- Added entity:
©
. -
-
- v3 of 2009-07-06 -
- -- Introduced in CodeSnip v3.0.1 -
- --
-
-
- Added protocol for use in
<a>
tags:file
. -
-
- v4 of 2011-12-31 -
- -- Introduced in CodeSnip v4.0 alpha 1 (preview) -
- --
-
-
- Added protocol for use in
<a>
tags:https
. -
-
- v5 of 2022-12-16 -
- -- Introduced in CodeSnip v4.21.0 -
- +-
-
-
- Added support for lists with the
<ol>
,<ul>
&<li>
block tags. -
- -
- Added entities:
×
,÷
,÷
±
,≠
,&neq;
,∑
,∞
,£
,¤
,¥
,€
,¢
,†
,‡
,‡
,…
,¶
,§
,®
,¼
,frac12
,½
,¾
,µ
,°
,«
,»
&¿
. -
+ - REML v1 was first supported by CodeSnip v2.2.5 +
- REML v2 was first supported by CodeSnip v3.0 +
- REML v3 was first supported by CodeSnip v3.0.1 +
- REML v4 was first supported by CodeSnip v4.0 alpha 1 (preview) +
- REML v5 was first supported by CodeSnip v4.21.0 +
- REML v6 was first supported by CodeSnip v4.23.0
- v6 of 2024-04-02 + All CodeSnip versions are backward compatible with earlier versions of REML.
-- Introduced in CodeSnip v4.23.0 -
+-
-
-
- Added entity:
'
. -
-