This commit is contained in:
@@ -783,8 +783,10 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
// Convert E style numbers to RTF with \super and \nosupersub
|
||||
string retval = Regex.Replace(str, "([+-]?)([0-9]+)[.]([0-9]*?)0*E([+-]?[0-9]+)", new MatchEvaluator(FixFortranNumber));
|
||||
retval = Regex.Replace(retval, "[#](.*?)[#]", "\\super $1\\nosupersub ");// DOS Superscript
|
||||
retval = Regex.Replace(retval, "[~](.*?)[~]", "\\sub $1\\nosupersub ");// DOS Subscript
|
||||
//retval = Regex.Replace(retval, "[#](.*?)[#]", "\\super $1\\nosupersub ");// DOS Superscript
|
||||
//retval = Regex.Replace(retval, "[~](.*?)[~]", "\\sub $1\\nosupersub ");// DOS Subscript
|
||||
retval = Regex.Replace(retval, "[#](.*?)[#]", "\\up3 $1\\up0 ");// DOS Superscript
|
||||
retval = Regex.Replace(retval, "[~](.*?)[~]", "\\dn3 $1\\dn0 ");// DOS Subscript
|
||||
return retval;
|
||||
}
|
||||
private static string FixFortranNumber(Match match)
|
||||
@@ -798,7 +800,7 @@ namespace Volian.Controls.Library
|
||||
else // A number with a decimal point
|
||||
sb.Append(match.Groups[2].Value + "." + match.Groups[3].Value + "x10");
|
||||
// Add the exponent as superscript
|
||||
return sb.ToString() + "\\super " + match.Groups[4].Value + "\\nosupersub ";
|
||||
return sb.ToString() + "\\up3 " + match.Groups[4].Value + "\\up0 ";
|
||||
}
|
||||
|
||||
//private string ConvertDOSSuperAndSubScripts(string instr)
|
||||
|
Reference in New Issue
Block a user