diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/WpfTex/LatexEditor/App.config b/WpfTex/LatexEditor/App.config
new file mode 100644
index 0000000..88fa402
--- /dev/null
+++ b/WpfTex/LatexEditor/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WpfTex/LatexEditor/App.xaml b/WpfTex/LatexEditor/App.xaml
new file mode 100644
index 0000000..f65b566
--- /dev/null
+++ b/WpfTex/LatexEditor/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/WpfTex/LatexEditor/App.xaml.cs b/WpfTex/LatexEditor/App.xaml.cs
new file mode 100644
index 0000000..4846236
--- /dev/null
+++ b/WpfTex/LatexEditor/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace LatexEditor
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/WpfTex/LatexEditor/Fonts/CmFont.cs b/WpfTex/LatexEditor/Fonts/CmFont.cs
new file mode 100644
index 0000000..e2fe24d
--- /dev/null
+++ b/WpfTex/LatexEditor/Fonts/CmFont.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LatexEditor.Fonts
+{
+ public enum CmFont
+ {
+ Serif = 0,
+ SerifOblique,
+ SerifItalic,
+ SerifItalicUpright,
+ SerifBold,
+ SerifBoldOblique,
+ SerifBoldItalic,
+ ClassicalItalic,
+ Sans,
+ SansOblique,
+ SansBold,
+ SansBoldOblique,
+ SansDemicondensed,
+ Typewriter,
+ TypewriterOblique,
+ TypewriterItalic,
+ TypewriterBold,
+ TypewriterBoldItalic,
+ TypewriterLight,
+ TypewriterLightOblique,
+ TypewriterVariable,
+ TypewriterVariableItalic,
+ Concrete,
+ ConcreteItalic,
+ ConcreteBold,
+ ConcreteBoldItalic,
+ Bright,
+ BrightSemibold,
+ BrightSemiboldOblique,
+ BrightBold,
+ BrightBoldOblique,
+
+ MathItalic,
+ MathBoldItalic,
+ MathExtension,
+ Symbols,
+ SymbolsBold
+ }
+}
\ No newline at end of file
diff --git a/WpfTex/LatexEditor/Fonts/CmManager.cs b/WpfTex/LatexEditor/Fonts/CmManager.cs
new file mode 100644
index 0000000..73ed246
--- /dev/null
+++ b/WpfTex/LatexEditor/Fonts/CmManager.cs
@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace LatexEditor.Fonts
+{
+ public static class CmManager
+ {
+ private static readonly Dictionary FontCodes = new Dictionary
+ {
+ [CmFont.Serif] = "cmun/cmunrm",
+ [CmFont.SerifOblique] = "cmun/cmunsl",
+ [CmFont.SerifItalic] = "cmun/cmunti",
+ [CmFont.SerifItalicUpright] = "cmun/cmunui",
+ [CmFont.SerifBold] = "cmun/cmunbx",
+ [CmFont.SerifBoldOblique] = "cmun/cmunbl",
+ [CmFont.SerifBoldItalic] = "cmun/cmunbi",
+ [CmFont.ClassicalItalic] = "cmun/cmunci",
+ [CmFont.Sans] = "cmun/cmunss",
+ [CmFont.SansOblique] = "cmun/cmunsi",
+ [CmFont.SansBold] = "cmun/cmunsx",
+ [CmFont.SansBoldOblique] = "cmun/cmunso",
+ [CmFont.SansDemicondensed] = "cmun/cmunssdc",
+ [CmFont.Typewriter] = "cmun/cmuntt",
+ [CmFont.TypewriterOblique] = "cmun/cmunst",
+ [CmFont.TypewriterItalic] = "cmun/cmunit",
+ [CmFont.TypewriterBold] = "cmun/cmuntb",
+ [CmFont.TypewriterBoldItalic] = "cmun/cmuntx",
+ [CmFont.TypewriterLight] = "cmun/cmunbtl",
+ [CmFont.TypewriterLightOblique] = "cmun/cmunbto",
+ [CmFont.TypewriterVariable] = "cmun/cmunvt",
+ [CmFont.TypewriterVariableItalic] = "cmun/cmunvi",
+ [CmFont.Concrete] = "cmun/cmunorm",
+ [CmFont.ConcreteItalic] = "cmun/cmunoti",
+ [CmFont.ConcreteBold] = "cmun/cmunobx",
+ [CmFont.ConcreteBoldItalic] = "cmun/cmunobi",
+ [CmFont.Bright] = "cmun/cmunbmr",
+ [CmFont.BrightSemibold] = "cmun/cmunbmo",
+ [CmFont.BrightSemiboldOblique] = "cmun/cmunbsr",
+ [CmFont.BrightBold] = "cmun/cmunbbx",
+ [CmFont.BrightBoldOblique] = "cmun/cmunbxo",
+
+ [CmFont.MathItalic] = "cm/cmmi",
+ [CmFont.MathBoldItalic] = "cm/cmmib",
+ [CmFont.MathExtension] = "cm/cmex",
+ [CmFont.Symbols] = "cm/cmsy",
+ [CmFont.SymbolsBold] = "cm/cmbsy",
+ };
+
+ private static readonly Dictionary EmSizes = new Dictionary
+ {
+ [CmFont.MathItalic] = new[] { 5, 6, 7, 8, 9, 10, 12 },
+ [CmFont.MathBoldItalic] = new[] { 6, 7, 8, 9, 10 },
+ [CmFont.MathExtension] = new[] { 7, 8, 9, 10 },
+ [CmFont.Symbols] = new[] { 5, 6, 7, 8, 9, 10 },
+ [CmFont.SymbolsBold] = new[] { 6, 7, 8, 9, 10 }
+ };
+
+ private static readonly Dictionary Fonts = new Dictionary();
+
+ public static GlyphTypeface GlyphTypeface(this CmFont font, double emSize = 10)
+ {
+ var code = FontCodes[font];
+ if (EmSizes.ContainsKey(font))
+ {
+ // take font size which is closest to the em size
+ var size = EmSizes[font]
+ .OrderBy(s => Math.Abs(s - emSize))
+ .First();
+ code = code + size;
+ }
+
+ if (Fonts.ContainsKey(code)) return Fonts[code];
+
+ var uri = new Uri("pack://application:,,,/LatexEditor;component/Fonts/" + code + ".ttf");
+ return Fonts[code] = new GlyphTypeface(uri);
+ }
+ }
+}
diff --git a/WpfTex/LatexEditor/Fonts/GlyphInfo.cs b/WpfTex/LatexEditor/Fonts/GlyphInfo.cs
new file mode 100644
index 0000000..d5bb0d4
--- /dev/null
+++ b/WpfTex/LatexEditor/Fonts/GlyphInfo.cs
@@ -0,0 +1,30 @@
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Media;
+
+namespace LatexEditor.Fonts
+{
+ public class GlyphInfo
+ {
+ public CmFont Font;
+ public Point Offset;
+ public double Size;
+ private int Char;
+
+ public GlyphTypeface Gtf => Font.GlyphTypeface();
+
+ ///
+ /// Index of this glyph within the GlyphTypeface.
+ ///
+ /// Thrown if does not have a glyph for char
+ public ushort Index => Gtf.CharacterToGlyphMap[Char];
+
+ public GlyphInfo(CmFont font, int character, double size, Point offset)
+ {
+ Font = font;
+ Char = character;
+ Size = size;
+ Offset = offset;
+ }
+ }
+}
\ No newline at end of file
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmbsy10.ttf b/WpfTex/LatexEditor/Fonts/cm/cmbsy10.ttf
new file mode 100644
index 0000000..f2f0f25
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmbsy10.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmbsy6.ttf b/WpfTex/LatexEditor/Fonts/cm/cmbsy6.ttf
new file mode 100644
index 0000000..5d5bb16
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmbsy6.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmbsy7.ttf b/WpfTex/LatexEditor/Fonts/cm/cmbsy7.ttf
new file mode 100644
index 0000000..36e4463
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmbsy7.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmbsy8.ttf b/WpfTex/LatexEditor/Fonts/cm/cmbsy8.ttf
new file mode 100644
index 0000000..273ba30
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmbsy8.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmbsy9.ttf b/WpfTex/LatexEditor/Fonts/cm/cmbsy9.ttf
new file mode 100644
index 0000000..c18009b
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmbsy9.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmex10.ttf b/WpfTex/LatexEditor/Fonts/cm/cmex10.ttf
new file mode 100644
index 0000000..e4b468d
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmex10.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmex7.ttf b/WpfTex/LatexEditor/Fonts/cm/cmex7.ttf
new file mode 100644
index 0000000..61be0d6
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmex7.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmex8.ttf b/WpfTex/LatexEditor/Fonts/cm/cmex8.ttf
new file mode 100644
index 0000000..20632ce
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmex8.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmex9.ttf b/WpfTex/LatexEditor/Fonts/cm/cmex9.ttf
new file mode 100644
index 0000000..fb5a2a3
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmex9.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi10.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi10.ttf
new file mode 100644
index 0000000..8d32661
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi10.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi12.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi12.ttf
new file mode 100644
index 0000000..5f9b6d0
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi12.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi5.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi5.ttf
new file mode 100644
index 0000000..06ab30d
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi5.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi6.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi6.ttf
new file mode 100644
index 0000000..fba0c36
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi6.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi7.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi7.ttf
new file mode 100644
index 0000000..558d785
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi7.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi8.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi8.ttf
new file mode 100644
index 0000000..7879344
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi8.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmi9.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmi9.ttf
new file mode 100644
index 0000000..2aec6c6
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmi9.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmib10.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmib10.ttf
new file mode 100644
index 0000000..e3e0b65
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmib10.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmib6.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmib6.ttf
new file mode 100644
index 0000000..729063c
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmib6.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmib7.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmib7.ttf
new file mode 100644
index 0000000..7fd440b
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmib7.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmib8.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmib8.ttf
new file mode 100644
index 0000000..82a73a8
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmib8.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmmib9.ttf b/WpfTex/LatexEditor/Fonts/cm/cmmib9.ttf
new file mode 100644
index 0000000..f1481bf
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmmib9.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmsy10.ttf b/WpfTex/LatexEditor/Fonts/cm/cmsy10.ttf
new file mode 100644
index 0000000..45d8421
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmsy10.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmsy5.ttf b/WpfTex/LatexEditor/Fonts/cm/cmsy5.ttf
new file mode 100644
index 0000000..3343d31
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmsy5.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmsy6.ttf b/WpfTex/LatexEditor/Fonts/cm/cmsy6.ttf
new file mode 100644
index 0000000..4ab9101
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmsy6.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmsy7.ttf b/WpfTex/LatexEditor/Fonts/cm/cmsy7.ttf
new file mode 100644
index 0000000..28e13e8
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmsy7.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmsy8.ttf b/WpfTex/LatexEditor/Fonts/cm/cmsy8.ttf
new file mode 100644
index 0000000..ad1c9c0
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmsy8.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cm/cmsy9.ttf b/WpfTex/LatexEditor/Fonts/cm/cmsy9.ttf
new file mode 100644
index 0000000..6620e7c
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cm/cmsy9.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/Fontmap.CMU b/WpfTex/LatexEditor/Fonts/cmun/Fontmap.CMU
new file mode 100644
index 0000000..2cfc0da
--- /dev/null
+++ b/WpfTex/LatexEditor/Fonts/cmun/Fontmap.CMU
@@ -0,0 +1,33 @@
+/CMUBright-Bold (cmunbbx.ttf) ;
+/CMUSerif-BoldItalic (cmunbi.ttf) ;
+/CMUSerif-BoldSlanted (cmunbl.ttf) ;
+/CMUBright-Oblique (cmunbmo.ttf) ;
+/CMUBright-Roman (cmunbmr.ttf) ;
+/CMUBright-SemiboldOblique (cmunbso.ttf) ;
+/CMUBright-Semibold (cmunbsr.ttf) ;
+/CMUTypewriter-Light (cmunbtl.ttf) ;
+/CMUTypewriter-LightOblique (cmunbto.ttf) ;
+/CMUSerif-Bold (cmunbx.ttf) ;
+/CMUBright-BoldOblique (cmunbxo.ttf) ;
+/CMUClassicalSerif-Italic (cmunci.ttf) ;
+/CMUTypewriter-Italic (cmunit.ttf) ;
+/CMUConcrete-BoldItalic (cmunobi.ttf) ;
+/CMUConcrete-Bold (cmunobx.ttf) ;
+/CMUConcrete-Roman (cmunorm.ttf) ;
+/CMUConcrete-Italic (cmunoti.ttf) ;
+/CMUSerif-BoldNonextended (cmunrb.ttf) ;
+/CMUSerif-Roman (cmunrm.ttf) ;
+/CMUSansSerif-Oblique (cmunsi.ttf) ;
+/CMUSerif-RomanSlanted (cmunsl.ttf) ;
+/CMUSansSerif-BoldOblique (cmunso.ttf) ;
+/CMUSansSerif (cmunss.ttf) ;
+/CMUSansSerif-DemiCondensed (cmunssdc.ttf) ;
+/CMUTypewriter-Oblique (cmunst.ttf) ;
+/CMUSansSerif-Bold (cmunsx.ttf) ;
+/CMUTypewriter-Bold (cmuntb.ttf) ;
+/CMUSerif-Italic (cmunti.ttf) ;
+/CMUTypewriter-Regular (cmuntt.ttf) ;
+/CMUTypewriter-BoldItalic (cmuntx.ttf) ;
+/CMUSerif-UprightItalic (cmunui.ttf) ;
+/CMUTypewriterVariable-Italic (cmunvi.ttf) ;
+/CMUTypewriterVariable (cmunvt.ttf) ;
diff --git a/WpfTex/LatexEditor/Fonts/cmun/OFL.txt b/WpfTex/LatexEditor/Fonts/cmun/OFL.txt
new file mode 100644
index 0000000..a55bb6b
--- /dev/null
+++ b/WpfTex/LatexEditor/Fonts/cmun/OFL.txt
@@ -0,0 +1,103 @@
+Copyright (C) Authors of original metafont fonts:
+Donald Ervin Knuth (cm, concrete fonts)
+1995, 1996, 1997 J"org Knappen, 1990, 1992 Norbert Schwarz (ec fonts)
+1992-2006 A.Khodulev, O.Lapko, A.Berdnikov, V.Volovich (lh fonts)
+1997-2005 Claudio Beccari (cb greek fonts)
+2002 FUKUI Rei (tipa fonts)
+2003-2005 Han The Thanh (Vietnamese fonts)
+1996-2005 Walter Schmidt (cmbright fonts)
+
+Copyright (C) 2003-2009, Andrey V. Panov (panov@canopus.iacp.dvo.ru),
+with Reserved Font Family Name "Computer Modern Unicode fonts".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbbx.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbbx.ttf
new file mode 100644
index 0000000..7622f4c
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbbx.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbi.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbi.ttf
new file mode 100644
index 0000000..3b529ed
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbi.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbl.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbl.ttf
new file mode 100644
index 0000000..65986cd
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbl.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbmo.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbmo.ttf
new file mode 100644
index 0000000..a7fbdcf
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbmo.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbmr.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbmr.ttf
new file mode 100644
index 0000000..a9eb24f
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbmr.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbso.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbso.ttf
new file mode 100644
index 0000000..f6ac344
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbso.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbsr.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbsr.ttf
new file mode 100644
index 0000000..a48165c
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbsr.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbtl.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbtl.ttf
new file mode 100644
index 0000000..b0f26fa
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbtl.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbto.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbto.ttf
new file mode 100644
index 0000000..10fcbbc
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbto.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbx.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbx.ttf
new file mode 100644
index 0000000..2c7198e
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbx.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunbxo.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunbxo.ttf
new file mode 100644
index 0000000..eac47a7
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunbxo.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunci.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunci.ttf
new file mode 100644
index 0000000..906adf0
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunci.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunit.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunit.ttf
new file mode 100644
index 0000000..82c90a5
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunit.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunobi.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunobi.ttf
new file mode 100644
index 0000000..3bdeda7
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunobi.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunobx.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunobx.ttf
new file mode 100644
index 0000000..52df5bf
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunobx.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunorm.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunorm.ttf
new file mode 100644
index 0000000..315bbd3
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunorm.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunoti.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunoti.ttf
new file mode 100644
index 0000000..1ae753d
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunoti.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunrb.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunrb.ttf
new file mode 100644
index 0000000..d69b938
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunrb.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunrm.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunrm.ttf
new file mode 100644
index 0000000..1c3fff0
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunrm.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunsi.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunsi.ttf
new file mode 100644
index 0000000..bd30a3f
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunsi.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunsl.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunsl.ttf
new file mode 100644
index 0000000..ed5c200
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunsl.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunso.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunso.ttf
new file mode 100644
index 0000000..529277b
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunso.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunss.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunss.ttf
new file mode 100644
index 0000000..d7513c8
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunss.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunssdc.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunssdc.ttf
new file mode 100644
index 0000000..63139eb
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunssdc.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunst.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunst.ttf
new file mode 100644
index 0000000..ea39140
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunst.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunsx.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunsx.ttf
new file mode 100644
index 0000000..d13901b
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunsx.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmuntb.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmuntb.ttf
new file mode 100644
index 0000000..f940901
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmuntb.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunti.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunti.ttf
new file mode 100644
index 0000000..993d5c0
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunti.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmuntt.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmuntt.ttf
new file mode 100644
index 0000000..1651877
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmuntt.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmuntx.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmuntx.ttf
new file mode 100644
index 0000000..c7db8b7
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmuntx.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunui.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunui.ttf
new file mode 100644
index 0000000..7c9e146
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunui.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunvi.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunvi.ttf
new file mode 100644
index 0000000..5813f35
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunvi.ttf differ
diff --git a/WpfTex/LatexEditor/Fonts/cmun/cmunvt.ttf b/WpfTex/LatexEditor/Fonts/cmun/cmunvt.ttf
new file mode 100644
index 0000000..2ac4146
Binary files /dev/null and b/WpfTex/LatexEditor/Fonts/cmun/cmunvt.ttf differ
diff --git a/WpfTex/LatexEditor/LatexDocument.cs b/WpfTex/LatexEditor/LatexDocument.cs
new file mode 100644
index 0000000..153d89b
--- /dev/null
+++ b/WpfTex/LatexEditor/LatexDocument.cs
@@ -0,0 +1,148 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Markup;
+using System.Windows.Media;
+using LatexEditor.Fonts;
+
+namespace LatexEditor
+{
+ [ContentProperty("Content")]
+ public class LatexDocument : FrameworkElement
+ {
+ public static readonly DependencyProperty ContentProperty =
+ DependencyProperty.Register("Content", typeof(string), typeof(LatexDocument),
+ new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+
+ [Category("LaTeX")]
+ [Description("LaTeX markup")]
+ public string Content
+ {
+ get => (string)GetValue(ContentProperty);
+ set => SetValue(ContentProperty, value);
+ }
+
+ public static readonly DependencyProperty FontSizeProperty =
+ DependencyProperty.Register("FontSize", typeof(double), typeof(LatexDocument),
+ new FrameworkPropertyMetadata(20d, FrameworkPropertyMetadataOptions.AffectsRender));
+
+ [Category("LaTeX")]
+ [Description("LaTeX font scaling")]
+ public double FontSize
+ {
+ get => (double)GetValue(FontSizeProperty);
+ set => SetValue(FontSizeProperty, value);
+ }
+
+ protected List Parse(string latex)
+ {
+ var x = 0d;
+ var y = 0d;
+ var font = CmFont.SerifItalic;
+ var size = FontSize;
+
+ var glyphs = new List(latex.Length);
+
+ var state = new Stack();
+ state.Push("-");
+
+ while (latex.Length > 0)
+ {
+ var s = state.Peek();
+
+ if (s == "cmd")
+ {
+ state.Pop();
+ var m = Regex.Match(latex, @"([a-z]+)(?=[^a-z]|$)", RegexOptions.IgnoreCase);
+ if (m.Index == 0)
+ {
+ var cmd = latex.Substring(0, m.Groups[1].Length);
+ switch (cmd)
+ {
+ case "it":
+ font = CmFont.SerifItalic;
+ break;
+ case "sym":
+ font = CmFont.Symbols;
+ break;
+ case "rm":
+ font = CmFont.Serif;
+ break;
+ case "sup":
+ size = FontSize * 0.4;
+ y = FontSize * (1 - 0.4);
+ break;
+ case "sub":
+ size = FontSize * 0.5;
+ y = -FontSize * 0.5 * 0.5;
+ break;
+ default:
+ continue;
+ }
+ latex = latex.Substring(m.Length).TrimStart(' ');
+ }
+ else
+ {
+ latex = latex.Substring(1);
+ }
+ }
+ else
+ {
+ if (latex.StartsWith("\\"))
+ {
+ latex = latex.Substring(1);
+
+ state.Push("cmd");
+ }
+ else
+ {
+ var chr = latex[0];
+ latex = latex.Substring(1);
+
+ var gtf = font.GlyphTypeface();
+ var point = new Point(x, y);
+ var gi = new GlyphInfo(font, chr, size, point);
+ x += gtf.AdvanceWidths[gi.Index] * size;
+ glyphs.Add(gi);
+ }
+ }
+ }
+
+ return glyphs;
+ }
+
+ protected override void OnRender(DrawingContext dc)
+ {
+ var text = Content;
+
+ if (string.IsNullOrEmpty(text)) return;
+
+ var glyphInfoList = Parse(text);
+
+ var gtfGroups = glyphInfoList.GroupBy(gi => gi.Gtf);
+ foreach (var gtfGroup in gtfGroups)
+ {
+ var gtf = gtfGroup.Key;
+
+ var sizeGroups = gtfGroup.GroupBy(gi => gi.Size);
+ foreach (var sizeGroup in sizeGroups)
+ {
+ var size = sizeGroup.Key;
+
+ var glyphs = sizeGroup.Select(gi => gi.Index).ToList();
+ var advanceWidths = new double[glyphs.Count];
+ var offsets = sizeGroup.Select(gi => gi.Offset).ToList();
+ var gr = new GlyphRun(gtf, 0, false, size,
+ glyphs, new Point(0, FontSize), advanceWidths,
+ offsets, null, null, null, null, null);
+ dc.DrawGlyphRun(Brushes.Black, gr);
+ }
+ }
+ }
+ }
+}
diff --git a/WpfTex/LatexEditor/LatexEditor.csproj b/WpfTex/LatexEditor/LatexEditor.csproj
new file mode 100644
index 0000000..75d3341
--- /dev/null
+++ b/WpfTex/LatexEditor/LatexEditor.csproj
@@ -0,0 +1,165 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {76364E84-547C-4589-90B6-2A07A2A91AC7}
+ WinExe
+ LatexEditor
+ LatexEditor
+ v4.5.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+
+
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WpfTex/LatexEditor/MainWindow.xaml b/WpfTex/LatexEditor/MainWindow.xaml
new file mode 100644
index 0000000..ec81942
--- /dev/null
+++ b/WpfTex/LatexEditor/MainWindow.xaml
@@ -0,0 +1,14 @@
+
+
+
+ \sym h \it x, y \sym i
+
+
+
\ No newline at end of file
diff --git a/WpfTex/LatexEditor/MainWindow.xaml.cs b/WpfTex/LatexEditor/MainWindow.xaml.cs
new file mode 100644
index 0000000..4143617
--- /dev/null
+++ b/WpfTex/LatexEditor/MainWindow.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace LatexEditor
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WpfTex/LatexEditor/Properties/AssemblyInfo.cs b/WpfTex/LatexEditor/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3ffff92
--- /dev/null
+++ b/WpfTex/LatexEditor/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("LatexEditor")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("LatexEditor")]
+[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/WpfTex/LatexEditor/Properties/Resources.Designer.cs b/WpfTex/LatexEditor/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..0fe7719
--- /dev/null
+++ b/WpfTex/LatexEditor/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace LatexEditor.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LatexEditor.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/WpfTex/LatexEditor/Properties/Resources.resx b/WpfTex/LatexEditor/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/WpfTex/LatexEditor/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WpfTex/LatexEditor/Properties/Settings.Designer.cs b/WpfTex/LatexEditor/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..fe45266
--- /dev/null
+++ b/WpfTex/LatexEditor/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace LatexEditor.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/WpfTex/LatexEditor/Properties/Settings.settings b/WpfTex/LatexEditor/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/WpfTex/LatexEditor/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WpfTex/WpfTex.sln b/WpfTex/WpfTex.sln
new file mode 100644
index 0000000..c60cb3b
--- /dev/null
+++ b/WpfTex/WpfTex.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.6
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LatexEditor", "LatexEditor\LatexEditor.csproj", "{76364E84-547C-4589-90B6-2A07A2A91AC7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {76364E84-547C-4589-90B6-2A07A2A91AC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {76364E84-547C-4589-90B6-2A07A2A91AC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {76364E84-547C-4589-90B6-2A07A2A91AC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {76364E84-547C-4589-90B6-2A07A2A91AC7}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal