diff --git a/PyTeX/format/constants.py b/PyTeX/format/constants.py index 331aac2..78d55f9 100644 --- a/PyTeX/format/constants.py +++ b/PyTeX/format/constants.py @@ -62,7 +62,7 @@ INS_FILE = [ DRV_FILE = [ r'\documentclass{{{documentclass}}}', - r'{{preamble}}', + r'{preamble}', r'\begin{{document}}', r'\DocInput{{{infile}}}', r'\end{{document}}' diff --git a/PyTeX/format/macros.py b/PyTeX/format/macros.py index be6ea35..2194a9a 100644 --- a/PyTeX/format/macros.py +++ b/PyTeX/format/macros.py @@ -169,7 +169,7 @@ class SimpleSingleLineMacro(SingleLineMacro, ABC): class GuardMacro(RegexSingleLineMacro): def __init__(self): - super(GuardMacro, self).__init__(r'<(\*|/|@@=)[a-zA-Z]*>') + super(GuardMacro, self).__init__(r'<(\*|/|@@=)[a-zA-Z_]*>') def _apply(self, line, formatter) -> Union[str, List[str]]: match = re.search(self.regex, line)