#define IncrementLineNumber() LineNumbers[CurrentInputIndex] ++
 
 
-TexRef::TexRef(char *label, char *file, char *section, char *sectionN)
+TexRef::TexRef(const char *label, const char *file,
+              const char *section, const char *sectionN)
 {
     refLabel = copystring(label);
     refFile = file ? copystring(file) : (char*) NULL;
  *
  */
  
-int ParseMacroBody(char *macro_name, TexChunk *parent,
+int ParseMacroBody(const char *macro_name, TexChunk *parent,
                    int no_args, char *buffer, int pos,
                    char *environment, bool parseToBrace,
                    TexChunk *customMacroArgs)
 
 bool TexLoadFile(char *filename);
 int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos,
            char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
-int ParseMacroBody(char *macro_name, TexChunk *parent, int no_args,
+int ParseMacroBody(const char *macro_name, TexChunk *parent, int no_args,
            char *buffer, int pos, char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
 void TraverseDocument(void);
 void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE);
 // make up a topic name otherwise.
 char *FindTopicName(TexChunk *chunk);
 // Force the current topic to be this (e.g. force 'references' label).
-void ForceTopicName(char *name);
+void ForceTopicName(const char *name);
 void ResetTopicCounter(void);
 
 // Parse unit eg. 14, 12pt, 34cm and return value in points.
   char *refFile;       // Reference filename (can be NULL)
   char *sectionNumber; // Section or figure number (as a string)
   char *sectionName; // name e.g. 'section'
-  TexRef(char *label, char *file, char *section, char *sectionN = NULL);
+  TexRef(const char *label, const char *file, const char *section, const char *sectionN = NULL);
   ~TexRef(void);
 };
 
   unsigned int green;
   unsigned int blue;
 
-  ColourTableEntry(char *theName, unsigned int r,  unsigned int g,  unsigned int b);
+  ColourTableEntry(const char *theName, unsigned int r,  unsigned int g,  unsigned int b);
   ~ColourTableEntry(void);
 };
 
 extern wxList ColourTable;
-extern void AddColour(char *theName, unsigned int r,  unsigned int g,  unsigned int b);
+extern void AddColour(const char *theName, unsigned int r,  unsigned int g,  unsigned int b);
 extern int FindColourPosition(char *theName);
 // Converts e.g. "red" -> "#FF0000"
 extern bool FindColourHTMLString(char *theName, char *buf);
 
 
 static char *forceTopicName = NULL;
 
-void ForceTopicName(char *name)
+void ForceTopicName(const char *name)
 {
   if (forceTopicName)
     delete[] forceTopicName;
  *
  */
  
-ColourTableEntry::ColourTableEntry(char *theName, unsigned int r,  unsigned int g,  unsigned int b)
+ColourTableEntry::ColourTableEntry(const char *theName, unsigned int r,  unsigned int g,  unsigned int b)
 {
   name = copystring(theName);
   red = r;
   delete[] name;
 }
 
-void AddColour(char *theName, unsigned int r,  unsigned int g,  unsigned int b)
+void AddColour(const char *theName, unsigned int r,  unsigned int g,  unsigned int b)
 {
   wxNode *node = ColourTable.Find(theName);
   if (node)