## 6.8.2 Package plugin

For a slighly more complicated example, assume that you have implemented a python version of some package that is not natively supported by plasTeX, or you don’t like the available implementation and, for some reason, contributing your implementation to plasTeXis not possible. You can use the --packages-dir option to use your implementation, but this is not convenient if you want to distribute it. So you can create a folder with the following structure

The ‘pyproject.toml’ was already explained and the ‘__init__.py’ can be empty in this case. In this case the plugin name is plastex_foo_package. The content of ‘foo.py’ could be:

`from plasTeX import Command class foo(Command): pass`

and the content of ‘Foo.jinja2’ could be:

`name: foo Foo!`

When compiling a file using this plugin, you can put `\usepackage{foo}` in the preamble and then use the `\foo` command that will be rendered as “Foo!” with any template based renderer (for instance the default HTML5 renderer).