aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/latex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lexlua/latex.lua')
-rw-r--r--lexlua/latex.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lexlua/latex.lua b/lexlua/latex.lua
index bb2f70823..3f18601f6 100644
--- a/lexlua/latex.lua
+++ b/lexlua/latex.lua
@@ -25,23 +25,23 @@ local math_word = word_match[[
local math_begin_end = (P('begin') + P('end')) * P(' ')^0 *
'{' * math_word * P('*')^-1 * '}'
lex:add_rule('math', token('math', '$' + '\\' * (S('[]()') + math_begin_end)))
-lex:add_style('math', lexer.STYLE_FUNCTION)
+lex:add_style('math', lexer.styles['function'])
-- LaTeX environments.
lex:add_rule('environment', token('environment', '\\' *
(P('begin') + P('end')) * P(' ')^0 * '{' * lexer.word * P('*')^-1 * '}'))
-lex:add_style('environment', lexer.STYLE_KEYWORD)
+lex:add_style('environment', lexer.styles.keyword)
-- Sections.
lex:add_rule('section', token('section', '\\' * word_match[[
part chapter section subsection subsubsection paragraph subparagraph
]] * P('*')^-1))
-lex:add_style('section', lexer.STYLE_CLASS)
+lex:add_style('section', lexer.styles.class)
-- Commands.
lex:add_rule('command', token('command', '\\' *
(lexer.alpha^1 + S('#$&~_^%{}'))))
-lex:add_style('command', lexer.STYLE_KEYWORD)
+lex:add_style('command', lexer.styles.keyword)
-- Operators.
lex:add_rule('operator', token(lexer.OPERATOR, S('&#{}[]')))