Added support to convert the carrot character (^) to the delta symbol in X/Y Plots
Added support for hard spaces in section titles and removed the dash character that was always inserted between the section number and section title.
This commit is contained in:
parent
6ed306e8b9
commit
eec1c7f6f9
@ -164,8 +164,13 @@ namespace Volian.Print.Library
|
|||||||
Phrase p = new Phrase();
|
Phrase p = new Phrase();
|
||||||
bool underlineChunk = false;
|
bool underlineChunk = false;
|
||||||
instr = instr.Replace("`", "\u00B0"); //degree
|
instr = instr.Replace("`", "\u00B0"); //degree
|
||||||
|
//instr = instr.Replace("\xC1", "\u03C1"); // rho symbol - is being read in as a line draw character
|
||||||
if (ConvertCaretToDelta)
|
if (ConvertCaretToDelta)
|
||||||
|
{
|
||||||
|
//char[] ca = instr.ToCharArray(); // for debug
|
||||||
instr = instr.Replace("^", "\u0394"); // delta
|
instr = instr.Replace("^", "\u0394"); // delta
|
||||||
|
}
|
||||||
|
//instr = instr.Replace("\x94", "\u0394"); // delta - the delta symbol is being read in as character x94
|
||||||
instr = ReplaceLineDrawCharsWithUnicode(instr);
|
instr = ReplaceLineDrawCharsWithUnicode(instr);
|
||||||
// Handle super/sub scripts
|
// Handle super/sub scripts
|
||||||
MatchCollection mc = Regex.Matches(instr, "[#~](.*?)[#~]");
|
MatchCollection mc = Regex.Matches(instr, "[#~](.*?)[#~]");
|
||||||
@ -351,8 +356,11 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png";
|
string pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png";
|
||||||
string rawPlotLang = plotlang;
|
string rawPlotLang = plotlang;
|
||||||
plotlang = plotlang.Replace("`", "\xB0");
|
plotlang = plotlang.Replace("`", "\xB0"); //degree
|
||||||
plotlang = plotlang.Replace("\xF8", "\xB0");
|
plotlang = plotlang.Replace("\xF8", "\xB0"); //degree
|
||||||
|
if (ConvertCaretToDelta)
|
||||||
|
plotlang = plotlang.Replace("^", "\x394"); // delta
|
||||||
|
plotlang = plotlang.Replace("\x7F", "\x394"); //delta
|
||||||
PdfPCell spaceCell = new PdfPCell();
|
PdfPCell spaceCell = new PdfPCell();
|
||||||
spaceCell.BorderColor = Color.WHITE;
|
spaceCell.BorderColor = Color.WHITE;
|
||||||
datatable.AddCell(spaceCell);
|
datatable.AddCell(spaceCell);
|
||||||
|
@ -686,7 +686,9 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
// Remove Procedure Number and Title
|
// Remove Procedure Number and Title
|
||||||
string sectionAndStep = Regex.Replace(path + "\x7\x7\x7", "^.+?\\u0007", "");
|
string sectionAndStep = Regex.Replace(path + "\x7\x7\x7", "^.+?\\u0007", "");
|
||||||
sectionAndStep = sectionAndStep.Replace("\x11", sectionAndStep[0] == '\x11' ? "" : " - ");
|
//sectionAndStep = sectionAndStep.Replace("\x11", sectionAndStep[0] == '\x11' ? "" : " - ");
|
||||||
|
sectionAndStep = sectionAndStep.Replace("\x11", sectionAndStep[0] == '\x11' ? "" : " ");
|
||||||
|
sectionAndStep = sectionAndStep.Replace("\\u160?", " "); // replace a hardspace with a space
|
||||||
// Split Section frrom Steps
|
// Split Section frrom Steps
|
||||||
return sectionAndStep.Split("\x7".ToCharArray());
|
return sectionAndStep.Split("\x7".ToCharArray());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user