3 * \file LaTeXHighlighter.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef LATEXHIGHLIGHTER_H
13 #define LATEXHIGHLIGHTER_H
15 #include <QSyntaxHighlighter>
16 #include <QTextCharFormat>
24 // used already twice...
25 class LaTeXHighlighter : public QSyntaxHighlighter
28 explicit LaTeXHighlighter(QTextDocument * parent, bool at_letter = false);
31 void highlightBlock(QString const & text);
34 QTextCharFormat commentFormat;
35 QTextCharFormat keywordFormat;
36 QTextCharFormat mathFormat;
37 QTextCharFormat warningFormat;
38 // is at a letter? (as in the preamble)
39 bool const at_letter_;
42 } // namespace frontend
45 #endif // LATEXHIGHLIGHTER