diff --git a/doc/type/alignment.txt b/doc/type/alignment.txt
index 52f68003..64e9a9da 100644
--- a/doc/type/alignment.txt
+++ b/doc/type/alignment.txt
@@ -19,7 +19,7 @@ The value is a combination of one or more flags, separated by spaces.
| @justify@ Move characters apart or together to exactly fill the width of the box.
| @justify-words@ Move words apart or together to exactly fill the width of the box.
| @justify-overflow@ If the text becomes to long, move characters closer together.
-| @stretch Stretch text, so it always fills the width of the box.
+| @stretch@ Stretch text, so it always fills the width of the box.
For images; stretch them, but preserve the aspect ratio.
| @stretch-overflow@ Stretch (compress) the text when it becomes too long.
diff --git a/doc/type/card.txt b/doc/type/card.txt
new file mode 100644
index 00000000..c68b2649
--- /dev/null
+++ b/doc/type/card.txt
@@ -0,0 +1,37 @@
+Data type: card
+
+--Overview--
+
+A '''card''' in a [[type:set]].
+
+--Properties--
+! Property Type Default Description
+| @stylesheet@ Name of a [[type:stylesheet]] ''none'' Use a different stylesheet for this card than the [[type:set]]'s default.
+| @has styling@ [[type:boolean]] false This card has styling data different from the set's default.
+| @styling data@ [[type:indexmap]] of [[type:value]]s false Styling data, based on the [[type:stylesheet]]'s @style fields@.
+| @notes@ [[type:tagged string]] @""@ Notes for this card.
+| @extra data@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s
+ Data for the 'extra card fields' of the stylesheet.
+ This is first indexed by stylesheet name, then by field name.
+| ''remaining keys'' [[type:indexmap]] of [[type:value]]s The remaining keys contain the data for the game's @card fields@.
+ So for example @card.some_field@ corresponds to the value of the card field @some field@.
+
+--Examples--
+
+With the following game:
+>card field:
+> type: text
+> name: title
+>card field:
+> type: color
+> name: card color
+
+A card could look like:
+>card:
+> stylesheet: new
+> has styling: false
+> notes: This card is not finished yet!
+> styling data:
+> extra large cards: true
+> title: My Card
+> card color: rgb(0,128,255)
diff --git a/doc/type/control_point.txt b/doc/type/control_point.txt
new file mode 100644
index 00000000..4a81bf52
--- /dev/null
+++ b/doc/type/control_point.txt
@@ -0,0 +1,24 @@
+Data type: symbol control point
+
+--Overview--
+
+A single [[http://en.wikipedia.org/wiki/Bezier_curve|Bézier curve]] control point in a [[type:symbol part|symbol shape]].
+
+A control point is a point on the polygon.
+It also optionally has two 'handles' corresponding to the boxes attached with dotted lines in the editor.
+
+The control points of a shape are circular, the point after the last point in the list is the first point.
+
+--Properties--
+! Property Type Default Description
+| @position@ [[type:vector2d]] Position of the control point.
+| @lock@ @free@, @direction@ or @size@ @"free"@
+ Is this point 'locked', i.e. is the relation between the two handles fixed?
+ If @lock@ is @"direction"@ then the two handles must lie on a line.
+ If @lock@ is @"direction"@ then the two handles must lie exactly oppisite each other on the same distance from the point.
+| @line after@ @line@ or @curve@ @"line"@ Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve?
+| @handle before@ [[type:vector2d]] Position of the handle for the segment between this point and the previous one, relative to the point's @position@.
Only when that point's @line after == "curve"@.
+| @handle after@ [[type:vector2d]] Position of the handle for the segment between this point and the next one, relative to the point's @position@.
Only when @line after == "curve"@.
+
+--Example--
+Look at a symbol file made with the program.
diff --git a/doc/type/export_template.txt b/doc/type/export_template.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/font.txt b/doc/type/font.txt
new file mode 100644
index 00000000..d1d49a43
--- /dev/null
+++ b/doc/type/font.txt
@@ -0,0 +1,27 @@
+Data type: font
+
+--Overview--
+
+A reference to a normal [[type:font]] for drawing text.
+
+--Properties--
+! Property Type Default Description
+| @name@ [[type:scriptable]] [[type:string]] ''required'' Name of the font as it appears in most text programs.
+| @italic name@ [[type:scriptable]] [[type:string]] Optionally, a different font to use for italic text instead of the normal italic version of the font.
+| @size@ [[type:scriptable]] [[type:double]] ''required'' Size of the font in points on a 96 DPI display.
+| @scale down to@ [[type:double]] ∞ Minimum size in points to scale the size down to.
+| @weight@ [[type:scriptable]] font weight @"normal"@ Weight of the font, one of @"normal"@ or @"bold"@. This can be changed locally by [[type:tagged string|tags]].
+| @style@ [[type:scriptable]] font style @"normal"@ Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]].
+| @underline@ [[type:scriptable]] [[type:boolean]] @false@ Should the font be underlined?
+| @color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ What color should text be drawn in?
+| @shadow color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ Color for a shadow below the text.
+| @shadow displacement x@ [[type:double]] @0@ Relative position of the shadow in pixels. A shadow is only drawn if the displacement is nonzero.
+| @shadow displacement y@ [[type:double]] @0@ ^^^
+| @separator color@ [[type:color]] @rgb(128,128,128)@ Color for @""@ tags inserted by the [[fun:combined_editor]] function.
+
+--Example--
+>font:
+> name: Times new Roman
+> size: 17
+> weight: bold
+> color: rgb(0,0,0)
diff --git a/doc/type/game.txt b/doc/type/game.txt
index 4d4545dd..8baa6799 100644
--- a/doc/type/game.txt
+++ b/doc/type/game.txt
@@ -12,7 +12,7 @@ Games provide the ''description'', i.e. what kinds of things are on a card.
--Package format--
A game is described in a [[file:package]] with the .mse-game file extension.
-Such a package contains a data file called game that has the following properties.
+Such a package contains a [[file:format|data file]] called game that has the following properties.
--Properties--
! Property Type Default Description
diff --git a/doc/type/graph-type-bar.png b/doc/type/graph-type-bar.png
new file mode 100644
index 00000000..649425d9
Binary files /dev/null and b/doc/type/graph-type-bar.png differ
diff --git a/doc/type/graph-type-pie.png b/doc/type/graph-type-pie.png
new file mode 100644
index 00000000..ef92bcc0
Binary files /dev/null and b/doc/type/graph-type-pie.png differ
diff --git a/doc/type/graph-type-scatter-pie.png b/doc/type/graph-type-scatter-pie.png
new file mode 100644
index 00000000..27beadad
Binary files /dev/null and b/doc/type/graph-type-scatter-pie.png differ
diff --git a/doc/type/graph-type-scatter.png b/doc/type/graph-type-scatter.png
new file mode 100644
index 00000000..141c47f1
Binary files /dev/null and b/doc/type/graph-type-scatter.png differ
diff --git a/doc/type/graph-type-stack.png b/doc/type/graph-type-stack.png
new file mode 100644
index 00000000..8aec8541
Binary files /dev/null and b/doc/type/graph-type-stack.png differ
diff --git a/doc/type/graph_type.txt b/doc/type/graph_type.txt
new file mode 100644
index 00000000..4994a5f0
--- /dev/null
+++ b/doc/type/graph_type.txt
@@ -0,0 +1,21 @@
+Enumeration: graph type
+
+Types of graphs for the statistics panel.
+
+--Possible values--
+The value is one of the following options:
+! Value Dimensions Sketch Description
+| @bar@ 1
+ One bar for each value on the axis, the height represent the number of cards with that value.
+| @pie@ 1
+ A pie graph, the size of the slice represents the numer of cards with a particular value.
+| @stack@ 2
+ One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other.
+| @scatter@ 2
+ Scatter plot, the size of the circles corresponds to the number of cards with those two values.
+| @scatter pie@ 3
+ Scatter plot, the size of the circles corresponds to the number of cards with those two values.
+ Each circle is a small pie graph for the third axis.
+
+--Examples--
+> type: bar
diff --git a/doc/type/include.txt b/doc/type/include.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/index.txt b/doc/type/index.txt
index 88e8584d..b09ca989 100644
--- a/doc/type/index.txt
+++ b/doc/type/index.txt
@@ -6,7 +6,7 @@ There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s des
--File types--
These are the 'major' data types that are written directly to [[file:package]]s.
| [[type:Game]] What information is on each card?
-| [[type:Stylesheets]] What do cards look like?
+| [[type:Stylesheet]] What do cards look like?
| [[type:Set]] Sets of cards.
| [[type:Symbol font]] Fonts consisting of symbols, for instance mana symbols.
| [[type:Export template]] How to export sets to HTML files?
@@ -51,6 +51,7 @@ These contain several properties, similair to the file types. But they are part
| [[type:alignment]] Alignment of text and images
| [[type:direction]] Direction of text
| [[type:combine]] How to combine images with the background
+| [[type:symbol combine]] How to combine [[type:symbol part|symbol shapes]] with the background
--Primitive types--
| [[type:string]] Text, @"abc"@
diff --git a/doc/type/insert_symbol_menu.txt b/doc/type/insert_symbol_menu.txt
new file mode 100644
index 00000000..bca4bebf
--- /dev/null
+++ b/doc/type/insert_symbol_menu.txt
@@ -0,0 +1,44 @@
+Data type: "insert symbol" menu.
+
+--Overview--
+
+A description of the "Insert symbol" menu for a specific [[type:symbol font]].
+
+The menu consists of a number of entries, either items, separators or submenus.
+
+--Properties--
+! Property Type Default Description
+| @type@ One of: @"code"@ or @"submenu"@ What type of menu item is this?
+ * @code@, inserts a symbol with the given code.
+ * @custom@, pops up a dialog where the user can choose a code to insert.
+ * @line@, a separating line.
+ * @submenu@, a submenu.
+| @name@ [[type:string]] ''required'' Name of this menu item, corresponding to the code to insert.
+| @items@ [[type:list]] of [[type:insert symbol menu|submenu items]] Items in the submenu, when items are present the @type@ is set to @"submenu"@.
+
+In the user interface the items are shown as @"menu item {name}"@, the [[type:locale]] should be used to give a beter label.
+
+For custom items the dialog will be titled @"title {name}"@ and have message text @"message {name}"@, again this should be changed in the locale.
+
+--Examples--
+A menu for magic mana symbols (simplified). Containing all types of items.
+>insert symbol menu:
+> item:
+> type: custom
+> name: colorless
+> item:
+> type: line
+> item: W
+> item: U
+> item: B
+> item: R
+> item: G
+> item:
+> type: line
+> item:
+> name: hybrid
+> item: W/U
+> item: U/B
+> item: B/R
+> item: R/G
+> item: G/W
diff --git a/doc/type/installer.txt b/doc/type/installer.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/locale.txt b/doc/type/locale.txt
new file mode 100644
index 00000000..c82f0802
--- /dev/null
+++ b/doc/type/locale.txt
@@ -0,0 +1,52 @@
+File type: Locale
+
+--Overview--
+
+A locale gives a translation of the user interface of the program.
+
+--Package format--
+
+A locale is described in a [[file:package]] with the .mse-locale file extension.
+Such a package contains a data file called locale that has the following properties.
+There are usually no other files in the package.
+
+--Properties--
+! Property Type Default Description
+| '''Common to all packages''' <<< <<< <<<
+| @mse version@ [[type:version]] ''required'' Version of MSE this locale is made for.
+| @short name@ [[type:string]] file name A short name of this locale, for the options dialog.
+| @full name@ [[type:string]] file name A longer name of this locale.
+| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this locale, currently not used.
+| @version@ [[type:version]] @0.0.0@ Version number of this package.
+
+| '''Specific to locales''' <<< <<< <<<
+| @menu@ [[type:map]] of [[type:string]]s Translations of menu items.
+ Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
+ Keys to use with Alt+Something (displayed underlined) can be specified &
+ For exmaple
+ >>>new set: &New... Ctrl+N
+| @help@ [[type:map]] of [[type:string]]s Translations of help texts for the status bar.
+| @tool@ [[type:map]] of [[type:string]]s Translations of toolbar item texts.
+| @tooltip@ [[type:map]] of [[type:string]]s Translations of tooltips for toolbar items.
+| @label@ [[type:map]] of [[type:string]]s Labels of controls in the GUI.
+| @button@ [[type:map]] of [[type:string]]s Labels of buttons in the GUI.
+| @title@ [[type:map]] of [[type:string]]s Titles of windows.
+| @action@ [[type:map]] of [[type:string]]s Names of actions for undo/redo, things like "typing" and "add card".
+| @error@ [[type:map]] of [[type:string]]s Error messages.
+| @type@ [[type:map]] of [[type:string]]s Types of objects for error messages.
+| @game@ [[type:map]] of [[type:map]] of [[type:string]]s
+ Translations for specific [[type:game]]s.
+ Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
+ Extra keys not present in the English locale can be added here.
+| @stylesheet@ [[type:map]] of [[type:map]] of [[type:string]]s
+ Translations for specific [[type:stylesheet]]s.
+| @symbol font@ [[type:map]] of [[type:map]] of [[type:string]]s
+ Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu.
+
+Some of the items can contain placeholders for other values, for example:
+> undo: &Undo%s Ctrl+Z
+The @%s@ is replaced by the name of the action to undo.
+This @%s@ should be used in exactly those entries that also contain it in the English locale.
+
+--Examples--
+Look at the @"en.mse-locale"@ file in the standard MSE distribution for an example.
diff --git a/doc/type/script.txt b/doc/type/script.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/scriptable.txt b/doc/type/scriptable.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/set.txt b/doc/type/set.txt
index 4e661e74..ffa2f762 100644
--- a/doc/type/set.txt
+++ b/doc/type/set.txt
@@ -21,7 +21,8 @@ such a package contains a data file called set.
| '''Specific to sets''' <<< <<< <<<
| game Name of a [[type:game]] ''required'' The game this set is made for.
-| stylesheet Name of a [[type:stylesheet]] ''required'' The default style for drawing cards in this set.
+| stylesheet Name of a [[type:stylesheet]] ''required'' The default style for drawing cards in this set.
+ This is without the game name or extension, so @"new"@ refers to the package @"gamename-new.mse-style"@.
| set info [[type:indexmap]] of [[type:value]]s The data for the [[prop:game:set fields]] defined in the game.
| styling [[type:map]] of [[type:indexmap]]s of [[type:value]]s
Data for the 'extra fields' of the stylesheet.
diff --git a/doc/type/settings.txt b/doc/type/settings.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/statistics_category.txt b/doc/type/statistics_category.txt
index e69de29b..8bad7984 100644
--- a/doc/type/statistics_category.txt
+++ b/doc/type/statistics_category.txt
@@ -0,0 +1,27 @@
+Data type: statistics category
+
+--Overview--
+
+A category in the statistics panel.
+This is a single choice in the list on the left of that panel.
+
+Statistics dimensions are automatically generated for all [[type:statistics dimension]]s a [[type:game]].
+
+--Properties--
+! Property Type Default Description
+| @name@ [[type:string]] ''required'' Name of this category.
+| @description@ [[type:string]] @""@ A description of the category, currently not used.
+| @position hint@ [[type:string]] @0@ Hint for ordering category, lower numbers are at the top of the list.
+| @icon@ [[type:filename]] Filename of an icon for this category, the image should be 21x21 pixels.
+| @type@ [[type:graph type]] @"bar"@ Type of graph to use.
+| @dimensions@ [[type:list]] of names of [[type:statistics dimension]]s
+ Dimensions for the axes of the graph.
+ The number of dimensions must be the same as that needed for the [[type:graph type]].
+
+--Example--
+A graph with power on the horizontal axis, toughness on the vertical axis:
+>statistics category:
+> name: power/toughness
+> type: scatter
+> dimension: power
+> dimension: toughness
diff --git a/doc/type/statistics_dimension.txt b/doc/type/statistics_dimension.txt
index e69de29b..d6334649 100644
--- a/doc/type/statistics_dimension.txt
+++ b/doc/type/statistics_dimension.txt
@@ -0,0 +1,46 @@
+Data type: statistics dimension
+
+--Overview--
+
+A dimension or axis for the statistics panel.
+
+One or more dimensions are combined in a graph, these combinations are called [[type:statistics category]]s.
+
+Statistics dimensions are automatically generated for all card fields in a [[type:game]] that don't set @show statistics@ to @false@.
+
+Categories are also automatically generated from dimensions.
+
+--Properties--
+! Property Type Default Description
+| @name@ [[type:string]] ''required'' Name of this dimension, used as an axis label and a label for automatically generated categories.
+| @description@ [[type:string]] @""@ A description of the dimension, currently not used.
+| @position hint@ [[type:string]] @0@ Hint for ordering dimensions.
+| @icon@ [[type:filename]] Filename of an icon for this dimension.
+| @script@ [[type:script]] ''required'' Script that generates a value for each card in the set.
+| @numeric@ [[type:boolean]] @false@ Is the value always a number?
+| @show empty@ [[type:boolean]] @false@ Should cards with the value @""@ be included?
+| @split list@ [[type:boolean]] @false@ Indicates the value is a list of the form @"item1, item2"@. The card is put under both items.
+| @colors@ [[type:map]] of [[type:color]]s Colors to use for specific values
+| @groups@ [[type:list]] of [[type:string]]s Values to always show, and the order to show them in.
+
+--Example--
+Automatically generated statistics dimensions look like this:
+>statistics dimension:
+> name: power
+> script: card.power
+
+Specify a specific order and color of values, otherwise they are ordered alphabeticaly and groups with no cards are not shown:
+>statistics dimension:
+> name: color
+> script: card.color
+> group: white
+> group: blue
+> group: black
+> group: red
+> group: green
+> colors:
+> white: rgb(255,255,255)
+> blue: rgb(0,0,255)
+> black: rgb(0,0,0)
+> red: rgb(255,0,0)
+> green: rgb(0,255,0)
diff --git a/doc/type/symbol.txt b/doc/type/symbol.txt
new file mode 100644
index 00000000..34db1acd
--- /dev/null
+++ b/doc/type/symbol.txt
@@ -0,0 +1,20 @@
+File type: Symbol
+
+--Overview--
+
+A symbol file contains a symbol created with the symbol editor.
+
+Symbols are not stored in packages, the data file is directly written to a @".mse-symbol"@ file.
+
+--Coordinates--
+
+Various parts of a symbol use [[type:vector2d|coordinates]].
+These are pairs of numbers in the range @0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right.
+
+--Properties--
+! Property Type Default Description
+| @mse version@ [[type:version]] ''required'' Version of MSE this symbol is made with.
+| @parts@ [[type:list]] of [[type:symbol part]]s The parts in this symbol.
+
+--Example--
+Look at a file made with the program.
diff --git a/doc/type/symbol_combine.txt b/doc/type/symbol_combine.txt
new file mode 100644
index 00000000..8aa2b972
--- /dev/null
+++ b/doc/type/symbol_combine.txt
@@ -0,0 +1,19 @@
+Enumeration: symbol combine
+
+Specifies how symbol shapes are combined with those below it
+
+--Script syntax--
+In scripts, symbol combine modes are passed around as a string.
+
+--Possible values--
+The value is one of the following options:
+! Value Description
+| @overlap@ Place this shape on top of those below it.
Further combine options only apply to this shape.
+| @merge@ Marge this shape with the one below it, they are considered a single shape for further combining.
+| @subtract@ Subtract this shape from the one below it.
+| @intersection@ Take the intersection of this shape and the one below it, only areas that are in both shapes remain.
+| @difference@ Take the difference of this shape and the one below it, only areas that are in exactly one of the shapes remain.
+| @border@ Use this shape as additional border for the shape below it.
+
+--Examples--
+> combine: overlap
diff --git a/doc/type/symbol_filter.txt b/doc/type/symbol_filter.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/symbol_font.txt b/doc/type/symbol_font.txt
new file mode 100644
index 00000000..cf44d6d0
--- /dev/null
+++ b/doc/type/symbol_font.txt
@@ -0,0 +1,58 @@
+File type: Symbol font
+
+--Overview--
+
+A symbol font is a font for drawing with images.
+Each [[type:symbol font symbol|symbol-font-symbol]] in the font is an image.
+
+A symbol font is referenced in [[type:stylesheet]]s using a [[type:symbol font reference]].
+
+--Splitting--
+
+A piece of text drawn with the symbol font is split into separate symbols.
+The list of symbols in the font is scanned from top to bottom to find matches.
+
+If the text is for instance "W/GR" and "W/G" should be rendered as a single symbol, then it should appear before the symbol "W".
+Otherwise the "W" is seen as a symbol and the program continues with rendering "/GR".
+
+--Font size--
+
+A symbol font is drawn using a specific point size, similair to normal fonts.
+Usually the images that make up the font are given in a very high resolution, for example 200x200.
+This resulution could correspond to a point size of for instance 150pt.
+
+When the symbol is drawn at for instance 12pt the image well then be scalled down to @200/150*12 == 16@ pixels.
+
+--Package format--
+
+A symbol font is described in a [[file:package]] with the .mse-symbol-font file extension.
+Such a package contains a [[file:format|data file]] called symbol-font that has the following properties.
+
+--Properties--
+! Property Type Default Description
+| '''Common to all packages''' <<< <<< <<<
+| @mse version@ [[type:version]] ''required'' Version of MSE this symbol font is made for.
+| @short name@ [[type:string]] file name A short name of this symbol font, currently not used by the program.
+| @full name@ [[type:string]] file name A longer name of this symbol font, currently not used by the program.
+| @icon@ [[type:filename]] ''none'' Filename of an icon, currently not used by the program.
+| @version@ [[type:version]] @0.0.0@ Version number of this package.
+| @depends on@ [[type:list]] of [[type:dependency]]s
+ Packages this package depends on.
+
+| '''Specific to symbol fonts''' <<< <<< <<<
+| @image font size@ [[type:double]] @12@ To what point size do the images correspond?
+| @horizontal space@ [[type:double]] @0@ Horizontal spacing between symbols, in pixels.
+| @vertical space@ [[type:double]] @0@ Vertical spacing between symbols, in pixels.
+| @symbols@ [[type:list]] of [[type:symbol font symbol]]s Symbols that make up this font.
+| @text font@ [[type:font]] Font to use for drawing text on symbols, only used if there is a default symbol.
+| @scale text@ [[type:boolean]] @false@ Should text be scaled down to fit in a symbol?
+| @merge numbers@ [[type:boolean]] @false@ Should a numeric value of multiple digits be rendered as a single symbol?
+| @text margin left@ [[type:double]] @0@ Margin on the left of the text in pixels.
+| @text margin right@ [[type:double]] @0@ Margin on the right of the text in pixels.
+| @text margin top@ [[type:double]] @0@ Margin on the top of the text in pixels.
+| @text margin bottom@ [[type:double]] @0@ Margin on the bottom of the text in pixels.
+| @text alignment@ [[type:alignment]] @"middle center"@ How should text be aligned on symbols?
+| @insert symbol menu@ [[type:insert symbol menu|"insert symbol" menu]] ''none'' A description of the menu to insert a symbol into the text.
+
+--Examples--
+See for instance the @"magic-mana-small.mse-symbol-font"@ package in the MSE distribution.
diff --git a/doc/type/symbol_font_reference.txt b/doc/type/symbol_font_reference.txt
new file mode 100644
index 00000000..f6615d5a
--- /dev/null
+++ b/doc/type/symbol_font_reference.txt
@@ -0,0 +1,26 @@
+Data type: symbol font reference
+
+--Overview--
+
+A reference to a [[type:symbol font]].
+
+In [[type:stylesheet]]s the symbol fonts are not included inline, instead they are referenced by their package name.
+
+--Properties--
+! Property Type Default Description
+| @name@ [[type:scriptable]] Name of a [[type:symbol font]]
+ ''required'' Name of the symbol font package to use (without the extension).
+| @size@ [[type:double]] 12 Size in points to render the symbols with.
+| @scale down to@ [[type:double]] 1 Minimum size in points to scale the size down to.
+| @alignment@ [[type:alignment]] @"middle center"@ Alignment of symbols in a line of text.
+
+--Example--
+>symbol font:
+> name: magic-mana-small
+> size: 10
+> alignment: top left
+The name can be scripted:
+>symbol font:
+> name: { if set.use_larga_mana_symbols then "magic-mana-large" else "magic-mana-small" }
+> size: 10
+> alignment: top left
diff --git a/doc/type/symbol_font_symbol.txt b/doc/type/symbol_font_symbol.txt
new file mode 100644
index 00000000..2a48f39f
--- /dev/null
+++ b/doc/type/symbol_font_symbol.txt
@@ -0,0 +1,30 @@
+Data type: symbol font symbol
+
+--Overview--
+
+A single symbol in a [[type:symbol font]].
+
+--Properties--
+! Property Type Default Description
+| @image font size@ [[type:double]] value from symbol font To what point size does the images correspond?
+| @code@ [[type:string]] ''required'' Text this symbol matches.
+ A single symbol can omit the code, this then becomes the ''default symbol'', on which text is drawn.
+| @image@ [[type:scriptable]] [[type:image]] ''required'' Image of this symbol.
+| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this symbol actually used?
+ This can be scripted to optionally disable certain symbols.
+ If multiple symbols with the same code are given disabling the first switches to the second one.
+
+--Examples--
+A default symbol:
+>symbol:
+> image: blank.png
+
+Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]].
+It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used.
+>symbol:
+> code: T
+> image: mana_t_old.png
+> enabled: { use_old_tap_symbol() }
+>symbol:
+> code: T
+> image: mana_t.png
diff --git a/doc/type/symbol_part.txt b/doc/type/symbol_part.txt
new file mode 100644
index 00000000..9351b420
--- /dev/null
+++ b/doc/type/symbol_part.txt
@@ -0,0 +1,29 @@
+Data type: symbol part
+
+--Overview--
+
+A part of a symbol, corresponds to an item you see in the list on the left of the editor.
+
+--Properties--
+! Property Type Default Description
+| @type@ One of: @"shape"@ What type of symbol part is this?
+ * @shape@
+ * @group@
+ * @symmetry@
+| @name@ [[type:string]] @""@ The name of this part, for the part list.
+
+The rest of the properties depends on the @type@.
+
+! Type Property Type Default Description
+| @"shape"@ @combine@ [[type:symbol combine]] @"overlap"@ How to combine the shape with those below it?
+| ^^^ @points@ [[type:list]] of [[type:control point]]s The points that form this shape
+| @"symmetry"@ @kind@ @rotation@ or @reflection@ @"rotation"@ What kind of symmetry is this?
+| ^^^ @copies@ [[type:int]] 2 How many times is the original copied (including the original itself)?
+| ^^^ @center@ [[type:vector2d]] Coordinates of the center of symmetry.
+| ^^^ @handle@ [[type:vector2d]] Direction perpendicular to the 'mirror' (this is a direction, so relative to the center).
+| @"group"@ and @"symmetry"@
+ @parts@ [[type:list]] of [[type:symbol part]]s Parts in this group.
+
+
+--Example--
+Look at a symbol file made with the program.
diff --git a/doc/type/symbol_variation.txt b/doc/type/symbol_variation.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/doc/type/tagged_string.txt b/doc/type/tagged_string.txt
index c51282ef..a82565c8 100644
--- a/doc/type/tagged_string.txt
+++ b/doc/type/tagged_string.txt
@@ -1,37 +1,47 @@
-==Data type: string with tags==
+Data type: string with tags
--Syntax--
-&1;
+Strings in [[type:value|text values]] can contain markup tags.
+These tags affect the presentation and sometimes the behaviour of the text.
+
+A tag is something like @"some text"@, similair to HTML.
+Tags are closed by the same tag with a @/@ before it.
+
+To represent the character @"<"@ in a tagged string use @"\<"@ in script code.
+This is written as the character with code 1 in files.
--Basic markup--
-! Tag Description
-| The text inside the tag is bold.
-| The text inside the tag is italic.
-| The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box.
-| Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line.
-| Line breaks inside this tag use the [[prop:style:soft line height]].
-| An atomic piece of text. The cursor can never be inside it; it is selected as a whole.
- The program automatically inserts
-| The text inside the text is rendered in a monospace font. This is used for syntax highlighting script code.
-| The text inside the text is highlighted as a keyword in source code.
-| The text inside the text is highlighted as a string in source code.
+! Tag Description
+| @""@ The text inside the tag is bold.
+| @""@ The text inside the tag is italic.
+| @""@ The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box.
+| @""@ Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line.
+| @""@ Line breaks inside this tag use the [[prop:style:soft line height]].
+| @""@ An atomic piece of text. The cursor can never be inside it; it is selected as a whole.
+ The program automatically inserts
+| @""@ The text inside the text is rendered in a monospace font. This is used for syntax highlighting script code.
+| @""@ The text inside the text is highlighted as a keyword in source code.
+| @""@ The text inside the text is highlighted as a string in source code.
--Other tags--
-! Tag Description
-| Indicates that the text inside it is a keyword. This tag is automatically inserted by
- The [[fun:expand_keywords] function. There are four versions, indicating whether or not reminder text is shown
- | Reminder text hidden, by default
- | Reminder text shown, by default
- | Remder hidden manually
- | Remder shown manually
-| A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
- Inserting this tag manually will confuse that function!
- This tag can never be selected, and its contents can not be edited.
-| Like <sep>, only hidden. This is inserted by [[fun:combined_editor]]
- ...
-| any other tag Other tags are ignored.
+! Tag Description
+| @""@ Indicates that the text inside it is a keyword. This tag is automatically inserted by
+ The [[fun:expand_keywords]] function.
+ There are four versions, indicating whether or not reminder text is shown:
+ * @""@, Reminder text hidden, by default
+ * @""@, Reminder text shown, by default
+ * @""@, Reminder hidden manually
+ * @""@, Reminder shown manually
+| @""@ A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
+ Inserting this tag manually will confuse that function!
+ This tag can never be selected, and its contents can not be edited.
+| @""@ Like @""@, only hidden. This is inserted by [[fun:combined_editor]]
+| any other tag Other tags are ignored.
--Related functions--
The following script functions deal with tags:
-| [[fun:remove_tag]]
+| [[fun:tag_contents|tag_contents / tag_contents_rule]]
+ Change the contents of a specific tag.
+| [[fun:remove_tag|remove_tag / tag_remove_rule]]
+ Remove a tag, keep the contents.
diff --git a/doc/type/vector2d.txt b/doc/type/vector2d.txt
new file mode 100644
index 00000000..a4f38183
--- /dev/null
+++ b/doc/type/vector2d.txt
@@ -0,0 +1,15 @@
+Data type: two dimensional vector
+
+A coordinate or direction in a symbol.
+This is a pair of [[type:double]]s.
+
+The coordinates are usually in the range @0@ to @1@.
+@(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right.
+
+--File syntax--
+> (x-coordinate,y-coordinate)
+For example
+> (0.5,0.5)
+
+--Script syntax--
+Vectors can not be represented in script syntax.