Google Logo mandoc -Tps – NetBSD/Google Summer of Code 2010 Project


mandoc is a utility for formatting UNIX manuals. It is part of the NetBSD, OpenBSD, and DragonFly BSD operating systems. And it's missing the following important feature:

-Tps: produce formatted PostScript output

where -Tps refers to the command-line flags for this output mode (the -T is used for historical purposes).

The purpose of mandoc -Tps is to provide this functionality over the course of a three month project. The work is sponsored by Google Summer of Code 2010 and mentored by NetBSD. mandoc is part of the mdocml package (mdocml is the historical name for the project).

The anticipated implementation will also provide -Tpdf (or a framework for it) for producing native PDF output.

Conclusions: the GSoC-2010 period has ended. The mandoc -Tps project was successful: both -Tps and -Tpdf were implemented!


This section minimally documents the progress of mandoc -Tps (for more elaborate updates, please subscribe to the discussion mailing list linked on the mdocml site). It also serves as a projected time-line for project milestones. These are estimates: milestones will be adjusted as they're met.

Week Milestone
24/05/2010 0 Project formally begins. NetBSD Logo
3 Initial -Tps output is committed to the mdocml repository (see the mandoc manual for details). This directly interpolates output words into PostScript. It is minimal but works over all manuals.
3,75 Text-decorated (bold, oblique, normal) -Tps committed to the repository. This concludes basic support for PostScript. Next up is variable-width glyphs, which will take some time.
6 Proportional-width font handling has been committed (it will be part of the next release). Right now, the font embedded for -Tps is Courier (i.e., it looks the same) until kerning and font-mode switching is handled. The -Opaper=papersize option may now be specified to fit output within various paper sizes.
7 Commited proportional-width Times 11-point font metrics, now used by default in -Tps output. Example: If this renders strangely, please let me (kristaps@) know.
11 Commited -Tpdf. This is strictly-speaking beyond the GSoC scope, but is nevertheless valuable. This concludes all GSoC features. The rest will be optimisations.
16/08/2010 13 Project formally ends.


For all other elements related to mandoc -Tps (contacts, documentation, downloads, etc.), please refer to the mdocml website. The project's implementor is Kristaps Dzonsons,

Get NetBSD Summer of Code projects at Fast, secure and Free Open Source software downloads Copyright © 2010 Kristaps Dzonsons, $Date: 2010/08/17 10:52:46 $