private static void Initialize() { // // If start application isn't WPF, pack isn't registered by defaultTexFontParser // if (Application.ResourceAssembly == null) { Application.ResourceAssembly = Assembly.GetExecutingAssembly(); if (!UriParser.IsKnownScheme("pack")) { UriParser.Register(new GenericUriParser(GenericUriParserOptions.GenericAuthority), "pack", -1); } } var formulaSettingsParser = new TexPredefinedFormulaSettingsParser(); symbols = formulaSettingsParser.GetSymbolMappings(); delimeters = formulaSettingsParser.GetDelimiterMappings(); textStyles = formulaSettingsParser.GetTextStyles(); var colorParser = new PredefinedColorParser(); colorParser.Parse(predefinedColors); var predefinedFormulasParser = new TexPredefinedFormulaParser(); predefinedFormulasParser.Parse(predefinedFormulas); }
public static void Initialize() { // // If start application isn't WPF, pack isn't registered by defaultTexFontParser // if (Application.ResourceAssembly == null) { Application.ResourceAssembly = Assembly.GetExecutingAssembly(); if (!UriParser.IsKnownScheme("pack")) UriParser.Register(new GenericUriParser(GenericUriParserOptions.GenericAuthority), "pack", -1); } commands = new HashSet<string>(); commands.Add("frac"); commands.Add("sqrt"); var formulaSettingsParser = new TexPredefinedFormulaSettingsParser(); symbols = formulaSettingsParser.GetSymbolMappings(); delimeters = formulaSettingsParser.GetDelimiterMappings(); textStyles = formulaSettingsParser.GetTextStyles(); isInitialized = true; var predefinedFormulasParser = new TexPredefinedFormulaParser(); predefinedFormulasParser.Parse(predefinedFormulas); }