{
case 1:
{
- wxFprintf(fd, _T("\\b\\fs%d"), chapterFont*2);
+ wxFprintf(fd, _T("\\sb300\\sa260\\f2\\b\\fs%d"), chapterFont*2);
break;
}
case 2:
{
- wxFprintf(fd, _T("\\b\\fs%d"), sectionFont*2);
+ wxFprintf(fd, _T("\\sb200\\sa240\\f2\\b\\fs%d"), sectionFont*2);
break;
}
case 3:
{
- wxFprintf(fd, _T("\\b\\fs%d"), subsectionFont*2);
+ wxFprintf(fd, _T("\\sb120\\sa240\\f2\\b\\fs%d"), subsectionFont*2);
break;
}
case 4:
{
- wxFprintf(fd, _T("\\b\\fs%d"), subsectionFont*2);
+ wxFprintf(fd, _T("\\sb120\\sa240\\f2\\b\\fs%d"), subsectionFont*2);
break;
}
default:
/*
* Style sheet
*/
- wxFprintf(fd, _T("{\\stylesheet{\\f2\\fs20 \\snext0 Normal;}\n"));
+ wxFprintf(fd, _T("{\\stylesheet{\\f2\\fs22\\sa200 \\snext0 Normal;}\n"));
// Headings
wxFprintf(fd, _T("{\\s1 ")); WriteHeadingStyle(fd, 1); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 1;}\n"));
wxFprintf(fd, _T("{\\s2 ")); WriteHeadingStyle(fd, 2); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 2;}\n"));
wxFprintf(fd, _T("{\\s3 ")); WriteHeadingStyle(fd, 3); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 3;}\n"));
wxFprintf(fd, _T("{\\s4 ")); WriteHeadingStyle(fd, 4); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 4;}\n"));
+
+ // Code style
+ wxFprintf(fd, _T("{\\s10\\ql \\li720\\ri0\\nowidctlpar\\faauto\\rin0\\lin720\\itap0 \\cbpat17\
+\\f2\\fs20 \\sbasedon0 \\snext24 Code;}\n"));
+
// Table of contents styles
wxFprintf(fd, _T("{\\s20\\sb300\\tqr\\tldot\\tx8640 \\b\\f2 \\sbasedon0\\snext0 toc 1;}\n"));
if (inVerbatim)
{
BigBuffer[ptr] = 0; wxStrcat(BigBuffer, _T("\\par\n")); ptr += 5;
+// BigBuffer[ptr] = 0; wxStrcat(BigBuffer, _T("\\par{\\v this was verbatim}\n")); ptr += 5;
i ++;
changed = TRUE;
}
}
}
OutputCurrentSection();
- TexOutput(_T("\\par\\pard}\\par\n"));
+ TexOutput(_T("\\par\\pard}\n"));
}
- issuedNewParagraph = 2;
+ issuedNewParagraph = 1;
+ WriteEnvironmentStyles();
}
break;
}
}
}
OutputCurrentSection();
- TexOutput(_T("\\par\\pard}\\par\n"));
+ TexOutput(_T("\\par\\pard}\n"));
+// TexOutput(_T("\\par\\pard}\\par\n"));
}
- issuedNewParagraph = 2;
+ issuedNewParagraph = 1;
+ WriteEnvironmentStyles();
+// issuedNewParagraph = 2;
}
break;
}
if (!InPopups())
wxFprintf(Subsections, _T("\\page\n"));
}
+ // Experimental JACS 2004-02-21
+#if 0
else
wxFprintf(Chapters, _T("\\par\n"));
+#endif
}
startedSections = TRUE;
}
}
OutputCurrentSection(); // Repeat section header
- TexOutput(_T("\\par\\pard}\\par\n"));
+
+ // Experimental JACS
+ TexOutput(_T("\\par\\pard}\n"));
+ // TexOutput(_T("\\par\\pard}\\par\n"));
}
- issuedNewParagraph = 2;
+ issuedNewParagraph = 1;
+ WriteEnvironmentStyles();
}
}
break;
{
if (winHelp)
wxFprintf(Subsubsections, _T("\\page\n"));
+ // Experimental JACS 2004-02-21
+#if 0
else
wxFprintf(Chapters, _T("\\par\n"));
+#endif
}
startedSections = TRUE;
}
}
OutputCurrentSection(); // Repeat section header
- TexOutput(_T("\\par\\pard}\\par\n"));
- issuedNewParagraph = 2;
-// if (winHelp) TexOutput(_T("\\pard"));
+ TexOutput(_T("\\par\\pard}\n"));
+ issuedNewParagraph = 1;
+ WriteEnvironmentStyles();
+// TexOutput(_T("\\par\\pard}\\par\n"));
+// issuedNewParagraph = 2;
}
}
break;
{
if (start)
{
- if (inVerbatim)
+ if (TRUE) // (inVerbatim)
TexOutput(_T("~"));
else
TexOutput(_T(" "));
{
if (indentLevel > 0)
{
- TexOutput(_T("\\par\\par\n"));
- issuedNewParagraph = 2;
+ // Experimental JACS 2004-02-21
+ TexOutput(_T("\\par\n"));
+ issuedNewParagraph = 1;
+// TexOutput(_T("\\par\\par\n"));
+// issuedNewParagraph = 2;
}
else
{
ItemizeStruc *struc = new ItemizeStruc(listType, indentSize2, indentSize1);
itemizeStack.Insert(struc);
- wxSprintf(buf, _T("\\tx%d\\tx%d\\li%d"), indentSize1, indentSize2, indentSize2);
+ wxSprintf(buf, _T("\\tx%d\\tx%d\\li%d\\sa200"), indentSize1, indentSize2, indentSize2);
PushEnvironmentStyle(buf);
}
else
itemizeStack.Insert(struc);
// wxSprintf(buf, _T("\\tx%d\\li%d\\ri%d"), indentSize, indentSize, TwoColWidthA+TwoColWidthB+oldIndent);
- wxSprintf(buf, _T("\\tx%d\\li%d"), indentSize, indentSize);
+ wxSprintf(buf, _T("\\tx%d\\li%d\\sa200"), indentSize, indentSize);
PushEnvironmentStyle(buf);
}
else
WriteEnvironmentStyles();
*/
/* why do we need this? */
+// Experimental
+ TexOutput(_T("\\pard\n"));
+#if 0
if (itemizeStack.GetCount() == 0)
{
issuedNewParagraph = 0;
OnMacro(ltPAR, 0, TRUE);
OnMacro(ltPAR, 0, FALSE);
}
+#endif
}
break;
}
int indentSize2 = struc->indentation;
TexOutput(_T("\n"));
- if (struc->currentItem > 1)
+ if (struc->currentItem > 1 && issuedNewParagraph == 0)
{
- if (currentItemSep > 0)
- TexOutput(_T("\\par"));
+ // JACS
+// if (currentItemSep > 0)
+// TexOutput(_T("\\par"));
TexOutput(_T("\\par"));
+ issuedNewParagraph = 1;
// WriteEnvironmentStyles();
}
oldIndent = ((ItemizeStruc *)node2->GetData())->indentation;
TexOutput(_T("\n"));
+ // JACS
+#if 0
if (struc->currentItem > 1)
{
if (currentItemSep > 0)
// WriteEnvironmentStyles();
}
+#endif
// wxSprintf(buf, _T("\\tx%d\\li%d\\fi-%d\\ri%d\n"), TwoColWidthA,
// TwoColWidthA, TwoColWidthA, TwoColWidthA+TwoColWidthB+oldIndent);
{
if (start)
{
+ // JACS
+#if 0
if (macroId == ltVERBATIM)
{
if (!issuedNewParagraph)
}
else issuedNewParagraph = 0;
}
- wxSprintf(buf, _T("{\\f3\\fs20 "));
+#endif
+
+ if (macroId == ltVERBATIM)
+ wxSprintf(buf, _T("{\\f3\\s10\\fs20\\li720\\sa0 "));
+ else
+ wxSprintf(buf, _T("{\\f3\\fs20 "));
TexOutput(buf);
}
else
if (macroId == ltVERBATIM)
{
TexOutput(_T("\\pard\n"));
-// issuedNewParagraph = 1;
WriteEnvironmentStyles();
+ // JACS
+#if 0
+ TexOutput(_T("\\par\n"));
+ issuedNewParagraph = 1;
+#endif
}
}
break;
{
if (start)
{
- TexOutput(_T("\\fi0\\qc "));
+ TexOutput(_T("\\qc "));
forbidParindent ++;
- PushEnvironmentStyle(_T("\\qc"));
+ PushEnvironmentStyle(_T("\\qc\\sa200"));
}
else
{
{
if (start)
{
- TexOutput(_T("\\fi0\\ql "));
+ TexOutput(_T("\\ql\\sa200 "));
forbidParindent ++;
PushEnvironmentStyle(_T("\\ql"));
}
{
if (start)
{
- TexOutput(_T("\\fi0\\qr "));
+ TexOutput(_T("\\qr\\sa200 "));
forbidParindent ++;
PushEnvironmentStyle(_T("\\qr"));
}
{
TexOutput(_T("\\par\\pard"));
issuedNewParagraph ++;
-
+
// Extra par if parskip is more than zero (usually looks best.)
- if (!inTabular && (ParSkip > 0))
+ // N.B. JACS 2004-02-21: shouldn't need this for linear RTF if
+ // we have a suitable set of styles.
+ if (winHelp && !inTabular && (ParSkip > 0))
{
TexOutput(_T("\\par"));
issuedNewParagraph ++;
// and ParSkip == 0.
// Extra par if parskip is more than zero (usually looks best.)
- if (!inTabular && (ParSkip > 0))
+ if (winHelp && !inTabular && (ParSkip > 0))
{
TexOutput(_T("\\par"));
issuedNewParagraph ++;
{
TexOutput(_T("\\li360\n"));
forbidParindent ++;
- PushEnvironmentStyle(_T("\\li360"));
+ PushEnvironmentStyle(_T("\\li360\\sa200"));
}
else
{
if (start)
{
TexOutput(_T("\\li360\n"));
- PushEnvironmentStyle(_T("\\li360"));
+ PushEnvironmentStyle(_T("\\li360\\sa200"));
}
else
{
{
if (start)
{
- wxSprintf(buf, _T("\\box\\trgaph108%s\n"), ((macroId == ltNORMALBOXD) ? _T("\\brdrdb") : _T("\\brdrs")));
+ wxSprintf(buf, _T("\\sa200\\box\\trgaph108%s\n"), ((macroId == ltNORMALBOXD) ? _T("\\brdrdb") : _T("\\brdrs")));
TexOutput(buf);
PushEnvironmentStyle(buf);
}
{
if (winHelp)
{
- TexOutput(_T("\\box\n"));
- PushEnvironmentStyle(_T("\\box"));
+ TexOutput(_T("\\sa200\\box\n"));
+ PushEnvironmentStyle(_T("\\sa200\\box"));
}
else
{
{
if (winHelp)
{
- TexOutput(_T("\\box\n"));
- PushEnvironmentStyle(_T("\\box"));
+ TexOutput(_T("\\sa200\\box\n"));
+ PushEnvironmentStyle(_T("\\sa200\\box"));
}
else
{
ItemizeStruc *struc = new ItemizeStruc(LATEX_INDENT, indentSize);
itemizeStack.Insert(struc);
- wxSprintf(buf, _T("\\tx%d\\li%d "), indentSize, indentSize);
+ wxSprintf(buf, _T("\\tx%d\\li%d\\sa200 "), indentSize, indentSize);
PushEnvironmentStyle(buf);
TexOutput(buf);
return FALSE;
ItemizeStruc *struc = new ItemizeStruc(LATEX_INDENT, indentSize);
itemizeStack.Insert(struc);
- wxSprintf(buf, _T("\\tx%d\\li%d\\lr%d\\box%s "), indentSize, indentSize, indentSizeRight,
+ wxSprintf(buf, _T("\\tx%d\\li%d\\lr%d\\sa200\\box%s "), indentSize, indentSize, indentSizeRight,
((macroId == ltCENTEREDBOX) ? _T("\\brdrs") : _T("\\brdrdb")));
PushEnvironmentStyle(buf);
TexOutput(buf);
wxFprintf(Contents, _T("{\\b\\fs%d %s}\\par\\par\\pard\n\n"),
(winHelp ? titleFont : chapterFont)*2, ContentsNameString);
- // By default, Swiss, 10 point.
- wxFprintf(Chapters, _T("\\f2\\fs20\n"));
+ // By default, Swiss, 11 point.
+ wxFprintf(Chapters, _T("\\f2\\fs22\n"));
+
+ PushEnvironmentStyle(_T("\\f2\\fs22\\sa200"));
SetCurrentOutput(Chapters);
}
WriteRTFHeader(Header);
fclose(Header);
+
+ PopEnvironmentStyle();
Tex2RTFYield(TRUE);
if (winHelp)