CounterFormat = re.compile(r'^\s*PrettyFormat\s+"?(.*)"?\s*$', re.IGNORECASE)
CiteFormat = re.compile(r'^\s*CiteFormat', re.IGNORECASE)
# Note: preceding and trailing space in the val below matters
- KeyVal = re.compile(r'^\s*_\w+\s(.*\S)*$')
+ KeyVal = re.compile(r'^\s*B?_\w+\s(.*\S)*$')
Float = re.compile(r'^\s*Float\s*$', re.IGNORECASE)
UsesFloatPkg = re.compile(r'^\s*UsesFloatPkg\s+(.*\S)\s*$', re.IGNORECASE)
IsPredefined = re.compile(r'^\s*IsPredefined\s+(.*\S)\s*$', re.IGNORECASE)
output = io.open(output, 'w', encoding='utf_8', newline='\n')
# assuming only one encodings file
# Encoding utf8 utf8 "Unicode (utf8)" UTF-8 variable inputenc
- reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*')
+ reg = re.compile(r'Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*')
input = io.open(input_files[0], encoding='utf_8')
for lineno, line in enumerate(input.readlines()):
if not line.startswith('Encoding'):
for sfile in glob.glob( os.path.join(file, '*') ):
parseExamplesTemplates(sfile, seen, output)
- filename = file.split(os.sep)[-1]
+ filename = os.path.normpath(os.path.realpath(file)).split(os.sep)[-1]
if os.path.isfile(file):
if filename[-4:] != ".lyx":
return
# only record each item once
seen = []
for file in input_files:
- filename = file.split(os.sep)[-1]
+ filename = os.path.normpath(os.path.realpath(file)).split(os.sep)[-1]
if os.path.isfile(file):
if filename[-4:] != ".lyx":
continue