A file with many RakuDoc components and some idea about what is expected.
Assuming a new renderer has been developed and installed (eg using zef) at Rakudoc::To::MyRender, the render this file using a raku --rakudoc=MyRenderer terminal command. The renderer will be consistent with the RakuDoc v2 specification if all the blocks are rendered appropriately, and warnings are generated by the statements marked as incorrect below.
This file is intended to prove a RakuDoc v2 renderer. It can be used in several ways:
An attempt has been made to utilise all RakuDoc components, it is not an exhaustive test of all components in all possible combinations. Please suggest additional combinations if they turn out to have unusual effects.
Several mistakes have been included where the RakuDoc v2 specification indicates how inconsistent behaviours or unknown components should be handled.
The the end of the rendering of this source file, a number of warning messages should be included.
text
text
A paragraph to illustrate Basis type formatting.
A paragraph to illustrate Important type formatting.
A paragraph to illustrate Unusual type formatting.
A paragraph to illustrate Strikethrough type formatting.
A paragraph to illustrate Superscript type formatting. (For text output, many terminals do not support superscript/subscript font positions, so consider using a colouration as well.)
A paragraph to illustrate Subscript type formatting.
A paragraph to illustrate Code type formatting. It can contain other markup, eg. A<> markup.
A paragraph to illustrate Verbatim type formatting. It can contain other RakuDoc, eg. P<defn:Happy> without executing it.
A paragraph to illustrate some >< formatting (in the source has Z<Zero width> between >< ).
A paragraph to illustrate Keyboard formatting.
A paragraph to illustrate Replacement formatting.
A paragraph to illustrate Terminal formatting.
A paragraph to illustrate several G<G undefined type>, Q<Q undefined type>, W<W undefined type>, Y<Y undefined type> formatting; warnings are expected.
Various entities are possible such as « or the same thing using unicode «. Entities can be double unicodes, such as 🇺🇦, which is the Ukrainian flag.
In case you have forgotten, here is something aliased at the start: Do not consider this a disquisition of possible combinations.
This is an example of an Alias where A<DECLARATION> was replaced by the contents of the =alias directive. Aliases are scoped, see below, but cannot be specified before being used in the document. Here is an undeclared forward reference, which was written as A<an undeclared|XXX>. The use of an undeclared alias causes a warning.
We can also make an inline definition. This whole paragraph will be referenced later.
A developer note can be attachedv1.2.3 ^.. v2.0.0 highly deprecated to text. A renderer may show the text or only show it for contexts compliant with the version.
But a note without meta no versioning here is ignored and a warning generated.
When we want a formula use F<> markup.
Links can be made internally say to the first heading or externally say to the raku documentation site.
A renderer should provide the opportunity to customise text using M<...|..,..;...> markup. The renderer should not recognise this functionality and issue a warning.
A note [ 1 ] will not itself be rendered inline, but the text will be rendered in a footnote or popup. A marker or number will be rendered to point to the text.
Suppose we want to place the definition ⦗
We can also make an inline definition. This whole paragraph will be referenced later.
Normally extra spaces are removed with paragraphs, but sometimes we truly dot dot dot dash dash dash want them.
Good text will contain elements to be placed in an index. The index has already been placed at the start of the document, although content is generated here.
text
text
text
text
text
Although this heading has the same text in the heading, the Table of Contents should provide a unique target for it (this may not be possible in some formats such as MarkDown)
text
Unnumbered up to four levels of bulleting are required, a renderer can offer more.
to put space between lists, probably a =para without text is needed.
Just shout why don't you?
This is an ordinary paragraph
An ordinary paragraph creates the definition list.
The project originally consisted of five phases, of which two are already complete and two have been abandoned:
The major sources of sustainable energy are:
my $x = 2;
# a brilliant program!
my $x = 3; # a renderer should observe the basis markup # and the markup but render R<markup> verbatim
# indenting causes an implicit code block
my $raku = 'fantastic';
This is a text with basis markup that conserves
all spacing when trying to get column
just using white spaces naively
better to use tables
This is almost the same as input but may have a different styling
Occasionally some text that is inset from the margin is required. So enclose it in a nested block.
The following semantic block was included at the beginning in source, but it is now included here.
Some silly text which will have its own extraordinary ToC entry
You are reminded that: Do not consider this a disquisition of possible combinations.
Animal | Legs | Eats |
---|---|---|
Zebra | 4 | Cookies |
Human | 2 | Pizza |
Shark | 0 | Fish |
Animal | Legs | Eats |
---|---|---|
Zebra | 4 | Cookies |
Human | 2 | Pizza |
Shark | 0 | Fish |
Date | Samples | Mean | ||
---|---|---|---|---|
Sample 1 | Sample 2 | Sample 3 | ||
2023-03-08 | 0.4 | 0.1 | 0.3 | 0.26667 |
2023-04-14 | 0.8 | 0.6 | 0.5 | 0.63333 |
2023-06-23 | 0.2 | 0.9 | 0.0 | 0.36667 |
Mean: | 0.46667 | 0.53333 | 0.26667 | 0.42222 |
An index entry is an inline formatting code that is rendered normally (i.e. with no special identifying styling) within the text, but which is also added to the index. Index entries may be specified with subentries, including multilevel subentries, though a renderer is not required to represent anything more than the first level. A single index entry can specify two or more separate entries in the index, all of which will refer back to the same point in the text.
Configuration and aliases are scoped.
Without configuration embedded B<markup> is rendered verbatim.
With configuration embedded <span class="basis">basis</span> markup is rendered.
How short the season when roses are red.
But configuration directives only B<apply> inside a block scope.
Did I mention before that: Do not consider this a disquisition of possible combinations.
Renderers are required to place text and RakuDoc sources, but may fallback to text messages for other formats.
Absolutely no warranty is implied. Not even of any kind. We have sold you this software with no hint of a suggestion that it is either useful or usable. As for guarantees of correctness...don't make us laugh!
At some time in the future we might deign to sell you upgrades that purport to address some of the application's many deficiencies, but no promises there either. We have more lawyers on staff than you have total employees, so don't even think about suing us.
Have a nice day. ☺
software
with no hint of a suggestion that it is either useful
or usable. As for guarantees of correctness...don't make us laugh!
Text finishes after version number