Ejemplo n.º 1
0
        private string handleLatexExtractableCommands(ref string aLine)
        {
            string lowerLine = aLine.ToLower();

            lowerLine = Regex.Replace(lowerLine, @"\s", "");
            LatexCommands.populateLatexExtractableCommandsDict();

            foreach (string command in LatexCommands.getLatexExtractableCommandsList())
            {
                if (latexExtractedCommands.Contains(command))
                {
                    string ValueType = "";
                    bool   hasValue  = LatexCommands.getLatexExtractableCommandsDict().TryGetValue(command, out ValueType);
                    if (hasValue)
                    {
                        aLine = aLine.ToLower().Replace(command, " " + ValueType + " ");
                    }
                    if (command.Equals("\\titlenote") || command.Equals("\\footnote"))
                    {
                        isTitleNote = true;
                    }
                }
            }
            return(aLine);
        }
Ejemplo n.º 2
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);
 }