version 1.15, 2009/03/24 20:05:43 |
version 1.121, 2011/05/26 20:23:01 |
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
<html> |
<HTML> |
<head> |
<HEAD> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> |
<meta name="resource-type" content="document"> |
<LINK REL="stylesheet" HREF="index.css" TYPE="text/css" MEDIA="all"> |
<link rel="stylesheet" href="style.css" type="text/css" media="all"> |
<TITLE>mdocml | mdoc macro compiler</TITLE> |
<title>mdocml.bsd.lv</title> |
</HEAD> |
</head> |
<BODY> |
<body> |
<P CLASS="head"> |
<table width="600"> |
<B>mdocml</B> – mdoc macro compiler |
<col width="100%"> |
</P> |
<tbody> |
<H1> |
<tr> |
<A NAME="description">Description</A> |
<td> |
</H1> |
<div class="head"> |
<P> |
<b>mdocml</b> – mdoc macro compiler |
<SPAN CLASS="nm">mdocml</SPAN> is a suite of tools compiling <I><A HREF="mdoc.7.html">mdoc</A></I>, the roff macro |
</div> |
package of choice for BSD manual pages, and <I><A HREF="man.7.html">man</A></I>, the predominant historical package for |
</td> |
UNIX manuals. The mission of <SPAN CLASS="nm">mdocml</SPAN> is to deprecate <A |
</tr> |
HREF="http://www.gnu.org/software/groff/" CLASS="external">groff</A>, the GNU troff implementation, for displaying <I>mdoc</I> |
<tr> |
pages whilst providing token support for <I>man</I>. |
<td valign="top"> |
</P> |
<h1> |
<P> |
DESCRIPTION |
Why? groff amounts to over 5 MB of source code, most of which is C++ and all of which is GPL. It runs slowly, produces |
</h1> |
uncertain output, and varies in operation from system to system. mdocml strives to fix this (respectively small, C, <A |
|
CLASS="external" HREF="http://www.isc.org/software/license">ISC</A>-licensed, fast and regular). |
|
</P> |
|
<P> |
|
<SPAN CLASS="nm">mdocml</SPAN> consists of the <A HREF="mandoc.3.html">libmandoc</A> validating compiler and <A |
|
HREF="mandoc.1.html">mandoc</A>, which interfaces with the compiler library to format output for UNIX terminals (with |
|
support for wide-character locales), XHTML, HTML, PostScript, and PDF. |
|
It also includes <A HREF="preconv.1.html">preconv</A>, for recoding multibyte manuals; and <A |
|
HREF="makewhatis.1.html">makewhatis</A>, for indexing manuals. |
|
It is a <A CLASS="external" HREF="http://bsd.lv/">BSD.lv</A> project. |
|
</P> |
|
<P> |
|
<I>Disambiguation</I>: <SPAN CLASS="nm">mdocml</SPAN> is often referred to by its installed binary, <Q>mandoc</Q>. |
|
</P> |
|
<H1> |
|
<A NAME="sources">Sources</A> |
|
</H1> |
|
<P> |
|
<SPAN CLASS="nm">mdocml</SPAN> is in plain-old ANSI C and should build and run on any UNIX system, although <A |
|
HREF="makewhatis.1.html">makewhatis</A> requires <A CLASS="external" |
|
HREF="http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html">Berkeley Database</A> (this is |
|
installed by default on all BSD operating systems). |
|
To compile <SPAN CLASS="nm">mdocml</SPAN>, run <CODE>make</CODE>, then <CODE>make install</CODE> to install into |
|
<I>/usr/local</I>. |
|
Be aware: if you have an existing <A HREF="http://www.gnu.org/software/groff/" CLASS="external">groff</A> installation, |
|
this may overwrite its <B>preconv</B> binary. |
|
The <A HREF="makewhatis.1.html">makewhatis</A> utility is not yet linked to the build. You must run <CODE>make |
|
makewhatis</CODE> to build it (it does not install). |
|
</P> |
|
<P> |
|
The most current version of <SPAN CLASS="nm">mdocml</SPAN> is <SPAN CLASS="attn">@VERSION@</SPAN>, dated <SPAN |
|
class="attn">@VDATE@</SPAN>. |
|
</P> |
|
|
<p> |
<H2> |
<span class="nm">mdocml</span> is a suite of tools compiling “-mdoc”, the roff macro |
Current |
package of choice for BSD manual pages. The mission of <span class="nm">mdocml</span> is to deprecate |
</H2> |
<a href="http://www.gnu.org/software/groff/" class="external">groff</a>, the GNU roff implementation, |
|
for displaying -mdoc pages. |
|
</p> |
|
|
|
<p> |
<TABLE WIDTH="100%" SUMMARY="Current Sources"> |
Why? groff amounts to over 5 MB of source code, most of which is C++ and all of which is GPL. It runs |
<COL WIDTH="175"> |
slowly, produces uncertain output, and varies in operation from system to system. mdocml strives to fix |
<COL> |
this (respectively small, C, ISC-licensed, fast and regular). |
<TBODY> |
</p> |
<TR> |
|
<TD>Source archive</TD> |
|
<TD> |
|
<A HREF="/snapshots/mdocml.tar.gz">/snapshots/mdocml.tar.gz</A> |
|
<SMALL>(<A HREF="/snapshots/mdocml.md5">md5</A>)</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD>Online source</TD> |
|
<TD> |
|
<A HREF="http://mdocml.bsd.lv/cgi-bin/cvsweb/?cvsroot=mdocml">cvsweb</A> |
|
</TD> |
|
</TR> |
|
</TBODY> |
|
</TABLE> |
|
|
<p> |
<H2> |
The core of <span class="nm">mdocml</span> is the libmdoc library, a validating scanner-parser producing |
Downstream |
intermediate-form output from -mdoc input. libmdoc is a simple, fast library operating on memory |
</H2> |
buffers, so it can be used for a variety of front-ends (terminal-based, CGI and so on). |
|
</p> |
|
|
|
<p> |
|
The primary front-end is <span class="man">mandoc(1)</span>, which formats -mdoc manuals for display on |
|
the terminal. The <span class="man">mandoc(1)</span> utility is intended to deprecate usage of <a |
|
href="http://www.gnu.org/software/groff/" class="external">groff</a> for displaying mdoc manuals on the |
|
terminal. |
|
</p> |
|
|
|
<p> |
<TABLE WIDTH="100%" SUMMARY="Downstream Sources"> |
<span class="attn">Please submit patches, bug reports and suggestions!</span> Although a significant |
<COL WIDTH="175"> |
implementation exists, work remains for the backend library and especially the front-end utilities. See |
<COL> |
the <a href="#contact">contact</a> information below for submissions. |
<TBODY> |
</p> |
<TR> |
</td> |
<TD>DragonFly BSD</TD> |
</tr> |
<TD> |
<tr> |
<A HREF="http://gitweb.dragonflybsd.org/dragonfly.git/tree/HEAD:/usr.bin/mandoc" |
<td> |
CLASS="external">usr.bin/mandoc</A> |
<h1> |
</TD> |
INSTALLING SOURCES |
</TR> |
</h1> |
<TR> |
|
<TD>FreeBSD</TD> |
|
<TD> |
|
<A HREF="http://www.freebsd.org/cgi/cvsweb.cgi/ports/textproc/mdocml/" |
|
CLASS="external">ports/textproc/mdocml</A> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD>NetBSD</TD> |
|
<TD> |
|
<A HREF="http://cvsweb.netbsd.org/bsdweb.cgi/src/external/bsd/mdocml/" |
|
CLASS="external">src/external/bsd/mdocml</A> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD>OpenBSD</TD> |
|
<TD> |
|
<A HREF="http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/" |
|
CLASS="external">src/usr.bin/mandoc</A> |
|
</TD> |
|
</TR> |
|
</TBODY> |
|
</TABLE> |
|
|
<p> |
<H2> |
Sources correctly build and install on FreeBSD, OpenBSD, NetBSD and Linux operating systems, tested |
Historical |
variously on i386, AMD64, alpha and others. |
</H2> |
</p> |
|
|
|
<p> |
<TABLE WIDTH="100%" SUMMARY="Archived Sources"> |
The most current version is <span class="attn">@VERSION@</span>, dated |
<COL WIDTH="175"> |
<span class="attn">@VDATE@</span>. |
<COL> |
</p> |
<TBODY> |
|
<TR> |
|
<TD>Source archive</TD> |
|
<TD> |
|
<A HREF="/snapshots/">/snapshots/</A> |
|
</TD> |
|
</TR> |
|
</TBODY> |
|
</TABLE> |
|
|
<h2> |
<H1> |
Snapshot source |
<A NAME="documentation">Documentation</A> |
</h2> |
</H1> |
|
|
<p> |
<P> |
CVS sources are checkedout and snapshotted with version updates. These may be found in the <a |
These manuals are generated automatically and refer to the current snapshot. |
href="/snapshots/">/snapshots/</a> directory. |
</P> |
</p> |
|
|
|
<p class="boxed"> |
<TABLE WIDTH="100%" SUMMARY="Documentation"> |
% cd /tmp<br> |
<COL WIDTH="175"> |
% ftp -V -o- http://mdocml.bsd.lv/snapshots/mdocml.tar.gz | tar -zvxf -<br> |
<COL> |
% cd mdocml<br> |
<TBODY> |
% make all<br> |
<TR> |
% make regress<br> |
<TD VALIGN="top"><A HREF="mandoc.1.html">mandoc(1)</A></TD> |
# make install |
<TD VALIGN="top"> |
</p> |
format and display UNIX manuals |
|
<SMALL> |
|
(<A HREF="mandoc.1.txt">text</A> | |
|
<A HREF="mandoc.1.xhtml">xhtml</A> | |
|
<A HREF="mandoc.1.pdf">pdf</A> | |
|
<A HREF="mandoc.1.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="makewhatis.1.html">makewhatis(1)</A></TD> |
|
<TD VALIGN="top"> |
|
index UNIX manuals |
|
<SMALL> |
|
(<A HREF="makewhatis.1.txt">text</A> | |
|
<A HREF="makewhatis.1.xhtml">xhtml</A> | |
|
<A HREF="makewhatis.1.pdf">pdf</A> | |
|
<A HREF="makewhatis.1.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="preconv.1.html">preconv(1)</A></TD> |
|
<TD VALIGN="top"> |
|
recode multibyte UNIX manuals |
|
<SMALL> |
|
(<A HREF="preconv.1.txt">text</A> | |
|
<A HREF="preconv.1.xhtml">xhtml</A> | |
|
<A HREF="preconv.1.pdf">pdf</A> | |
|
<A HREF="preconv.1.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="mandoc.3.html">mandoc(3)</A></TD> |
|
<TD VALIGN="top"> |
|
mandoc macro compiler library |
|
<SMALL> |
|
(<A HREF="mandoc.3.txt">text</A> | |
|
<A HREF="mandoc.3.xhtml">xhtml</A> | |
|
<A HREF="mandoc.3.pdf">pdf</A> | |
|
<A HREF="mandoc.3.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="man.7.html">man(7)</A></TD> |
|
<TD VALIGN="top"> |
|
man language reference |
|
<SMALL> |
|
(<A HREF="man.7.txt">text</A> | |
|
<A HREF="man.7.xhtml">xhtml</A> | |
|
<A HREF="man.7.pdf">pdf</A> | |
|
<A HREF="man.7.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="eqn.7.html">eqn(7)</A></TD> |
|
<TD VALIGN="top"> |
|
eqn-mandoc language reference |
|
<SMALL> |
|
(<A HREF="eqn.7.txt">text</A> | |
|
<A HREF="eqn.7.xhtml">xhtml</A> | |
|
<A HREF="eqn.7.pdf">pdf</A> | |
|
<A HREF="eqn.7.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="mandoc_char.7.html">mandoc_char(7)</A></TD> |
|
<TD VALIGN="top"> |
|
mandoc special characters |
|
<SMALL> |
|
(<A HREF="mandoc_char.7.txt">text</A> | |
|
<A HREF="mandoc_char.7.xhtml">xhtml</A> | |
|
<A HREF="mandoc_char.7.pdf">pdf</A> | |
|
<A HREF="mandoc_char.7.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="mdoc.7.html">mdoc(7)</A></TD> |
|
<TD VALIGN="top"> |
|
mdoc language reference |
|
<SMALL> |
|
(<A HREF="mdoc.7.txt">text</A> | |
|
<A HREF="mdoc.7.xhtml">xhtml</A> | |
|
<A HREF="mdoc.7.pdf">pdf</A> | |
|
<A HREF="mdoc.7.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="roff.7.html">roff(7)</A></TD> |
|
<TD VALIGN="top"> |
|
roff-mandoc language reference |
|
<SMALL> |
|
(<A HREF="roff.7.txt">text</A> | |
|
<A HREF="roff.7.xhtml">xhtml</A> | |
|
<A HREF="roff.7.pdf">pdf</A> | |
|
<A HREF="roff.7.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD VALIGN="top"><A HREF="tbl.7.html">tbl(7)</A></TD> |
|
<TD VALIGN="top"> |
|
tbl-mandoc language reference |
|
<SMALL> |
|
(<A HREF="tbl.7.txt">text</A> | |
|
<A HREF="tbl.7.xhtml">xhtml</A> | |
|
<A HREF="tbl.7.pdf">pdf</A> | |
|
<A HREF="tbl.7.ps">postscript</A>) |
|
</SMALL> |
|
</TD> |
|
</TR> |
|
</TBODY> |
|
</TABLE> |
|
|
<h2> |
<H1> |
Snapshot port/pkgsrc |
<A NAME="contact">Contact</A> |
</h2> |
</H1> |
|
|
<p> |
<P> |
The source snapshot is automatically converted into OpenBSD, NetBSD and FreeBSD ports at <a |
Use the mailing lists for bug-reports, patches, questions, etc. (these require subscription). Please check the |
href="/ports-openbsd/">/ports-openbsd/</a>, <a href="/ports-netbsd/">/ports-netbsd/</a> and <a |
<A HREF="http://mdocml.bsd.lv/cgi-bin/cvsweb/TODO?cvsroot=mdocml">TODO</A> for known issues |
href="/ports-freebsd/">/ports-freebsd/</a>, respectively. Please read the <a class="external" |
before posting. Beyond that, contact Kristaps at <A |
href="http://www.openbsd.org/faq/faq15.html">OpenBSD Ports FAQ</a>, the <a class="external" |
HREF="http://mailhide.recaptcha.net/d?k=01M6h_w7twDp58ZgH57eWC_w==&c=Q2DBUt401ePlSeupJFrq_Q==" TITLE="Reveal |
href="http://www.netbsd.org/docs/software/packages.html">NetBSD pkgsrc guide</a> or the <a |
this e-mail address">kris...</A>@bsd.lv. |
class="external" |
</P> |
href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html">FreeBSD ports |
|
guide</a>, first. |
|
</p> |
|
|
|
<h3> |
<TABLE WIDTH="100%" SUMMARY="Mailing Lists"> |
OpenBSD port |
<COL WIDTH="175"> |
</h3> |
<COL> |
|
<TBODY> |
|
<TR> |
|
<TD> |
|
disc<A CLASS="external" TITLE="Reveal this e-mail address" |
|
HREF="http://www.google.com/recaptcha/mailhide/d?k=01KQ80PFH5n3BBNpF5Gs4sRg==&c=EV1QytpQqTHSItc2IXvZyocgYLPnG5K0JKw_gwMC9yc=">...</A>@mdocml.bsd.lv |
|
</TD> |
|
<TD> |
|
bug-reports, general questions, and announcements |
|
<SMALL>(<A HREF="/archives/discuss/summary.html">archive</A>)</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD> |
|
tec<A CLASS="external" TITLE="Reveal this e-mail address" |
|
HREF="http://www.google.com/recaptcha/mailhide/d?k=01qDX_iV0RlUOarEvb6mR28g==&c=gRXsTjza0NNCFPaYu-Taj2tF0pmYZSc90EZkFkhkxgo=">...</A>@mdocml.bsd.lv |
|
</TD> |
|
<TD> |
|
patches and system discussions |
|
<SMALL>(<A HREF="/archives/tech/summary.html">archive</A>)</SMALL> |
|
</TD> |
|
</TR> |
|
<TR> |
|
<TD> |
|
sou<A CLASS="external" TITLE="Reveal this e-mail address" |
|
HREF="http://www.google.com/recaptcha/mailhide/d?k=01prQrAZhhl2EbIwVcRfABsQ==&c=KtTW4Yic9xk-8g40KzJoca4fR3MYXv28g8NC6OQV-T8=">...</A>@mdocml.bsd.lv |
|
</TD> |
|
<TD> |
|
source commit messages |
|
<SMALL>(<A HREF="/archives/source/summary.html">archive</A>)</SMALL> |
|
</TD> |
|
</TR> |
|
</TBODY> |
|
</TABLE> |
|
|
<p class="boxed"> |
<H1> |
# pkg_delete mdocml<br> |
<A NAME="news">News</A> |
# cd /usr/ports/textproc/<br> |
</H1> |
# rm -rf mdocml<br> |
|
# ftp -V -o- http://mdocml.bsd.lv/ports-openbsd/mdocml.tar.gz | tar -zvxf -<br> |
|
# cd mdocml<br> |
|
# make build<br> |
|
# make install |
|
</p> |
|
|
|
<h3> |
<P CLASS="news"> |
NetBSD pkgsrc |
19-05-2011: version 1.11.3 |
</h3> |
</P> |
|
<P> |
|
Introduce locale-encoding of output with the <B>-Tlocale</B> output option and Unicode escaped-character input. |
|
See <A HREF="mandoc.1.html">mandoc</A> and <A HREF="mandoc_char.7.html">mandoc_char</A>, respectively, for details. |
|
This allows for non-ASCII characters (e.g., <I>\[u5000]</I>) to be rendered in the locale's encoding, if said |
|
environment supports wide-character encoding (if it does not, <B>-Tascii</B> is used instead). |
|
Locale support can be turned off at compile time by removing <I>-DUSE_WCHAR</I> in the <I>Makefile</I>, in which case |
|
<B>-Tlocale</B> is always a synonym for <B>-Tascii</B>. |
|
</P> |
|
<P> |
|
Furthermore, multibyte-encoded documents, such as those in UTF-8, may be on-the-fly recoded as <A |
|
HREF="mandoc.1.html">mandoc</A> input by using the newly-added <A HREF="preconv.1.html">preconv</A> utility. |
|
Note: in the future, this feature may be integrated into <A HREF="mandoc.1.html">mandoc</A>. |
|
</P> |
|
|
<p class="boxed"> |
<P CLASS="news"> |
# pkg_delete mdocml<br> |
12-05-2011: version 1.11.2 |
# cd /usr/pkgsrc/textproc/<br> |
</P> |
# rm -rf mdocml<br> |
<P> |
# ftp -V -o- http://mdocml.bsd.lv/ports-netbsd/mdocml.tar.gz | tar -zvxf -<br> |
Corrected some installation issues in version 1.11.1. |
# cd mdocml<br> |
Further migration to <A HREF="mandoc.3.html">libmandoc</A>. |
# make build<br> |
Initial public release (this utility is very much under development) of <A HREF="makewhatis.1.html">makewhatis</A>, |
# make install |
initially named mandoc-db. |
</p> |
This utility produces keyword databases of manual content |
|
<A HREF="http://mdocml.bsd.lv/mandoc-cgi/index.html">mandoc-cgi</A>, which features semantic querying of manual content. |
|
</P> |
|
|
<h3> |
<P CLASS="news"> |
FreeBSD port |
04-04-2011: version 1.11.1 |
</h3> |
</P> |
|
<P> |
|
The earlier <I>libroff</I>, <I>libmdoc</I>, and <I>libman</I> soup have been merged into |
|
a single library, <A HREF="mandoc.3.html">libmandoc</A>, which manages all aspects of |
|
parsing real manuals (from line-handling to <A HREF="tbl.7.html">tbl</A> parsing). |
|
</P> |
|
<P> |
|
Beyond this structural change, initial <A HREF="eqn.7.html">eqn</A> functionality is in |
|
place. For the time being, this is limited to the recognition of equation blocks; |
|
future version of <SPAN CLASS="nm">mdocml</SPAN> will expand upon this framework. |
|
</P> |
|
<P> |
|
As usual, many general fixes and improvements have also occurred. In particular, a great |
|
deal of redundancy and superfluous code has been removed with the merging of the backend |
|
libraries. |
|
</P> |
|
|
<p class="boxed"> |
<P> |
# pkg_delete -x mdocml<br> |
See <A HREF="http://mdocml.bsd.lv/cgi-bin/cvsweb/index.sgml?cvsroot=mdocml">cvsweb</A> for |
# cd /tmp<br> |
historical notes. |
# ftp -V -o- http://mdocml.bsd.lv/ports-freebsd/mdocml.tar.gz | tar -zvxf -<br> |
</P> |
# cd mdocml<br> |
|
# make<br> |
|
# make install |
|
</p> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
<h1> |
|
CONTACT |
|
</h1> |
|
|
|
<p> |
<P CLASS="foot"> |
Please contact Kristaps, kris<a class="external" |
<SMALL> |
href="http://mailhide.recaptcha.net/d?k=01jt88xIsFONwVjHZmGpc4AQ==&c=sb5E6ulipc-eTnpTVqI-BQ==" |
Copyright © 2008–2011 |
onclick="window.open('http://mailhide.recaptcha.net/d?k=01jt88xIsFONwVjHZmGpc4AQ==&c=sb5E6ulipc-eTnpTVqI-BQ==', |
<A CLASS="external" HREF="http://kristaps.bsd.lv">Kristaps Dzonsons</A>, |
'', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return |
$Date$ |
false;" title="Reveal this e-mail address">...</a>@kth.se, with questions, bug reports, patches, and so |
</SMALL> |
on. |
</P> |
</p> |
</BODY> |
|
</HTML> |
<p> |
|
If you'd like to submit patches, please contact us beforehand in case larger changes are pending but not |
|
checked in. If making a bug report, please make sure it's repeatable on the most current snapshot. |
|
</p> |
|
</td> |
|
</tr> |
|
<tr> |
|
<td> |
|
<div class="foot"> |
|
Copyright © 2008, 2009 Kristaps Džonsons, $Date$ |
|
</div> |
|
</td> |
|
</tr> |
|
</tbody> |
|
</table> |
|
</body> |
|
</html> |
|