This pages describe about the advanced usage or wrong usage of KARAS. Please read to write a good document by KARAS.
- Continuous Text
- Appearance of Line-break
- Cell Text Can't Break the Line.
- Output format of Link
- Syntax Combination
- Syntax Nest
- Special Nest
- Linked Note & Footnote
- Don't put a Cite into Blockquote
- Don't write a 'Quote mark' to Quoted text
In KARAS, continuous text which has no blank line is considered as a one text. For example, even if the heading text has line-breaks, all of the lines become a heading.
List, blockquote or any other syntax also has this rule.
Appearance of Line-break
User agent like browser render line-break as white-space. Some language like Japanese has a problem caused by this rule. Language that not separate each words by space has this problem.
KARAS not remove the line-break. For example, following text which is not separated by white-space gets a problem.
Like this, there is a space between K and L. If this text is written in a language that not separate each words by space, this space is not good. When you use KARAS in such language, be careful with line-break position to avoid this problem.
Cell Text Can't Break the Line.
Text in table cell can't break the line. Because the table row is defined by line-break. If line-break is needed in the cell text, you should reconsider the text first.
If absolutely necessary, write a
<br> element directly to break the line. In KARAS, the text enable to include HTML tag. However, in some system, you may not insert HTML tag because of the security. In such case, you can not break the line in cell.
Output format of Link
Link has 2 pattern. One of it, there are link and the other text. And the other case, there is only link. In KARAS, when the continuous text consisted of only link, each links becomes a independent content. (It means the link is outputted as flow content in HTML.) When the text consisted of link and the other text, it becomes paragraph, and the link is included in it. (It means the link is outputted as phrasing content in HTML.)
This rule is enabled even if the link shows media, like image.
KARAS syntax can be used with the other KARAS syntax. Following sample is one of it, link in heading, and heading in blockquote. There are lot of combination pattern, so can not describe all.
Syntax can be nested. For example, following sample shows bold and italic text.
Some patterns can not be nested. Syntax using same mark can not be nested. For example, bold and strong syntax can not be nested each other.
And, it is impossible to write staggered syntax, like a following sample.
Syntax which start and end mark are different can be nested. Link, Inline group, Block group can be nested.
Link can be nested. For example, following sample shows image and video which has link.
And, when the URL and Media-URL are same, write like this.
Be careful with wrong nest. Usually, it does not allow you to give a link in the media. It outputs the text which has wrong structure.
Nested Inling Group
Also inline group can be nested. You can nest class group into id group, and the opposite is also true.
Inline group which has 3 or more
> marks becomes id group.
Nested Block Group
Block group can be nested in block group.
However, block group can not be nested in pre, code, kbd, samp group. Block group syntax is not converted.
Linked Note & Footnote
Lot of lightweight markup language and the system have a syntax to write a footnote, but KARAS does not have. However, by using inline group and link syntax, you can output a linked note (like footnote).
Don't put a Cite into Blockquote
Blockquote should be used to indicate the contents is quoted. Therefore, I think, the cite element in blockquote must been shown as the quoted cite element.
If you want to group blockquote and the cite (or original url, etc...), you should use block group syntax. For example, write like a following sample. Because the characters 'blockquote' is not reserved name by block group syntax, it becomes class name of div element. Or, you can simply name it 'quote'.
Don't write a 'Quote mark' to Quoted text
Text enclosed with
"" becomes quoted text, but you don't have to write quote marks like
<<>> in it. Lot of user agent (like browser) automatically insert quote marks to it. For example, following text has wrong.
However, that this shall not apply to the case that the output format of KARAS converter is not HTML. And, few user agent may not support this feature.