Subject: nroff questions + a template

From: "Rahmat M. Samik-Ibrahim" <[email-masked]>
Date: Wed, 10 Mar 1999 16:14:34 +0800

Hello:

I have just made a simple RFC template which was based on an 
Internet-Draft that was in widespread use within the network 
management area in the early 1990s. It includes the standard 
"Status of the Memo" and the "Full Copyright Notice" text,
as well as an automated "Table of Contents" generator.

However, I am just wondering if anyone could help me to solve
these following problems:
- how to indent bullets into bullets, e.g:
  * bullet level 1
    - bullet level 2
    - ....
  * ....

- how to explode macros in macros, e.g.: authors, tittle, filename
  as variables that could be defined in one place.

- how to include a source file that should not be interpreted at 
  all (including the dot in the first column).

Enclosed is the source file. I am not sure whether I will ever
submit it, however, at least this file is going to reside in this 
IETF-list archive.
    
-- 
Rahmat M.Samik-Ibrahim VLSM-TJT http://www.geocities.com/Tokyo/6825
It took 100s of years to learn that we don't have to. -Insurrection

.\" $Revision: 1.5 $$Date: 1999/03/10 07:09:42 $
.\" (c)1993-1999 All Rights Reversed, All Wrongs Reengineered[sm]
.\" Permission is granted to do whatever you could think about!
.\" For a Makefile see Rob Austein's:
.\"       <ftp://ftp.epilogue.com/pub/sra/dns-mib/makefile>
.\" Or, use this following simplified script:
.\" ==== ZCZC F.31 START SHELL SCRIPT ===============================
.\" #!/bin/sh
.\" # may need additional PATHs
.\" PATH=/bin:/usr/bin:
.\" FILE="ahbeng"
.\" LONGNAME="the-usual-long-dash-naming-style-00.txt"
.\" 
.\" (echo '%%% TOC %%%'; echo '.xp t') |\
.\"     nroff -me -Tlpr -i $FILE.rf |\
.\"     sed -n '/%%% TOC %%%/,$s/^  *\([0-9].*\)$/\1/p' >$FILE.toc
.\" (echo '%%% TOC %%%'; echo '.xp t') |\
.\"     nroff -me -Tlpr -i $FILE.rf |\
.\"     sed -n '/%%% TOC %%%/,$s/^  *\([0-9].*\)$/\1/p' >$FILE.tmp
.\" mv $FILE.tmp $FILE.toc
.\" ## replace the FORMFEED with "^L" (i.e. CONTROL-L).
.\" ## hint for vi: insert <CONTROL-V><CONTROL-L>
.\" nroff -me -Tlpr $FILE.rf |\
.\"     sed -e 's/_//g' -e 's/.//g' |\
.\"     awk 'p==1 {print "FORMFEED"; p=0} {print} /\[Page [0-9]*\]$$/ {p=1}' \
.\"     >$LONGNAME
.\" rm -f $FILE.txt $FILE.toc
.\" ln -s $LONGNAME $FILE.txt
.\" exit 0
.\" ==== NNNN START SHELL SCRIPT ===================================
.\" ==== "% man me" ================================================
.\" .\"                         comments
.\" .(x t                       begin indexed item in index t
.\" .)x                         end index item
.\" ..                          end macro
.\" .ba n                       augments the base indent by n
.\" .bp                         begin new page
.\" .br                         break output line here
.\" .ce n                       center next n lines
.\" .de                         define macro; see also ".."
.\" .fi                         finish 
.\" .fo 'LEFT'MID'LEFT %'       footer + page number %
.\" .he 'LEFT'MID'LEFT %'       header + page number %
.\" .in n                       indent ??
.\" .ip x y                     indent y with tag x
.\" .ll n                       total line width==n
.\" .ls n                       line spacing==n
.\" .lp                         left block paragraph
.\" .m1 0v                      blank lines between top and header
.\" .m2 1v                      blank lines between header and body
.\" .m3 1v                      blank lines between body and footer
.\" .m4 0v                      blank lines between footer and bottom
.\" .na                         no alignment of right margin
.\" .nf                         no format
.\" .nh                         ??
.\" .nr fm 0                    ??
.\" .nr sf R                    ??  
.\" .nr so -3n                  Exdent section headers back to left margin
.\" .pl 58                      total page length
.\" .po 0n                      ??
.\" .sh n x                     section header level n with title x
.\" .so file-name               include source file-name
.\" .sp n                       insert n spacing lines
.\" .uh x                       unumbered .sh
.\" ================================================================
.\" Set up footer and basic page layout right away We don't set up
.\" the header until after we've started generating the first page.
.\"
.\" ZCZC F.31 EXPIRE ===============================================
.fo 'Beng & Alkolny'Expires September 1999'[Page %]'
.ll 72
.pl 58
.nr sf R
.nr fm 0
.m1 0v
.m2 1v
.m3 1v
.m4 0v
.po 0n
.de $0
.(x t
\\$2 \\$1
.)x
..
.na
.nh
.lp
.nf
Network Working Group                                            Ah Beng
Internet-Draft                             Gombak Chua-Chu-Kang, Pte.Ltd
                                                          Abu A. Alkolny
                                              Universe Le'Centra'lSahara 
                                                              March 1999
.sp
.ce 3
Ah Beng Learns To Roff: Yet Another Simple RFC Template
<the-usual-long-dash-naming-style-00.txt>
===== DRAFT ===== DRAFT ===== DRAFT =====
.fi
.he 'Internet-Draft'Ah Beng Learns To Roff'March 1999'
.ba 3
.nr so -3n
.br
.uh "Status of this Memo"
.lp
This document is an Internet-Draft and is in full conformance with all 
provisions of Section 10 of RFC 2026:
.in +5
<http://www.isi.edu/in-notes/rfc2026.txt>.
.in -5
Internet-Drafts are working documents of the Internet Engineering Task Force 
(IETF), its areas, and its working groups. Note that other groups may also 
distribute working documents as Internet-Drafts.

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."

The list of current Internet-Drafts can be accessed at:
.in +5
<http://www.ietf.org/ID.html>.
.in -5
The list of Internet-Draft Shadow Directories can be accessed at:
.in +5
<http://www.ietf.org/shadow.html>.
.in -5
Discussion and suggestions for improvement are requested. Distribution of 
this draft is unlimited. This document will expire before 
.\" ZCZC F.31 EXPIRE ===============================================
September 1999.
.br
.uh "Abstract"
.sp
This boilerplate is just a little bit more complicated than the example 
in "Instructions to RFCs Authors" RFC 2223 at:
.in +5
<http://www.isi.edu/in-notes/rfc2223.txt>.
.in -5
Most of the examples are very obvious for anyone who has been using 
nroff for a while.
Appendix A has the nroff source of this "ready for use" memo.
.br
.uh "Table of Contents"
.sp
.nf
.so ahbeng.toc
.fi
.br
.sh 1 "Introduction"
.lp
RFCs have been traditionally published and continue to be published
as ASCII text [2].
Usually, each working group has developed its own nroff template
this is kept either privately or in a public ftp server that is not
widely known.
This template is based on Rob Austein's:
.in +5
        <ftp://ftp.epilogue.com/pub/sra/dns-mib/>
.in -5
which was in widespread use within the network management area in 
the early 1990s.

We assume that it is not difficult to learn nroff.
*AS LONG AS* you have the right example.
*AS LONG AS* that right example is visible to you!
.br
.sh 1 "What Next?"
.lp
This sections contains some examples that are often used in RFCs.
See appendix A for the source text of this memo.
.ip o 3n
To process this file, use the shell script that is at the beginning
of the source text. 
Do not forget to delete the comment characters (i.e. `.\\"' ) of
each line.
.ip o 3n
Bullets are made from ".ip o 3n". 
The same indentation macro is also used for references (".ip [1]").
.ip - 3n
Occasionally, you want to draw ASCII diagrams. 
Open it with no format ".nf" and do not forget to finish it with ".fi".
.nf
    +----------------------+              +---------------+
    |This is an GigaPOP box|--- OC-192 ---|Yet another box|
    +----------------------+              +---------------+
               |
            RF-1200
               |
       +---------------+
       | KA9Q - YC1DAV |
       +---------------+
.fi
.ip * 3n
Yet another bullet example.
.br
.sh 2 "Sub-Section"
.lp
A subsection is basically ".sh 2 Sub-Section-Title".
.br
.sh 3 "Sub-Sub-Section"
.lp
Therefore a sub-subsection is just ".sh 3 Sub-Section-Title".
.br
.sh 1 "Security Considerations"
.lp
Security issues are not discussed in this memo.
Disclose your social security number somewhere else.
.br
.sh 1 "Acknowledgements"
.lp
The authors would particularly like to thank the following people for 
their whatever data, information and knowledge: 
Rob Austein,
Scott O. Bradner,
Donald E Eastlake 3rd,
Indra Gandalf,
the RFC-Editor(s).
.br
.sh 1 "References"
.ip [1]
Eastlake, 3rd Donald E.,
Boesch, Brian, Crocker,
Steve,
and Yesil, Magdalena,
"CyberCash Credit Card Protocol Version 0.8",
RFC 1898,
CyberCash,
February 1996,
.sp 0
<http://www.isi.edu/in-notes/rfc1898.txt>
.ip [2]
Postel, Jon,
and Reynolds, Joyce,
"Instructions to RFC Authors",
RFC 2223,
USC Information Sciences Institute,
October 1997,
.sp 0
<http://www.isi.edu/in-notes/rfc2223.txt>
.br
.sh 1 "Author's Addresses"
.sp
.nf
Ah Beng
Gombak Chua-Chu-Kang, Pte. Ltd.
N22 Bukit Gombak 
Hong Kah 650366
.sp
+1-800-EAT-S44T
mailto:[email-masked]
.sp 2
Abu A. Alkolny
Omar Bakry School of Management
Universe Le'Centra'lSahara
Mt. Jabal Akakus Silicon Valley
Ghat
.sp
+1-800-EAT-S44T
mailto:[email-masked]
.fi
.br
.sh 1 "Full Copyright Statement"
.sp
Copyright (C) The Internet Society (1999) All Rights Reserved.

This document and translations of it may be copied and furnished to others, 
and derivative works that comment on or otherwise explain it or assist in 
its implementation may be prepared, copied, published and distributed, in 
whole or in part, without restriction of any kind, provided that the above 
copyright notice and this paragraph are included on all such copies and 
derivative works. However, this document itself may not be modified in any 
way, such as by removing the copyright notice or references to the 
Internet Society or other Internet organizations, except as needed for the 
purpose of developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be followed, or 
as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked 
by the Internet Society or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" 
basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE 
DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY 
RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 
PARTICULAR PURPOSE."
.br
.sh 1 "Appendix A: Source Text"
.sp