The only default filename in the list is {\tt psbox.tex}.}
\twocolitem{\inioption{isInteractive}}{If true, runs in interactive mode (the default).}
\twocolitem{\inioption{runTwice}}{If true, runs the converter twice.}
+\twocolitem{\inioption{ignoreBadRefs}}{If true (or yes), ignores bad helpref references
+and simply writes the text in the first argument. Useful when a program such as HelpGen
+generates references to classes documented in another manual.}
\end{twocollist}
\subsubsection{Presentation options}\index{options, presentation}%
// This is defined in the Tex2Any library and isn't in use after parsing
extern char *BigBuffer;
-
extern wxHashTable TexReferences;
-
// Are we in verbatim mode? If so, format differently.
static bool inVerbatim = FALSE;
const int PageWidth = 12242; // 8.25 inches wide for A4
+// Remember the anchor in a helpref
+static TexChunk *helpRefText = NULL;
/*
* Flag to say we've just issued a \par\pard command, so don't
TexOutput("{\\i ");
else
TexOutput("}");
+
+ if (start)
+ helpRefText = GetArgChunk();
+
return TRUE;
}
else if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
{
if (macroId != ltHELPREFN)
{
+ char *refName = GetArgData();
+ TexRef *texRef = NULL;
+ if (refName)
+ texRef = FindReference(refName);
if (start)
{
- TexOutput(" (");
- char *refName = GetArgData();
+ if (texRef || !ignoreBadRefs)
+ TexOutput(" (");
if (refName)
{
- if (useWord)
+ if (texRef || !ignoreBadRefs)
{
- char *s = GetArgData();
- TexOutput("p. ");
- TexOutput("{\\field{\\*\\fldinst PAGEREF ");
- TexOutput(refName);
- TexOutput(" \\\\* MERGEFORMAT }{\\fldrslt ??}}");
- }
- else
- {
- // Only print section name if we're not in Word mode,
- // so can't do page references
- TexRef *texRef = FindReference(refName);
- if (texRef)
+ if (useWord)
{
- TexOutput(texRef->sectionName) ; TexOutput(" "); TexOutput(texRef->sectionNumber);
+ char *s = GetArgData();
+ TexOutput("p. ");
+ TexOutput("{\\field{\\*\\fldinst PAGEREF ");
+ TexOutput(refName);
+ TexOutput(" \\\\* MERGEFORMAT }{\\fldrslt ??}}");
}
else
{
- TexOutput("??");
- sprintf(buf, "Warning: unresolved reference '%s'", refName);
- OnInform(buf);
+ // Only print section name if we're not in Word mode,
+ // so can't do page references
+ if (texRef)
+ {
+ TexOutput(texRef->sectionName) ; TexOutput(" "); TexOutput(texRef->sectionNumber);
+ }
+ else
+ {
+ if (!ignoreBadRefs)
+ TexOutput("??");
+ sprintf(buf, "Warning: unresolved reference '%s'", refName);
+ OnInform(buf);
+ }
}
}
}
else TexOutput("??");
}
- else TexOutput(")");
+ else
+ {
+ if (texRef || !ignoreBadRefs)
+ TexOutput(")");
+ }
}
return FALSE;
}
htmlFrameContents = StringTobool(settingValue);
else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE))
upperCaseNames = StringTobool(settingValue);
+ else if (StringMatch(settingName, "ignoreBadRefs", FALSE, TRUE))
+ ignoreBadRefs = StringTobool(settingValue);
else if (StringMatch(settingName, "winHelpTitle", FALSE, TRUE))
{
if (winHelpTitle)