[latexila/symbols] Symbols: refactoring and use GResource



commit d0c83fef594321fa234f37492169e7dd37a67fd5
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Thu May 3 02:40:34 2012 +0200

    Symbols: refactoring and use GResource
    
    The most used symbols are disabled. This will be the next part.
    
    The "make install" is a bit shorter thanks to GResource ;) The 614
    symbols are now inside the executable.
    
    There is now the SymbolsView class, which contain only the UI to display
    the symbols in the side panel.
    
    There is also a private class NormalSymbols (child of ListStore) to get
    the model of a "normal" store (i.e. not the most used symbols store).
    The MostUsedSymbols class will be adapted in the same way.
    
    All the data about the symbols are in XML files (loaded with GResource).

 CMakeLists.txt                                     |   21 +
 data/CMakeLists.txt                                |    7 -
 data/images/arrows/CMakeLists.txt                  |    2 -
 data/images/arrows/data.xml                        |   71 ++
 data/images/arrows/symbols-arrows.gresource.xml    |   75 ++
 data/images/delimiters/CMakeLists.txt              |    2 -
 data/images/delimiters/data.xml                    |   39 +
 .../delimiters/symbols-delimiters.gresource.xml    |   43 +
 data/images/greek/CMakeLists.txt                   |    2 -
 data/images/greek/data.xml                         |   53 +
 data/images/greek/symbols-greek.gresource.xml      |   57 +
 data/images/misc-math/CMakeLists.txt               |    2 -
 data/images/misc-math/data.xml                     |  105 ++
 .../misc-math/symbols-misc-math.gresource.xml      |  109 ++
 data/images/misc-text/CMakeLists.txt               |    2 -
 data/images/misc-text/data.xml                     |  137 +++
 .../misc-text/symbols-misc-text.gresource.xml      |  141 +++
 data/images/operators/CMakeLists.txt               |    2 -
 data/images/operators/data.xml                     |   82 ++
 .../operators/symbols-operators.gresource.xml      |   86 ++
 data/images/relations/CMakeLists.txt               |    2 -
 data/images/relations/data.xml                     |  141 +++
 .../relations/symbols-relations.gresource.xml      |  145 +++
 src/app_settings.vala                              |    2 +
 src/latexila.vala                                  |    2 +-
 src/main_window.vala                               |   23 +-
 src/symbols.vala                                   | 1101 ++++----------------
 src/symbols_view.vala                              |  186 ++++
 src/utils.vala                                     |    6 +
 29 files changed, 1691 insertions(+), 955 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c783865..f5ad0e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,27 @@ gresource (
 
 set (generated_resources ${generated_resource})
 
+set (symbols_categories
+	"arrows"
+	"delimiters"
+	"greek"
+	"misc-math"
+	"misc-text"
+	"operators"
+	"relations"
+)
+
+foreach (symbols_cat ${symbols_categories})
+	gresource (
+		"${latexila_SOURCE_DIR}/data/images/${symbols_cat}" # resource dir
+		"symbols-${symbols_cat}.gresource.xml" # resource file
+		"${latexila_BINARY_DIR}/src" # output dir
+		generated_resource
+	)
+
+	list (APPEND generated_resources ${generated_resource})
+endforeach ()
+
 # Build the source code
 include_directories (src/C src/gedit ${latexila_BINARY_DIR}/src)
 
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 912b824..27aa866 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -12,10 +12,3 @@ install (FILES "latexila.desktop" DESTINATION share/applications)
 add_subdirectory ("build_tools")
 add_subdirectory ("templates")
 add_subdirectory ("images/app")
-add_subdirectory ("images/arrows")
-add_subdirectory ("images/delimiters")
-add_subdirectory ("images/greek")
-add_subdirectory ("images/misc-math")
-add_subdirectory ("images/misc-text")
-add_subdirectory ("images/operators")
-add_subdirectory ("images/relations")
diff --git a/data/images/arrows/data.xml b/data/images/arrows/data.xml
new file mode 100644
index 0000000..4f9d528
--- /dev/null
+++ b/data/images/arrows/data.xml
@@ -0,0 +1,71 @@
+<symbols>
+  <symbol file="01.png" command="\leftarrow" />
+  <symbol file="02.png" command="\leftrightarrow" />
+  <symbol file="03.png" command="\rightarrow" />
+  <symbol file="04.png" command="\mapsto" />
+  <symbol file="05.png" command="\longleftarrow" />
+  <symbol file="06.png" command="\longleftrightarrow" />
+  <symbol file="07.png" command="\longrightarrow" />
+  <symbol file="08.png" command="\longmapsto" />
+  <symbol file="09.png" command="\downarrow" />
+  <symbol file="10.png" command="\updownarrow" />
+  <symbol file="11.png" command="\uparrow" />
+  <symbol file="12.png" command="\nwarrow" />
+  <symbol file="13.png" command="\searrow" />
+  <symbol file="14.png" command="\nearrow" />
+  <symbol file="15.png" command="\swarrow" />
+  <symbol file="16.png" command="\textdownarrow" package="textcomp" />
+  <symbol file="17.png" command="\textuparrow" package="textcomp" />
+  <symbol file="18.png" command="\textleftarrow" package="textcomp" />
+  <symbol file="19.png" command="\textrightarrow" package="textcomp" />
+  <symbol file="20.png" command="\nleftarrow" package="amssymb" />
+  <symbol file="21.png" command="\nleftrightarrow" package="amssymb" />
+  <symbol file="22.png" command="\nrightarrow" package="amssymb" />
+  <symbol file="23.png" command="\hookleftarrow" />
+  <symbol file="24.png" command="\hookrightarrow" />
+  <symbol file="25.png" command="\twoheadleftarrow" package="amssymb" />
+  <symbol file="26.png" command="\twoheadrightarrow" package="amssymb" />
+  <symbol file="27.png" command="\leftarrowtail" package="amssymb" />
+  <symbol file="28.png" command="\rightarrowtail" package="amssymb" />
+  <symbol file="29.png" command="\Leftarrow" />
+  <symbol file="30.png" command="\Leftrightarrow" />
+  <symbol file="31.png" command="\Rightarrow" />
+  <symbol file="32.png" command="\Longleftarrow" />
+  <symbol file="33.png" command="\Longleftrightarrow" />
+  <symbol file="34.png" command="\Longrightarrow" />
+  <symbol file="35.png" command="\Updownarrow" />
+  <symbol file="36.png" command="\Uparrow" />
+  <symbol file="37.png" command="\Downarrow" />
+  <symbol file="38.png" command="\nLeftarrow" package="amssymb" />
+  <symbol file="39.png" command="\nLeftrightarrow" package="amssymb" />
+  <symbol file="40.png" command="\nRightarrow" package="amssymb" />
+  <symbol file="41.png" command="\leftleftarrows" package="amssymb" />
+  <symbol file="42.png" command="\leftrightarrows" package="amssymb" />
+  <symbol file="43.png" command="\rightleftarrows" package="amssymb" />
+  <symbol file="44.png" command="\rightrightarrows" package="amssymb" />
+  <symbol file="45.png" command="\downdownarrows" package="amssymb" />
+  <symbol file="46.png" command="\upuparrows" package="amssymb" />
+  <symbol file="47.png" command="\circlearrowleft" package="amssymb" />
+  <symbol file="48.png" command="\circlearrowright" package="amssymb" />
+  <symbol file="49.png" command="\curvearrowleft" package="amssymb" />
+  <symbol file="50.png" command="\curvearrowright" package="amssymb" />
+  <symbol file="51.png" command="\Lsh" package="amssymb" />
+  <symbol file="52.png" command="\Rsh" package="amssymb" />
+  <symbol file="53.png" command="\looparrowleft" package="amssymb" />
+  <symbol file="54.png" command="\looparrowright" package="amssymb" />
+  <symbol file="55.png" command="\dashleftarrow" package="amssymb" />
+  <symbol file="56.png" command="\dashrightarrow" package="amssymb" />
+  <symbol file="57.png" command="\leftrightsquigarrow" package="amssymb" />
+  <symbol file="58.png" command="\rightsquigarrow" package="amssymb" />
+  <symbol file="59.png" command="\Lleftarrow" package="amssymb" />
+  <symbol file="60.png" command="\leftharpoondown" />
+  <symbol file="61.png" command="\rightharpoondown" />
+  <symbol file="62.png" command="\leftharpoonup" />
+  <symbol file="63.png" command="\rightharpoonup" />
+  <symbol file="64.png" command="\rightleftharpoons" />
+  <symbol file="65.png" command="\leftrightharpoons" package="amssymb" />
+  <symbol file="66.png" command="\downharpoonleft" package="amssymb" />
+  <symbol file="67.png" command="\upharpoonleft" package="amssymb" />
+  <symbol file="68.png" command="\downharpoonright" package="amssymb" />
+  <symbol file="69.png" command="\upharpoonright" package="amssymb" />
+</symbols>
diff --git a/data/images/arrows/symbols-arrows.gresource.xml b/data/images/arrows/symbols-arrows.gresource.xml
new file mode 100644
index 0000000..d810221
--- /dev/null
+++ b/data/images/arrows/symbols-arrows.gresource.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/arrows">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">01.png</file>
+    <file preprocess="to-pixdata">02.png</file>
+    <file preprocess="to-pixdata">03.png</file>
+    <file preprocess="to-pixdata">04.png</file>
+    <file preprocess="to-pixdata">05.png</file>
+    <file preprocess="to-pixdata">06.png</file>
+    <file preprocess="to-pixdata">07.png</file>
+    <file preprocess="to-pixdata">08.png</file>
+    <file preprocess="to-pixdata">09.png</file>
+    <file preprocess="to-pixdata">10.png</file>
+    <file preprocess="to-pixdata">11.png</file>
+    <file preprocess="to-pixdata">12.png</file>
+    <file preprocess="to-pixdata">13.png</file>
+    <file preprocess="to-pixdata">14.png</file>
+    <file preprocess="to-pixdata">15.png</file>
+    <file preprocess="to-pixdata">16.png</file>
+    <file preprocess="to-pixdata">17.png</file>
+    <file preprocess="to-pixdata">18.png</file>
+    <file preprocess="to-pixdata">19.png</file>
+    <file preprocess="to-pixdata">20.png</file>
+    <file preprocess="to-pixdata">21.png</file>
+    <file preprocess="to-pixdata">22.png</file>
+    <file preprocess="to-pixdata">23.png</file>
+    <file preprocess="to-pixdata">24.png</file>
+    <file preprocess="to-pixdata">25.png</file>
+    <file preprocess="to-pixdata">26.png</file>
+    <file preprocess="to-pixdata">27.png</file>
+    <file preprocess="to-pixdata">28.png</file>
+    <file preprocess="to-pixdata">29.png</file>
+    <file preprocess="to-pixdata">30.png</file>
+    <file preprocess="to-pixdata">31.png</file>
+    <file preprocess="to-pixdata">32.png</file>
+    <file preprocess="to-pixdata">33.png</file>
+    <file preprocess="to-pixdata">34.png</file>
+    <file preprocess="to-pixdata">35.png</file>
+    <file preprocess="to-pixdata">36.png</file>
+    <file preprocess="to-pixdata">37.png</file>
+    <file preprocess="to-pixdata">38.png</file>
+    <file preprocess="to-pixdata">39.png</file>
+    <file preprocess="to-pixdata">40.png</file>
+    <file preprocess="to-pixdata">41.png</file>
+    <file preprocess="to-pixdata">42.png</file>
+    <file preprocess="to-pixdata">43.png</file>
+    <file preprocess="to-pixdata">44.png</file>
+    <file preprocess="to-pixdata">45.png</file>
+    <file preprocess="to-pixdata">46.png</file>
+    <file preprocess="to-pixdata">47.png</file>
+    <file preprocess="to-pixdata">48.png</file>
+    <file preprocess="to-pixdata">49.png</file>
+    <file preprocess="to-pixdata">50.png</file>
+    <file preprocess="to-pixdata">51.png</file>
+    <file preprocess="to-pixdata">52.png</file>
+    <file preprocess="to-pixdata">53.png</file>
+    <file preprocess="to-pixdata">54.png</file>
+    <file preprocess="to-pixdata">55.png</file>
+    <file preprocess="to-pixdata">56.png</file>
+    <file preprocess="to-pixdata">57.png</file>
+    <file preprocess="to-pixdata">58.png</file>
+    <file preprocess="to-pixdata">59.png</file>
+    <file preprocess="to-pixdata">60.png</file>
+    <file preprocess="to-pixdata">61.png</file>
+    <file preprocess="to-pixdata">62.png</file>
+    <file preprocess="to-pixdata">63.png</file>
+    <file preprocess="to-pixdata">64.png</file>
+    <file preprocess="to-pixdata">65.png</file>
+    <file preprocess="to-pixdata">66.png</file>
+    <file preprocess="to-pixdata">67.png</file>
+    <file preprocess="to-pixdata">68.png</file>
+    <file preprocess="to-pixdata">69.png</file>
+  </gresource>
+</gresources>
diff --git a/data/images/delimiters/data.xml b/data/images/delimiters/data.xml
new file mode 100644
index 0000000..a31494d
--- /dev/null
+++ b/data/images/delimiters/data.xml
@@ -0,0 +1,39 @@
+<symbols>
+  <symbol file="01.png" command="\downarrow" />
+  <symbol file="02.png" command="\Downarrow" />
+  <symbol file="03.png" command="[" />
+  <symbol file="04.png" command="]" />
+  <symbol file="05.png" command="\langle" />
+  <symbol file="06.png" command="\rangle" />
+  <symbol file="07.png" command="|" />
+  <symbol file="08.png" command="\|" />
+  <symbol file="09.png" command="\lceil" />
+  <symbol file="10.png" command="\rceil" />
+  <symbol file="11.png" command="\uparrow" />
+  <symbol file="12.png" command="\Uparrow" />
+  <symbol file="13.png" command="\lfloor" />
+  <symbol file="14.png" command="\rfloor" />
+  <symbol file="15.png" command="\updownarrow" />
+  <symbol file="16.png" command="\Updownarrow" />
+  <symbol file="17.png" command="(" />
+  <symbol file="18.png" command=")" />
+  <symbol file="19.png" command="\{" />
+  <symbol file="20.png" command="\}" />
+  <symbol file="21.png" command="/" />
+  <symbol file="22.png" command="\backslash" />
+  <symbol file="23.png" command="\lmoustache" />
+  <symbol file="24.png" command="\rmoustache" />
+  <symbol file="25.png" command="\lgroup" />
+  <symbol file="26.png" command="\rgroup" />
+  <symbol file="27.png" command="\arrowvert" />
+  <symbol file="28.png" command="\Arrowvert" />
+  <symbol file="29.png" command="\bracevert" />
+  <symbol file="30.png" command="\lvert" package="amsmath" />
+  <symbol file="31.png" command="\rvert" package="amsmath" />
+  <symbol file="32.png" command="\lVert" package="amsmath" />
+  <symbol file="33.png" command="\rVert" package="amsmath" />
+  <symbol file="34.png" command="\ulcorner" package="amssymb" />
+  <symbol file="35.png" command="\urcorner" package="amssymb" />
+  <symbol file="36.png" command="\llcorner" package="amssymb" />
+  <symbol file="37.png" command="\lrcorner" package="amssymb" />
+</symbols>
diff --git a/data/images/delimiters/symbols-delimiters.gresource.xml b/data/images/delimiters/symbols-delimiters.gresource.xml
new file mode 100644
index 0000000..cecc735
--- /dev/null
+++ b/data/images/delimiters/symbols-delimiters.gresource.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/delimiters">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">01.png</file>
+    <file preprocess="to-pixdata">02.png</file>
+    <file preprocess="to-pixdata">03.png</file>
+    <file preprocess="to-pixdata">04.png</file>
+    <file preprocess="to-pixdata">05.png</file>
+    <file preprocess="to-pixdata">06.png</file>
+    <file preprocess="to-pixdata">07.png</file>
+    <file preprocess="to-pixdata">08.png</file>
+    <file preprocess="to-pixdata">09.png</file>
+    <file preprocess="to-pixdata">10.png</file>
+    <file preprocess="to-pixdata">11.png</file>
+    <file preprocess="to-pixdata">12.png</file>
+    <file preprocess="to-pixdata">13.png</file>
+    <file preprocess="to-pixdata">14.png</file>
+    <file preprocess="to-pixdata">15.png</file>
+    <file preprocess="to-pixdata">16.png</file>
+    <file preprocess="to-pixdata">17.png</file>
+    <file preprocess="to-pixdata">18.png</file>
+    <file preprocess="to-pixdata">19.png</file>
+    <file preprocess="to-pixdata">20.png</file>
+    <file preprocess="to-pixdata">21.png</file>
+    <file preprocess="to-pixdata">22.png</file>
+    <file preprocess="to-pixdata">23.png</file>
+    <file preprocess="to-pixdata">24.png</file>
+    <file preprocess="to-pixdata">25.png</file>
+    <file preprocess="to-pixdata">26.png</file>
+    <file preprocess="to-pixdata">27.png</file>
+    <file preprocess="to-pixdata">28.png</file>
+    <file preprocess="to-pixdata">29.png</file>
+    <file preprocess="to-pixdata">30.png</file>
+    <file preprocess="to-pixdata">31.png</file>
+    <file preprocess="to-pixdata">32.png</file>
+    <file preprocess="to-pixdata">33.png</file>
+    <file preprocess="to-pixdata">34.png</file>
+    <file preprocess="to-pixdata">35.png</file>
+    <file preprocess="to-pixdata">36.png</file>
+    <file preprocess="to-pixdata">37.png</file>
+  </gresource>
+</gresources>
diff --git a/data/images/greek/data.xml b/data/images/greek/data.xml
new file mode 100644
index 0000000..0375844
--- /dev/null
+++ b/data/images/greek/data.xml
@@ -0,0 +1,53 @@
+<symbols>
+  <symbol file="01.png" command="\alpha" />
+  <symbol file="02.png" command="\beta" />
+  <symbol file="03.png" command="\gamma" />
+  <symbol file="04.png" command="\delta" />
+  <symbol file="05.png" command="\epsilon" />
+  <symbol file="06.png" command="\varepsilon" />
+  <symbol file="07.png" command="\zeta" />
+  <symbol file="08.png" command="\eta" />
+  <symbol file="09.png" command="\theta" />
+  <symbol file="10.png" command="\vartheta" />
+  <symbol file="11.png" command="\iota" />
+  <symbol file="12.png" command="\kappa" />
+  <symbol file="13.png" command="\lambda" />
+  <symbol file="14.png" command="\mu" />
+  <symbol file="15.png" command="\nu" />
+  <symbol file="16.png" command="\xi" />
+  <symbol file="18.png" command="\pi" />
+  <symbol file="19.png" command="\varpi" />
+  <symbol file="20.png" command="\rho" />
+  <symbol file="21.png" command="\varrho" />
+  <symbol file="22.png" command="\sigma" />
+  <symbol file="23.png" command="\varsigma" />
+  <symbol file="24.png" command="\tau" />
+  <symbol file="25.png" command="\upsilon" />
+  <symbol file="26.png" command="\phi" />
+  <symbol file="27.png" command="\varphi" />
+  <symbol file="28.png" command="\chi" />
+  <symbol file="29.png" command="\psi" />
+  <symbol file="30.png" command="\omega" />
+  <symbol file="33.png" command="\Gamma" />
+  <symbol file="34.png" command="\varGamma" package="amsmath" />
+  <symbol file="35.png" command="\Delta" />
+  <symbol file="36.png" command="\varDelta" package="amsmath" />
+  <symbol file="40.png" command="\Theta" />
+  <symbol file="41.png" command="\varTheta" package="amsmath" />
+  <symbol file="44.png" command="\Lambda" />
+  <symbol file="45.png" command="\varLambda" package="amsmath" />
+  <symbol file="48.png" command="\Xi" />
+  <symbol file="49.png" command="\varXi" package="amsmath" />
+  <symbol file="51.png" command="\Pi" />
+  <symbol file="52.png" command="\varPi" package="amsmath" />
+  <symbol file="54.png" command="\Sigma" />
+  <symbol file="55.png" command="\varSigma" package="amsmath" />
+  <symbol file="57.png" command="\Upsilon" />
+  <symbol file="58.png" command="\varUpsilon" package="amsmath" />
+  <symbol file="59.png" command="\Phi" />
+  <symbol file="60.png" command="\varPhi" package="amsmath" />
+  <symbol file="62.png" command="\Psi" />
+  <symbol file="63.png" command="\varPsi" package="amsmath" />
+  <symbol file="64.png" command="\Omega" />
+  <symbol file="65.png" command="\varOmega" package="amsmath" />
+</symbols>
diff --git a/data/images/greek/symbols-greek.gresource.xml b/data/images/greek/symbols-greek.gresource.xml
new file mode 100644
index 0000000..14aac44
--- /dev/null
+++ b/data/images/greek/symbols-greek.gresource.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/greek">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">01.png</file>
+    <file preprocess="to-pixdata">02.png</file>
+    <file preprocess="to-pixdata">03.png</file>
+    <file preprocess="to-pixdata">04.png</file>
+    <file preprocess="to-pixdata">05.png</file>
+    <file preprocess="to-pixdata">06.png</file>
+    <file preprocess="to-pixdata">07.png</file>
+    <file preprocess="to-pixdata">08.png</file>
+    <file preprocess="to-pixdata">09.png</file>
+    <file preprocess="to-pixdata">10.png</file>
+    <file preprocess="to-pixdata">11.png</file>
+    <file preprocess="to-pixdata">12.png</file>
+    <file preprocess="to-pixdata">13.png</file>
+    <file preprocess="to-pixdata">14.png</file>
+    <file preprocess="to-pixdata">15.png</file>
+    <file preprocess="to-pixdata">16.png</file>
+    <file preprocess="to-pixdata">18.png</file>
+    <file preprocess="to-pixdata">19.png</file>
+    <file preprocess="to-pixdata">20.png</file>
+    <file preprocess="to-pixdata">21.png</file>
+    <file preprocess="to-pixdata">22.png</file>
+    <file preprocess="to-pixdata">23.png</file>
+    <file preprocess="to-pixdata">24.png</file>
+    <file preprocess="to-pixdata">25.png</file>
+    <file preprocess="to-pixdata">26.png</file>
+    <file preprocess="to-pixdata">27.png</file>
+    <file preprocess="to-pixdata">28.png</file>
+    <file preprocess="to-pixdata">29.png</file>
+    <file preprocess="to-pixdata">30.png</file>
+    <file preprocess="to-pixdata">33.png</file>
+    <file preprocess="to-pixdata">34.png</file>
+    <file preprocess="to-pixdata">35.png</file>
+    <file preprocess="to-pixdata">36.png</file>
+    <file preprocess="to-pixdata">40.png</file>
+    <file preprocess="to-pixdata">41.png</file>
+    <file preprocess="to-pixdata">44.png</file>
+    <file preprocess="to-pixdata">45.png</file>
+    <file preprocess="to-pixdata">48.png</file>
+    <file preprocess="to-pixdata">49.png</file>
+    <file preprocess="to-pixdata">51.png</file>
+    <file preprocess="to-pixdata">52.png</file>
+    <file preprocess="to-pixdata">54.png</file>
+    <file preprocess="to-pixdata">55.png</file>
+    <file preprocess="to-pixdata">57.png</file>
+    <file preprocess="to-pixdata">58.png</file>
+    <file preprocess="to-pixdata">59.png</file>
+    <file preprocess="to-pixdata">60.png</file>
+    <file preprocess="to-pixdata">62.png</file>
+    <file preprocess="to-pixdata">63.png</file>
+    <file preprocess="to-pixdata">64.png</file>
+    <file preprocess="to-pixdata">65.png</file>
+  </gresource>
+</gresources>
diff --git a/data/images/misc-math/data.xml b/data/images/misc-math/data.xml
new file mode 100644
index 0000000..c869b67
--- /dev/null
+++ b/data/images/misc-math/data.xml
@@ -0,0 +1,105 @@
+<symbols>
+  <symbol file="01.png" command="\cdotp" />
+  <symbol file="02.png" command="\colon" />
+  <symbol file="03.png" command="\ldotp" />
+  <symbol file="04.png" command="\vdots" />
+  <symbol file="05.png" command="\cdots" />
+  <symbol file="06.png" command="\ddots" />
+  <symbol file="07.png" command="\ldots" />
+  <symbol file="08.png" command="\neg" />
+  <symbol file="09.png" command="\infty" />
+  <symbol file="10.png" command="\prime" />
+  <symbol file="11.png" command="\backprime" package="amssymb" />
+  <symbol file="12.png" command="\backslash" />
+  <symbol file="13.png" command="\diagdown" package="amssymb" />
+  <symbol file="14.png" command="\diagup" package="amssymb" />
+  <symbol file="15.png" command="\surd" />
+  <symbol file="16.png" command="\emptyset" />
+  <symbol file="17.png" command="\varnothing" package="amssymb" />
+  <symbol file="18.png" command="\sharp" />
+  <symbol file="19.png" command="\flat" />
+  <symbol file="20.png" command="\natural" />
+  <symbol file="21.png" command="\angle" />
+  <symbol file="22.png" command="\sphericalangle" package="amssymb" />
+  <symbol file="23.png" command="\measuredangle" package="amssymb" />
+  <symbol file="24.png" command="\Box" package="amssymb" />
+  <symbol file="25.png" command="\square" package="amssymb" />
+  <symbol file="26.png" command="\triangle" />
+  <symbol file="27.png" command="\vartriangle" package="amssymb" />
+  <symbol file="28.png" command="\triangledown" package="amssymb" />
+  <symbol file="29.png" command="\Diamond" package="amssymb" />
+  <symbol file="30.png" command="\diamondsuit" />
+  <symbol file="31.png" command="\lozenge" package="amssymb" />
+  <symbol file="32.png" command="\heartsuit" />
+  <symbol file="33.png" command="\blacksquare" package="amssymb" />
+  <symbol file="34.png" command="\blacktriangle" package="amssymb" />
+  <symbol file="35.png" command="\blacktriangledown" package="amssymb" />
+  <symbol file="36.png" command="\blacklozenge" package="amssymb" />
+  <symbol file="37.png" command="\bigstar" package="amssymb" />
+  <symbol file="38.png" command="\spadesuit" />
+  <symbol file="39.png" command="\clubsuit" />
+  <symbol file="40.png" command="\forall" />
+  <symbol file="41.png" command="\exists" />
+  <symbol file="42.png" command="\nexists" package="amssymb" />
+  <symbol file="43.png" command="\Finv" package="amssymb" />
+  <symbol file="44.png" command="\Game" package="amssymb" />
+  <symbol file="45.png" command="\ni" />
+  <symbol file="46.png" command="\in" />
+  <symbol file="47.png" command="\notin" />
+  <symbol file="48.png" command="\complement" package="amssymb" />
+  <symbol file="set-N.png" command="\mathbb{N}" package="amsfonts" />
+  <symbol file="set-Z.png" command="\mathbb{Z}" package="amsfonts" />
+  <symbol file="set-Q.png" command="\mathbb{Q}" package="amsfonts" />
+  <symbol file="set-I.png" command="\mathbb{I}" package="amsfonts" />
+  <symbol file="set-R.png" command="\mathbb{R}" package="amsfonts" />
+  <symbol file="set-C.png" command="\mathbb{C}" package="amsfonts" />
+  <symbol file="49.png" command="\Im" />
+  <symbol file="50.png" command="\Re" />
+  <symbol file="51.png" command="\aleph" />
+  <symbol file="52.png" command="\wp" />
+  <symbol file="53.png" command="\hslash" package="amssymb" />
+  <symbol file="54.png" command="\hbar" />
+  <symbol file="55.png" command="\imath" />
+  <symbol file="56.png" command="\jmath" />
+  <symbol file="57.png" command="\Bbbk" package="amssymb" />
+  <symbol file="58.png" command="\ell" />
+  <symbol file="59.png" command="\circledR" package="amssymb" />
+  <symbol file="60.png" command="\circledS" package="amssymb" />
+  <symbol file="61.png" command="\bot" />
+  <symbol file="62.png" command="\top" />
+  <symbol file="63.png" command="\partial" />
+  <symbol file="64.png" command="\nabla" />
+  <symbol file="65.png" command="\eth" package="amssymb" />
+  <symbol file="66.png" command="\mho" package="amssymb" />
+  <symbol file="67.png" command="\acute{}" />
+  <symbol file="68.png" command="\grave{}" />
+  <symbol file="69.png" command="\check{}" />
+  <symbol file="70.png" command="\hat{}" />
+  <symbol file="71.png" command="\tilde{}" />
+  <symbol file="72.png" command="\bar{}" />
+  <symbol file="73.png" command="\vec{}" />
+  <symbol file="74.png" command="\breve{}" />
+  <symbol file="75.png" command="\dot{}" />
+  <symbol file="76.png" command="\ddot{}" />
+  <symbol file="77.png" command="\dddot{}" package="amsmath" />
+  <symbol file="78.png" command="\ddddot{}" package="amsmath" />
+  <symbol file="79.png" command="\mathring{}" />
+  <symbol file="80.png" command="\widetilde{}" />
+  <symbol file="81.png" command="\widehat{}" />
+  <symbol file="82.png" command="\overleftarrow{}" />
+  <symbol file="83.png" command="\overrightarrow{}" />
+  <symbol file="84.png" command="\overline{}" />
+  <symbol file="85.png" command="\underline{}" />
+  <symbol file="86.png" command="\overbrace{}" />
+  <symbol file="87.png" command="\underbrace{}" />
+  <symbol file="88.png" command="\overleftrightarrow{}" package="amsmath" />
+  <symbol file="89.png" command="\underleftrightarrow{}" package="amsmath" />
+  <symbol file="90.png" command="\underleftarrow{}" package="amsmath" />
+  <symbol file="91.png" command="\underrightarrow{}" package="amsmath" />
+  <symbol file="92.png" command="\xleftarrow{}" package="amsmath" />
+  <symbol file="93.png" command="\xrightarrow{}" package="amsmath" />
+  <symbol file="94.png" command="\stackrel{}{}" />
+  <symbol file="95.png" command="\sqrt{}" />
+  <symbol file="96.png" command="f'" />
+  <symbol file="97.png" command="f''" />
+</symbols>
diff --git a/data/images/misc-math/symbols-misc-math.gresource.xml b/data/images/misc-math/symbols-misc-math.gresource.xml
new file mode 100644
index 0000000..aeff485
--- /dev/null
+++ b/data/images/misc-math/symbols-misc-math.gresource.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/misc-math">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">01.png</file>
+    <file preprocess="to-pixdata">02.png</file>
+    <file preprocess="to-pixdata">03.png</file>
+    <file preprocess="to-pixdata">04.png</file>
+    <file preprocess="to-pixdata">05.png</file>
+    <file preprocess="to-pixdata">06.png</file>
+    <file preprocess="to-pixdata">07.png</file>
+    <file preprocess="to-pixdata">08.png</file>
+    <file preprocess="to-pixdata">09.png</file>
+    <file preprocess="to-pixdata">10.png</file>
+    <file preprocess="to-pixdata">11.png</file>
+    <file preprocess="to-pixdata">12.png</file>
+    <file preprocess="to-pixdata">13.png</file>
+    <file preprocess="to-pixdata">14.png</file>
+    <file preprocess="to-pixdata">15.png</file>
+    <file preprocess="to-pixdata">16.png</file>
+    <file preprocess="to-pixdata">17.png</file>
+    <file preprocess="to-pixdata">18.png</file>
+    <file preprocess="to-pixdata">19.png</file>
+    <file preprocess="to-pixdata">20.png</file>
+    <file preprocess="to-pixdata">21.png</file>
+    <file preprocess="to-pixdata">22.png</file>
+    <file preprocess="to-pixdata">23.png</file>
+    <file preprocess="to-pixdata">24.png</file>
+    <file preprocess="to-pixdata">25.png</file>
+    <file preprocess="to-pixdata">26.png</file>
+    <file preprocess="to-pixdata">27.png</file>
+    <file preprocess="to-pixdata">28.png</file>
+    <file preprocess="to-pixdata">29.png</file>
+    <file preprocess="to-pixdata">30.png</file>
+    <file preprocess="to-pixdata">31.png</file>
+    <file preprocess="to-pixdata">32.png</file>
+    <file preprocess="to-pixdata">33.png</file>
+    <file preprocess="to-pixdata">34.png</file>
+    <file preprocess="to-pixdata">35.png</file>
+    <file preprocess="to-pixdata">36.png</file>
+    <file preprocess="to-pixdata">37.png</file>
+    <file preprocess="to-pixdata">38.png</file>
+    <file preprocess="to-pixdata">39.png</file>
+    <file preprocess="to-pixdata">40.png</file>
+    <file preprocess="to-pixdata">41.png</file>
+    <file preprocess="to-pixdata">42.png</file>
+    <file preprocess="to-pixdata">43.png</file>
+    <file preprocess="to-pixdata">44.png</file>
+    <file preprocess="to-pixdata">45.png</file>
+    <file preprocess="to-pixdata">46.png</file>
+    <file preprocess="to-pixdata">47.png</file>
+    <file preprocess="to-pixdata">48.png</file>
+    <file preprocess="to-pixdata">set-N.png</file>
+    <file preprocess="to-pixdata">set-Z.png</file>
+    <file preprocess="to-pixdata">set-Q.png</file>
+    <file preprocess="to-pixdata">set-I.png</file>
+    <file preprocess="to-pixdata">set-R.png</file>
+    <file preprocess="to-pixdata">set-C.png</file>
+    <file preprocess="to-pixdata">49.png</file>
+    <file preprocess="to-pixdata">50.png</file>
+    <file preprocess="to-pixdata">51.png</file>
+    <file preprocess="to-pixdata">52.png</file>
+    <file preprocess="to-pixdata">53.png</file>
+    <file preprocess="to-pixdata">54.png</file>
+    <file preprocess="to-pixdata">55.png</file>
+    <file preprocess="to-pixdata">56.png</file>
+    <file preprocess="to-pixdata">57.png</file>
+    <file preprocess="to-pixdata">58.png</file>
+    <file preprocess="to-pixdata">59.png</file>
+    <file preprocess="to-pixdata">60.png</file>
+    <file preprocess="to-pixdata">61.png</file>
+    <file preprocess="to-pixdata">62.png</file>
+    <file preprocess="to-pixdata">63.png</file>
+    <file preprocess="to-pixdata">64.png</file>
+    <file preprocess="to-pixdata">65.png</file>
+    <file preprocess="to-pixdata">66.png</file>
+    <file preprocess="to-pixdata">67.png</file>
+    <file preprocess="to-pixdata">68.png</file>
+    <file preprocess="to-pixdata">69.png</file>
+    <file preprocess="to-pixdata">70.png</file>
+    <file preprocess="to-pixdata">71.png</file>
+    <file preprocess="to-pixdata">72.png</file>
+    <file preprocess="to-pixdata">73.png</file>
+    <file preprocess="to-pixdata">74.png</file>
+    <file preprocess="to-pixdata">75.png</file>
+    <file preprocess="to-pixdata">76.png</file>
+    <file preprocess="to-pixdata">77.png</file>
+    <file preprocess="to-pixdata">78.png</file>
+    <file preprocess="to-pixdata">79.png</file>
+    <file preprocess="to-pixdata">80.png</file>
+    <file preprocess="to-pixdata">81.png</file>
+    <file preprocess="to-pixdata">82.png</file>
+    <file preprocess="to-pixdata">83.png</file>
+    <file preprocess="to-pixdata">84.png</file>
+    <file preprocess="to-pixdata">85.png</file>
+    <file preprocess="to-pixdata">86.png</file>
+    <file preprocess="to-pixdata">87.png</file>
+    <file preprocess="to-pixdata">88.png</file>
+    <file preprocess="to-pixdata">89.png</file>
+    <file preprocess="to-pixdata">90.png</file>
+    <file preprocess="to-pixdata">91.png</file>
+    <file preprocess="to-pixdata">92.png</file>
+    <file preprocess="to-pixdata">93.png</file>
+    <file preprocess="to-pixdata">94.png</file>
+    <file preprocess="to-pixdata">95.png</file>
+    <file preprocess="to-pixdata">96.png</file>
+    <file preprocess="to-pixdata">97.png</file>
+  </gresource>
+</gresources>
diff --git a/data/images/misc-text/data.xml b/data/images/misc-text/data.xml
new file mode 100644
index 0000000..dd9d111
--- /dev/null
+++ b/data/images/misc-text/data.xml
@@ -0,0 +1,137 @@
+<symbols>
+  <symbol file="001.png" command="\dots" />
+  <symbol file="002.png" command="\texttildelow" package="textcomp" />
+  <symbol file="003.png" command="\textasciicircum" />
+  <symbol file="004.png" command="\textasciimacron" package="textcomp" />
+  <symbol file="005.png" command="\textasciiacute" package="textcomp" />
+  <symbol file="006.png" command="\textasciidieresis" package="textcomp" />
+  <symbol file="007.png" command="\textasciitilde" />
+  <symbol file="008.png" command="\textasciigrave" package="textcomp" />
+  <symbol file="009.png" command="\textasciibreve" package="textcomp" />
+  <symbol file="010.png" command="\textasciicaron" package="textcomp" />
+  <symbol file="011.png" command="\textacutedbl" package="textcomp" />
+  <symbol file="012.png" command="\textgravedbl" package="textcomp" />
+  <symbol file="013.png" command="\textquotedblleft" />
+  <symbol file="014.png" command="\textquotedblright" />
+  <symbol file="015.png" command="\textquoteleft" />
+  <symbol file="016.png" command="\textquoteright" />
+  <symbol file="017.png" command="\textquotestraightbase" package="textcomp" />
+  <symbol file="018.png" command="\textquotestraightdblbase" package="textcomp" />
+  <symbol file="019.png" command="\textquotesingle" package="textcomp" />
+  <symbol file="020.png" command="\textdblhyphen" package="textcomp" />
+  <symbol file="021.png" command="\textdblhyphenchar" package="textcomp" />
+  <symbol file="022.png" command="\textasteriskcentered" />
+  <symbol file="023.png" command="\textperiodcentered" />
+  <symbol file="024.png" command="\textquestiondown" />
+  <symbol file="025.png" command="\textinterrobang" package="textcomp" />
+  <symbol file="026.png" command="\textinterrobangdown" package="textcomp" />
+  <symbol file="027.png" command="\textexclamdown" />
+  <symbol file="028.png" command="\texttwelveudash" package="textcomp" />
+  <symbol file="029.png" command="\textemdash" />
+  <symbol file="030.png" command="\textendash" />
+  <symbol file="031.png" command="\textthreequartersemdash" package="textcomp" />
+  <symbol file="032.png" command="\textvisiblespace" />
+  <symbol file="033.png" command="\_" />
+  <symbol file="034.png" command="\textcurrency" package="textcomp" />
+  <symbol file="035.png" command="\textbaht" package="textcomp" />
+  <symbol file="036.png" command="\textguarani" package="textcomp" />
+  <symbol file="037.png" command="\textwon" package="textcomp" />
+  <symbol file="038.png" command="\textcent" package="textcomp" />
+  <symbol file="039.png" command="\textcentoldstyle" package="textcomp" />
+  <symbol file="040.png" command="\textdollar" />
+  <symbol file="041.png" command="\textdollaroldstyle" package="textcomp" />
+  <symbol file="042.png" command="\textlira" package="textcomp" />
+  <symbol file="043.png" command="\textyen" package="textcomp" />
+  <symbol file="044.png" command="\textdong" package="textcomp" />
+  <symbol file="045.png" command="\textnaira" package="textcomp" />
+  <symbol file="046.png" command="\textcolonmonetary" package="textcomp" />
+  <symbol file="047.png" command="\textpeso" package="textcomp" />
+  <symbol file="048.png" command="\pounds" />
+  <symbol file="049.png" command="\textflorin" package="textcomp" />
+  <symbol file="050.png" command="\texteuro" package="textcomp" />
+  <symbol file="051.png" command="\geneuro" package="eurosym" />
+  <symbol file="052.png" command="\geneuronarrow" package="eurosym" />
+  <symbol file="053.png" command="\geneurowide" package="eurosym" />
+  <symbol file="054.png" command="\officialeuro" package="eurosym" />
+  <symbol file="055.png" command="\textcircled{a}" />
+  <symbol file="056.png" command="\textcopyright" />
+  <symbol file="057.png" command="\textcopyleft" package="textcomp" />
+  <symbol file="058.png" command="\textregistered" />
+  <symbol file="059.png" command="\texttrademark" />
+  <symbol file="060.png" command="\textservicemark" package="textcomp" />
+  <symbol file="061.png" command="\oldstylenums{0}" />
+  <symbol file="062.png" command="\oldstylenums{1}" />
+  <symbol file="063.png" command="\oldstylenums{2}" />
+  <symbol file="064.png" command="\oldstylenums{3}" />
+  <symbol file="065.png" command="\oldstylenums{4}" />
+  <symbol file="066.png" command="\oldstylenums{5}" />
+  <symbol file="067.png" command="\oldstylenums{6}" />
+  <symbol file="068.png" command="\oldstylenums{7}" />
+  <symbol file="069.png" command="\oldstylenums{8}" />
+  <symbol file="070.png" command="\oldstylenums{9}" />
+  <symbol file="071.png" command="\textonehalf" package="textcomp" />
+  <symbol file="072.png" command="\textonequarter" package="textcomp" />
+  <symbol file="073.png" command="\textthreequarters" package="textcomp" />
+  <symbol file="074.png" command="\textonesuperior" package="textcomp" />
+  <symbol file="075.png" command="\texttwosuperior" package="textcomp" />
+  <symbol file="076.png" command="\textthreesuperior" package="textcomp" />
+  <symbol file="077.png" command="\textnumero" package="textcomp" />
+  <symbol file="078.png" command="\textpertenthousand" package="textcomp" />
+  <symbol file="079.png" command="\textperthousand" package="textcomp" />
+  <symbol file="080.png" command="\textdiscount" package="textcomp" />
+  <symbol file="081.png" command="\textblank" package="textcomp" />
+  <symbol file="082.png" command="\textrecipe" package="textcomp" />
+  <symbol file="083.png" command="\textestimated" package="textcomp" />
+  <symbol file="084.png" command="\textreferencemark" package="textcomp" />
+  <symbol file="085.png" command="\textmusicalnote" package="textcomp" />
+  <symbol file="086.png" command="\dag" />
+  <symbol file="087.png" command="\ddag" />
+  <symbol file="088.png" command="\S" />
+  <symbol file="089.png" command="\$" />
+  <symbol file="090.png" command="\textpilcrow" package="textcomp" />
+  <symbol file="091.png" command="\Cutleft" package="marvosym" />
+  <symbol file="092.png" command="\Cutright" package="marvosym" />
+  <symbol file="093.png" command="\Leftscissors" package="marvosym" />
+  <symbol file="094.png" command="\Cutline" package="marvosym" />
+  <symbol file="095.png" command="\Kutline" package="marvosym" />
+  <symbol file="096.png" command="\Rightscissors" package="marvosym" />
+  <symbol file="097.png" command="\CheckedBox" package="wasysym" />
+  <symbol file="098.png" command="\Square" package="wasysym" />
+  <symbol file="099.png" command="\XBox" package="wasysym" />
+  <symbol file="100.png" command="\textbigcircle" package="textcomp" />
+  <symbol file="101.png" command="\textopenbullet" package="textcomp" />
+  <symbol file="102.png" command="\textbullet" />
+  <symbol file="103.png" command="\checkmark" package="amssymb" />
+  <symbol file="104.png" command="\maltese" package="amssymb" />
+  <symbol file="105.png" command="\textordmasculine" package="textcomp" />
+  <symbol file="106.png" command="\textordfeminine" package="textcomp" />
+  <symbol file="107.png" command="\textborn" package="textcomp" />
+  <symbol file="108.png" command="\textdivorced" package="textcomp" />
+  <symbol file="109.png" command="\textdied" package="textcomp" />
+  <symbol file="110.png" command="\textmarried" package="textcomp" />
+  <symbol file="111.png" command="\textleaf" package="textcomp" />
+  <symbol file="112.png" command="\textcelsius" package="textcomp" />
+  <symbol file="113.png" command="\textdegree" package="textcomp" />
+  <symbol file="114.png" command="\textmho" package="textcomp" />
+  <symbol file="115.png" command="\textohm" package="textcomp" />
+  <symbol file="116.png" command="\textbackslash" />
+  <symbol file="117.png" command="\textbar" />
+  <symbol file="118.png" command="\textbrokenbar" package="textcomp" />
+  <symbol file="119.png" command="\textbardbl" />
+  <symbol file="120.png" command="\textfractionsolidus" package="textcomp" />
+  <symbol file="121.png" command="\textlangle" package="textcomp" />
+  <symbol file="122.png" command="\textlnot" package="textcomp" />
+  <symbol file="123.png" command="\textminus" package="textcomp" />
+  <symbol file="124.png" command="\textrangle" package="textcomp" />
+  <symbol file="125.png" command="\textlbrackdbl" package="textcomp" />
+  <symbol file="126.png" command="\textrbrackdbl" package="textcomp" />
+  <symbol file="127.png" command="\textmu" package="textcomp" />
+  <symbol file="128.png" command="\textpm" package="textcomp" />
+  <symbol file="129.png" command="\textlquill" package="textcomp" />
+  <symbol file="130.png" command="\textrquill" package="textcomp" />
+  <symbol file="131.png" command="\textless" />
+  <symbol file="132.png" command="\textgreater" />
+  <symbol file="133.png" command="\textsurd" package="textcomp" />
+  <symbol file="134.png" command="\texttimes" package="textcomp" />
+  <symbol file="135.png" command="\textdiv" package="textcomp" />
+</symbols>
diff --git a/data/images/misc-text/symbols-misc-text.gresource.xml b/data/images/misc-text/symbols-misc-text.gresource.xml
new file mode 100644
index 0000000..aa23fcf
--- /dev/null
+++ b/data/images/misc-text/symbols-misc-text.gresource.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/misc-text">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">001.png</file>
+    <file preprocess="to-pixdata">002.png</file>
+    <file preprocess="to-pixdata">003.png</file>
+    <file preprocess="to-pixdata">004.png</file>
+    <file preprocess="to-pixdata">005.png</file>
+    <file preprocess="to-pixdata">006.png</file>
+    <file preprocess="to-pixdata">007.png</file>
+    <file preprocess="to-pixdata">008.png</file>
+    <file preprocess="to-pixdata">009.png</file>
+    <file preprocess="to-pixdata">010.png</file>
+    <file preprocess="to-pixdata">011.png</file>
+    <file preprocess="to-pixdata">012.png</file>
+    <file preprocess="to-pixdata">013.png</file>
+    <file preprocess="to-pixdata">014.png</file>
+    <file preprocess="to-pixdata">015.png</file>
+    <file preprocess="to-pixdata">016.png</file>
+    <file preprocess="to-pixdata">017.png</file>
+    <file preprocess="to-pixdata">018.png</file>
+    <file preprocess="to-pixdata">019.png</file>
+    <file preprocess="to-pixdata">020.png</file>
+    <file preprocess="to-pixdata">021.png</file>
+    <file preprocess="to-pixdata">022.png</file>
+    <file preprocess="to-pixdata">023.png</file>
+    <file preprocess="to-pixdata">024.png</file>
+    <file preprocess="to-pixdata">025.png</file>
+    <file preprocess="to-pixdata">026.png</file>
+    <file preprocess="to-pixdata">027.png</file>
+    <file preprocess="to-pixdata">028.png</file>
+    <file preprocess="to-pixdata">029.png</file>
+    <file preprocess="to-pixdata">030.png</file>
+    <file preprocess="to-pixdata">031.png</file>
+    <file preprocess="to-pixdata">032.png</file>
+    <file preprocess="to-pixdata">033.png</file>
+    <file preprocess="to-pixdata">034.png</file>
+    <file preprocess="to-pixdata">035.png</file>
+    <file preprocess="to-pixdata">036.png</file>
+    <file preprocess="to-pixdata">037.png</file>
+    <file preprocess="to-pixdata">038.png</file>
+    <file preprocess="to-pixdata">039.png</file>
+    <file preprocess="to-pixdata">040.png</file>
+    <file preprocess="to-pixdata">041.png</file>
+    <file preprocess="to-pixdata">042.png</file>
+    <file preprocess="to-pixdata">043.png</file>
+    <file preprocess="to-pixdata">044.png</file>
+    <file preprocess="to-pixdata">045.png</file>
+    <file preprocess="to-pixdata">046.png</file>
+    <file preprocess="to-pixdata">047.png</file>
+    <file preprocess="to-pixdata">048.png</file>
+    <file preprocess="to-pixdata">049.png</file>
+    <file preprocess="to-pixdata">050.png</file>
+    <file preprocess="to-pixdata">051.png</file>
+    <file preprocess="to-pixdata">052.png</file>
+    <file preprocess="to-pixdata">053.png</file>
+    <file preprocess="to-pixdata">054.png</file>
+    <file preprocess="to-pixdata">055.png</file>
+    <file preprocess="to-pixdata">056.png</file>
+    <file preprocess="to-pixdata">057.png</file>
+    <file preprocess="to-pixdata">058.png</file>
+    <file preprocess="to-pixdata">059.png</file>
+    <file preprocess="to-pixdata">060.png</file>
+    <file preprocess="to-pixdata">061.png</file>
+    <file preprocess="to-pixdata">062.png</file>
+    <file preprocess="to-pixdata">063.png</file>
+    <file preprocess="to-pixdata">064.png</file>
+    <file preprocess="to-pixdata">065.png</file>
+    <file preprocess="to-pixdata">066.png</file>
+    <file preprocess="to-pixdata">067.png</file>
+    <file preprocess="to-pixdata">068.png</file>
+    <file preprocess="to-pixdata">069.png</file>
+    <file preprocess="to-pixdata">070.png</file>
+    <file preprocess="to-pixdata">071.png</file>
+    <file preprocess="to-pixdata">072.png</file>
+    <file preprocess="to-pixdata">073.png</file>
+    <file preprocess="to-pixdata">074.png</file>
+    <file preprocess="to-pixdata">075.png</file>
+    <file preprocess="to-pixdata">076.png</file>
+    <file preprocess="to-pixdata">077.png</file>
+    <file preprocess="to-pixdata">078.png</file>
+    <file preprocess="to-pixdata">079.png</file>
+    <file preprocess="to-pixdata">080.png</file>
+    <file preprocess="to-pixdata">081.png</file>
+    <file preprocess="to-pixdata">082.png</file>
+    <file preprocess="to-pixdata">083.png</file>
+    <file preprocess="to-pixdata">084.png</file>
+    <file preprocess="to-pixdata">085.png</file>
+    <file preprocess="to-pixdata">086.png</file>
+    <file preprocess="to-pixdata">087.png</file>
+    <file preprocess="to-pixdata">088.png</file>
+    <file preprocess="to-pixdata">089.png</file>
+    <file preprocess="to-pixdata">090.png</file>
+    <file preprocess="to-pixdata">091.png</file>
+    <file preprocess="to-pixdata">092.png</file>
+    <file preprocess="to-pixdata">093.png</file>
+    <file preprocess="to-pixdata">094.png</file>
+    <file preprocess="to-pixdata">095.png</file>
+    <file preprocess="to-pixdata">096.png</file>
+    <file preprocess="to-pixdata">097.png</file>
+    <file preprocess="to-pixdata">098.png</file>
+    <file preprocess="to-pixdata">099.png</file>
+    <file preprocess="to-pixdata">100.png</file>
+    <file preprocess="to-pixdata">101.png</file>
+    <file preprocess="to-pixdata">102.png</file>
+    <file preprocess="to-pixdata">103.png</file>
+    <file preprocess="to-pixdata">104.png</file>
+    <file preprocess="to-pixdata">105.png</file>
+    <file preprocess="to-pixdata">106.png</file>
+    <file preprocess="to-pixdata">107.png</file>
+    <file preprocess="to-pixdata">108.png</file>
+    <file preprocess="to-pixdata">109.png</file>
+    <file preprocess="to-pixdata">110.png</file>
+    <file preprocess="to-pixdata">111.png</file>
+    <file preprocess="to-pixdata">112.png</file>
+    <file preprocess="to-pixdata">113.png</file>
+    <file preprocess="to-pixdata">114.png</file>
+    <file preprocess="to-pixdata">115.png</file>
+    <file preprocess="to-pixdata">116.png</file>
+    <file preprocess="to-pixdata">117.png</file>
+    <file preprocess="to-pixdata">118.png</file>
+    <file preprocess="to-pixdata">119.png</file>
+    <file preprocess="to-pixdata">120.png</file>
+    <file preprocess="to-pixdata">121.png</file>
+    <file preprocess="to-pixdata">122.png</file>
+    <file preprocess="to-pixdata">123.png</file>
+    <file preprocess="to-pixdata">124.png</file>
+    <file preprocess="to-pixdata">125.png</file>
+    <file preprocess="to-pixdata">126.png</file>
+    <file preprocess="to-pixdata">127.png</file>
+    <file preprocess="to-pixdata">128.png</file>
+    <file preprocess="to-pixdata">129.png</file>
+    <file preprocess="to-pixdata">130.png</file>
+    <file preprocess="to-pixdata">131.png</file>
+    <file preprocess="to-pixdata">132.png</file>
+    <file preprocess="to-pixdata">133.png</file>
+    <file preprocess="to-pixdata">134.png</file>
+    <file preprocess="to-pixdata">135.png</file>
+  </gresource>
+</gresources>
diff --git a/data/images/operators/data.xml b/data/images/operators/data.xml
new file mode 100644
index 0000000..67f4d51
--- /dev/null
+++ b/data/images/operators/data.xml
@@ -0,0 +1,82 @@
+<symbols>
+  <symbol file="001.png" command="\pm" />
+  <symbol file="002.png" command="\mp" />
+  <symbol file="003.png" command="\times" />
+  <symbol file="004.png" command="\div" />
+  <symbol file="005.png" command="\ast" />
+  <symbol file="006.png" command="\star" />
+  <symbol file="007.png" command="\circ" />
+  <symbol file="008.png" command="\bullet" />
+  <symbol file="009.png" command="\divideontimes" package="amssymb" />
+  <symbol file="010.png" command="\ltimes" package="amssymb" />
+  <symbol file="011.png" command="\rtimes" package="amssymb" />
+  <symbol file="012.png" command="\cdot" />
+  <symbol file="013.png" command="\dotplus" package="amssymb" />
+  <symbol file="014.png" command="\leftthreetimes" package="amssymb" />
+  <symbol file="015.png" command="\rightthreetimes" package="amssymb" />
+  <symbol file="016.png" command="\amalg" />
+  <symbol file="017.png" command="\otimes" />
+  <symbol file="018.png" command="\oplus" />
+  <symbol file="019.png" command="\ominus" />
+  <symbol file="020.png" command="\oslash" />
+  <symbol file="021.png" command="\odot" />
+  <symbol file="022.png" command="\circledcirc" package="amssymb" />
+  <symbol file="023.png" command="\circleddash" package="amssymb" />
+  <symbol file="024.png" command="\circledast" package="amssymb" />
+  <symbol file="025.png" command="\bigcirc" />
+  <symbol file="026.png" command="\boxdot" package="amssymb" />
+  <symbol file="027.png" command="\boxminus" package="amssymb" />
+  <symbol file="028.png" command="\boxplus" package="amssymb" />
+  <symbol file="029.png" command="\boxtimes" package="amssymb" />
+  <symbol file="030.png" command="\diamond" />
+  <symbol file="031.png" command="\bigtriangleup" />
+  <symbol file="032.png" command="\bigtriangledown" />
+  <symbol file="033.png" command="\triangleleft" />
+  <symbol file="034.png" command="\triangleright" />
+  <symbol file="035.png" command="\lhd" package="amssymb" />
+  <symbol file="036.png" command="\rhd" package="amssymb" />
+  <symbol file="037.png" command="\unlhd" package="amssymb" />
+  <symbol file="038.png" command="\unrhd" package="amssymb" />
+  <symbol file="039.png" command="\cup" />
+  <symbol file="040.png" command="\cap" />
+  <symbol file="041.png" command="\uplus" />
+  <symbol file="042.png" command="\Cup" package="amssymb" />
+  <symbol file="043.png" command="\Cap" package="amssymb" />
+  <symbol file="044.png" command="\wr" />
+  <symbol file="045.png" command="\setminus" />
+  <symbol file="046.png" command="\smallsetminus" package="amssymb" />
+  <symbol file="047.png" command="\sqcap" />
+  <symbol file="048.png" command="\sqcup" />
+  <symbol file="049.png" command="\wedge" />
+  <symbol file="050.png" command="\vee" />
+  <symbol file="051.png" command="\barwedge" package="amssymb" />
+  <symbol file="052.png" command="\veebar" package="amssymb" />
+  <symbol file="053.png" command="\doublebarwedge" package="amssymb" />
+  <symbol file="054.png" command="\curlywedge" package="amssymb" />
+  <symbol file="055.png" command="\curlyvee" package="amssymb" />
+  <symbol file="056.png" command="\dagger" package="amssymb" />
+  <symbol file="057.png" command="\ddagger" package="amssymb" />
+  <symbol file="058.png" command="\intercal" package="amssymb" />
+  <symbol file="059.png" command="\bigcap" />
+  <symbol file="060.png" command="\bigcup" />
+  <symbol file="061.png" command="\biguplus" />
+  <symbol file="062.png" command="\bigsqcup" />
+  <symbol file="063.png" command="\prod" />
+  <symbol file="064.png" command="\coprod" />
+  <symbol file="065.png" command="\bigwedge" />
+  <symbol file="066.png" command="\bigvee" />
+  <symbol file="067.png" command="\bigodot" />
+  <symbol file="068.png" command="\bigoplus" />
+  <symbol file="069.png" command="\bigotimes" />
+  <symbol file="070.png" command="\sum" />
+  <symbol file="071.png" command="\int" />
+  <symbol file="072.png" command="\oint" />
+  <symbol file="073.png" command="\iint" package="amsmath" />
+  <symbol file="074.png" command="\iiint" package="amsmath" />
+  <symbol file="075.png" command="\iiiint" package="amsmath" />
+  <symbol file="076.png" command="\idotsint" package="amsmath" />
+  <symbol file="077.png" command="\varlimsup" package="amsmath" />
+  <symbol file="078.png" command="\varliminf" package="amsmath" />
+  <symbol file="079.png" command="\varinjlim" package="amsmath" />
+  <symbol file="080.png" command="\varprojlim" package="amsmath" />
+</symbols>
diff --git a/data/images/operators/symbols-operators.gresource.xml b/data/images/operators/symbols-operators.gresource.xml
new file mode 100644
index 0000000..d410dfa
--- /dev/null
+++ b/data/images/operators/symbols-operators.gresource.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/operators">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">001.png</file>
+    <file preprocess="to-pixdata">002.png</file>
+    <file preprocess="to-pixdata">003.png</file>
+    <file preprocess="to-pixdata">004.png</file>
+    <file preprocess="to-pixdata">005.png</file>
+    <file preprocess="to-pixdata">006.png</file>
+    <file preprocess="to-pixdata">007.png</file>
+    <file preprocess="to-pixdata">008.png</file>
+    <file preprocess="to-pixdata">009.png</file>
+    <file preprocess="to-pixdata">010.png</file>
+    <file preprocess="to-pixdata">011.png</file>
+    <file preprocess="to-pixdata">012.png</file>
+    <file preprocess="to-pixdata">013.png</file>
+    <file preprocess="to-pixdata">014.png</file>
+    <file preprocess="to-pixdata">015.png</file>
+    <file preprocess="to-pixdata">016.png</file>
+    <file preprocess="to-pixdata">017.png</file>
+    <file preprocess="to-pixdata">018.png</file>
+    <file preprocess="to-pixdata">019.png</file>
+    <file preprocess="to-pixdata">020.png</file>
+    <file preprocess="to-pixdata">021.png</file>
+    <file preprocess="to-pixdata">022.png</file>
+    <file preprocess="to-pixdata">023.png</file>
+    <file preprocess="to-pixdata">024.png</file>
+    <file preprocess="to-pixdata">025.png</file>
+    <file preprocess="to-pixdata">026.png</file>
+    <file preprocess="to-pixdata">027.png</file>
+    <file preprocess="to-pixdata">028.png</file>
+    <file preprocess="to-pixdata">029.png</file>
+    <file preprocess="to-pixdata">030.png</file>
+    <file preprocess="to-pixdata">031.png</file>
+    <file preprocess="to-pixdata">032.png</file>
+    <file preprocess="to-pixdata">033.png</file>
+    <file preprocess="to-pixdata">034.png</file>
+    <file preprocess="to-pixdata">035.png</file>
+    <file preprocess="to-pixdata">036.png</file>
+    <file preprocess="to-pixdata">037.png</file>
+    <file preprocess="to-pixdata">038.png</file>
+    <file preprocess="to-pixdata">039.png</file>
+    <file preprocess="to-pixdata">040.png</file>
+    <file preprocess="to-pixdata">041.png</file>
+    <file preprocess="to-pixdata">042.png</file>
+    <file preprocess="to-pixdata">043.png</file>
+    <file preprocess="to-pixdata">044.png</file>
+    <file preprocess="to-pixdata">045.png</file>
+    <file preprocess="to-pixdata">046.png</file>
+    <file preprocess="to-pixdata">047.png</file>
+    <file preprocess="to-pixdata">048.png</file>
+    <file preprocess="to-pixdata">049.png</file>
+    <file preprocess="to-pixdata">050.png</file>
+    <file preprocess="to-pixdata">051.png</file>
+    <file preprocess="to-pixdata">052.png</file>
+    <file preprocess="to-pixdata">053.png</file>
+    <file preprocess="to-pixdata">054.png</file>
+    <file preprocess="to-pixdata">055.png</file>
+    <file preprocess="to-pixdata">056.png</file>
+    <file preprocess="to-pixdata">057.png</file>
+    <file preprocess="to-pixdata">058.png</file>
+    <file preprocess="to-pixdata">059.png</file>
+    <file preprocess="to-pixdata">060.png</file>
+    <file preprocess="to-pixdata">061.png</file>
+    <file preprocess="to-pixdata">062.png</file>
+    <file preprocess="to-pixdata">063.png</file>
+    <file preprocess="to-pixdata">064.png</file>
+    <file preprocess="to-pixdata">065.png</file>
+    <file preprocess="to-pixdata">066.png</file>
+    <file preprocess="to-pixdata">067.png</file>
+    <file preprocess="to-pixdata">068.png</file>
+    <file preprocess="to-pixdata">069.png</file>
+    <file preprocess="to-pixdata">070.png</file>
+    <file preprocess="to-pixdata">071.png</file>
+    <file preprocess="to-pixdata">072.png</file>
+    <file preprocess="to-pixdata">073.png</file>
+    <file preprocess="to-pixdata">074.png</file>
+    <file preprocess="to-pixdata">075.png</file>
+    <file preprocess="to-pixdata">076.png</file>
+    <file preprocess="to-pixdata">077.png</file>
+    <file preprocess="to-pixdata">078.png</file>
+    <file preprocess="to-pixdata">079.png</file>
+    <file preprocess="to-pixdata">080.png</file>
+  </gresource>
+</gresources>
diff --git a/data/images/relations/data.xml b/data/images/relations/data.xml
new file mode 100644
index 0000000..ace5c4a
--- /dev/null
+++ b/data/images/relations/data.xml
@@ -0,0 +1,141 @@
+<symbols>
+  <symbol file="001.png" command="\bowtie" />
+  <symbol file="002.png" command="\Join" package="amssymb" />
+  <symbol file="003.png" command="\propto" />
+  <symbol file="004.png" command="\varpropto" package="amssymb" />
+  <symbol file="005.png" command="\multimap" package="amssymb" />
+  <symbol file="006.png" command="\pitchfork" package="amssymb" />
+  <symbol file="007.png" command="\therefore" package="amssymb" />
+  <symbol file="008.png" command="\because" package="amssymb" />
+  <symbol file="009.png" command="=" />
+  <symbol file="010.png" command="\neq" />
+  <symbol file="011.png" command="\equiv" />
+  <symbol file="012.png" command="\approx" />
+  <symbol file="013.png" command="\sim" />
+  <symbol file="014.png" command="\simeq" />
+  <symbol file="015.png" command="\backsimeq" package="amssymb" />
+  <symbol file="016.png" command="\approxeq" package="amssymb" />
+  <symbol file="017.png" command="\cong" />
+  <symbol file="018.png" command="\ncong" package="amssymb" />
+  <symbol file="019.png" command="\smile" />
+  <symbol file="020.png" command="\frown" />
+  <symbol file="021.png" command="\asymp" />
+  <symbol file="022.png" command="\smallfrown" package="amssymb" />
+  <symbol file="023.png" command="\smallsmile" package="amssymb" />
+  <symbol file="024.png" command="\between" package="amssymb" />
+  <symbol file="025.png" command="\prec" />
+  <symbol file="026.png" command="\succ" />
+  <symbol file="027.png" command="\nprec" package="amssymb" />
+  <symbol file="028.png" command="\nsucc" package="amssymb" />
+  <symbol file="029.png" command="\preceq" />
+  <symbol file="030.png" command="\succeq" />
+  <symbol file="031.png" command="\npreceq" package="amssymb" />
+  <symbol file="032.png" command="\nsucceq" package="amssymb" />
+  <symbol file="033.png" command="\preccurlyeq" package="amssymb" />
+  <symbol file="034.png" command="\succcurlyeq" package="amssymb" />
+  <symbol file="035.png" command="\curlyeqprec" package="amssymb" />
+  <symbol file="036.png" command="\curlyeqsucc" package="amssymb" />
+  <symbol file="037.png" command="\precsim" package="amssymb" />
+  <symbol file="038.png" command="\succsim" package="amssymb" />
+  <symbol file="039.png" command="\precnsim" package="amssymb" />
+  <symbol file="040.png" command="\succnsim" package="amssymb" />
+  <symbol file="041.png" command="\precapprox" package="amssymb" />
+  <symbol file="042.png" command="\succapprox" package="amssymb" />
+  <symbol file="043.png" command="\precnapprox" package="amssymb" />
+  <symbol file="044.png" command="\succnapprox" package="amssymb" />
+  <symbol file="045.png" command="\perp" />
+  <symbol file="046.png" command="\vdash" />
+  <symbol file="047.png" command="\dashv" />
+  <symbol file="048.png" command="\nvdash" package="amssymb" />
+  <symbol file="049.png" command="\Vdash" package="amssymb" />
+  <symbol file="050.png" command="\Vvdash" package="amssymb" />
+  <symbol file="051.png" command="\models" />
+  <symbol file="052.png" command="\vDash" package="amssymb" />
+  <symbol file="053.png" command="\nvDash" package="amssymb" />
+  <symbol file="054.png" command="\nVDash" package="amssymb" />
+  <symbol file="055.png" command="\mid" />
+  <symbol file="056.png" command="\nmid" package="amssymb" />
+  <symbol file="057.png" command="\parallel" />
+  <symbol file="058.png" command="\nparallel" package="amssymb" />
+  <symbol file="059.png" command="\shortmid" package="amssymb" />
+  <symbol file="060.png" command="\nshortmid" package="amssymb" />
+  <symbol file="061.png" command="\shortparallel" package="amssymb" />
+  <symbol file="062.png" command="\nshortparallel" package="amssymb" />
+  <symbol file="063.png" command="&lt;" />
+  <symbol file="064.png" command="&gt;" />
+  <symbol file="065.png" command="\nless" package="amssymb" />
+  <symbol file="066.png" command="\ngtr" package="amssymb" />
+  <symbol file="067.png" command="\lessdot" package="amssymb" />
+  <symbol file="068.png" command="\gtrdot" package="amssymb" />
+  <symbol file="069.png" command="\ll" />
+  <symbol file="070.png" command="\gg" />
+  <symbol file="071.png" command="\lll" package="amssymb" />
+  <symbol file="072.png" command="\ggg" package="amssymb" />
+  <symbol file="073.png" command="\leq" />
+  <symbol file="074.png" command="\geq" />
+  <symbol file="075.png" command="\lneq" package="amssymb" />
+  <symbol file="076.png" command="\gneq" package="amssymb" />
+  <symbol file="077.png" command="\nleq" package="amssymb" />
+  <symbol file="078.png" command="\ngeq" package="amssymb" />
+  <symbol file="079.png" command="\leqq" package="amssymb" />
+  <symbol file="080.png" command="\geqq" package="amssymb" />
+  <symbol file="081.png" command="\lneqq" package="amssymb" />
+  <symbol file="082.png" command="\gneqq" package="amssymb" />
+  <symbol file="083.png" command="\lvertneqq" package="amssymb" />
+  <symbol file="084.png" command="\gvertneqq" package="amssymb" />
+  <symbol file="085.png" command="\nleqq" package="amssymb" />
+  <symbol file="086.png" command="\ngeqq" package="amssymb" />
+  <symbol file="087.png" command="\leqslant" package="amssymb" />
+  <symbol file="088.png" command="\geqslant" package="amssymb" />
+  <symbol file="089.png" command="\nleqslant" package="amssymb" />
+  <symbol file="090.png" command="\ngeqslant" package="amssymb" />
+  <symbol file="091.png" command="\eqslantless" package="amssymb" />
+  <symbol file="092.png" command="\eqslantgtr" package="amssymb" />
+  <symbol file="093.png" command="\lessgtr" package="amssymb" />
+  <symbol file="094.png" command="\gtrless" package="amssymb" />
+  <symbol file="095.png" command="\lesseqgtr" package="amssymb" />
+  <symbol file="096.png" command="\gtreqless" package="amssymb" />
+  <symbol file="097.png" command="\lesseqqgtr" package="amssymb" />
+  <symbol file="098.png" command="\gtreqqless" package="amssymb" />
+  <symbol file="099.png" command="\lesssim" package="amssymb" />
+  <symbol file="100.png" command="\gtrsim" package="amssymb" />
+  <symbol file="101.png" command="\lnsim" package="amssymb" />
+  <symbol file="102.png" command="\gnsim" package="amssymb" />
+  <symbol file="103.png" command="\lessapprox" package="amssymb" />
+  <symbol file="104.png" command="\gtrapprox" package="amssymb" />
+  <symbol file="105.png" command="\lnapprox" package="amssymb" />
+  <symbol file="106.png" command="\gnapprox" package="amssymb" />
+  <symbol file="107.png" command="\vartriangleleft" package="amssymb" />
+  <symbol file="108.png" command="\vartriangleright" package="amssymb" />
+  <symbol file="109.png" command="\ntriangleleft" package="amssymb" />
+  <symbol file="110.png" command="\ntriangleright" package="amssymb" />
+  <symbol file="111.png" command="\trianglelefteq" package="amssymb" />
+  <symbol file="112.png" command="\trianglerighteq" package="amssymb" />
+  <symbol file="113.png" command="\ntrianglelefteq" package="amssymb" />
+  <symbol file="114.png" command="\ntrianglerighteq" package="amssymb" />
+  <symbol file="115.png" command="\blacktriangleleft" package="amssymb" />
+  <symbol file="116.png" command="\blacktriangleright" package="amssymb" />
+  <symbol file="117.png" command="\subset" />
+  <symbol file="118.png" command="\supset" />
+  <symbol file="119.png" command="\subseteq" />
+  <symbol file="120.png" command="\supseteq" />
+  <symbol file="121.png" command="\subsetneq" package="amssymb" />
+  <symbol file="122.png" command="\supsetneq" package="amssymb" />
+  <symbol file="123.png" command="\varsubsetneq" package="amssymb" />
+  <symbol file="124.png" command="\varsupsetneq" package="amssymb" />
+  <symbol file="125.png" command="\nsubseteq" package="amssymb" />
+  <symbol file="126.png" command="\nsupseteq" package="amssymb" />
+  <symbol file="127.png" command="\subseteqq" package="amssymb" />
+  <symbol file="128.png" command="\supseteqq" package="amssymb" />
+  <symbol file="129.png" command="\subsetneqq" package="amssymb" />
+  <symbol file="130.png" command="\supsetneqq" package="amssymb" />
+  <symbol file="131.png" command="\nsubseteqq" package="amssymb" />
+  <symbol file="132.png" command="\nsupseteqq" package="amssymb" />
+  <symbol file="133.png" command="\backepsilon" package="amssymb" />
+  <symbol file="134.png" command="\Subset" package="amssymb" />
+  <symbol file="135.png" command="\Supset" package="amssymb" />
+  <symbol file="136.png" command="\sqsubset" package="amssymb" />
+  <symbol file="137.png" command="\sqsupset" package="amssymb" />
+  <symbol file="138.png" command="\sqsubseteq" />
+  <symbol file="139.png" command="\sqsupseteq" />
+</symbols>
diff --git a/data/images/relations/symbols-relations.gresource.xml b/data/images/relations/symbols-relations.gresource.xml
new file mode 100644
index 0000000..dfe2cbd
--- /dev/null
+++ b/data/images/relations/symbols-relations.gresource.xml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/latexila/symbols/relations">
+    <file preprocess="xml-stripblanks">data.xml</file>
+    <file preprocess="to-pixdata">001.png</file>
+    <file preprocess="to-pixdata">002.png</file>
+    <file preprocess="to-pixdata">003.png</file>
+    <file preprocess="to-pixdata">004.png</file>
+    <file preprocess="to-pixdata">005.png</file>
+    <file preprocess="to-pixdata">006.png</file>
+    <file preprocess="to-pixdata">007.png</file>
+    <file preprocess="to-pixdata">008.png</file>
+    <file preprocess="to-pixdata">009.png</file>
+    <file preprocess="to-pixdata">010.png</file>
+    <file preprocess="to-pixdata">011.png</file>
+    <file preprocess="to-pixdata">012.png</file>
+    <file preprocess="to-pixdata">013.png</file>
+    <file preprocess="to-pixdata">014.png</file>
+    <file preprocess="to-pixdata">015.png</file>
+    <file preprocess="to-pixdata">016.png</file>
+    <file preprocess="to-pixdata">017.png</file>
+    <file preprocess="to-pixdata">018.png</file>
+    <file preprocess="to-pixdata">019.png</file>
+    <file preprocess="to-pixdata">020.png</file>
+    <file preprocess="to-pixdata">021.png</file>
+    <file preprocess="to-pixdata">022.png</file>
+    <file preprocess="to-pixdata">023.png</file>
+    <file preprocess="to-pixdata">024.png</file>
+    <file preprocess="to-pixdata">025.png</file>
+    <file preprocess="to-pixdata">026.png</file>
+    <file preprocess="to-pixdata">027.png</file>
+    <file preprocess="to-pixdata">028.png</file>
+    <file preprocess="to-pixdata">029.png</file>
+    <file preprocess="to-pixdata">030.png</file>
+    <file preprocess="to-pixdata">031.png</file>
+    <file preprocess="to-pixdata">032.png</file>
+    <file preprocess="to-pixdata">033.png</file>
+    <file preprocess="to-pixdata">034.png</file>
+    <file preprocess="to-pixdata">035.png</file>
+    <file preprocess="to-pixdata">036.png</file>
+    <file preprocess="to-pixdata">037.png</file>
+    <file preprocess="to-pixdata">038.png</file>
+    <file preprocess="to-pixdata">039.png</file>
+    <file preprocess="to-pixdata">040.png</file>
+    <file preprocess="to-pixdata">041.png</file>
+    <file preprocess="to-pixdata">042.png</file>
+    <file preprocess="to-pixdata">043.png</file>
+    <file preprocess="to-pixdata">044.png</file>
+    <file preprocess="to-pixdata">045.png</file>
+    <file preprocess="to-pixdata">046.png</file>
+    <file preprocess="to-pixdata">047.png</file>
+    <file preprocess="to-pixdata">048.png</file>
+    <file preprocess="to-pixdata">049.png</file>
+    <file preprocess="to-pixdata">050.png</file>
+    <file preprocess="to-pixdata">051.png</file>
+    <file preprocess="to-pixdata">052.png</file>
+    <file preprocess="to-pixdata">053.png</file>
+    <file preprocess="to-pixdata">054.png</file>
+    <file preprocess="to-pixdata">055.png</file>
+    <file preprocess="to-pixdata">056.png</file>
+    <file preprocess="to-pixdata">057.png</file>
+    <file preprocess="to-pixdata">058.png</file>
+    <file preprocess="to-pixdata">059.png</file>
+    <file preprocess="to-pixdata">060.png</file>
+    <file preprocess="to-pixdata">061.png</file>
+    <file preprocess="to-pixdata">062.png</file>
+    <file preprocess="to-pixdata">063.png</file>
+    <file preprocess="to-pixdata">064.png</file>
+    <file preprocess="to-pixdata">065.png</file>
+    <file preprocess="to-pixdata">066.png</file>
+    <file preprocess="to-pixdata">067.png</file>
+    <file preprocess="to-pixdata">068.png</file>
+    <file preprocess="to-pixdata">069.png</file>
+    <file preprocess="to-pixdata">070.png</file>
+    <file preprocess="to-pixdata">071.png</file>
+    <file preprocess="to-pixdata">072.png</file>
+    <file preprocess="to-pixdata">073.png</file>
+    <file preprocess="to-pixdata">074.png</file>
+    <file preprocess="to-pixdata">075.png</file>
+    <file preprocess="to-pixdata">076.png</file>
+    <file preprocess="to-pixdata">077.png</file>
+    <file preprocess="to-pixdata">078.png</file>
+    <file preprocess="to-pixdata">079.png</file>
+    <file preprocess="to-pixdata">080.png</file>
+    <file preprocess="to-pixdata">081.png</file>
+    <file preprocess="to-pixdata">082.png</file>
+    <file preprocess="to-pixdata">083.png</file>
+    <file preprocess="to-pixdata">084.png</file>
+    <file preprocess="to-pixdata">085.png</file>
+    <file preprocess="to-pixdata">086.png</file>
+    <file preprocess="to-pixdata">087.png</file>
+    <file preprocess="to-pixdata">088.png</file>
+    <file preprocess="to-pixdata">089.png</file>
+    <file preprocess="to-pixdata">090.png</file>
+    <file preprocess="to-pixdata">091.png</file>
+    <file preprocess="to-pixdata">092.png</file>
+    <file preprocess="to-pixdata">093.png</file>
+    <file preprocess="to-pixdata">094.png</file>
+    <file preprocess="to-pixdata">095.png</file>
+    <file preprocess="to-pixdata">096.png</file>
+    <file preprocess="to-pixdata">097.png</file>
+    <file preprocess="to-pixdata">098.png</file>
+    <file preprocess="to-pixdata">099.png</file>
+    <file preprocess="to-pixdata">100.png</file>
+    <file preprocess="to-pixdata">101.png</file>
+    <file preprocess="to-pixdata">102.png</file>
+    <file preprocess="to-pixdata">103.png</file>
+    <file preprocess="to-pixdata">104.png</file>
+    <file preprocess="to-pixdata">105.png</file>
+    <file preprocess="to-pixdata">106.png</file>
+    <file preprocess="to-pixdata">107.png</file>
+    <file preprocess="to-pixdata">108.png</file>
+    <file preprocess="to-pixdata">109.png</file>
+    <file preprocess="to-pixdata">110.png</file>
+    <file preprocess="to-pixdata">111.png</file>
+    <file preprocess="to-pixdata">112.png</file>
+    <file preprocess="to-pixdata">113.png</file>
+    <file preprocess="to-pixdata">114.png</file>
+    <file preprocess="to-pixdata">115.png</file>
+    <file preprocess="to-pixdata">116.png</file>
+    <file preprocess="to-pixdata">117.png</file>
+    <file preprocess="to-pixdata">118.png</file>
+    <file preprocess="to-pixdata">119.png</file>
+    <file preprocess="to-pixdata">120.png</file>
+    <file preprocess="to-pixdata">121.png</file>
+    <file preprocess="to-pixdata">122.png</file>
+    <file preprocess="to-pixdata">123.png</file>
+    <file preprocess="to-pixdata">124.png</file>
+    <file preprocess="to-pixdata">125.png</file>
+    <file preprocess="to-pixdata">126.png</file>
+    <file preprocess="to-pixdata">127.png</file>
+    <file preprocess="to-pixdata">128.png</file>
+    <file preprocess="to-pixdata">129.png</file>
+    <file preprocess="to-pixdata">130.png</file>
+    <file preprocess="to-pixdata">131.png</file>
+    <file preprocess="to-pixdata">132.png</file>
+    <file preprocess="to-pixdata">133.png</file>
+    <file preprocess="to-pixdata">134.png</file>
+    <file preprocess="to-pixdata">135.png</file>
+    <file preprocess="to-pixdata">136.png</file>
+    <file preprocess="to-pixdata">137.png</file>
+    <file preprocess="to-pixdata">138.png</file>
+    <file preprocess="to-pixdata">139.png</file>
+  </gresource>
+</gresources>
diff --git a/src/app_settings.vala b/src/app_settings.vala
index 99c4dcc..9efd9b3 100644
--- a/src/app_settings.vala
+++ b/src/app_settings.vala
@@ -148,6 +148,7 @@ public class AppSettings : GLib.Settings
                 doc.tab.auto_save_interval = val;
         });
 
+        /*
         editor.changed["nb-most-used-symbols"].connect ((setting, key) =>
         {
             if (timeout_id != 0)
@@ -159,6 +160,7 @@ public class AppSettings : GLib.Settings
                 return false;
             });
         });
+        */
     }
 
     private void set_font (string font)
diff --git a/src/latexila.vala b/src/latexila.vala
index 41626af..31178a6 100644
--- a/src/latexila.vala
+++ b/src/latexila.vala
@@ -48,7 +48,7 @@ public class Latexila : Gtk.Application
             hold ();
             Projects.get_default ().save ();
             BuildTools.get_default ().save ();
-            MostUsedSymbols.get_default ().save ();
+//            MostUsedSymbols.get_default ().save ();
             release ();
         });
 
diff --git a/src/main_window.vala b/src/main_window.vala
index c996e26..1da3332 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -189,7 +189,7 @@ public class MainWindow : Window
     private Toolbar main_toolbar;
     private Toolbar edit_toolbar;
     private SidePanel _side_panel;
-    private Symbols symbols;
+    private SymbolsView _symbols;
     private FileBrowser file_browser;
     private Structure _structure;
     private Paned main_hpaned;
@@ -312,8 +312,8 @@ public class MainWindow : Window
 
         _side_panel.closed.connect (() => action_view_side_panel.active = false);
 
-        symbols = new Symbols (this);
-        _side_panel.add_component (_("Symbols"), "symbol_greek", symbols);
+        _symbols = new SymbolsView (this);
+        _side_panel.add_component (_("Symbols"), "symbol_greek", _symbols);
 
         file_browser = new FileBrowser (this);
         _side_panel.add_component (_("File Browser"), Stock.OPEN, file_browser);
@@ -480,7 +480,7 @@ public class MainWindow : Window
 
         main_hpaned.notify["position"].connect (() =>
         {
-            this.symbols.resize_iconview ();
+            this._symbols.resize_iconview ();
         });
 
         // vgrid source view: documents panel, goto line, search and replace
@@ -694,21 +694,6 @@ public class MainWindow : Window
         return build_view;
     }
 
-    public CustomStatusbar get_statusbar ()
-    {
-        return statusbar;
-    }
-
-    public Symbols get_symbols ()
-    {
-        return symbols;
-    }
-
-    public FileBrowser get_file_browser ()
-    {
-        return file_browser;
-    }
-
     public DocumentTab? open_document (File location, bool jump_to = true)
     {
         /* check if the document is already opened */
diff --git a/src/symbols.vala b/src/symbols.vala
index f403ddd..fbc4c00 100644
--- a/src/symbols.vala
+++ b/src/symbols.vala
@@ -15,998 +15,271 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: SÃbastien Wilmet
  */
 
 using Gtk;
 
-public class Symbols : Grid
+public enum SymbolsCategoryType
 {
-    struct SymbolInfo
-    {
-        public string filename;
-        public string latex_command;
-        public string package_required;
-    }
+    NORMAL,
+    MOST_USED
+}
 
-    struct CategoryInfo
-    {
-        public string name;
-        public string icon;
-    }
+public enum SymbolsCategoryColumn
+{
+    TYPE,
+    ICON, // stock-id, as a string
+    NAME,
+    SYMBOLS_STORE,
+    N_COLUMNS
+}
 
-    private const CategoryInfo[] _categories =
-    {
-        {N_("Greek"), "symbol_greek"},
-        {N_("Arrows"), "symbol_arrows"},
-        {N_("Relations"), "symbol_relations"},
-        {N_("Operators"), "symbol_operators"},
-        {N_("Delimiters"), "symbol_delimiters"},
-        {N_("Misc math"), "symbol_misc_math"},
-        {N_("Misc text"), "symbol_misc_text"},
-        {N_("Most Used"), Stock.ABOUT}
-    };
+public enum SymbolColumn
+{
+    PIXBUF, // Gdk.Pixbuf
+    COMMAND,
+    TOOLTIP,
+    ID, // used for the most used symbols
+    N_COLUMNS
+}
 
-    private const SymbolInfo[] symbols_greek =
+public class Symbols : GLib.Object
+{
+    private struct CategoryInfo
     {
-        {Config.DATA_DIR + "/images/greek/01.png", "\\alpha", null},
-        {Config.DATA_DIR + "/images/greek/02.png", "\\beta", null},
-        {Config.DATA_DIR + "/images/greek/03.png", "\\gamma", null},
-        {Config.DATA_DIR + "/images/greek/04.png", "\\delta", null},
-        {Config.DATA_DIR + "/images/greek/05.png", "\\epsilon", null},
-        {Config.DATA_DIR + "/images/greek/06.png", "\\varepsilon", null},
-        {Config.DATA_DIR + "/images/greek/07.png", "\\zeta", null},
-        {Config.DATA_DIR + "/images/greek/08.png", "\\eta", null},
-        {Config.DATA_DIR + "/images/greek/09.png", "\\theta", null},
-        {Config.DATA_DIR + "/images/greek/10.png", "\\vartheta", null},
-        {Config.DATA_DIR + "/images/greek/11.png", "\\iota", null},
-        {Config.DATA_DIR + "/images/greek/12.png", "\\kappa", null},
-        {Config.DATA_DIR + "/images/greek/13.png", "\\lambda", null},
-        {Config.DATA_DIR + "/images/greek/14.png", "\\mu", null},
-        {Config.DATA_DIR + "/images/greek/15.png", "\\nu", null},
-        {Config.DATA_DIR + "/images/greek/16.png", "\\xi", null},
-        {Config.DATA_DIR + "/images/greek/18.png", "\\pi", null},
-        {Config.DATA_DIR + "/images/greek/19.png", "\\varpi", null},
-        {Config.DATA_DIR + "/images/greek/20.png", "\\rho", null},
-        {Config.DATA_DIR + "/images/greek/21.png", "\\varrho", null},
-        {Config.DATA_DIR + "/images/greek/22.png", "\\sigma", null},
-        {Config.DATA_DIR + "/images/greek/23.png", "\\varsigma", null},
-        {Config.DATA_DIR + "/images/greek/24.png", "\\tau", null},
-        {Config.DATA_DIR + "/images/greek/25.png", "\\upsilon", null},
-        {Config.DATA_DIR + "/images/greek/26.png", "\\phi", null},
-        {Config.DATA_DIR + "/images/greek/27.png", "\\varphi", null},
-        {Config.DATA_DIR + "/images/greek/28.png", "\\chi", null},
-        {Config.DATA_DIR + "/images/greek/29.png", "\\psi", null},
-        {Config.DATA_DIR + "/images/greek/30.png", "\\omega", null},
-        {Config.DATA_DIR + "/images/greek/33.png", "\\Gamma", null},
-        {Config.DATA_DIR + "/images/greek/34.png", "\\varGamma", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/35.png", "\\Delta", null},
-        {Config.DATA_DIR + "/images/greek/36.png", "\\varDelta", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/40.png", "\\Theta", null},
-        {Config.DATA_DIR + "/images/greek/41.png", "\\varTheta", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/44.png", "\\Lambda", null},
-        {Config.DATA_DIR + "/images/greek/45.png", "\\varLambda", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/48.png", "\\Xi", null},
-        {Config.DATA_DIR + "/images/greek/49.png", "\\varXi", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/51.png", "\\Pi", null},
-        {Config.DATA_DIR + "/images/greek/52.png", "\\varPi", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/54.png", "\\Sigma", null},
-        {Config.DATA_DIR + "/images/greek/55.png", "\\varSigma", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/57.png", "\\Upsilon", null},
-        {Config.DATA_DIR + "/images/greek/58.png", "\\varUpsilon", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/59.png", "\\Phi", null},
-        {Config.DATA_DIR + "/images/greek/60.png", "\\varPhi", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/62.png", "\\Psi", null},
-        {Config.DATA_DIR + "/images/greek/63.png", "\\varPsi", "amsmath"},
-        {Config.DATA_DIR + "/images/greek/64.png", "\\Omega", null},
-        {Config.DATA_DIR + "/images/greek/65.png", "\\varOmega", "amsmath"}
-    };
+        string name;
+        string icon;
+        string id;
+    }
 
-    private const SymbolInfo[] symbols_arrows =
+    private const CategoryInfo[] _normal_categories =
     {
-        {Config.DATA_DIR + "/images/arrows/01.png", "\\leftarrow", null},
-        {Config.DATA_DIR + "/images/arrows/02.png", "\\leftrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/03.png", "\\rightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/04.png", "\\mapsto", null},
-        {Config.DATA_DIR + "/images/arrows/05.png", "\\longleftarrow", null},
-        {Config.DATA_DIR + "/images/arrows/06.png", "\\longleftrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/07.png", "\\longrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/08.png", "\\longmapsto", null},
-        {Config.DATA_DIR + "/images/arrows/09.png", "\\downarrow", null},
-        {Config.DATA_DIR + "/images/arrows/10.png", "\\updownarrow", null},
-        {Config.DATA_DIR + "/images/arrows/11.png", "\\uparrow", null},
-        {Config.DATA_DIR + "/images/arrows/12.png", "\\nwarrow", null},
-        {Config.DATA_DIR + "/images/arrows/13.png", "\\searrow", null},
-        {Config.DATA_DIR + "/images/arrows/14.png", "\\nearrow", null},
-        {Config.DATA_DIR + "/images/arrows/15.png", "\\swarrow", null},
-        {Config.DATA_DIR + "/images/arrows/16.png", "\\textdownarrow", "textcomp"},
-        {Config.DATA_DIR + "/images/arrows/17.png", "\\textuparrow", "textcomp"},
-        {Config.DATA_DIR + "/images/arrows/18.png", "\\textleftarrow", "textcomp"},
-        {Config.DATA_DIR + "/images/arrows/19.png", "\\textrightarrow", "textcomp"},
-        {Config.DATA_DIR + "/images/arrows/20.png", "\\nleftarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/21.png", "\\nleftrightarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/22.png", "\\nrightarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/23.png", "\\hookleftarrow", null},
-        {Config.DATA_DIR + "/images/arrows/24.png", "\\hookrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/25.png", "\\twoheadleftarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/26.png", "\\twoheadrightarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/27.png", "\\leftarrowtail", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/28.png", "\\rightarrowtail", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/29.png", "\\Leftarrow", null},
-        {Config.DATA_DIR + "/images/arrows/30.png", "\\Leftrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/31.png", "\\Rightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/32.png", "\\Longleftarrow", null},
-        {Config.DATA_DIR + "/images/arrows/33.png", "\\Longleftrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/34.png", "\\Longrightarrow", null},
-        {Config.DATA_DIR + "/images/arrows/35.png", "\\Updownarrow", null},
-        {Config.DATA_DIR + "/images/arrows/36.png", "\\Uparrow", null},
-        {Config.DATA_DIR + "/images/arrows/37.png", "\\Downarrow", null},
-        {Config.DATA_DIR + "/images/arrows/38.png", "\\nLeftarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/39.png", "\\nLeftrightarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/40.png", "\\nRightarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/41.png", "\\leftleftarrows", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/42.png", "\\leftrightarrows", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/43.png", "\\rightleftarrows", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/44.png", "\\rightrightarrows", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/45.png", "\\downdownarrows", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/46.png", "\\upuparrows", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/47.png", "\\circlearrowleft", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/48.png", "\\circlearrowright", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/49.png", "\\curvearrowleft", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/50.png", "\\curvearrowright", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/51.png", "\\Lsh", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/52.png", "\\Rsh", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/53.png", "\\looparrowleft", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/54.png", "\\looparrowright", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/55.png", "\\dashleftarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/56.png", "\\dashrightarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/57.png", "\\leftrightsquigarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/58.png", "\\rightsquigarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/59.png", "\\Lleftarrow", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/60.png", "\\leftharpoondown", null},
-        {Config.DATA_DIR + "/images/arrows/61.png", "\\rightharpoondown", null},
-        {Config.DATA_DIR + "/images/arrows/62.png", "\\leftharpoonup", null},
-        {Config.DATA_DIR + "/images/arrows/63.png", "\\rightharpoonup", null},
-        {Config.DATA_DIR + "/images/arrows/64.png", "\\rightleftharpoons", null},
-        {Config.DATA_DIR + "/images/arrows/65.png", "\\leftrightharpoons", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/66.png", "\\downharpoonleft", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/67.png", "\\upharpoonleft", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/68.png", "\\downharpoonright", "amssymb"},
-        {Config.DATA_DIR + "/images/arrows/69.png", "\\upharpoonright", "amssymb"}
+        { N_("Greek"), "symbol_greek", "greek" },
+        { N_("Arrows"), "symbol_arrows", "arrows" },
+        { N_("Relations"), "symbol_relations", "relations" },
+        { N_("Operators"), "symbol_operators", "operators" },
+        { N_("Delimiters"), "symbol_delimiters", "delimiters" },
+        { N_("Misc math"), "symbol_misc_math", "misc-math" },
+        { N_("Misc text"), "symbol_misc_text", "misc-text" }
     };
 
-    private const SymbolInfo[] symbols_relations =
-    {
-        {Config.DATA_DIR + "/images/relations/001.png", "\\bowtie", null},
-        {Config.DATA_DIR + "/images/relations/002.png", "\\Join", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/003.png", "\\propto", null},
-        {Config.DATA_DIR + "/images/relations/004.png", "\\varpropto", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/005.png", "\\multimap", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/006.png", "\\pitchfork", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/007.png", "\\therefore", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/008.png", "\\because", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/009.png", "=", null},
-        {Config.DATA_DIR + "/images/relations/010.png", "\\neq", null},
-        {Config.DATA_DIR + "/images/relations/011.png", "\\equiv", null},
-        {Config.DATA_DIR + "/images/relations/012.png", "\\approx", null},
-        {Config.DATA_DIR + "/images/relations/013.png", "\\sim", null},
-        {Config.DATA_DIR + "/images/relations/014.png", "\\simeq", null},
-        {Config.DATA_DIR + "/images/relations/015.png", "\\backsimeq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/016.png", "\\approxeq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/017.png", "\\cong", null},
-        {Config.DATA_DIR + "/images/relations/018.png", "\\ncong", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/019.png", "\\smile", null},
-        {Config.DATA_DIR + "/images/relations/020.png", "\\frown", null},
-        {Config.DATA_DIR + "/images/relations/021.png", "\\asymp", null},
-        {Config.DATA_DIR + "/images/relations/022.png", "\\smallfrown", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/023.png", "\\smallsmile", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/024.png", "\\between", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/025.png", "\\prec", null},
-        {Config.DATA_DIR + "/images/relations/026.png", "\\succ", null},
-        {Config.DATA_DIR + "/images/relations/027.png", "\\nprec", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/028.png", "\\nsucc", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/029.png", "\\preceq", null},
-        {Config.DATA_DIR + "/images/relations/030.png", "\\succeq", null},
-        {Config.DATA_DIR + "/images/relations/031.png", "\\npreceq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/032.png", "\\nsucceq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/033.png", "\\preccurlyeq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/034.png", "\\succcurlyeq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/035.png", "\\curlyeqprec", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/036.png", "\\curlyeqsucc", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/037.png", "\\precsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/038.png", "\\succsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/039.png", "\\precnsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/040.png", "\\succnsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/041.png", "\\precapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/042.png", "\\succapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/043.png", "\\precnapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/044.png", "\\succnapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/045.png", "\\perp", null},
-        {Config.DATA_DIR + "/images/relations/046.png", "\\vdash", null},
-        {Config.DATA_DIR + "/images/relations/047.png", "\\dashv", null},
-        {Config.DATA_DIR + "/images/relations/048.png", "\\nvdash", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/049.png", "\\Vdash", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/050.png", "\\Vvdash", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/051.png", "\\models", null},
-        {Config.DATA_DIR + "/images/relations/052.png", "\\vDash", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/053.png", "\\nvDash", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/054.png", "\\nVDash", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/055.png", "\\mid", null},
-        {Config.DATA_DIR + "/images/relations/056.png", "\\nmid", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/057.png", "\\parallel", null},
-        {Config.DATA_DIR + "/images/relations/058.png", "\\nparallel", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/059.png", "\\shortmid", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/060.png", "\\nshortmid", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/061.png", "\\shortparallel", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/062.png", "\\nshortparallel", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/063.png", "<", null},
-        {Config.DATA_DIR + "/images/relations/064.png", ">", null},
-        {Config.DATA_DIR + "/images/relations/065.png", "\\nless", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/066.png", "\\ngtr", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/067.png", "\\lessdot", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/068.png", "\\gtrdot", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/069.png", "\\ll", null},
-        {Config.DATA_DIR + "/images/relations/070.png", "\\gg", null},
-        {Config.DATA_DIR + "/images/relations/071.png", "\\lll", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/072.png", "\\ggg", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/073.png", "\\leq", null},
-        {Config.DATA_DIR + "/images/relations/074.png", "\\geq", null},
-        {Config.DATA_DIR + "/images/relations/075.png", "\\lneq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/076.png", "\\gneq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/077.png", "\\nleq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/078.png", "\\ngeq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/079.png", "\\leqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/080.png", "\\geqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/081.png", "\\lneqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/082.png", "\\gneqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/083.png", "\\lvertneqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/084.png", "\\gvertneqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/085.png", "\\nleqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/086.png", "\\ngeqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/087.png", "\\leqslant", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/088.png", "\\geqslant", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/089.png", "\\nleqslant", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/090.png", "\\ngeqslant", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/091.png", "\\eqslantless", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/092.png", "\\eqslantgtr", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/093.png", "\\lessgtr", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/094.png", "\\gtrless", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/095.png", "\\lesseqgtr", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/096.png", "\\gtreqless", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/097.png", "\\lesseqqgtr", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/098.png", "\\gtreqqless", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/099.png", "\\lesssim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/100.png", "\\gtrsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/101.png", "\\lnsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/102.png", "\\gnsim", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/103.png", "\\lessapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/104.png", "\\gtrapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/105.png", "\\lnapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/106.png", "\\gnapprox", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/107.png", "\\vartriangleleft", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/108.png", "\\vartriangleright", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/109.png", "\\ntriangleleft", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/110.png", "\\ntriangleright", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/111.png", "\\trianglelefteq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/112.png", "\\trianglerighteq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/113.png", "\\ntrianglelefteq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/114.png", "\\ntrianglerighteq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/115.png", "\\blacktriangleleft", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/116.png", "\\blacktriangleright", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/117.png", "\\subset", null},
-        {Config.DATA_DIR + "/images/relations/118.png", "\\supset", null},
-        {Config.DATA_DIR + "/images/relations/119.png", "\\subseteq", null},
-        {Config.DATA_DIR + "/images/relations/120.png", "\\supseteq", null},
-        {Config.DATA_DIR + "/images/relations/121.png", "\\subsetneq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/122.png", "\\supsetneq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/123.png", "\\varsubsetneq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/124.png", "\\varsupsetneq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/125.png", "\\nsubseteq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/126.png", "\\nsupseteq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/127.png", "\\subseteqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/128.png", "\\supseteqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/129.png", "\\subsetneqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/130.png", "\\supsetneqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/131.png", "\\nsubseteqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/132.png", "\\nsupseteqq", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/133.png", "\\backepsilon", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/134.png", "\\Subset", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/135.png", "\\Supset", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/136.png", "\\sqsubset", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/137.png", "\\sqsupset", "amssymb"},
-        {Config.DATA_DIR + "/images/relations/138.png", "\\sqsubseteq", null},
-        {Config.DATA_DIR + "/images/relations/139.png", "\\sqsupseteq", null}
-    };
+    private static Symbols _instance = null;
+    private ListStore _categories_store;
 
-    private const SymbolInfo[] symbols_operators =
+    // singleton
+    private Symbols ()
     {
-        {Config.DATA_DIR + "/images/operators/001.png", "\\pm", null},
-        {Config.DATA_DIR + "/images/operators/002.png", "\\mp", null},
-        {Config.DATA_DIR + "/images/operators/003.png", "\\times", null},
-        {Config.DATA_DIR + "/images/operators/004.png", "\\div", null},
-        {Config.DATA_DIR + "/images/operators/005.png", "\\ast", null},
-        {Config.DATA_DIR + "/images/operators/006.png", "\\star", null},
-        {Config.DATA_DIR + "/images/operators/007.png", "\\circ", null},
-        {Config.DATA_DIR + "/images/operators/008.png", "\\bullet", null},
-        {Config.DATA_DIR + "/images/operators/009.png", "\\divideontimes", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/010.png", "\\ltimes", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/011.png", "\\rtimes", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/012.png", "\\cdot", null},
-        {Config.DATA_DIR + "/images/operators/013.png", "\\dotplus", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/014.png", "\\leftthreetimes", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/015.png", "\\rightthreetimes", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/016.png", "\\amalg", null},
-        {Config.DATA_DIR + "/images/operators/017.png", "\\otimes", null},
-        {Config.DATA_DIR + "/images/operators/018.png", "\\oplus", null},
-        {Config.DATA_DIR + "/images/operators/019.png", "\\ominus", null},
-        {Config.DATA_DIR + "/images/operators/020.png", "\\oslash", null},
-        {Config.DATA_DIR + "/images/operators/021.png", "\\odot", null},
-        {Config.DATA_DIR + "/images/operators/022.png", "\\circledcirc", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/023.png", "\\circleddash", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/024.png", "\\circledast", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/025.png", "\\bigcirc", null},
-        {Config.DATA_DIR + "/images/operators/026.png", "\\boxdot", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/027.png", "\\boxminus", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/028.png", "\\boxplus", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/029.png", "\\boxtimes", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/030.png", "\\diamond", null},
-        {Config.DATA_DIR + "/images/operators/031.png", "\\bigtriangleup", null},
-        {Config.DATA_DIR + "/images/operators/032.png", "\\bigtriangledown", null},
-        {Config.DATA_DIR + "/images/operators/033.png", "\\triangleleft", null},
-        {Config.DATA_DIR + "/images/operators/034.png", "\\triangleright", null},
-        {Config.DATA_DIR + "/images/operators/035.png", "\\lhd", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/036.png", "\\rhd", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/037.png", "\\unlhd", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/038.png", "\\unrhd", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/039.png", "\\cup", null},
-        {Config.DATA_DIR + "/images/operators/040.png", "\\cap", null},
-        {Config.DATA_DIR + "/images/operators/041.png", "\\uplus", null},
-        {Config.DATA_DIR + "/images/operators/042.png", "\\Cup", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/043.png", "\\Cap", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/044.png", "\\wr", null},
-        {Config.DATA_DIR + "/images/operators/045.png", "\\setminus", null},
-        {Config.DATA_DIR + "/images/operators/046.png", "\\smallsetminus", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/047.png", "\\sqcap", null},
-        {Config.DATA_DIR + "/images/operators/048.png", "\\sqcup", null},
-        {Config.DATA_DIR + "/images/operators/049.png", "\\wedge", null},
-        {Config.DATA_DIR + "/images/operators/050.png", "\\vee", null},
-        {Config.DATA_DIR + "/images/operators/051.png", "\\barwedge", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/052.png", "\\veebar", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/053.png", "\\doublebarwedge", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/054.png", "\\curlywedge", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/055.png", "\\curlyvee", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/056.png", "\\dagger", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/057.png", "\\ddagger", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/058.png", "\\intercal", "amssymb"},
-        {Config.DATA_DIR + "/images/operators/059.png", "\\bigcap", null},
-        {Config.DATA_DIR + "/images/operators/060.png", "\\bigcup", null},
-        {Config.DATA_DIR + "/images/operators/061.png", "\\biguplus", null},
-        {Config.DATA_DIR + "/images/operators/062.png", "\\bigsqcup", null},
-        {Config.DATA_DIR + "/images/operators/063.png", "\\prod", null},
-        {Config.DATA_DIR + "/images/operators/064.png", "\\coprod", null},
-        {Config.DATA_DIR + "/images/operators/065.png", "\\bigwedge", null},
-        {Config.DATA_DIR + "/images/operators/066.png", "\\bigvee", null},
-        {Config.DATA_DIR + "/images/operators/067.png", "\\bigodot", null},
-        {Config.DATA_DIR + "/images/operators/068.png", "\\bigoplus", null},
-        {Config.DATA_DIR + "/images/operators/069.png", "\\bigotimes", null},
-        {Config.DATA_DIR + "/images/operators/070.png", "\\sum", null},
-        {Config.DATA_DIR + "/images/operators/071.png", "\\int", null},
-        {Config.DATA_DIR + "/images/operators/072.png", "\\oint", null},
-        {Config.DATA_DIR + "/images/operators/073.png", "\\iint", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/074.png", "\\iiint", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/075.png", "\\iiiint", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/076.png", "\\idotsint", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/077.png", "\\varlimsup", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/078.png", "\\varliminf", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/079.png", "\\varinjlim", "amsmath"},
-        {Config.DATA_DIR + "/images/operators/080.png", "\\varprojlim", "amsmath"}
-    };
+        _categories_store = new ListStore (SymbolsCategoryColumn.N_COLUMNS,
+            typeof (SymbolsCategoryType),
+            typeof (string), // the icon
+            typeof (string), // the name
+            typeof (ListStore)
+        );
 
-    private const SymbolInfo[] symbols_delimiters =
-    {
-        {Config.DATA_DIR + "/images/delimiters/01.png", "\\downarrow", null},
-        {Config.DATA_DIR + "/images/delimiters/02.png", "\\Downarrow", null},
-        {Config.DATA_DIR + "/images/delimiters/03.png", "[", null},
-        {Config.DATA_DIR + "/images/delimiters/04.png", "]", null},
-        {Config.DATA_DIR + "/images/delimiters/05.png", "\\langle", null},
-        {Config.DATA_DIR + "/images/delimiters/06.png", "\\rangle", null},
-        {Config.DATA_DIR + "/images/delimiters/07.png", "|", null},
-        {Config.DATA_DIR + "/images/delimiters/08.png", "\\|", null},
-        {Config.DATA_DIR + "/images/delimiters/09.png", "\\lceil", null},
-        {Config.DATA_DIR + "/images/delimiters/10.png", "\\rceil", null},
-        {Config.DATA_DIR + "/images/delimiters/11.png", "\\uparrow", null},
-        {Config.DATA_DIR + "/images/delimiters/12.png", "\\Uparrow", null},
-        {Config.DATA_DIR + "/images/delimiters/13.png", "\\lfloor", null},
-        {Config.DATA_DIR + "/images/delimiters/14.png", "\\rfloor", null},
-        {Config.DATA_DIR + "/images/delimiters/15.png", "\\updownarrow", null},
-        {Config.DATA_DIR + "/images/delimiters/16.png", "\\Updownarrow", null},
-        {Config.DATA_DIR + "/images/delimiters/17.png", "(", null},
-        {Config.DATA_DIR + "/images/delimiters/18.png", ")", null},
-        {Config.DATA_DIR + "/images/delimiters/19.png", "\\{", null},
-        {Config.DATA_DIR + "/images/delimiters/20.png", "\\}", null},
-        {Config.DATA_DIR + "/images/delimiters/21.png", "/", null},
-        {Config.DATA_DIR + "/images/delimiters/22.png", "\\backslash", null},
-        {Config.DATA_DIR + "/images/delimiters/23.png", "\\lmoustache", null},
-        {Config.DATA_DIR + "/images/delimiters/24.png", "\\rmoustache", null},
-        {Config.DATA_DIR + "/images/delimiters/25.png", "\\lgroup", null},
-        {Config.DATA_DIR + "/images/delimiters/26.png", "\\rgroup", null},
-        {Config.DATA_DIR + "/images/delimiters/27.png", "\\arrowvert", null},
-        {Config.DATA_DIR + "/images/delimiters/28.png", "\\Arrowvert", null},
-        {Config.DATA_DIR + "/images/delimiters/29.png", "\\bracevert", null},
-        {Config.DATA_DIR + "/images/delimiters/30.png", "\\lvert", "amsmath"},
-        {Config.DATA_DIR + "/images/delimiters/31.png", "\\rvert", "amsmath"},
-        {Config.DATA_DIR + "/images/delimiters/32.png", "\\lVert", "amsmath"},
-        {Config.DATA_DIR + "/images/delimiters/33.png", "\\rVert", "amsmath"},
-        {Config.DATA_DIR + "/images/delimiters/34.png", "\\ulcorner", "amssymb"},
-        {Config.DATA_DIR + "/images/delimiters/35.png", "\\urcorner", "amssymb"},
-        {Config.DATA_DIR + "/images/delimiters/36.png", "\\llcorner", "amssymb"},
-        {Config.DATA_DIR + "/images/delimiters/37.png", "\\lrcorner", "amssymb"}
-    };
+        /* Normal categories */
+        foreach (CategoryInfo info in _normal_categories)
+            add_normal_category (info);
 
-    private const SymbolInfo[] symbols_misc_math =
-    {
-        {Config.DATA_DIR + "/images/misc-math/01.png", "\\cdotp", null},
-        {Config.DATA_DIR + "/images/misc-math/02.png", "\\colon", null},
-        {Config.DATA_DIR + "/images/misc-math/03.png", "\\ldotp", null},
-        {Config.DATA_DIR + "/images/misc-math/04.png", "\\vdots", null},
-        {Config.DATA_DIR + "/images/misc-math/05.png", "\\cdots", null},
-        {Config.DATA_DIR + "/images/misc-math/06.png", "\\ddots", null},
-        {Config.DATA_DIR + "/images/misc-math/07.png", "\\ldots", null},
-        {Config.DATA_DIR + "/images/misc-math/08.png", "\\neg", null},
-        {Config.DATA_DIR + "/images/misc-math/09.png", "\\infty", null},
-        {Config.DATA_DIR + "/images/misc-math/10.png", "\\prime", null},
-        {Config.DATA_DIR + "/images/misc-math/11.png", "\\backprime", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/12.png", "\\backslash", null},
-        {Config.DATA_DIR + "/images/misc-math/13.png", "\\diagdown", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/14.png", "\\diagup", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/15.png", "\\surd", null},
-        {Config.DATA_DIR + "/images/misc-math/16.png", "\\emptyset", null},
-        {Config.DATA_DIR + "/images/misc-math/17.png", "\\varnothing", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/18.png", "\\sharp", null},
-        {Config.DATA_DIR + "/images/misc-math/19.png", "\\flat", null},
-        {Config.DATA_DIR + "/images/misc-math/20.png", "\\natural", null},
-        {Config.DATA_DIR + "/images/misc-math/21.png", "\\angle", null},
-        {Config.DATA_DIR + "/images/misc-math/22.png", "\\sphericalangle", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/23.png", "\\measuredangle", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/24.png", "\\Box", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/25.png", "\\square", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/26.png", "\\triangle", null},
-        {Config.DATA_DIR + "/images/misc-math/27.png", "\\vartriangle", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/28.png", "\\triangledown", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/29.png", "\\Diamond", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/30.png", "\\diamondsuit", null},
-        {Config.DATA_DIR + "/images/misc-math/31.png", "\\lozenge", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/32.png", "\\heartsuit", null},
-        {Config.DATA_DIR + "/images/misc-math/33.png", "\\blacksquare", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/34.png", "\\blacktriangle", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/35.png", "\\blacktriangledown", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/36.png", "\\blacklozenge", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/37.png", "\\bigstar", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/38.png", "\\spadesuit", null},
-        {Config.DATA_DIR + "/images/misc-math/39.png", "\\clubsuit", null},
-        {Config.DATA_DIR + "/images/misc-math/40.png", "\\forall", null},
-        {Config.DATA_DIR + "/images/misc-math/41.png", "\\exists", null},
-        {Config.DATA_DIR + "/images/misc-math/42.png", "\\nexists", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/43.png", "\\Finv", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/44.png", "\\Game", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/45.png", "\\ni", null},
-        {Config.DATA_DIR + "/images/misc-math/46.png", "\\in", null},
-        {Config.DATA_DIR + "/images/misc-math/47.png", "\\notin", null},
-        {Config.DATA_DIR + "/images/misc-math/48.png", "\\complement", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/set-N.png", "\\mathbb{N}", "amsfonts"},
-        {Config.DATA_DIR + "/images/misc-math/set-Z.png", "\\mathbb{Z}", "amsfonts"},
-        {Config.DATA_DIR + "/images/misc-math/set-Q.png", "\\mathbb{Q}", "amsfonts"},
-        {Config.DATA_DIR + "/images/misc-math/set-I.png", "\\mathbb{I}", "amsfonts"},
-        {Config.DATA_DIR + "/images/misc-math/set-R.png", "\\mathbb{R}", "amsfonts"},
-        {Config.DATA_DIR + "/images/misc-math/set-C.png", "\\mathbb{C}", "amsfonts"},
-        {Config.DATA_DIR + "/images/misc-math/49.png", "\\Im", null},
-        {Config.DATA_DIR + "/images/misc-math/50.png", "\\Re", null},
-        {Config.DATA_DIR + "/images/misc-math/51.png", "\\aleph", null},
-        {Config.DATA_DIR + "/images/misc-math/52.png", "\\wp", null},
-        {Config.DATA_DIR + "/images/misc-math/53.png", "\\hslash", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/54.png", "\\hbar", null},
-        {Config.DATA_DIR + "/images/misc-math/55.png", "\\imath", null},
-        {Config.DATA_DIR + "/images/misc-math/56.png", "\\jmath", null},
-        {Config.DATA_DIR + "/images/misc-math/57.png", "\\Bbbk", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/58.png", "\\ell", null},
-        {Config.DATA_DIR + "/images/misc-math/59.png", "\\circledR", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/60.png", "\\circledS", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/61.png", "\\bot", null},
-        {Config.DATA_DIR + "/images/misc-math/62.png", "\\top", null},
-        {Config.DATA_DIR + "/images/misc-math/63.png", "\\partial", null},
-        {Config.DATA_DIR + "/images/misc-math/64.png", "\\nabla", null},
-        {Config.DATA_DIR + "/images/misc-math/65.png", "\\eth", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/66.png", "\\mho", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-math/67.png", "\\acute{}", null},
-        {Config.DATA_DIR + "/images/misc-math/68.png", "\\grave{}", null},
-        {Config.DATA_DIR + "/images/misc-math/69.png", "\\check{}", null},
-        {Config.DATA_DIR + "/images/misc-math/70.png", "\\hat{}", null},
-        {Config.DATA_DIR + "/images/misc-math/71.png", "\\tilde{}", null},
-        {Config.DATA_DIR + "/images/misc-math/72.png", "\\bar{}", null},
-        {Config.DATA_DIR + "/images/misc-math/73.png", "\\vec{}", null},
-        {Config.DATA_DIR + "/images/misc-math/74.png", "\\breve{}", null},
-        {Config.DATA_DIR + "/images/misc-math/75.png", "\\dot{}", null},
-        {Config.DATA_DIR + "/images/misc-math/76.png", "\\ddot{}", null},
-        {Config.DATA_DIR + "/images/misc-math/77.png", "\\dddot{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/78.png", "\\ddddot{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/79.png", "\\mathring{}", null},
-        {Config.DATA_DIR + "/images/misc-math/80.png", "\\widetilde{}", null},
-        {Config.DATA_DIR + "/images/misc-math/81.png", "\\widehat{}", null},
-        {Config.DATA_DIR + "/images/misc-math/82.png", "\\overleftarrow{}", null},
-        {Config.DATA_DIR + "/images/misc-math/83.png", "\\overrightarrow{}", null},
-        {Config.DATA_DIR + "/images/misc-math/84.png", "\\overline{}", null},
-        {Config.DATA_DIR + "/images/misc-math/85.png", "\\underline{}", null},
-        {Config.DATA_DIR + "/images/misc-math/86.png", "\\overbrace{}", null},
-        {Config.DATA_DIR + "/images/misc-math/87.png", "\\underbrace{}", null},
-        {Config.DATA_DIR + "/images/misc-math/88.png", "\\overleftrightarrow{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/89.png", "\\underleftrightarrow{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/90.png", "\\underleftarrow{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/91.png", "\\underrightarrow{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/92.png", "\\xleftarrow{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/93.png", "\\xrightarrow{}", "amsmath"},
-        {Config.DATA_DIR + "/images/misc-math/94.png", "\\stackrel{}{}", null},
-        {Config.DATA_DIR + "/images/misc-math/95.png", "\\sqrt{}", null},
-        {Config.DATA_DIR + "/images/misc-math/96.png", "f'", null},
-        {Config.DATA_DIR + "/images/misc-math/97.png", "f''", null}
-    };
+        /* Most used symbols */
+        //add_new_category (Stock.ABOUT, _("Most Used"));
+    }
 
-    private const SymbolInfo[] symbols_misc_text =
+    public static Symbols get_default ()
     {
-        {Config.DATA_DIR + "/images/misc-text/001.png", "\\dots", null},
-        {Config.DATA_DIR + "/images/misc-text/002.png", "\\texttildelow", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/003.png", "\\textasciicircum", null},
-        {Config.DATA_DIR + "/images/misc-text/004.png", "\\textasciimacron", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/005.png", "\\textasciiacute", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/006.png", "\\textasciidieresis", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/007.png", "\\textasciitilde", null},
-        {Config.DATA_DIR + "/images/misc-text/008.png", "\\textasciigrave", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/009.png", "\\textasciibreve", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/010.png", "\\textasciicaron", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/011.png", "\\textacutedbl", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/012.png", "\\textgravedbl", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/013.png", "\\textquotedblleft", null},
-        {Config.DATA_DIR + "/images/misc-text/014.png", "\\textquotedblright", null},
-        {Config.DATA_DIR + "/images/misc-text/015.png", "\\textquoteleft", null},
-        {Config.DATA_DIR + "/images/misc-text/016.png", "\\textquoteright", null},
-        {Config.DATA_DIR + "/images/misc-text/017.png", "\\textquotestraightbase", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/018.png", "\\textquotestraightdblbase", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/019.png", "\\textquotesingle", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/020.png", "\\textdblhyphen", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/021.png", "\\textdblhyphenchar", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/022.png", "\\textasteriskcentered", null},
-        {Config.DATA_DIR + "/images/misc-text/023.png", "\\textperiodcentered", null},
-        {Config.DATA_DIR + "/images/misc-text/024.png", "\\textquestiondown", null},
-        {Config.DATA_DIR + "/images/misc-text/025.png", "\\textinterrobang", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/026.png", "\\textinterrobangdown", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/027.png", "\\textexclamdown", null},
-        {Config.DATA_DIR + "/images/misc-text/028.png", "\\texttwelveudash", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/029.png", "\\textemdash", null},
-        {Config.DATA_DIR + "/images/misc-text/030.png", "\\textendash", null},
-        {Config.DATA_DIR + "/images/misc-text/031.png", "\\textthreequartersemdash", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/032.png", "\\textvisiblespace", null},
-        {Config.DATA_DIR + "/images/misc-text/033.png", "\\_", null},
-        {Config.DATA_DIR + "/images/misc-text/034.png", "\\textcurrency", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/035.png", "\\textbaht", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/036.png", "\\textguarani", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/037.png", "\\textwon", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/038.png", "\\textcent", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/039.png", "\\textcentoldstyle", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/040.png", "\\textdollar", null},
-        {Config.DATA_DIR + "/images/misc-text/041.png", "\\textdollaroldstyle", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/042.png", "\\textlira", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/043.png", "\\textyen", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/044.png", "\\textdong", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/045.png", "\\textnaira", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/046.png", "\\textcolonmonetary", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/047.png", "\\textpeso", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/048.png", "\\pounds", null},
-        {Config.DATA_DIR + "/images/misc-text/049.png", "\\textflorin", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/050.png", "\\texteuro", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/051.png", "\\geneuro", "eurosym"},
-        {Config.DATA_DIR + "/images/misc-text/052.png", "\\geneuronarrow", "eurosym"},
-        {Config.DATA_DIR + "/images/misc-text/053.png", "\\geneurowide", "eurosym"},
-        {Config.DATA_DIR + "/images/misc-text/054.png", "\\officialeuro", "eurosym"},
-        {Config.DATA_DIR + "/images/misc-text/055.png", "\\textcircled{a}", null},
-        {Config.DATA_DIR + "/images/misc-text/056.png", "\\textcopyright", null},
-        {Config.DATA_DIR + "/images/misc-text/057.png", "\\textcopyleft", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/058.png", "\\textregistered", null},
-        {Config.DATA_DIR + "/images/misc-text/059.png", "\\texttrademark", null},
-        {Config.DATA_DIR + "/images/misc-text/060.png", "\\textservicemark", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/061.png", "\\oldstylenums{0}", null},
-        {Config.DATA_DIR + "/images/misc-text/062.png", "\\oldstylenums{1}", null},
-        {Config.DATA_DIR + "/images/misc-text/063.png", "\\oldstylenums{2}", null},
-        {Config.DATA_DIR + "/images/misc-text/064.png", "\\oldstylenums{3}", null},
-        {Config.DATA_DIR + "/images/misc-text/065.png", "\\oldstylenums{4}", null},
-        {Config.DATA_DIR + "/images/misc-text/066.png", "\\oldstylenums{5}", null},
-        {Config.DATA_DIR + "/images/misc-text/067.png", "\\oldstylenums{6}", null},
-        {Config.DATA_DIR + "/images/misc-text/068.png", "\\oldstylenums{7}", null},
-        {Config.DATA_DIR + "/images/misc-text/069.png", "\\oldstylenums{8}", null},
-        {Config.DATA_DIR + "/images/misc-text/070.png", "\\oldstylenums{9}", null},
-        {Config.DATA_DIR + "/images/misc-text/071.png", "\\textonehalf", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/072.png", "\\textonequarter", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/073.png", "\\textthreequarters", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/074.png", "\\textonesuperior", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/075.png", "\\texttwosuperior", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/076.png", "\\textthreesuperior", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/077.png", "\\textnumero", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/078.png", "\\textpertenthousand", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/079.png", "\\textperthousand", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/080.png", "\\textdiscount", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/081.png", "\\textblank", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/082.png", "\\textrecipe", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/083.png", "\\textestimated", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/084.png", "\\textreferencemark", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/085.png", "\\textmusicalnote", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/086.png", "\\dag", null},
-        {Config.DATA_DIR + "/images/misc-text/087.png", "\\ddag", null},
-        {Config.DATA_DIR + "/images/misc-text/088.png", "\\S", null},
-        {Config.DATA_DIR + "/images/misc-text/089.png", "\\$", null},
-        {Config.DATA_DIR + "/images/misc-text/090.png", "\\textpilcrow", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/091.png", "\\Cutleft", "marvosym"},
-        {Config.DATA_DIR + "/images/misc-text/092.png", "\\Cutright", "marvosym"},
-        {Config.DATA_DIR + "/images/misc-text/093.png", "\\Leftscissors", "marvosym"},
-        {Config.DATA_DIR + "/images/misc-text/094.png", "\\Cutline", "marvosym"},
-        {Config.DATA_DIR + "/images/misc-text/095.png", "\\Kutline", "marvosym"},
-        {Config.DATA_DIR + "/images/misc-text/096.png", "\\Rightscissors", "marvosym"},
-        {Config.DATA_DIR + "/images/misc-text/097.png", "\\CheckedBox", "wasysym"},
-        {Config.DATA_DIR + "/images/misc-text/098.png", "\\Square", "wasysym"},
-        {Config.DATA_DIR + "/images/misc-text/099.png", "\\XBox", "wasysym"},
-        {Config.DATA_DIR + "/images/misc-text/100.png", "\\textbigcircle", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/101.png", "\\textopenbullet", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/102.png", "\\textbullet", null},
-        {Config.DATA_DIR + "/images/misc-text/103.png", "\\checkmark", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-text/104.png", "\\maltese", "amssymb"},
-        {Config.DATA_DIR + "/images/misc-text/105.png", "\\textordmasculine", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/106.png", "\\textordfeminine", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/107.png", "\\textborn", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/108.png", "\\textdivorced", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/109.png", "\\textdied", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/110.png", "\\textmarried", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/111.png", "\\textleaf", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/112.png", "\\textcelsius", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/113.png", "\\textdegree", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/114.png", "\\textmho", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/115.png", "\\textohm", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/116.png", "\\textbackslash", null},
-        {Config.DATA_DIR + "/images/misc-text/117.png", "\\textbar", null},
-        {Config.DATA_DIR + "/images/misc-text/118.png", "\\textbrokenbar", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/119.png", "\\textbardbl", null},
-        {Config.DATA_DIR + "/images/misc-text/120.png", "\\textfractionsolidus", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/121.png", "\\textlangle", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/122.png", "\\textlnot", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/123.png", "\\textminus", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/124.png", "\\textrangle", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/125.png", "\\textlbrackdbl", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/126.png", "\\textrbrackdbl", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/127.png", "\\textmu", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/128.png", "\\textpm", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/129.png", "\\textlquill", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/130.png", "\\textrquill", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/131.png", "\\textless", null},
-        {Config.DATA_DIR + "/images/misc-text/132.png", "\\textgreater", null},
-        {Config.DATA_DIR + "/images/misc-text/133.png", "\\textsurd", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/134.png", "\\texttimes", "textcomp"},
-        {Config.DATA_DIR + "/images/misc-text/135.png", "\\textdiv", "textcomp"}
-    };
+        if (_instance == null)
+            _instance = new Symbols ();
 
-    enum SymbolColumn
-    {
-        PIXBUF,
-        COMMAND,
-        TOOLTIP,
-        ID,
-        PACKAGE,
-        N_COLUMNS
+        return _instance;
     }
 
-    enum CategoryColumn
+    public TreeModel get_categories_model ()
     {
-        ICON,
-        NAME,
-        N_COLUMNS
+        return _categories_store as TreeModel;
     }
 
-    private static bool _stores_initialized = false;
-    private static ListStore _categories_store;
-    private static ListStore[] symbols_stores = new ListStore[8];
-    private static ListStore mus_store;
-    private unowned MainWindow _main_window;
-    private IconView _symbol_view;
-    private Button _clear_button;
-
-    private uint _timeout_id = 0;
-
-    public Symbols (MainWindow main_window)
+    private void add_normal_category (CategoryInfo info)
     {
-        _main_window = main_window;
-
-        orientation = Orientation.VERTICAL;
-        set_row_spacing (3);
-
-        init_stores ();
-        create_combo_box ();
-        create_icon_view ();
+        ListStore store = new NormalSymbols (info.id);
 
-        show_all ();
-        _clear_button.hide ();
-
-        show.connect (() => resize_iconview ());
+        TreeIter iter;
+        _categories_store.append (out iter);
+        _categories_store.set (iter,
+            SymbolsCategoryColumn.TYPE, SymbolsCategoryType.NORMAL,
+            SymbolsCategoryColumn.ICON, info.icon,
+            SymbolsCategoryColumn.NAME, _(info.name),
+            SymbolsCategoryColumn.SYMBOLS_STORE, store
+        );
     }
 
-    // HACK the IconView is not resized with GTK+ 3.4, see:
-    // https://bugzilla.gnome.org/show_bug.cgi?id=673326
-    // TODO when the IconView is fixed, remove this hack.
-    public void resize_iconview ()
+    /* MOST USED SYMBOLS */
+    public static void reload_most_used_symbols ()
     {
-        if (_timeout_id > 0)
-            return;
-
-        // Resize every 100ms.
-        _timeout_id = Timeout.add (100, () =>
-        {
-            TreeModel model = _symbol_view.get_model ();
-            _symbol_view.set_model (null);
-            _symbol_view.set_model (model);
-            _timeout_id = 0;
-            return false;
-        });
-    }
+        /*
+        _most_used_store.clear ();
 
-    private void init_stores ()
-    {
-        if (! _stores_initialized)
+        foreach (MostUsedSymbol mus in MostUsedSymbols.get_default ())
         {
-            init_categories_store ();
-            init_symbols_stores ();
-
-            _stores_initialized = true;
+            var symbol = get_symbol_info_from_most_used (mus);
+            insert_symbol (_most_used_store, -1, symbol);
         }
+        */
     }
 
-    private void init_categories_store ()
+    public static void insert_most_used_symbol (int index, MostUsedSymbol symbol)
     {
-        _categories_store = new ListStore (CategoryColumn.N_COLUMNS,
-            typeof (string), // the icon (stock-id)
-            typeof (string)  // the name
-        );
-
-        foreach (CategoryInfo info in _categories)
-        {
-            TreeIter iter;
-            _categories_store.append (out iter);
-            _categories_store.set (iter,
-                CategoryColumn.ICON, info.icon,
-                CategoryColumn.NAME, _(info.name));
-        }
+//        insert_symbol (_most_used_store, index, get_symbol_info_from_most_used (symbol));
     }
 
-    private void init_symbols_stores ()
+    public static void remove_most_used_symbol (int index)
     {
-        symbols_stores[0] = get_symbol_store (symbols_greek);
-        symbols_stores[1] = get_symbol_store (symbols_arrows);
-        symbols_stores[2] = get_symbol_store (symbols_relations);
-        symbols_stores[3] = get_symbol_store (symbols_operators);
-        symbols_stores[4] = get_symbol_store (symbols_delimiters);
-        symbols_stores[5] = get_symbol_store (symbols_misc_math);
-        symbols_stores[6] = get_symbol_store (symbols_misc_text);
-
-        symbols_stores[7] = mus_store = new ListStore (SymbolColumn.N_COLUMNS,
-            typeof (Gdk.Pixbuf), typeof (string), typeof (string), typeof (string),
-            typeof (string));
-
-        reload_most_used_symbols ();
+        /*
+        TreePath path = new TreePath.from_indices (index, -1);
+        TreeIter iter;
+        if (_most_used_store.get_iter (out iter, path))
+            _most_used_store.remove (iter);
+        */
     }
 
-    private void create_combo_box ()
+    public static void swap_most_used_symbol (int current_index, int new_index)
     {
-        ComboBox combo_box = new ComboBox.with_model (_categories_store);
-        combo_box.hexpand = true;
-
-        CellRendererPixbuf pixbuf_renderer = new CellRendererPixbuf ();
-        combo_box.pack_start (pixbuf_renderer, false);
-        combo_box.set_attributes (pixbuf_renderer,
-            "stock-id", CategoryColumn.ICON, null);
-
-        CellRendererText text_renderer = new CellRendererText ();
-        text_renderer.ellipsize_set = true;
-        text_renderer.ellipsize = Pango.EllipsizeMode.END;
-        combo_box.pack_start (text_renderer, true);
-        combo_box.set_attributes (text_renderer, "text", CategoryColumn.NAME, null);
-
-        combo_box.set_active (0);
+        /*
+        TreePath current_path = new TreePath.from_indices (current_index, -1);
+        TreePath new_path = new TreePath.from_indices (new_index, -1);
 
-        add (combo_box);
+        TreeIter current_iter = {};
+        TreeIter new_iter = {};
 
-        combo_box.changed.connect (() =>
+        if (_most_used_store.get_iter (out current_iter, current_path)
+            && _most_used_store.get_iter (out new_iter, new_path))
         {
-            int num = combo_box.get_active ();
-
-            if (_symbol_view != null)
-                _symbol_view.set_model (symbols_stores[num]);
-
-            if (num == symbols_stores.length - 1)
-                _clear_button.show ();
-            else
-                _clear_button.hide ();
-        });
+            _most_used_store.move_before (ref current_iter, new_iter);
+        }
+        */
     }
+}
 
-    private void create_icon_view ()
+private class NormalSymbols : ListStore
+{
+    private struct SymbolInfo
     {
-        /* show the symbols */
-        _symbol_view = new IconView.with_model (symbols_stores[0]);
-        _symbol_view.set_pixbuf_column (SymbolColumn.PIXBUF);
-        _symbol_view.set_tooltip_column (SymbolColumn.TOOLTIP);
-        _symbol_view.set_selection_mode (SelectionMode.SINGLE);
-        _symbol_view.spacing = 0;
-        _symbol_view.row_spacing = 0;
-        _symbol_view.column_spacing = 0;
-        _symbol_view.expand = true;
-
-        Widget sw = Utils.add_scrollbar (_symbol_view);
-        sw.expand = true;
-        add (sw);
-
-        /* clear button (for most used symbols) */
-        _clear_button = new Button.from_stock (Stock.CLEAR);
-        add (_clear_button);
-
-        /* signals */
-        _clear_button.clicked.connect (() =>
-        {
-            mus_store.clear ();
-            MostUsedSymbols.get_default ().clear ();
-        });
-
-        _symbol_view.selection_changed.connect (() =>
-        {
-            if (_main_window.active_tab == null)
-            {
-                _symbol_view.unselect_all ();
-                return;
-            }
-
-            var selected_items = _symbol_view.get_selected_items ();
-
-            // unselect the symbol, so the user can insert several times the same symbol
-            _symbol_view.unselect_all ();
-
-            TreePath path = selected_items.nth_data (0);
-            TreeModel model = _symbol_view.get_model ();
-            TreeIter iter = {};
-
-            if (path != null && model.get_iter (out iter, path))
-            {
-                string latex_command, id, package;
-                model.get (iter,
-                    SymbolColumn.COMMAND, out latex_command,
-                    SymbolColumn.ID, out id,
-                    SymbolColumn.PACKAGE, out package,
-                    -1);
-
-                // insert the symbol in the current document
-                _main_window.active_document.begin_user_action ();
-                _main_window.active_document.insert_at_cursor (latex_command, -1);
-                _main_window.active_document.insert_at_cursor (" ", -1);
-                _main_window.active_document.end_user_action ();
-                _main_window.active_view.grab_focus ();
-
-                // insert to most used symbol
-                MostUsedSymbols.get_default ().add_symbol (id, latex_command,
-                    package != "" ? package : null);
-            }
-        });
+        string icon_file;
+        string latex_command;
+        string? package_required;
     }
 
-    private ListStore get_symbol_store (SymbolInfo[] symbols)
+    private string _category_id;
+    private string _resource_path;
+
+    public NormalSymbols (string category_id)
     {
-        ListStore symbol_store = new ListStore (SymbolColumn.N_COLUMNS,
+        _category_id = category_id;
+        _resource_path = @"/org/gnome/latexila/symbols/$category_id/";
+
+        Type[] column_types = {
             typeof (Gdk.Pixbuf),
-            typeof (string),    // command
-            typeof (string),    // tooltip
-            typeof (string),    // id
-            typeof (string)     // package
-            );
+            typeof (string), // command
+            typeof (string), // tooltip
+            typeof (string), // package
+            typeof (string)  // id
+        };
 
-        foreach (SymbolInfo symbol in symbols)
-            insert_symbol (symbol_store, -1, symbol);
+        set_column_types (column_types);
 
-        return symbol_store;
+        load_symbols ();
     }
 
-    private static string get_symbol_id (string path)
+    private void load_symbols ()
     {
-        long l = path.length;
-        bool second = false;
-
-        for (long i = l - 1 ; i >= 0 ; i--)
+        try
         {
-            if (path[i] == '/')
-            {
-                if (second)
-                    return path[i+1:l];
-                second = true;
-            }
-        }
-
-        return_val_if_reached ("no id");
-    }
-
-    public static void reload_most_used_symbols ()
-    {
-        mus_store.clear ();
+            unowned string contents =
+                Utils.get_string_from_resource (_resource_path + "data.xml");
 
-        foreach (MostUsedSymbol mus in MostUsedSymbols.get_default ())
+            MarkupParser parser = { parser_start, null, null, null, null };
+            MarkupParseContext context = new MarkupParseContext (parser, 0, this, null);
+            context.parse (contents, -1);
+        }
+        catch (GLib.Error e)
         {
-            var symbol = get_symbol_info_from_most_used (mus);
-            insert_symbol (mus_store, -1, symbol);
+            warning ("Impossible to load the symbols: %s", e.message);
         }
     }
 
-    private static SymbolInfo get_symbol_info_from_most_used (MostUsedSymbol mus)
+    private void add_symbol (SymbolInfo symbol)
     {
-        SymbolInfo symbol = SymbolInfo ();
-        symbol.filename = Config.DATA_DIR + "/images/" + mus.id;
-        symbol.latex_command = mus.latex_command;
-        symbol.package_required = mus.package_required;
-        return symbol;
-    }
+        Gdk.Pixbuf pixbuf;
 
-    private static void insert_symbol (ListStore symbol_store, int index,
-        SymbolInfo symbol)
-    {
         try
         {
-            Gdk.Pixbuf pixbuf = new Gdk.Pixbuf.from_file (symbol.filename);
-
-            // some characters ('<' for example) generate errors for the tooltip,
-            // so we must escape it
-            string tooltip = Markup.escape_text (symbol.latex_command);
-
-            if (symbol.package_required != null)
-                tooltip += " (package %s)".printf (symbol.package_required);
-
-            TreeIter iter;
-            if (index == -1)
-                symbol_store.append (out iter);
-            else
-                symbol_store.insert (out iter, index);
-            symbol_store.set (iter,
-                SymbolColumn.PIXBUF, pixbuf,
-                SymbolColumn.COMMAND, symbol.latex_command,
-                SymbolColumn.TOOLTIP, tooltip,
-                SymbolColumn.ID, get_symbol_id (symbol.filename),
-                SymbolColumn.PACKAGE, symbol.package_required ?? "",
-                -1);
+            pixbuf = Gdk.MyPixbuf.from_resource (_resource_path + symbol.icon_file);
         }
         catch (Error e)
         {
             warning ("Impossible to load the symbol: %s", e.message);
+            return;
         }
-    }
 
-    public static void insert_most_used_symbol (int index, MostUsedSymbol symbol)
-    {
-        insert_symbol (mus_store, index, get_symbol_info_from_most_used (symbol));
-    }
+        // Some characters ('<' for example) generate errors for the tooltip,
+        // so the text must be escaped.
+        string tooltip = Markup.escape_text (symbol.latex_command);
+
+        if (symbol.package_required != null)
+            tooltip += " (package %s)".printf (symbol.package_required);
+
+        string id = "%s/%s".printf (_category_id, symbol.icon_file);
 
-    public static void remove_most_used_symbol (int index)
-    {
-        TreePath path = new TreePath.from_indices (index, -1);
         TreeIter iter;
-        if (mus_store.get_iter (out iter, path))
-            mus_store.remove (iter);
+        append (out iter);
+        set (iter,
+            SymbolColumn.PIXBUF, pixbuf,
+            SymbolColumn.COMMAND, symbol.latex_command,
+            SymbolColumn.TOOLTIP, tooltip,
+            SymbolColumn.ID, id
+        );
     }
 
-    public static void swap_most_used_symbol (int current_index, int new_index)
+    private void parser_start (MarkupParseContext context, string name,
+        string[] attr_names, string[] attr_values) throws MarkupError
     {
-        TreePath current_path = new TreePath.from_indices (current_index, -1);
-        TreePath new_path = new TreePath.from_indices (new_index, -1);
-
-        TreeIter current_iter = {};
-        TreeIter new_iter = {};
+        switch (name)
+        {
+            case "symbols":
+                return;
 
-        if (mus_store.get_iter (out current_iter, current_path)
-            && mus_store.get_iter (out new_iter, new_path))
-            mus_store.move_before (ref current_iter, new_iter);
+            case "symbol":
+                SymbolInfo symbol = SymbolInfo ();
+                symbol.package_required = null;
+
+                for (int i = 0 ; i < attr_names.length ; i++)
+                {
+                    switch (attr_names[i])
+                    {
+                        case "file":
+                            symbol.icon_file = attr_values[i];
+                            break;
+
+                        case "command":
+                            symbol.latex_command = attr_values[i];
+                            break;
+
+                        case "package":
+                            symbol.package_required = attr_values[i];
+                            break;
+
+                        default:
+                            throw new MarkupError.UNKNOWN_ATTRIBUTE (
+                                "unknown attribute \"" + attr_names[i] + "\"");
+                    }
+                }
+
+                add_symbol (symbol);
+                break;
+
+            default:
+                throw new MarkupError.UNKNOWN_ELEMENT (
+                    "unknown element \"" + name + "\"");
+        }
     }
 }
diff --git a/src/symbols_view.vala b/src/symbols_view.vala
new file mode 100644
index 0000000..b1b9b42
--- /dev/null
+++ b/src/symbols_view.vala
@@ -0,0 +1,186 @@
+/*
+ * This file is part of LaTeXila.
+ *
+ * Copyright  2012 SÃbastien Wilmet
+ *
+ * LaTeXila is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * LaTeXila is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with LaTeXila.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: SÃbastien Wilmet
+ */
+
+using Gtk;
+
+// Lists of LaTeX symbols, displayed in the side panel.
+// There are different categories, listed in a combo box.
+// There is a special category that contains the most used symbols, with a clear button.
+public class SymbolsView : Grid
+{
+    private unowned MainWindow _main_window;
+    private ComboBox _combo_box;
+    private IconView _symbol_view;
+    private Button _clear_button;
+    private uint _timeout_id = 0;
+
+    public SymbolsView (MainWindow main_window)
+    {
+        _main_window = main_window;
+
+        create_combo_box ();
+        create_icon_view ();
+        create_clear_button ();
+
+        // Packing widgets
+        orientation = Orientation.VERTICAL;
+        set_row_spacing (3);
+
+        add (_combo_box);
+
+        Widget sw = Utils.add_scrollbar (_symbol_view);
+        sw.expand = true; // FIXME still useful?
+        add (sw);
+
+        add (_clear_button);
+
+        show_all ();
+        show.connect (() => resize_iconview ());
+
+        _combo_box.set_active (0);
+    }
+
+    // HACK the IconView is not resized with GTK+ 3.4, see:
+    // https://bugzilla.gnome.org/show_bug.cgi?id=673326
+    // TODO when the IconView is fixed, remove this hack.
+    public void resize_iconview ()
+    {
+        if (_timeout_id > 0)
+            return;
+
+        // Resize every 100ms.
+        _timeout_id = Timeout.add (100, () =>
+        {
+            TreeModel model = _symbol_view.get_model ();
+            _symbol_view.set_model (null);
+            _symbol_view.set_model (model);
+            _timeout_id = 0;
+            return false;
+        });
+    }
+
+    private void create_combo_box ()
+    {
+        TreeModel categories_model = Symbols.get_default ().get_categories_model ();
+
+        _combo_box = new ComboBox.with_model (categories_model);
+        _combo_box.hexpand = true;
+
+        CellRendererPixbuf pixbuf_renderer = new CellRendererPixbuf ();
+        _combo_box.pack_start (pixbuf_renderer, false);
+        _combo_box.set_attributes (pixbuf_renderer,
+            "stock-id", SymbolsCategoryColumn.ICON, null);
+
+        CellRendererText text_renderer = new CellRendererText ();
+        text_renderer.ellipsize_set = true;
+        text_renderer.ellipsize = Pango.EllipsizeMode.END;
+        _combo_box.pack_start (text_renderer, true);
+        _combo_box.set_attributes (text_renderer,
+            "text", SymbolsCategoryColumn.NAME, null);
+
+        _combo_box.changed.connect (() =>
+        {
+            TreeIter iter = {};
+
+            if (! _combo_box.get_active_iter (out iter))
+                return;
+
+            ListStore store;
+            SymbolsCategoryType type;
+
+            categories_model.get (iter,
+                SymbolsCategoryColumn.SYMBOLS_STORE, out store,
+                SymbolsCategoryColumn.TYPE, out type
+            );
+
+            if (_symbol_view != null)
+                _symbol_view.set_model (store);
+
+            if (type == SymbolsCategoryType.MOST_USED)
+                _clear_button.show ();
+            else
+                _clear_button.hide ();
+        });
+    }
+
+    private void create_icon_view ()
+    {
+        /* show the symbols */
+        _symbol_view = new IconView ();
+        _symbol_view.set_pixbuf_column (SymbolColumn.PIXBUF);
+        _symbol_view.set_tooltip_column (SymbolColumn.TOOLTIP);
+        _symbol_view.set_selection_mode (SelectionMode.SINGLE);
+        _symbol_view.spacing = 0;
+        _symbol_view.row_spacing = 0;
+        _symbol_view.column_spacing = 0;
+        _symbol_view.expand = true;
+
+        _symbol_view.selection_changed.connect (() =>
+        {
+            if (_main_window.active_tab == null)
+            {
+                _symbol_view.unselect_all ();
+                return;
+            }
+
+            var selected_items = _symbol_view.get_selected_items ();
+
+            // Unselect the symbol, so the user can insert several times the same symbol.
+            _symbol_view.unselect_all ();
+
+            TreePath path = selected_items.nth_data (0);
+            TreeModel model = _symbol_view.get_model ();
+            TreeIter iter = {};
+
+            if (path != null && model.get_iter (out iter, path))
+            {
+                string latex_command;
+                string id;
+
+                model.get (iter,
+                    SymbolColumn.COMMAND, out latex_command,
+                    SymbolColumn.ID, out id
+                );
+
+                // insert the symbol in the current document
+                _main_window.active_document.begin_user_action ();
+                _main_window.active_document.insert_at_cursor (@"$latex_command ", -1);
+                _main_window.active_document.end_user_action ();
+                _main_window.active_view.grab_focus ();
+
+                // insert to most used symbol
+//                MostUsedSymbols.get_default ().add_symbol (id, latex_command,
+//                    package != "" ? package : null);
+            }
+        });
+    }
+
+    private void create_clear_button ()
+    {
+        _clear_button = new Button.from_stock (Stock.CLEAR);
+
+//        _clear_button.clicked.connect (() =>
+//        {
+//            _most_used_store.clear ();
+//            MostUsedSymbols.get_default ().clear ();
+//        });
+    }
+}
diff --git a/src/utils.vala b/src/utils.vala
index 24fab78..d959ab5 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -75,6 +75,12 @@ namespace Utils
         return true;
     }
 
+    public unowned string get_string_from_resource (string resource_path)
+    {
+        Bytes bytes = resources_lookup_data (resource_path, 0);
+        return (string) bytes.get_data ();
+    }
+
 
     /*************************************************************************/
     // URI, File or Path utilities



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]