# BBClash Spec V1.1.0
This document aims to create a standard specification for basic Penclash-flavoured BBCode.
# Goals
Penclash-flavoured BBCode aims to be simple to use, easy to understand, and quick to write, while still providing users with enough options to be able to achieve most desired formatting needs.
Penclash-flavoured BBCode also aims to be as semantic as possible, giving end applications freedom to style content as needed.
# Basic Syntax
## Tags
Penclash-flavoured BBCode utilizes three types of tags: simple tags (no argument), parameterized tags (one argument), and void tags (no closing tag). These are written as follows:
Simple tag: `[tag][/tag]`
Parameterized tag: `[tag=argument][/tag]`
Void tag: `[tag]`
## Paragraphs
Paragraphs are defined by either **two line breaks** or **a line break and an indent**. A single line break will remain as a single line break, but will be kept in the same paragraph as the text that precedes it. Three line breaks will create a **scene break**.
This is done to allow greater control over the formatting of output by the end application.
# Tag Reference
---
Template:
## Tag Name
Tag description.
#### Tag:
BBCode example. Use {} to indicate user input, e.g. (text contents}.
#### Yields:
HTML example. Use {} to indicate user input, e.g. (text contents}.
---
## Center
Center-aligns text.
#### Tag:
[center]{text content}[/center]
#### Yields:
{text content}
## Right
Right-aligns text.
#### Tag:
[Right]{text content}[/right]
#### Yields:
{text content}
## Bold and Strong
Emboldens text. The [strong] tag can be nested.
#### Tag:
[bold]{text content}[/bold]
[strong]{text content}[/strong]
#### Yields:
{text content}{text content}
## Italic and Emphasis
Emphasizes text. The [em] tag can be nested.
#### Tag:
[i]{text content}[/i]
[em]{text content}[/em]
#### Yields:
{text content}{text content}
## Underline
Underlines text.
#### Tag:
[u]{text content}[/u]
#### Yields:
{text contents}
## Smallcaps
Sets text to a smallcaps font variant.
#### Tag:
[smcaps]{text content}[/smcaps]
#### Yields:
{text contents}
## Strikethrough
Strikes text through.
#### Tag:
[s]{text content}[/s]
#### Yields:
{text contents}
## Monospace
Sets text to a monospace font variant.
#### Tag:
[mono]{text content}[/mono]
#### Yields:
{text contents}
## Subscript
Subscripts text.
#### Tag:
[sub]{text content}[/sub]
#### Yields:
{text contents}
## Superscript
Superscripts text.
#### Tag:
[sup]{text content}[/sup]
#### Yields:
{text contents}
## Spoiler
Spoilers text.
#### Tag:
[spoiler]{text content}[/spoiler]
#### Yields:
{text contents}
## Color/Colour
Sets the font colour of text. Accepts hex colour codes prefixed with a '#' and valid web colours. Both spellings (colour/color) are acceptable.
#### Tag:
[color=#{hex code}]{text content}[/color]
[colour={web colour name}]{text content}[/colour]
#### Yields:
span style="color:#{hex code};">{text contents}
span style="color:{web colour name};">{text contents}
## URL
Creates a hyperlink. Can be named or unnamed, depending on whether or not the url is given as an argument.
#### Tag:
[url]{web address}[/url]
[url={web address}]{text content}[/url]
#### Yields:
{web address}{text content}
## Email
Creates an email hyperlink.
#### Tag:
[email]{email address}[/email]
#### Yields:
{text contents}
## Size
Sets text size. Takes either an em or a point value. Values less than 0.5em or above 2.0em will be set to .5 and 2, respectively.
#### Tag:
[size={size value}]{text content}[/size]
#### Yields:
{text contents}
## Header
Creates a header. Header tags range from 1 to 6.
#### Tag:
[h1]{text content}[/h1]
[h2]{text content}[/h2]
[h6]{text content}[/h6]
#### Yields:
[tr]
[td]{table content 1}[/td]
[td]{table content 2}[/td]
[/tr]
## Math and Mathblock
Math and Mathblock designate TeX-syntax mathematical formulae to be rendered by the application. Math is for inline code; Mathblock is a block element. Math and Mathblock ignore formatting and BBCode tags.
#### Tag:
[math]{TeX code}[/math]
[mathblock]{TeX code}[/mathblock]
#### Yields:
{TeX code}
{TeXCode}
## Embed
Embed embeds content from other sources. This should be handled by the end application.
#### Tag:
[embed]{content address}[/embed]
#### Yields:
## Pre-Line
Preserves linebreaks as-written.
#### Tag:
{text content}\n\n{more text content}
#### Yields:
{text content}\n\n{more text content}
## Indent
Indents passages of text. Can take an optional argument for the level of indentation, up to four levels deep.
#### Tag:
[indent]{text content}[/indent]
[indent=4]{text content}[/indent]
#### Yields:
{text content}
{text content}
## Horizontal Rule
Horizontal Rule is a void tag that inserts a horizontal rule.
#### Tag:
[hr]
#### Yields: