Formatting RFCs and Internet-Drafts

The basic reference document on creating an RFC is "Instructions to RFC Authors". The primary submission format for RFCs is ASCII text. For more on RFC/Internet-Draft authoring tools, see also the IETF web page "Available Authoring Tools".

Creating Internet-Drafts

  • XML

    The xml2rfc tool converts an XML source file to text, HTML, or nroff. RFC 2629 and its unofficial successor define the format. Various templates, the xml2rfc FAQ, and intro to xml2rfc slides are available.

    A template by Elwyn Davies is available as template-bare.xml.

    A template by the MIB Doctors for a document containing a MIB is available here. The text output with advice is available here.

  • nroff, groff

    The text preparation program nroff is widely available for Unix systems, while its freeware equivalent groff is available for an even wider range of platforms, including Microsoft Windows. These programs use directives in the text to control the formatting. The RFC Editor, in particular, uses nroff for final RFC formatting.

    NroffEdit is an application with wysiwyg display for writing and editing Internet-Drafts using nroff. You edit the nroff in the left-hand window and see the text output in the right-hand window. To start a new I-D, load a template by selecting File > New Draft from Template.

    A template is available as 3-nroff.template. There is also an introductory tutorial on the use of nroff.

  • Microsoft Word

    The rules for formatting RFCs were set in the days when most text editors basically handled ASCII text files. Life is more difficult for those who must use Microsoft Word to produce their RFCs. RFC 5385 by Joe Touch describes in detail how to use his Word template to create an Internet-Draft or RFC. It requires this perl script for post-processing.

  • LaTeX

    LaTeX is widely used for text preparation in many academic environments. A convenient LaTeX template is available as 2-latex.template. LaTeX in general does not produce plain ASCII text in the RFC format, but there is a LaTeX-to-nroff translation tool.

Checking Formal Languages

Additional Tools

  • For creating different kinds of diff files, see the diff tools made available by the IETF Tools Team.

  • For validating your XML file for use with xml2rfc, see Bill Fenner's xml2rfc validator.

This page was last updated on 9 November 2010.