00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef LATEXGENERATOR_H
00019 #define LATEXGENERATOR_H
00020
00021 #include <string>
00022 #include <iostream>
00023 #include <sstream>
00024
00025 #include "codegenerator.h"
00026 #include "version.h"
00027 #include "charcodes.h"
00028
00029
00030 namespace highlight {
00031
00042 class LatexGenerator : public highlight::CodeGenerator
00043 {
00044 public:
00045 LatexGenerator();
00046 ~LatexGenerator();
00047
00051 string getHeader(const string & title);
00052
00054 string getFooter();
00055
00057 void printBody();
00058
00062 void setReplaceQuotes(bool b){ replaceQuotes = b; }
00063
00067 void setDisableShorthands(bool b){ disableBabelShortHand = b; }
00068
00069 private:
00070
00071 string styleDefinitionCache;
00072 string longLineTag;
00073
00075 virtual string maskCharacter(unsigned char );
00076
00078 string formatStyleAttributes(const string & elemName,
00079 const ElementStyle & elem);
00080
00082 bool replaceQuotes;
00083
00085 bool disableBabelShortHand;
00086
00087 string getNewLine();
00088
00089 string getStyleDefinition();
00090
00091 string getMatchingOpenTag(unsigned int styleID);
00092 string getMatchingCloseTag(unsigned int styleID);
00093 };
00094
00095 }
00096
00097 #endif