From 77cfc621aa0c81a4d9eaea0a2c0f1b923696444b Mon Sep 17 00:00:00 2001 From: "Achim D. Brucker" Date: Sun, 8 Apr 2018 15:18:24 +0100 Subject: [PATCH] Allow <> in LaTeX commands. --- .../scala/com/logicalhacking/dof/converter/LaTexLexer.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/document-generator/converter/src/main/scala/com/logicalhacking/dof/converter/LaTexLexer.scala b/document-generator/converter/src/main/scala/com/logicalhacking/dof/converter/LaTexLexer.scala index 74ba3d8d..a5752cf8 100644 --- a/document-generator/converter/src/main/scala/com/logicalhacking/dof/converter/LaTexLexer.scala +++ b/document-generator/converter/src/main/scala/com/logicalhacking/dof/converter/LaTexLexer.scala @@ -94,7 +94,7 @@ object LaTeXLexer extends RegexParsers { def end_env = end0 ~ arg ^^ {case end_txt ~ arg => ENDENV (end_txt,arg)} def command: Parser[COMMAND] = { - "\\\\[a-zA-Z0-9][a-zA-Z0-9*]*".r ^^ { str => COMMAND(str) } + "\\\\[<>a-zA-Z0-9][a-zA-Z0-9*]*".r ^^ { str => COMMAND(str) } } def vbackslash = "\\\\" ^^ (_ => VBACKSLASH ) @@ -104,7 +104,7 @@ object LaTeXLexer extends RegexParsers { def vcurlyclose = "\\}" ^^ (_ => VCURLYCLOSE ) def vbracketopen = "\\[" ^^ (_ => VBRACKETOPEN ) def vbracketclose = "\\]" ^^ (_ => VBRACKETCLOSE ) - def newline = "\n" ^^ (_ => NEWLINE ) + def newline = "\n" ^^ (_ => NEWLINE ) def curlyopen = "{" ^^ (_ => CURLYOPEN ) def curlyclose = "}" ^^ (_ => CURLYCLOSE ) def bracketopen = "[" ^^ (_ => BRACKETOPEN )