Impressum, Datenschutz (Legal information in German)


What is hm4?

hm4 is a set of shell scripts and m4 macro packages to generate HTML, LATEX and plain text output from a common source text in a language with a syntax similar to (a small subset of) LATEX.

hm4 is free software (GNU GPL). hm4's WWW home page is

What does "hm4" stand for?

It has no special meaning. It's just a contraction of HTML (originally the only output format) and m4 because I'm so uncreative. ;-)

What's the main purpose of hm4?

Create web pages that (optionally) can also be printed via LATEX or used in plain text format (e.g. for emails) – the latter, of course, with reduced formatting.

Why not write HTML directly?

I Hate This Mini Language. ;-) Well, not entirely, but I don't like its tag syntax, especially the need for paragraph tags (compared to TEX), and the language is just too limited (most notably: no macros). So, it's nothing I like to write longish texts in.

Why hm4 and not Texinfo?

Texinfo also supports (besides Info) output in DVI (via TEX), HTML and plain text formats. However, its main target is manuals and the like. Its format for references (especially in Info and plain text) is a little peculiar. It does not offer (without tweaking) the flexibility one sometimes needs for web pages (the output of makeinfo --html and texi2html has quite a fixed layout – though it's possible to change it by post-processing). Finally, the choice of "@" as the special character is a little unfortunate when dealing with email addresses a lot.

Why hm4 and not (LA)TEX?

TEX is simply too powerful. It has many features that cannot be adequately represented in HTML (except by including graphics, DVI, PS or PDF files). Though there are (LA)TEX to HTML translators that do quite a good job, it's not obvious for the author during writing which (LA)TEX constructs will work well, or only partially, or not at all in HTML, so it's not optimal for writing new texts meant (also) for the web. IMHO, TEX should have been the language used on the WWW, but things being as they are, we're stuck with HTML which does not make (LA)TEX the best choice for writing texts mainly intended for the WWW.

Why not use any of the various other available HTML generators?

I checked a number of them. Many of them use an extended HTML syntax, i.e. more tags etc. That's not exactly what I prefer personally, see above. Others don't have all the features I need. Sure, hm4 has its limitations as well, but it does the job I needed to do (and at least I know how to extend it when necessary ;-). Perhaps it's useful for you, too, and perhaps not ...

Why not use a "WYSIWYG" HTML editor?

You must be kidding ...

Main features of hm4

Most of the following features are optional.


No, sorry. :–( I don't have the time to write some now. It's probably not easy to figure it out from the scripts and the (rather unreadable) m4 macros, but at least you have the source ...


The following packages are needed for various parts of hm4 (checked on a Debian wheezy system, excluding essential packages):


Get hm4.tar.bz2.

Copyright 2000-2018 by Frank Heckenbach (

Best Viewed With Any Browser Valid HTML 4.0