kettext/documentation/kettext_formatting.ktx

98 lines
3.4 KiB
Plaintext

,,,,,,,,,,,,,,,,,,,,,,,,
Formatting in Brief
````````````````````````
kettext's general text formatting is styled after standard online communications. Those familiar with Markdown will note that similarity, and this is for good reason -- it works well.
This section only covers the basic and non-processing features of kettext, and as such, is more of the stylistic definition.
,,,,,,,,,,,,,,,,
Text Formatting
````````````````
Within a [[text block]](#Text_Blocks), sections of text may be surrounded by styling indicators. These lexical indicators use the following patterns:
#*emphasis*
#**bold**
#_underline_
#//italic//
#((note))
#[[link]]
#``code``
,,,,,,,,,,,,,,,,
Text Blocks
````````````````
Text blocks are sections of text that are organized into the follow categories:
* **paragraph**
* **preformatted**
* **code**
* **blockquote**
A text block continues until a completely empty line is found _or_ a differing block type, [[List]](#Lists), or [[Header]](#Headers) is found. [[Text formatting]](#Text_Formatting) is assumed to only work in paragraphs, and only conditionally in blockquotes (see: [[Block Formatters]](#Block_Formatters)).
Paragraph text blocks are very straight-forward:
#This is a paragraph.
#It can span multiple lines.
#
#This is a separate paragraph.
Preformatted text blocks must have every line indented via a tab or 2 spaces:
# This is a preformatted text block.
# It can also span multiple lines.
#
# This is the same preformatted text block due to the above line using indentation.
Code text blocks are intended as per preformatted text, but must have a "#" immediately following indentation:
# # This is a code text block.
# # It also spans multiple lines.
# #
# # This is also the same code text block due to the above indentation and "#" sign.
Blockquote text blocks are signified by having every line begin with ">".
# > Blockquotes can also span
# > multiple lines!
# >
# > and can be considered as one quote if empty lines are indented properly.
,,,,,,,,,,,,,,,,
Lists
````````````````
Lists are organized outlines of items. Lists are indicated by a tab or 2 spaces followed by any of the following:
#*
#~
#-
#+
#3 characters followed by a "."
List depth is controlled by the level of indentation provided:
# * Item 1
# * Sub-item 1
# * Item 2
,,,,,,,,,,,,,,,,
Headers
````````````````
Headers come in two styles. The first is the single-line header, indicated by a non-space character repeating at least 2 times:
# ==== Header
Single-line headers may have an optional close indicator, providing it exactly matches the opening indicator:
# ==== Header ====
The level of character repitition provides the level of depth, with larger repititions indicating a higher precedence as a header. This behavior can be reversed, as indicated in [[Header Formatting]](#Header_Formatters).
Multi-line headers are indicated by three lines: a start line, containing non-space characters repeating at least 2 times, a heading line, and a closing line operating under the same rules as the start line.
# ,,,,,,,,
# Header
# ````````
The start line indicates the precedence of the header, which larger repititions indicating higher precedence. As per single-line headers, this behavior can optionally be reversed.
Start and close lines do not have to have the same characters, nor do they have to have the same length.