Working with Hg sources

Source distributions of Mr. Filter come with a number of files pre-built. The schematics, spice files, and documentation are all included in the distributions. The Hg repository, however, contains the original material. Building Mr. Filter from the Hg repository is a very different process.


To build everything, you will need the following packages

  • gschem
  • scons
  • pstoedit
  • eps2eps
  • Skencil
  • xmlto (for documentation)
  • graphviz (for documentation)
  • docbook-mathml (for documentation)
  • sphinx (for the web site)


on my system installing docbook-mathml fails to download the dtd file. I had to download it manually with these commands:

$ wget
$ sudo mkdir -p /usr/local/share/xml/docbook-mathml-dtd-1.0
$ sudo mv dbmathml.dtd /usr/local/share/xml/docbook-mathml-dtd.1.0
$ sudo xmlcatalog --noout --add public "-//OASIS//DTD DocBook MathML Module V1.0//EN" "file:///usr/local/share/xml/docbook-mathml-dtd-1.0/dbmathml.dtd" /etc/xml/catalog
$ sudo xmlcatalog --noout --add system "" "file:///usr/local/share/xml/docbook-mathml-dtd-1.0/dbmathml.dtd" /etc/xml/catalog
$ sudo xmlcatalog --noout --add public "-//W3C//DTD MathML 2.0//EN" "file:///usr/share/xml/schema/w3c/mathml/dtd/mathml2.dtd" /etc/xml/catalog
$ sudo xmlcatalog --noout --add public "-//W3C//DTD MathML//EN" "file:///usr/share/xml/schema/w3c/mathml/dtd/mathml2.dtd" /etc/xml/catalog
$ sudo xmlcatalog --noout --add system "" "file:///usr/share/xml/schema/w3c/mathml/dtd/mathml2.dtd" /etc/xml/catalog
$ sudo xmlcatalog --noout --add public "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "file:///usr/share/xml/schema/w3c/mathml/dtd/xhtml-math11-f.dtd" /etc/xml/catalog
$ sudo xmlcatalog --noout --add system "" "file:///usr/share/xml/schema/w3c/mathml/dtd/xhtml-math11-f.dtd" /etc/xml/catalog


  • First, get the sources by hg clone mrfilter.
  • To build everything, just do scons
  • If you only want to build the code and not documentation, do scons images spice
  • If you want to make a source distribution, do python sdist after first building everything.

Updating the web site

The mrfilter website is managed in the main mercurial repository. To post, do:

$ scons web
$ ln -s index.xhtml web/html/index.html
$ rsync  -avl --delete -e ssh web/html/ asomers,