Beispiel #1
0
 private bool checkForLatexTextCommands(string aLine)
 {
     LatexCommands.populatelatexExtractableCommandsList();
     latexExtractedCommands.Clear(); //clear previous commands
     extractLatex(aLine);
     foreach (var v in LatexCommands.getLatexExtractableCommandsList())
     {
         if (latexExtractedCommands.Contains(v))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #2
0
        private string handlemiscellenousLatexCommands(ref string aLine)
        {
            string lowerLine = aLine.ToLower();

            lowerLine = Regex.Replace(lowerLine, @"\s", "");
            LatexCommands.populateMiscellenousLatexTextCommands();
            LatexCommands.populateMiscellenousLatexTextCommandsDict();
            foreach (string command in LatexCommands.getMiscellenousLatexTextCommands())
            {
                if (lowerLine.Contains(command))
                {
                    string ValueType = "";
                    bool   hasValue  = LatexCommands.getMiscellenousLatexTextCommandsDict().TryGetValue(command, out ValueType);
                    if (hasValue)
                    {
                        aLine = aLine.ToLower().Replace(command, " " + ValueType + " ");
                    }
                }
            }
            return(aLine);
        }