add package error macro

This commit is contained in:
Maximilian Keßler 2021-10-07 14:27:06 +02:00
parent d1a269b56b
commit 536b995e79

View file

@ -47,6 +47,7 @@ def make_default_commands(package_formatter: PackageFormatter):
info=Args.one) info=Args.one)
package_formatter.add_arg_replacement(1, 'warning', r'\PackageWarning{{{name}}}{{{warning}}}', package_formatter.add_arg_replacement(1, 'warning', r'\PackageWarning{{{name}}}{{{warning}}}',
name=Attributes.package_name, warning=Args.one) name=Attributes.package_name, warning=Args.one)
package_formatter.add_arg_replacement(1, 'error', r'\PackageError{{{name}}}{{{error}}}}', name=Attributes.package_name, error=Args.one)
package_formatter.add_replacement('end options x', package_formatter.add_replacement('end options x',
r"\DeclareOptionX*{{\PackageWarning{{{package_name}}}" r"\DeclareOptionX*{{\PackageWarning{{{package_name}}}"
r"{{Unknown '\CurrentOption'}}}}" + '\n' + r'\ProcessOptionsX\relax' + '\n', r"{{Unknown '\CurrentOption'}}}}" + '\n' + r'\ProcessOptionsX\relax' + '\n',