.\" automatically generated by xml2rfc v2.7.1dev0 on 2017-08-30T19:14:48Z

.pl 10.0i
.po 0
.ll 7.2i
.lt 7.2i
.nr LL 7.2i
.nr LT 7.2i
.hy 0
.ad l
.ds LH Internet-Draft
.ds CH Pandoc2rfc Version 2
.ds RH January 2013
.ds LF Gieben
.ds CF Expires July 5, 2013
.ds RF FORMFEED[Page %]
.in 0
.nf
RFC Beautification Working Group                               R. Gieben
Internet-Draft                                                    Google
Intended status: Informational                              January 2013
Expires: July 5, 2013
.fi


.ce 1
Writing \%I-Ds and RFCs using Pandoc and xml2rfc 2.x
.ce 1
\%draft-gieben-writing-rfcs-pandoc-02

Abstract
.in 3

This memo presents a technique for using Pandoc syntax as a source
format for documents in the \%Internet-Drafts \%(I-Ds) and Request for
Comments (RFC) series.

This version is adapted to work with "xml2rfc" version 2.x.
.in 0

Status of This Memo
.in 3

This \%Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.

\%Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF).  Note that other groups may also distribute
working documents as \%Internet-Drafts.  The list of current \%Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.

\%Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time.  It is inappropriate to use \%Internet-Drafts as reference
material or to cite them other than as "work in progress."

This \%Internet-Draft will expire on July 5, 2013.
.in 0

Copyright Notice
.in 3

Copyright (c) 2013 IETF Trust and the persons identified as the
document authors.  All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
\%(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document.  Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.  Code Components extracted from this document must
include Simplified BSD License text as described in Section\04.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
.bp
.ti 0
Table of Contents
.in 0
.nf

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Pandoc to RFC . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Dependencies  . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Starting a new project  . . . . . . . . . . . . . . . . . . .   5
   4.  Supported Features  . . . . . . . . . . . . . . . . . . . . .   5
   5.  Unsupported Features  . . . . . . . . . . . . . . . . . . . .   6
   6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   7
   7.  Pandoc Constructs . . . . . . . . . . . . . . . . . . . . . .   7
     7.1.  Paragraph . . . . . . . . . . . . . . . . . . . . . . . .   7
     7.2.  Section . . . . . . . . . . . . . . . . . . . . . . . . .   7
     7.3.  List Styles . . . . . . . . . . . . . . . . . . . . . . .   7
       7.3.1.  Symbol  . . . . . . . . . . . . . . . . . . . . . . .   7
       7.3.2.  Number  . . . . . . . . . . . . . . . . . . . . . . .   8
       7.3.3.  Empty . . . . . . . . . . . . . . . . . . . . . . . .   8
       7.3.4.  Roman . . . . . . . . . . . . . . . . . . . . . . . .   8
       7.3.5.  Letter  . . . . . . . . . . . . . . . . . . . . . . .   9
       7.3.6.  Hanging . . . . . . . . . . . . . . . . . . . . . . .   9
     7.4.  Figure/Artwork  . . . . . . . . . . . . . . . . . . . . .  10
       7.4.1.  References  . . . . . . . . . . . . . . . . . . . . .  10
     7.5.  Block Quote . . . . . . . . . . . . . . . . . . . . . . .  11
     7.6.  References  . . . . . . . . . . . . . . . . . . . . . . .  11
       7.6.1.  External  . . . . . . . . . . . . . . . . . . . . . .  11
       7.6.2.  Internal  . . . . . . . . . . . . . . . . . . . . . .  11
     7.7.  Spanx Styles  . . . . . . . . . . . . . . . . . . . . . .  12
     7.8.  Tables  . . . . . . . . . . . . . . . . . . . . . . . . .  12
       7.8.1.  References  . . . . . . . . . . . . . . . . . . . . .  12
     7.9.  Indexes . . . . . . . . . . . . . . . . . . . . . . . . .  13
   8.  Usage guidelines  . . . . . . . . . . . . . . . . . . . . . .  13
     8.1.  Working with multiple files . . . . . . . . . . . . . . .  13
     8.2.  Setting the title . . . . . . . . . . . . . . . . . . . .  13
     8.3.  Uploading the XML/txt . . . . . . . . . . . . . . . . . .  14
     8.4.  VIM syntax highlighting . . . . . . . . . . . . . . . . .  14
   9.  Security Considerations . . . . . . . . . . . . . . . . . . .  14
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  14
   11. References  . . . . . . . . . . . . . . . . . . . . . . . . .  14
     11.1.  Informative References . . . . . . . . . . . . . . . . .  14
     11.2.  Normative References . . . . . . . . . . . . . . . . . .  14
     11.3.  URIs . . . . . . . . . . . . . . . . . . . . . . . . . .  14
   Appendix A.  Tests  . . . . . . . . . . . . . . . . . . . . . . .  15
     A.1.  A Very Long Title Considerations With Regards to the
           Already Deployed Routing Policy . . . . . . . . . . . . .  15
     A.2.  Markup in heading . . . . . . . . . . . . . . . . . . . .  15
     A.3.  Blockquote  . . . . . . . . . . . . . . . . . . . . . . .  15
     A.4.  Verbatim code blocks  . . . . . . . . . . . . . . . . . .  15
     A.5.  Reference Tests . . . . . . . . . . . . . . . . . . . . .  15
     A.6.  Spanx Tests . . . . . . . . . . . . . . . . . . . . . . .  15
.bp
     A.7.  List Tests  . . . . . . . . . . . . . . . . . . . . . . .  16
     A.8.  Table Tests . . . . . . . . . . . . . . . . . . . . . . .  19
     A.9.  Numbered examples . . . . . . . . . . . . . . . . . . . .  20
     A.10. Figure tests  . . . . . . . . . . . . . . . . . . . . . .  20
     A.11. Verse tests . . . . . . . . . . . . . . . . . . . . . . .  21
   Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  21
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  21
.fi
.in 3
.in 4
.ti 0

1.  Introduction
.in 3

This document presents a technique for using Pandoc syntax as a
source format for documents in the \%Internet-Drafts \%(I-Ds) and Request
for Comments (RFC) series.

This version is adapted to work with "xml2rfc" version 2.x.

Pandoc is an "almost plain text" format and therefor particularly
well suited for editing \%RFC-like documents.
.in 6

Note: this document is typeset in Pandoc and does not render
completely correct when reading it on github.
.in 4
.ti 0

2.  Pandoc to RFC
.in 6

Pandoc2rfc \%-- designed to do the right thing, until it doesn't.
.in 3

When writing [RFC4641] we directly wrote the XML.  Needless to say it
was tedious even thought the XML of xml2rfc [1] is very "light".  The
latest version of xml2rfc version 2 can be found here [2].

During the last few years people have been developing markup
languages that are very easy to remember and type.  These languages
have become known as "almost plain \%text"-markup languages.  One of
the first was the Markdown [3] syntax.  One that was developed later
and incorporates Markdown and a number of extensions is Pandoc [4].
The power of Pandoc also comes from the fact that it can be
translated to numerous output formats, including, but not limited to:
HTML, (plain) Markdown and "docbook" XML.

So using Pandoc for writing RFCs seems like a sane choice.  As
"xml2rfc" uses XML, the easiest way would be to create "docbook" XML
and transform that using XSLT.  Pandoc2rfc does just that.  The
conversions are, in some way amusing, as we start off with (almost)
plain text, use elaborate XML and end up with plain text again.
.bp
.in 0
.nf
   +-------------------+   pandoc   +---------+
   | ALMOST PLAIN TEXT |   ------>  | DOCBOOK |
   +-------------------+            +---------+
                 |                       |
   non-existent  |                       | xsltproc
     faster way  |                       |
                 v                       v
         +------------+    xml2rfc  +---------+
         | PLAIN TEXT |  <--------  | XML2RFC |
         +------------+             +---------+
.fi
.in 3
.ce 1

Figure\01: Attempt to justify Pandoc2rfc.

The XML generated (the output after the "xsltproc" step in Figure\01)
is suitable for inclusion in either the "middle" or "back" section of
an RFC.  The simplest way is to create a template XML file and
include the appropriate XML:
.in 0
.nf

   <?xml version='1.0' ?>
   <!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
   <!ENTITY pandocMiddle PUBLIC '' 'middle.xml'>
   <!ENTITY pandocBack   PUBLIC '' 'back.xml'>
   ]>

   <rfc ipr='trust200902' docName='draft-gieben-pandoc-rfcs-02'>
    <front>
       <title>Writing I-Ds and RFCs using Pandoc v2</title>
   </front>

   <middle>
       &pandocMiddle;
   </middle>

   <back>
       &pandocBack;
   </back>

   </rfc>
.fi
.in 3
.ce 1

Figure\02: A minimal template.xml.

See the Makefile for an example of this.  In this case you need to
edit 3 documents:
.in 7
.ti 3

1.  middle.pdc \%- contains the main body of text;
.ti 3

2.  back.pdc \%- holds appendices and references;
.bp
.ti 3
3.  template.xml (probably a fairly static file).
.in 3

The draft ("draft.txt") you are reading now, is automatically created
when you call "make".  The homepage of Pandoc2rfc is this github
repository [5].
.in 6
.ti 0

2.1.  Dependencies
.in 3

It needs "xsltproc" and "pandoc" to be installed.  See the Pandoc
user manual for the details [6] on how to type in Pandoc style.  And
ofcourse "xml2rfc" version two.

When using Pandoc2rfc consider adding the following sentence to an
Acknowledgements section:
.in 0
.nf

    This document was produced using the Pandoc2rfc tool.
.fi
.in 3
.in 4
.ti 0

3.  Starting a new project
.in 3

When starting a new project with "pandoc2rfc" you'll need to copy the
following files:
.in 6
.ti 3

o  "Makefile"
.ti 3

o  "transform.xslt"
.ti 3

o  And the above mentioned files:
.in 9
.ti 6

*  "middle.pdc"
.ti 6

*  "back.pdc"
.ti 6

*  "template.xml"
.in 3

After that you can start editing.
.in 4
.ti 0

4.  Supported Features
.in 6
.ti 3

o  Sections with an anchor and title attributes (Section\07.2);
.ti 3

o  Lists
.in 9
.ti 6

*  style=symbols (Section\07.3.1);
.ti 6

*  style=numbers (Section\07.3.2);
.ti 6

*  style=empty (Section\07.3.3);
.bp
.ti 6
*  style=format %i, use roman lowercase numerals, (Section\07.3.4);
.ti 6

*  style=format (%d), use roman uppercase numerals
(Section\07.3.4);
.ti 6

*  style=letters \%(lower- and uppercase, Section\07.3.5);
.ti 6

*  style=hanging (Section\07.3.6);
.in 6
.ti 3

o  Figure/artwork with a title (Section\07.4);
.ti 3

o  Block quote this is converted to "<list style="empty">" paragraph
(Section\07.5);
.ti 3

o  References
.in 9
.ti 6

*  external (eref) (Section\07.6.1);
.ti 6

*  internal (xref) (Section\07.6.2), you can refer to:
.in 12
.ti 9

+  section (handled by Pandoc, see Section\07.6));
.ti 9

+  figures (handled by XSLT, see Section\07.4.1);
.ti 9

+  tables (handled by XSLT, see Section\07.8.1).
.in 6
.ti 3

o  Citations, by using internal references;
.ti 3

o  Spanx style=verb, style=emph and style=strong (Section\07.7);
.ti 3

o  Tables with an anchor and title (Section\07.8);
.ti 3

o  Indexes, by using footnotes (Section\07.9).
.in 4
.ti 0

5.  Unsupported Features
.in 6
.ti 3

o  Lists inside a table ("xml2rfc" doesn't handle this);
.ti 3

o  Pandoc markup in the caption for figures/artwork.  Pandoc markup
for table captions _is_ supported;
.ti 3

o  crefs: for comments (no input syntax available), use HTML
comments: \%"<!-- ... \%-->";
.bp
.in 4
.ti 0
6.  Acknowledgements
.in 3

The following people have helped to make Pandoc2rfc what it is today:
Benno Overeinder, Erlend Hamnaberg, Matthijs Mekking, Trygve
Laugstoel.

This document was prepared using Pandoc2rfc.
.in 4
.ti 0

7.  Pandoc Constructs
.in 3

So, what syntax do you need to use to get the correct output?  Well,
it is _just_ Pandoc.  The best introduction to the Pandoc style is
given in this README from Pandoc itself [7].

For convenience we list the most important ones in the following
sections.
.in 6
.ti 0

7.1.  Paragraph
.in 3

Paragraphs are separated with an empty line.
.in 6
.ti 0

7.2.  Section
.in 3

Just use the normal sectioning commands available in Pandoc, for
instance:
.in 0
.nf

   # Section1 One
   Bla
.fi
.in 3

Converts to: "<section title="Section1 One" \%anchor="section1-one">"
If you have another section that is also named "Section1 One", that
anchor will be called \%"section1-one-1", but _only_ when the sections
are in the _same_ source file!

Referencing the section is done with "see \%[](#section1-one)", as in
see Section\07.2.
.in 6
.ti 0

7.3.  List Styles
.in 3

A good number of styles are supported.
.in 8
.ti 0

7.3.1.  Symbol
.in 0
.nf

   A symbol list.

   * Item one;
   * Item two.
.fi
.in 3
.bp
Converts to "<list style="symbol">":
.in 6
.ti 3

o  Item one;
.ti 3

o  Item two.
.in 8
.ti 0

7.3.2.  Number
.in 0
.nf

   A numbered list.

   1. Item one;
   1. Item two.
.fi
.in 3

Converts to "<list style="numbers">":
.in 7
.ti 3

1.  Item one;
.ti 3

2.  Item two.
.in 8
.ti 0

7.3.3.  Empty
.in 3

Using the default list markers from Pandoc:
.in 0
.nf

   A list using the default list markers.

   #. Item one;
   #. Item two.
.fi
.in 3

Converts to "<list style="empty">":
.in 6

Item one;

Item two.
.in 8
.ti 0

7.3.4.  Roman
.in 3

Use the supported Pandoc syntax:
.in 0
.nf

   ii. Item one;
   ii. Item two.
.fi
.in 3

Converts to "<list style="format %i.">":
.in 9
.ti 3

i.    Item one;
.ti 3

ii.   Item two.
.bp
.in 3
If you use uppercase Roman numerals, they convert to a different
style:
.in 0
.nf

   II. Item one;
   II. Item two.
.fi
.in 3

Yields "<list style="format (%d) ">":
.in 8
.ti 3

(1)  Item one;
.ti 3

(2)  Item two.
.ti 0

7.3.5.  Letter
.in 3

A numbered list.
.in 0
.nf

   a.  Item one;
   b.  Item two.
.fi
.in 3

Converts to "<list style="letters">":
.in 7
.ti 3

a.  Item one;
.ti 3

b.  Item two.
.in 3

Uppercasing the letters works too (note two spaces after the letter.
.in 0
.nf

   A.  Item one;
   B.  Item two.
.fi
.in 3

Becomes:
.in 7
.ti 3

A.  Item one;
.ti 3

B.  Item two.
.in 8
.ti 0

7.3.6.  Hanging
.in 3

This is more like a description list, so we need to use:
.bp
.in 0
.nf
   First item that needs clarification:

   :   Explanation one
   More stuff, because item is difficult to explain.
   * item1
   * item2

   Second item that needs clarification:

   :   Explanation two
.fi
.in 3

Converts to: "<list style="hanging">" and "<t hangText="First item
that...">"

If you want a newline after the hangTexts, search for the string
"OPTION" in "transform.xsl" and uncomment it.
.in 6
.ti 0

7.4.  Figure/Artwork
.in 3

Indent the paragraph with 4 spaces.
.in 0
.nf

   Like this
.fi
.in 3

Converts to: "<figure><artwork> ..." Note that "xml2rfc" supports a
caption with "<artwork>".  Pandoc does not support this, but
Pandoc2rfc does.  If you add a "@Figure: some text" as the last line,
the artwork gets a "title" attribute with the text after "@Figure:".
It will also be possible to reference the artwork.  If a caption is
supplied the artwork will be centered.  If a caption is needed but
the figure should not be centered use "@figure:\\".
.in 8
.ti 0

7.4.1.  References
.in 3

The reference anchor attribute will be: "fig:" + "first 10
(normalized) characters from the caption".  Where normalized means:
.in 6
.ti 3

o  Take the first 10 characters of the caption (i.e. this is the text
_after_ the string "@Figure:");
.ti 3

o  Spaces and single quotes (') are translated to a minus \%"-";
.ti 3

o  Uppercase letters translated to lowercase.
.in 3

So the first artwork with a caption will get \%"fig:a-minimal-" as a
reference.  See for instance Figure\02.
.bp
This anchoring is completely handled from within the "xslt".  Note
that duplicate anchors are an XML validation error which will make
"xml2rfc" fail.
.in 6
.ti 0

7.5.  Block Quote
.in 3

Any paragraph like:
.in 0
.nf

   > quoted text
.fi
.in 3

Converts to: "<t><list style="empty"> ..." paragraph, making it
indented.
.in 6
.ti 0

7.6.  References
.in 8
.ti 0

7.6.1.  External
.in 3

Any reference like:
.in 0
.nf

   [Click here](URI)
.fi
.in 3

Converts to: "<ulink target="URI">Click here ..."
.in 8
.ti 0

7.6.2.  Internal
.in 3

Any reference like:
.in 0
.nf

   [Click here](#localid)
.fi
.in 3

Converts to: "<link target="localid">Click here ..."

For referring to RFCs (for which you manually need add the reference
source in the template, with an external XML entity), you can just
use:
.in 0
.nf

   [](#RFC2119)
.fi
.in 3

And it does the right thing.  Referencing sections is done with:
.in 0
.nf

   See [](#pandoc-constructs)
.fi
.in 3

The word 'Section' is inserted automatically: ... see Section\07 ...
For referencing figures/artworks see Section\07.4.  For referencing
tables see Section\07.8.
.bp
.in 6
.ti 0
7.7.  Spanx Styles
.in 3

The verb style can be selected with \%back-tics: "`text`" Converts to:
"<spanx style="verb"> ..."

And the emphasis style with asterisks: "*text*" or underscores:
"_text_" Converts to: "<spanx style="emph"> ..."

And the emphasis style with double asterisks: "**text**" Converts to:
"<spanx style="strong"> ..."
.in 6
.ti 0

7.8.  Tables
.in 3

A table can be entered as:
.in 0
.nf

     Right     Left     Center     Default
     -------   ------ ----------   -------
          12     12        12        12
         123     123       123       123
           1     1         1         1

     Table: A caption describing the table.
.fi
.in 3
.ce 1

Figure\03: A caption describing the figure describing the table.

Is translated to "<texttable>" element in "xml2rfc".  You can choose
multiple styles as input, but they all are converted to the same
style (plain "<texttable>") table in "xml2rfc".  The column alignment
is copied over to the generated XML.
.in 8
.ti 0

7.8.1.  References
.in 3

The caption is _always_ translated to a "title" attribute.  If a
table has a caption, it will _also_ get a reference.  The reference
anchor attribute will be: "tab:" + "first 10 (normalized) characters
from the caption".  Where normalized means:
.in 6
.ti 3

o  Take the first 10 characters of the caption (i.e. this is the text
_after_ the string "Table:");
.ti 3

o  Spaces and single quotes (') are translated to a minus \%"-";
.ti 3

o  Uppercase letters translated to lowercase.
.in 3

So the first table with a caption will get \%"tab:a-caption-" for
reference use.  See for instance
.bp
This anchoring is completely handled from within the "xslt".  Note
that duplicate anchors are an XML validation error which will make
"xml2rfc" fail.
.in 6
.ti 0

7.9.  Indexes
.in 3

The footnote syntax of Pandoc is slightly abused to support an index.
Footnotes are entered in two steps, you have a marker in the text,
and later you give actual footnote text.  Like this:
.in 0
.nf

   [^1]

   [^1]: footnote text
.fi
.in 3

We \%re-use this syntax for the "<iref>" tag.  The above text
translates to:
.in 0
.nf

   <iref item="footnote text"/>
.fi
.in 3

Sub items are also supported.  Use an exclamation mark ("!") to
separate them:
.in 0
.nf

   [^1]: item!sub item
.fi
.in 3
.in 4
.ti 0

8.  Usage guidelines
.in 6
.ti 0

8.1.  Working with multiple files
.in 3

As an author you will probably break up a draft in multiple files,
each dealing with a subject or section.  When doing so sections with
the same title will clash with each other.  Pandoc can deal with this
situation, but only if the different sections are in the _same_ file
or processed in the same Pandoc run.  Concatenating the different
section files before processing them is a solution to this problem.
You can, for instance, amend the "Makefile" and add something like
this:
.in 0
.nf

   allsections.pdc: section.pdc.1 section.pdc.2 section.pdc.3
           cat $@ > allsections.pdc
.fi
.in 3

And then process "allsection.pdc" in the normal way.
.in 6
.ti 0

8.2.  Setting the title
.in 3

If you use double quotes in the documents title in the "docName"
attribute, like:
.in 0
.nf

   <rfc ipr="trust200902" docName="draft-gieben-writing-rfcs-pandoc-02">
.bp
.fi
.in 3
The Makefile will pick this up automatically and make a symbolic
link:
.in 0
.nf

   draft-gieben-writing-rfcs-pandoc-00.txt -> draft.txt
.fi
.in 3

This makes uploading the file to the \%i-d tracker a bit easier.
.in 6
.ti 0

8.3.  Uploading the XML/txt
.in 3

The "draft.xml" target will generate an XML file with all XML
included, so you can upload just one file to the \%I-D tracker.
.in 6
.ti 0

8.4.  VIM syntax highlighting
.in 3

If you are a VIM user you might be interested in a syntax
highlighting file (see [VIM]) that slightly lightens up your reading
experience while viewing a draft.txt from VIM.
.in 4
.ti 0

9.  Security Considerations
.in 3

This document raises no security issues.
.in 5
.ti 0

10.  IANA Considerations
.in 3

This document has no actions for IANA.
.in 5
.ti 0

11.  References
.in 7
.ti 0

11.1.  Informative References
.in 14
.ti 3

[VIM]      Gieben, R., "VIM syntax file for RFCs and \%I-Ds", October
2012, <http://github.com/miekg/rfc>.
.in 7
.ti 0

11.2.  Normative References
.in 14
.ti 3

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP\014, RFC\02119, March 1997.
.ti 3

[RFC4641]  Kolkman, O. and R. Gieben, "DNSSEC Operational Practices",
RFC\04641, September 2006.
.in 7
.ti 0

11.3.  URIs
.ti 3

[1] http://xml.resource.org/experimental
.ti 3

[2] http://pypi.python.org/pypi/xml2rfc/
.ti 3

[3] http://daringfireball.net/projects/markdown/
.bp
.ti 3
[4] http://johnmacfarlane.net/pandoc/
.ti 3

[5] https://github.com/miekg/pandoc2rfc
.ti 3

[6] http://johnmacfarlane.net/pandoc/README.html
.ti 3

[7] http://johnmacfarlane.net/pandoc/README.html
.ti 3

[8] http://miek.nl
.in 13
.ti 0

Appendix\0A.  Tests
.in 3

This appendix consists out of a few tests that should all render to
proper "xml2rfc" XML.
.in 6
.ti 0

A.1.  A Very Long Title Considerations With Regards to the Already
Deployed Routing Policy
.in 3

Test a very long title.
.in 6
.ti 0

A.2.  Markup in heading
.in 3

This is discarded by "xml2rfc".
.in 6
.ti 0

A.3.  Blockquote

This is a blockquote, how does it look?
.ti 0

A.4.  Verbatim code blocks
.in 0
.nf

   A verbatim code block
   jkasjksajassjasjsajsajkas
.fi
.in 3
.in 6
.ti 0

A.5.  Reference Tests
.in 3

Refer to RFC 2119 [RFC2119] if you will.  Or maybe you want to
inspect Figure\02 in Section\02 again.  Or you might want to Click here
[8].
.in 6
.ti 0

A.6.  Spanx Tests

underscores: _underscores_

asterisks: _asterisks_

double asterisks: *double asterisks*

backticks: "backticks"
.bp
.ti 0
A.7.  List Tests
.in 7
.ti 3

1.  First we do
.ti 3

2.  And then
.in 10
.ti 7

*  item 1
.ti 7

*  item 2
.in 3

And the other around.
.in 6
.ti 3

o  First we do
.ti 3

o  Then
.in 10
.ti 6

1.  Something
.ti 6

2.  Another thing
.in 3

Description lists:
.in 6
.ti 3

Item to explain:  It works because of herbs.
.ti 3

Another item to explain:  More explaining.
.sp 1
Multiple paragraphs in such a list.
.in 3

lists in description lists.
.in 6
.ti 3

Item to explain:  It works because of
.in 10
.ti 6

1.  One
.ti 6

2.  Two
.in 6
.ti 3

Another item to explain:  More explaining
.ti 3

Item to explain:  It works because of
.in 10
.ti 6

1.  One1
.ti 6

2.  Two1
.in 13
.ti 10

+  Itemize list
.ti 10

+  Another item
.bp
.in 6
.ti 3
Another item to explain again:  More explaining
.in 3

list with description lists.
.in 7
.ti 3

1.  More
.in 10
.ti 7

Item to explain:  Explanation ...
.ti 7

Item to explain:  Another explanation ...
.in 7
.ti 3

2.  Go'bye
.in 3

Multiple paragraphs in a list.
.in 7
.ti 3

1.  This is the first bullet point and it needs multiple
paragraphs...
.sp 1
\&... to be explained properly.
.ti 3

2.  This is the next bullet.  New paragraphs should be indented with
4 four spaces.
.ti 3

3.  Another item with some artwork, indented by 8 spaces.
.in 0
.nf

   Artwork
.fi
.in 3
.in 7
.ti 3

4.  Final item.
.in 3

xml2rfc does not allow this, so the second paragraph is faked with a
.in 0
.nf

   <vspace blankLines='1'>
.fi
.in 3

Ordered lists.
.in 7
.ti 3

1.  First item
.ti 3

2.  Second item
.in 3

A lowercase roman list:
.in 9
.ti 3

i.    Item 1
.ti 3

ii.   Item 2
.in 3

An uppercase roman list.
.in 8
.ti 3

(1)  Item1
.bp
.ti 3
(2)  Item2
.ti 3

(3)  Item 3
.in 3

And default list markers.

Some surrounding text, to make it look better.
.in 6

First item.  Use lot of text to get a real paragraphs sense.
First item.  Use lot of text to get a real paragraphs sense.
First item.  Use lot of text to get a real paragraphs sense.
First item.  Use lot of text to get a real paragraphs sense.

Second item.  So this is the second para in your list.  Enjoy;

Another item.
.in 3

Text at the end.

Lowercase letters list.
.in 7
.ti 3

a.  First item
.ti 3

b.  Second item
.in 3

Uppercase letters list.
.in 7
.ti 3

A.  First item
.ti 3

B.  Second item
.in 3

And artwork in a description list.
.in 6
.ti 3

Item1:  Tell something about it.  Tell something about it.  Tell
something about it.  Tell something about it.  Tell something
about it.  Tell something about it.
.in 0
.nf

   miek.nl.    IN  NS  a.miek.nl.
   a.miek.nl.  IN  A   192.0.2.1    ; <- this is glue
.fi
.in 3
.sp 1
.in 6
Tell some more about it.  Tell some more about it.  Tell some more
about it.
.ti 3

Item2:  Another description
.in 3

List with a sublist with a paragraph above the sublist
.in 7
.ti 3

1.  First Item
.bp
.ti 3
2.  Second item
.ti 3

3.  Third item
.sp 1
A paragraph that comes first
.in 11
.ti 7

A.  But what do you know
.ti 7

B.  This is another list
.in 6
.ti 0

A.8.  Table\0Tests
.in 0
.nf

                  +--------+-------+---------+----------+
                  |  Right | Left  |  Center | Default  |
                  +--------+-------+---------+----------+
                  |     12 | 12    |    12   | 12       |
                  |    123 | 123   |   123   | 123      |
                  |      1 | 1     |    1    | 1        |
                  +--------+-------+---------+----------+
.fi
.in 3
.ce 1

Table\01: Demonstration of simple table syntax.
.in 0
.nf

   +-----------+-----------+---------------+---------------------------+
   |  Centered | Default   | Right Aligned | Left Aligned              |
   |   Header  | Aligned   |               |                           |
   +-----------+-----------+---------------+---------------------------+
   |   First   | row       |          12.0 | Example of a row that     |
   |           |           |               | spans multiple lines.     |
   |   Second  | row       |           5.0 | Here's another one. Note  |
   |           |           |               | the blank line between    |
   |           |           |               | rows.                     |
   +-----------+-----------+---------------+---------------------------+
.fi
.in 3
.ce 2

Table\02: Here's the caption.  It, too, may span multiple lines.  This
is a multiline table.  This is verbatim text.
.in 0
.nf

          +---------------+---------------+--------------------+
          | Fruit         | Price         | Advantages         |
          +---------------+---------------+--------------------+
          | Bananas       | $1.34         | built-in wrapper   |
          | Oranges       | $2.10         | cures scurvy       |
          +---------------+---------------+--------------------+
.fi
.in 3
.ce 1

Table\03: Sample grid table.

Grid tables without a caption
.bp
.in 0
.nf
          +---------------+---------------+--------------------+
          | Fruit         | Price         | Advantages         |
          +---------------+---------------+--------------------+
          | Bananas       | $1.34         | built-in wrapper   |
          | Oranges       | $2.10         | cures scurvy       |
          +---------------+---------------+--------------------+
.fi
.in 3

This table has no caption, and therefor no reference.  But you can
refer to some of the other tables, with for instance:
.in 0
.nf

   See [](#tab:here-s-the)
.fi
.in 3

Which will become "See Table\02".

We should also be able to refer to the table numbers directly, to say
things like 'Look at Tables 1, 2 and 3.'
.in 6
.ti 0

A.9.  Numbered examples
.in 3

This is another example:
.in 7
.ti 3

1.  Another bla bla..
.in 3

as (1) shows...
.in 7
.ti 0

A.10.  Figure\0tests
.in 0
.nf

   This is a figure
   This is a figure
   This is a figure
   This is a figure
.fi
.in 3
.ce 2

Figure\04: This is the caption, with text in `typewriter`. Which isnt
converted to a <spanx> style, because this is copied \%as-is.

And how a figure that is not centered, do to using "figure" and not
"Figure".
.in 0
.nf

   This is a figure
   This is a figure
.fi
.in 3
.ce 1

Figure\05: A non centered figure.

Test the use of "@title":
.in 0
.nf

   This is a figure with a title
   This is a figure with a title
   @title: and here it is: a title, don't mess it up *
.bp
.fi
.in 3
.in 7
.ti 0
A.11.  Verse tests
.in 3

This is a verse text This is another line

.ti 0
Index
.in 3

L
.in 6
list
.in 9
default markers  18
.in 9
Uppercase Letters  18
.in 3

T
.in 6
table
.in 9
grid  20
.in 9
simple  19
.in 0

Author's Address
.nf

   R. (Miek) Gieben
   Google
   123 Buckingham Palace Road
   London  SW1W 9SH
   UK

   Email: miek@miek.nl
   URI:   http://miek.nl/
.fi
.in 3
