You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REML is a little markup language that can be used to style text. It is used in Code Snippets collection meta data for certain properties of a snippet.
249
-
</p>
250
-
<p>
251
-
The REML language is a SGML language similar to a greatly simplified XHTML. The are a small number of tags and character entities that can be used.
252
-
</p>
253
-
<aside>
254
-
<strong>Note:</strong> The language described here is REML v6. v4 is still in regular use in CodeSnip up to v4.20.x. Earlier versions are obsolete.
255
-
</aside>
256
-
257
-
</section>
121
+
<main>
258
122
259
-
<sectionid="tags">
123
+
<sectionid="intro">
260
124
261
125
<h1>
262
-
Tags
126
+
About REML
263
127
</h1>
264
128
265
129
<p>
266
-
There are two types of tags: block level and in-line.
267
-
</p>
268
-
269
-
<p>
270
-
If an unrecognised tag is encountered an REML code the interpreter <em>should</em> report an error. However, providing start and end tags are matched, the interpreter <em>may</em> choose to simply ignore the tags.
271
-
</p>
272
-
273
-
<h2>
274
-
Block Level Tags
275
-
</h2>
276
-
277
-
<p>
278
-
Block level tags separate the enclosed text into paragraphs of some description. The supported tags are:
279
-
</p>
280
-
<ulclass="half-spaced">
281
-
<li>
282
-
<codeclass="value"><p>...</p></code> – Renders the enclosed markup as a simple paragraph.
283
-
</li>
284
-
<li>
285
-
<codeclass="value"><heading>...</heading></code> – Renders the enclosed markup as a heading.
286
-
</li>
287
-
<li>
288
-
<codeclass="value"><ol>...</ol></code> – Renders the enclosed markup as an ordered list.
289
-
</li>
290
-
<li>
291
-
<codeclass="value"><ul>...</ul></code> – Renders the enclosed markup as an unordered list.
292
-
</li>
293
-
<li>
294
-
<codeclass="value"><li>...</li></code> – Renders the enclosed markup as a list item.
295
-
</li>
296
-
</ul>
297
-
<p>
298
-
The following rules apply to the use of block level tags:
299
-
</p>
300
-
<ulclass="unspaced">
301
-
<li>
302
-
<spanclass="very-strong">Must</span> be matched, e.g. <codeclass="value"><p></code><spanclass="very-strong">must</span> have a matching <codeclass="value"></p></code>.
303
-
</li>
304
-
<li>
305
-
<codeclass="value"><p>...</p></code> and <codeclass="value"><heading>...</heading></code> blocks <spanclass="very-strong">must not</span> contain other block level tags.
306
-
</li>
307
-
<li>
308
-
<codeclass="value"><ol>...</ol></code> and <codeclass="value"><ul>...</ul></code> blocks <spanclass="very-strong">must only</span> contain one or more <codeclass="value"><li>...</li></code> blocks.
309
-
</li>
310
-
<li>
311
-
<codeclass="value"><li>...</li></code> blocks <spanclass="very-strong">must</span> only be used within <codeclass="value"><ol>...</ol></code> and <codeclass="value"><ul>...</ul></code> blocks. <em>May</em> contain <codeclass="value"><p>...</p></code> and <codeclass="value"><heading>...</heading></code> 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 <codeclass="value"><ul>...</ul></code> and <codeclass="value"><ol>...</ol></code> blocks.
312
-
</li>
313
-
<li>
314
-
All text <em>should</em> be embedded within <codeclass="value"><p>...</p></code>, <codeclass="value"><heading>...</heading></code> or <codeclass="value"><li>...</li></code> block level tags, e.g. <codeclass="value"><heading>heading</heading><p>text</p></code> or simply <codeclass="value"><p>text</p></code>.
315
-
</li>
316
-
<li>
317
-
White space between blocks <spanclass="very-strong">must</span> be ignored.
Strictly speaking, the following example is invalid code – all occurrences of <codeclass="value">wrong</code> are in error because they are not contained within block tags.
However interpreting code <em>may</em> interpret this permissively. If this is done the text outside blocks <em>should</em> be interpreted as if it was enclosed in <codeclass="value"><p></code> and <codeclass="value"></p></code> tags. Therefore the above code would be interpreted as:
130
+
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.
<strong>Note:</strong> Code Snippets Database collections <em>may</em> contain such non-conforming REML. Therefore interpreters of REML that need to accept such collections <spanclass="very-strong">must</span> be able to handle text without enclosing block tags.
344
-
</aside>
345
132
346
-
<h2>
347
-
Inline Tags
348
-
</h2>
349
-
350
-
<p>
351
-
In-line tags format the text enclosed between the start and end tags.
352
-
</p>
353
133
<p>
354
-
Here are the available in-line tags:
134
+
See the <ahref="https://htmlpreview.github.io/?https://raw.githubusercontent.com/delphidabbler/reml/main/docs/reml-v6.html">REML v6 language definition</a> for full details.
355
135
</p>
356
-
<ulclass="half-spaced">
357
-
<li>
358
-
<codeclass="value"><strong>...</strong></code> – Renders the enclosed markup with strong emphasis.
359
-
</li>
360
-
<li>
361
-
<codeclass="value"><em>...</em></code> – Emphasises the enclosed markup.
362
-
</li>
363
-
<li>
364
-
<codeclass="value"><var>...</var></code> – Used to indicate the enclosed markup is a variable.
365
-
</li>
366
-
<li>
367
-
<codeclass="value"><warning>...</warning></code> – Used for warning text.
368
-
</li>
369
-
<li>
370
-
<codeclass="value"><mono>...</mono></code> – Renders markup in a mono-spaced font.
371
-
</li>
372
-
<li>
373
-
<codeclass="value"><a href="url">...</a></code> – Creates a hyper-link. The <codeclass="value">href</code> attribute <spanclass="very-strong">must</span> specify the required URL, which <spanclass="very-strong">must</span> use one of the <codeclass="value">http</code>, <codeclass="value">https</code> or <codeclass="value">file</code> protocols; others are not permitted. If you use the <codeclass="value">file</code> protocol it <spanclass="very-strong">must</span> reference a valid local or network file.
374
-
</li>
375
-
</ul>
376
-
<p>
377
-
The following rules apply to the use of in-line tags:
378
-
</p>
379
-
<ulclass="unspaced">
380
-
<li>
381
-
In-line tags <spanclass="very-strong">must</span> be embedded inside a valid block level tag. E.g. <codeclass="value"><p>one<strong>two</strong>three</p></code>.
382
-
</li>
383
-
<li>
384
-
Tags <spanclass="very-strong">must</span> match. E.g. <codeclass="value"><em></code> must be matched with <codeclass="value"></em></code>.
385
-
</li>
386
-
<li>
387
-
Tags may be nested, providing the tags are balanced. E.g. <codeclass="value"><em>blah <var>blah</var></em></code> is valid but <codeclass="value"><em>blah <var>blah</em></var></code> is not.
<p>See this <a href="https://example.com">example</a>.</p></pre>
398
136
399
137
</section>
400
138
401
-
<sectionid="entities">
139
+
<sectionid="reml-in-codesnip">
402
140
403
141
<h1>
404
-
Character Entities
142
+
REML in CodeSnip
405
143
</h1>
406
144
407
145
<p>
408
-
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.
146
+
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.
<td><code>&divide;</code> or <code>&div;</code></td>
445
-
<td>÷</td>
446
-
</tr>
447
-
<tr>
448
-
<td><code>&plusmn;</code></td>
449
-
<td>±</td>
450
-
</tr>
451
-
<tr>
452
-
<td><code>&ne;</code> or <code>&neq;</code></td>
453
-
<td>≠</td>
454
-
</tr>
455
-
<tr>
456
-
<td><code>&sum;</code></td>
457
-
<td>∑</td>
458
-
</tr>
459
-
<tr>
460
-
<td><code>&infin;</code></td>
461
-
<td>∞</td>
462
-
</tr>
463
-
<tr>
464
-
<td><code>&pound;</code></td>
465
-
<td>£</td>
466
-
</tr>
467
-
<tr>
468
-
<td><code>&curren;</code></td>
469
-
<td>¤</td>
470
-
</tr>
471
-
<tr>
472
-
<td><code>&yen;</code></td>
473
-
<td>¥</td>
474
-
</tr>
475
-
<tr>
476
-
<td><code>&euro;</code></td>
477
-
<td>€</td>
478
-
</tr>
479
-
<tr>
480
-
<td><code>&cent;</code></td>
481
-
<td>¢</td>
482
-
</tr>
483
-
<tr>
484
-
<td><code>&dagger;</code></td>
485
-
<td>†</td>
486
-
</tr>
487
-
<tr>
488
-
<td><code>&ddagger;</code> or <code>&Dagger;</code></td>
489
-
<td>‡</td>
490
-
</tr>
491
-
<tr>
492
-
<td><code>&hellip;</code></td>
493
-
<td>…</td>
494
-
</tr>
495
-
<tr>
496
-
<td><code>&para;</code></td>
497
-
<td>¶</td>
498
-
</tr>
499
-
<tr>
500
-
<td><code>&sect;</code></td>
501
-
<td>§</td>
502
-
</tr>
503
-
<tr>
504
-
<td><code>&reg;</code></td>
505
-
<td>®</td>
506
-
</tr>
507
-
<tr>
508
-
<td><code>&frac14;</code></td>
509
-
<td>¼</td>
510
-
</tr>
511
-
<tr>
512
-
<td><code>&frac12;</code> or <code>&half;</code></td>
513
-
<td>½</td>
514
-
</tr>
515
-
<tr>
516
-
<td><code>&frac34;</code></td>
517
-
<td>¾</td>
518
-
</tr>
519
-
<tr>
520
-
<td><code>&micro;</code></td>
521
-
<td>µ</td>
522
-
</tr>
523
-
<tr>
524
-
<td><code>&deg;</code></td>
525
-
<td>°</td>
526
-
</tr>
527
-
<tr>
528
-
<td><code>&laquo;</code></td>
529
-
<td>«</td>
530
-
</tr>
531
-
<tr>
532
-
<td><code>&raquo;</code></td>
533
-
<td>»</td>
534
-
</tr>
535
-
<tr>
536
-
<td><code>&iquest;</code></td>
537
-
<td>¿</td>
538
-
</tr>
539
-
<tr>
540
-
<td><code>&apos;</code></td>
541
-
<td>'</td>
542
-
</tr>
543
-
</tbody>
544
-
</table>
545
-
546
-
<aside>
547
-
<strong>Note:</strong> the '<' and '&' characters are special within the markup and cannot be used literally, even when you are just entering plain text. You <spanclass="very-strong">must</span> use the <codeclass="value">&lt;</code> character entity in place of <codeclass="value"><</code> and <codeclass="value">&amp;</code> instead of <codeclass="value">&</code>. For example to write <codeclass="value">x<y</code> in REML use <codeclass="value">x&lt;y</code> and to write <codeclass="value">you & me</code> use <codeclass="value">you &amp; me</code>.
548
-
</aside>
549
-
550
149
<p>
551
-
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 <em>Greek capital letter Omega</em>) use <codeclass="value">&#937;</code>.
150
+
CodeSnip currently supports REML v6. Earlier versions of CodeSnip supported different versions of REML:
552
151
</p>
553
-
554
-
<aside>
555
-
<strong>Note:</strong> Numeric entities should be used with caution because the characters they represent may vary across different text encodings, whereas symbolic entities are safe across encodings.
556
-
</aside>
557
-
558
-
</section>
559
-
560
-
561
-
<sectionid="changes">
562
-
563
-
<h1>Change Log</h1>
564
-
565
-
<p>
566
-
This section notes the changes in the various versions of REML.
567
-
</p>
568
-
569
-
<p>
570
-
<strong>v1 of 2008-12-31</strong>
571
-
</p>
572
-
573
-
<p>
574
-
Introduced in CodeSnip v2.2.5
575
-
</p>
576
-
577
-
<ul>
578
-
<li>
579
-
Supported tags: <codeclass="value"><strong></code> and <codeclass="value"><a></code>.
580
-
</li>
581
-
<li>
582
-
Supported entities: <codeclass="value">&gt;</code>, <codeclass="value">&lt;</code>, <codeclass="value">&quot;</code> and <codeclass="value">&amp;</code>.
583
-
</li>
584
-
<li>
585
-
Supported protocols for use in <codeclass="value"><a></code> tags: <codeclass="value">http</code>.
586
-
</li>
587
-
</ul>
588
-
589
-
<p>
590
-
<strong>v2 of 2009-06-29</strong>
591
-
</p>
592
-
593
-
<p>
594
-
Introduced in CodeSnip v3.0
595
-
</p>
596
-
597
-
<ul>
598
-
<li>
599
-
Added tags: <codeclass="value"><em></code>, <codeclass="value"><var></code>, <codeclass="value"><warning></code>, <codeclass="value"><mono></code>, <codeclass="value"><p></code> and <codeclass="value"><heading></code>.
Added protocol for use in <codeclass="value"><a></code> tags: <codeclass="value">file</code>.
617
-
</li>
618
-
</ul>
619
-
620
-
<p>
621
-
<strong>v4 of 2011-12-31</strong>
622
-
</p>
623
-
624
-
<p>
625
-
Introduced in CodeSnip v4.0 alpha 1 (preview)
626
-
</p>
627
-
628
-
<ul>
629
-
<li>
630
-
Added protocol for use in <codeclass="value"><a></code> tags: <codeclass="value">https</code>.
631
-
</li>
632
-
</ul>
633
-
634
-
<p>
635
-
<strong>v5 of 2022-12-16</strong>
636
-
</p>
637
-
638
-
<p>
639
-
Introduced in CodeSnip v4.21.0
640
-
</p>
641
-
152
+
642
153
<ul>
643
-
<li>
644
-
Added support for lists with the <codeclass="value"><ol></code>, <codeclass="value"><ul></code> & <codeclass="value"><li></code> block tags.
<em>REML</em> is <em>CodeSnip</em>'s own little markup language that can
45
-
be used to style the text of a snippet's description and / or extra
46
-
information. The latest version is v6, which is backwards compatible with
47
-
all other versions.
30
+
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.
48
31
</p>
49
-
<h2>
50
-
Language Details
51
-
</h2>
52
32
<p>
53
-
The <em>REML</em> language is a SGML language similar to a greatly
54
-
simplified XHTML. The are a small number of tags you can use. Firstly
55
-
there are two block-level tags that render text in paragraphs, while the
56
-
other tags format text inline or embed hyplerlinks.
33
+
CodeSnip currently supports REML v6. See the <ahref="https://htmlpreview.github.io/?https://raw.githubusercontent.com/delphidabbler/reml/main/docs/reml-v6.html">REML v6 language definition</a> for full details.
0 commit comments