This commit is contained in:
@@ -827,18 +827,21 @@ namespace PrintMSWord
|
||||
|
||||
string tmp = DisplayRO.ConvertFortranFormatToScienctificNotation(roValue);
|
||||
// Look for superscript or subscript and insert the appropriate commands
|
||||
Match roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub ");
|
||||
//Match roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub ");
|
||||
Match roMatch = Regex.Match(tmp, @"(.*?)\\(up3|dn3) (.*?)\\(up0|dn0) ");
|
||||
if (roMatch.Groups.Count == 4)// Superscript or subscript found
|
||||
{
|
||||
sel.Font.Color = LBWdColor.wdColorRed;
|
||||
while (roMatch.Groups.Count == 4)
|
||||
{
|
||||
sel.TypeText(roMatch.Groups[1].Value); // output the text preceeding the super or sub command
|
||||
sel.Font.Position = roMatch.Groups[2].Value=="super" ? 2 : -2; // Shift the vertical position for super or sub
|
||||
sel.Font.Position = roMatch.Groups[2].Value == "up3" ? 2 : -2; // Shift the vertical position for super or sub
|
||||
//sel.Font.Position = roMatch.Groups[2].Value == "super" ? 2 : -2; // Shift the vertical position for super or sub
|
||||
sel.TypeText(roMatch.Groups[3].Value); // output the superscript or subscript
|
||||
sel.Font.Position = 0; // restore the vertical position
|
||||
tmp = tmp.Substring(roMatch.Length); // remove the processed text
|
||||
roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub "); // check to see if the text contain another super or sub
|
||||
//roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub "); // check to see if the text contain another super or sub
|
||||
roMatch = Regex.Match(tmp, @"(.*?)\\(up3|dn3) (.*?)\\(up0|dn0) "); // check to see if the text contain another super or sub
|
||||
}
|
||||
if(tmp != "")// Add any remaining text
|
||||
sel.TypeText(tmp);
|
||||
|
@@ -446,18 +446,21 @@ namespace PrintMSWord
|
||||
|
||||
string tmp = DisplayRO.ConvertFortranFormatToScienctificNotation(roValue);
|
||||
// Look for superscript or subscript and insert the appropriate commands
|
||||
Match roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub ");
|
||||
//Match roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub ");
|
||||
Match roMatch = Regex.Match(tmp, @"(.*?)\\(up3|dn3) (.*?)\\(up0|dn0) ");
|
||||
if (roMatch.Groups.Count == 4)// Superscript or subscript found
|
||||
{
|
||||
sel.Font.Color = LBWdColor.wdColorRed;
|
||||
while (roMatch.Groups.Count == 4)
|
||||
{
|
||||
sel.TypeText(roMatch.Groups[1].Value); // output the text preceeding the super or sub command
|
||||
sel.Font.Position = roMatch.Groups[2].Value=="super" ? 2 : -2; // Shift the vertical position for super or sub
|
||||
//sel.Font.Position = roMatch.Groups[2].Value=="super" ? 2 : -2; // Shift the vertical position for super or sub
|
||||
sel.Font.Position = roMatch.Groups[2].Value == "up3" ? 2 : -2; // Shift the vertical position for super or sub
|
||||
sel.TypeText(roMatch.Groups[3].Value); // output the superscript or subscript
|
||||
sel.Font.Position = 0; // restore the vertical position
|
||||
tmp = tmp.Substring(roMatch.Length); // remove the processed text
|
||||
roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub "); // check to see if the text contain another super or sub
|
||||
//roMatch = Regex.Match(tmp, @"(.*?)\\(super|sub) (.*?)\\nosupersub "); // check to see if the text contain another super or sub
|
||||
roMatch = Regex.Match(tmp, @"(.*?)\\(up3|dn3) (.*?)\\(up0|dn0) "); // check to see if the text contain another super or sub
|
||||
}
|
||||
if(tmp != "")// Add any remaining text
|
||||
sel.TypeText(tmp);
|
||||
@@ -540,7 +543,7 @@ namespace PrintMSWord
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddInfo("Error==={0:s.ffff}==========>{1} - {2}", DateTime.Now, ex.GetType().Name, ex.Message);
|
||||
AddInfo("RemovePDFFiles Error==={0:s.ffff}==========>{1} - {2}", DateTime.Now, ex.GetType().Name, ex.Message);
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user