static void WriteEquationAsComment(char *pre, char *eq, char *post) /****************************************************************************** purpose : Writes equation to RTF file as text of COMMENT field ******************************************************************************/ { fprintRTF("{\\field{\\*\\fldinst{ COMMENTS \"\" "); while (*pre) putRtfChar(*pre++); while (*eq) putRtfChar(*eq++); while (*post) putRtfChar(*post++); fprintRTF("}{ }}{\\fldrslt }}"); }
void ConvertAllttString(char *s) /****************************************************************************** purpose : converts string in TeX-format to Rtf-format according to the alltt environment, which is like verbatim environment except that \, {, and } have their usual meanings ******************************************************************************/ { char cThis; if (s==NULL) return; diagnostics(4, "Entering Convert() from StringAllttConvert()"); if(PushSource(NULL, s)==0) { while (StillSource()) { cThis = getRawTexChar(); /* it is a verbatim like environment */ switch (cThis) { case '\\': PushLevels(); TranslateCommand(); CleanStack(); break; case '{': PushBrace(); fprintRTF("{"); break; case '}': ret = RecursionLevel - PopBrace(); fprintRTF("}"); break; default: putRtfChar(cThis); break; } } PopSource(); } diagnostics(4, "Exiting Convert() from StringAllttConvert()"); }