diff --git a/build/utils/pytex_file.py b/build/utils/pytex_file.py index e1a7221..adf76f4 100644 --- a/build/utils/pytex_file.py +++ b/build/utils/pytex_file.py @@ -69,9 +69,17 @@ class TexFileToFormat: def __format_header(self): new_header = [] for line in self.current_build_info.header: + if '.pysty' in self.src_path.name: + latex_file_type = 'package' + elif '.pycls' in self.src_path.name: + latex_file_type = 'class' + elif '.pydict' in self.src_path.name: + latex_file_type = 'dictionary' + else: + raise Exception('Programming error. Please contact the developer.') new_header.append(line.format( source_file=self.src_path.name, - latex_file_type='package' if '.pysty' in self.src_path.name else 'class' + latex_file_type=latex_file_type )) self._header = new_header