00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TEXGENERATOR_H
00019 #define TEXGENERATOR_H
00020
00021 #include <string>
00022 #include <iostream>
00023 #include <sstream>
00024
00025 #include "charcodes.h"
00026 #include "version.h"
00027 #include "codegenerator.h"
00028
00029
00030 namespace highlight {
00031
00042 class TexGenerator : public highlight::CodeGenerator
00043 {
00044 public:
00045
00046 TexGenerator();
00047
00048 ~TexGenerator();
00049
00053 string getHeader(const string & title);
00054
00056 string getFooter();
00057
00059 void printBody();
00060
00061 private:
00062
00063 string styleDefinitionCache;
00064
00065 string getStyleDefinition();
00066
00068 virtual string maskCharacter(unsigned char );
00069
00071 string formatStyleAttributes(const string & elemName, const ElementStyle & elem);
00072
00073 string getMatchingOpenTag(unsigned int styleID);
00074 string getMatchingCloseTag(unsigned int styleID);
00075
00076 };
00077
00078 }
00079
00080 #endif