CTAN Comprehensive TeX Archive Network

Directory graphics/metapost/contrib/macros/huffman



This METAPOST package allows to draw binary Huffman trees from two arrays : a string one, and a value one. It is based on METAOBJ package which provides many tools to build trees in general.

This package is in beta version, do not hesitate to report bugs, as well as requests for improvement.


To allow for easier feedback and bug reporting, this repository has a mirror repository on github: https://github.com/chupinmaxime/huffman


huffman is on the ctan and can be installed via the package manager of your distribution https://www.ctan.org/pkg/mpchess.

With live under Linux or MacOS

To install huffman with live, you will have to create the directory texmf directory in your home.

user $> mkdir ~/texmf

Then, you will have to place the .mp files in the ~/texmf/tex/metapost/huffman/.

Once this is done, huffman will be loaded with the classic

input huffman

With MikTEX and Windows

These two systems are unknown to the author of MPchess, so we refer to their documentation to add local packages: http://docs.miktex.org/manual/localadditions.html


huffman depends on the packages METAPOST: metaobj and, if MPchess is not used with Lua and luamplib, latexmp.



Maxime Chupin, notezik(at)gmail.com


This projet is under LATEX Project Public License 1.3c.

Download the contents of this package in one zip archive (128.1k).

huffman – Drawing binary Huffman trees with and METAOBJ

This package allows to draw binary Huffman trees from two arrays : an array of strings, and an array of weights (numeric). It is based on the METAOBJ package which provides many tools for building trees in general.

Home pagehttps://plmlab.math.cnrs.fr/mchupin/huffman
Version0.1 2023-05-10
LicensesThe Project Public License 1.3c
MaintainerMaxime Chupin
Contained inTeX Live as huffman
MiKTeX as huffman
Graphics metapost
Guest Book Sitemap Contact Contact Author