]>
git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/src/rtfutils.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: RTF-specific code
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 * Write a suitable RTF header.
17 void WriteRTFHeader(FILE *fd
);
20 * Given a TexChunk with a string value, scans through the string
21 * converting Latex-isms into RTF-isms, such as 2 newlines -> \par,
22 * and inserting spaces at the start of lines since in Latex, a newline
23 * implies a space, but not in RTF.
27 void ProcessText2RTF(TexChunk
*chunk
);
30 * Scan through all chunks starting from the given one,
31 * calling ProcessText2RTF to convert Latex-isms to RTF-isms.
32 * This should be called after Tex2Any has parsed the file,
33 * and before TraverseDocument is called.
37 void Text2RTF(TexChunk
*chunk
);
41 * Keeping track of environments to restore the styles after \pard.
42 * Push strings like "\qc" onto stack.
46 void PushEnvironmentStyle(wxChar
*style
);
48 void PopEnvironmentStyle(void);
50 // Write out the styles, most recent first.
51 void WriteEnvironmentStyles(void);
53 // Called on start/end of macro examination
54 void DefaultRtfOnMacro(wxChar
*name
, int no_args
, bool start
);
56 // Called on start/end of argument examination
57 bool DefaultRtfOnArgument(wxChar
*macro_name
, int arg_no
, bool start
);
59 // Reset memory of which levels have 'books' (for WinHelp 4 contents file)
60 void ResetContentsLevels(int level
);