pytex/default_formatters/package_formatter.py

23 lines
769 B
Python
Raw Normal View History

import PyTeX.formatter
import PyTeX.base
import PyTeX.macros
class PackageFormatter(PyTeX.formatter.TexFormatter):
2022-01-11 18:51:03 +01:00
def __init__(self, package_name: str, author: str, extra_header: [str] = [], tex_version: str = 'LaTeX2e',
version: str = '0.0.0', latex_name: str = 'prepend-author'):
PyTeX.formatter.TexFormatter.__init__(
self,
name=package_name,
author=author,
header=extra_header,
file_extension='.sty',
2022-01-11 18:51:03 +01:00
tex_version=tex_version,
version=version,
latex_name=latex_name
)
2022-01-11 18:51:03 +01:00
self.tex_version = tex_version
def make_default_macros(self):
2022-01-11 18:51:03 +01:00
PyTeX.macros.make_default_macros(self, 'package', tex_version=self.tex_version)