Build a new filter plugin

AMC has two built-in source file types : LaTeX and AMC-TXT. You can add some more...

Files to be written

To define a new file type named mytype, you need to create two perl modules with the following files:


Have a look at the corresponding files for type plain (LaTeX files) and the parents modules (AMC/Filter/ and AMC/ to see how they are built. The AMC::Filter::register::mytype module is used to register this new file type in AMC, and the AMC::Filter::mytype module is used to process an input file written with our new type to a LaTeX file. As an example, the processing part of AMC::Filter::mytype only copies the file:

sub filter {
  my ($self,$input_file,$output_file)=@_;

Pack the code

If you want to publish your module so that another user can use it, make a ZIP archive with the mytype tree from your $HOME/.AMC.d/plugins/ directory. That's it!