Basic Syntax - Group
This page describe the group syntax of KARAS.
Inline group
Inline group syntax is the syntax to group some text or words. (In other words, syntax to close the text with span element.)
Text closed with <<
and >>
becomes inline group.
Inline group enable to add the name with option syntax ::
. The maximum level of inline group is 2. ** In level 1, outputs class group. And in level 2, outputs id group. Usually group has name, and the id should be uniquely defined in the document.
Block group
Block group syntax is the syntax to group everything like heading, list, table, text or the other. (In other words, syntax to close the text with div element or the other.) When write a {{
at the beginning of the line, it becomes the start of the group. And, when write a }}
at the beginning of the line, it becomes the end of the group. Heading, text, and the others between start and end will be grouped.
Named group
Following text after the syntax of the block group start {{
becomes group name. (In other words, it becomes class name of div element.) Note, the group name cannot break the line.
Special group
Following names cannot use as group name. When these names are set, the group becomes special group.
In other words, the group becomes that name element. If you need more information about these group, please search and read document about HTML element.
div | Nothing have special mean. |
---|---|
header | Represent header of contents. |
footer | Represent footer of contents. |
nav | Represent menu or structure of contents. |
article | Represent article. (same topic contents). |
section | Represent section (smaller than article). |
aside | Represent not main subject. |
address | Represent author info of contents. |
details | Repesent additional info, detail info. |
figure | Represent figure, table. |
pre | Reperesent preformatted contents. |
code | Represent source code or path. |
kbd | Represent user input. |
samp | Reperesent output. Like sample. |
For example, the group named 'header' is output as header element.
In order to add the name to header group, use option syntax ::
. The following text becomes the group name.
In order to name 'header' to the div group, use 'div' as group name, and add the 'header' as option.
figure, details group
figure and details group have a special function. Heading syntax =
in figure group is output as figcaption. You can write heading syntax at anywhere in the figure group. However, usually at the top or bottom of figure group.
Heading syntax =
in details group is output as summary. You can write heading syntax at anywhere in the details group. However, usually at the top of details group.
pre, code, kbd, samp group
pre, code, kbd, and samp, group have a special function. Text in these group enable to break the line without using syntax ~
to linebreak. In addition, KARAS syntax in the text is not converted, and the special marks like < or > are convert to the character reference.
code, kbd and sample group is output along with pre group(element). Group name added as option added to the both pre and code (kbd, samp) group.