Network Working Group M. Gahrns Request for Comments: 3285 Microsoft Category: Informational T. Hain Cisco May 2002
Network Working Group M. Gahrns Request for Comments: 3285 Microsoft Category: Informational T. Hain Cisco May 2002
Using Microsoft Word to create Internet Drafts and RFCs
使用Microsoft Word创建Internet草稿和RFC
Status of this Memo
本备忘录的状况
This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.
本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。
Copyright Notice
版权公告
Copyright (C) The Internet Society (2002). All Rights Reserved.
版权所有(C)互联网协会(2002年)。版权所有。
Abstract
摘要
This document describes the steps to configure the Microsoft Word application to produce documents in Internet Draft and RFC format.
本文档描述了配置Microsoft Word应用程序以生成Internet草稿和RFC格式文档的步骤。
Table of Contents
目录
1. Overview.......................................................2 2. Conventions used in this document..............................2 3. Instructions for producing Internet drafts and RFCs............3 3.1 Defining Microsoft Word Page Layout and Styles.............4 3.2 Positioning the document identifiers on the first page.....7 3.3 Automatic date.............................................8 3.4 Automatic reference numbering..............................9 4. Final fixup: the CRLF program.................................11 5. Known problems................................................16 5.1 Margins...................................................16 5.2 Printing..................................................16 5.3 The Underscore character..................................17 6. Formal Syntax.................................................17 7. Security Considerations.......................................17 References.......................................................17 Acknowledgements.................................................17 Authors' Addresses...............................................18 Full Copyright Statement.........................................19
1. Overview.......................................................2 2. Conventions used in this document..............................2 3. Instructions for producing Internet drafts and RFCs............3 3.1 Defining Microsoft Word Page Layout and Styles.............4 3.2 Positioning the document identifiers on the first page.....7 3.3 Automatic date.............................................8 3.4 Automatic reference numbering..............................9 4. Final fixup: the CRLF program.................................11 5. Known problems................................................16 5.1 Margins...................................................16 5.2 Printing..................................................16 5.3 The Underscore character..................................17 6. Formal Syntax.................................................17 7. Security Considerations.......................................17 References.......................................................17 Acknowledgements.................................................17 Authors' Addresses...............................................18 Full Copyright Statement.........................................19
This document describes the steps to create a Microsoft Word 97 or later template to assist those producing Internet drafts. The resulting configuration allows for simple WYSIWYG editing of drafts and RFCs while producing output that is in accordance with IETF draft and RFC submission specifications. (72 Characters per line, 58 lines per page, each line terminated by a CRLF, and each page followed by a LF, etc.) Using Word's text justification and table capabilities may facilitate creating ASCII stick drawings.
本文档描述了创建Microsoft Word 97或更高版本模板以帮助制作Internet草稿的步骤。生成的配置允许对草稿和RFC进行简单的WYSIWYG编辑,同时生成符合IETF草稿和RFC提交规范的输出。(每行72个字符,每页58行,每行以CRLF结尾,每页后跟LF,等等)使用Word的文本对齐和表格功能可能有助于创建ASCII棒图形。
While the authors happen to have been employed by Microsoft during much of this document's evolution, it is not a product of Microsoft and is unsupported.
虽然在本文档的大部分发展过程中,作者碰巧受雇于Microsoft,但它不是Microsoft的产品,因此不受支持。
Included is a detailed description of how the RFC Text and RFC Heading styles are defined. This should prove useful to those wishing to do further customization work or to create a similar template for other versions of Microsoft Word.
其中详细说明了如何定义RFC文本和RFC标题样式。这对于那些希望进一步定制工作或为其他版本的Microsoft Word创建类似模板的人来说应该很有用。
It also includes a description and the source of the CRLF.EXE program that is used to create the final text file output. Feedback about this program is consistent with the fact that each version of Windows has a slightly different Generic Printer driver. Since this document will not be kept current with every Windows revision, the code sample is provided as a basis for personal customizations.
它还包括用于创建最终文本文件输出的CRLF.EXE程序的说明和源代码。有关此程序的反馈与以下事实一致:每个版本的Windows都有一个稍微不同的通用打印机驱动程序。由于此文档不会随每个Windows版本保持最新,因此提供代码示例作为个人自定义的基础。
Copies of the template in Microsoft Word format and the CRLF.EXE program can be found at:
Microsoft Word格式的模板副本和CRLF.EXE程序可在以下位置找到:
ftp://ftp.ietf.org/internet-drafts/2-Word.template.rtf ftp://ftp.ietf.org/internet-drafts/crlf.exe ftp://ftp.rfc-editor.org/in-notes/rfc-editor/2-Word.template.rtf ftp://ftp.rfc-editor.org/in-notes/rfc-editor/crlf.exe
ftp://ftp.ietf.org/internet-drafts/2-Word.template.rtf ftp://ftp.ietf.org/internet-drafts/crlf.exe ftp://ftp.rfc-editor.org/in-notes/rfc-editor/2-Word.template.rtf ftp://ftp.rfc-editor.org/in-notes/rfc-editor/crlf.exe
While the process described in this document can be used to create Word format documents, using the editions of Microsoft Word for Windows or the Apple Macintosh, the actual text format file for submission to the I-D or RFC editors is only available from the Windows edition. This limitation is due to the lack of a Generic Printer driver for the Macintosh.
虽然本文档中描述的过程可用于使用Microsoft Word for Windows或Apple Macintosh版本创建Word格式文档,但提交给I-D或RFC编辑器的实际文本格式文件仅在Windows版本中可用。这种限制是由于Macintosh缺乏通用打印机驱动程序造成的。
In this document the steps for walking a pull-down tree are indented on subsequent lines. This allows abbreviation rather than a barrage of 'then click' or 'select' strings in a paragraph form. Example:
在本文档中,遍历下拉树的步骤缩进到后续行中。这允许在段落形式中使用缩写而不是大量的“然后单击”或“选择”字符串。例子:
Help About Microsoft Word
关于Microsoft Word的帮助
1) Microsoft Word's "auto-formatting" can result in some undesired characters when creating the IETF standardized format. (I.e., it will insert special characters for quotation marks, add special formatting when creating lists, etc, which will appear as unintelligible character sequences when displayed by plain-text readers.) To avoid this, turn off "auto formatting."
1) 在创建IETF标准格式时,Microsoft Word的“自动格式化”可能会产生一些不需要的字符。(即,它将为引号插入特殊字符,在创建列表时添加特殊格式,等等,当纯文本阅读器显示时,这些字符将显示为无法理解的字符序列。)要避免这种情况,请关闭“自动格式设置”
Tools Autocorrect
工具自动更正
On the property pages, 'AutoFormat' and 'AutoFormat As You Type', turn off all of the auto formatting options. If you forget, or frequently switch between IETF format and not, typing a ^Z after each auto-format event will undo the formatting change. This of course requires awareness of the event.
在属性页“自动格式化”和“键入时自动格式化”中,关闭所有自动格式化选项。如果忘记或经常在IETF格式和not格式之间切换,则在每个自动格式事件后键入^Z将撤消格式更改。这当然需要对事件的了解。
2) Two special styles need to be defined: RFC Heading and RFC Text. If you choose automatic reference numbering or table of contents (defined below), the style for Endnote Reference, Endnote Text, and TOC need to be modified. The entire draft must be written using these styles for the spacing to come out correctly.
2) 需要定义两种特殊样式:RFC标题和RFC文本。如果选择“自动引用编号”或“目录”(定义见下文),则需要修改尾注引用、尾注文本和TOC的样式。整个草稿必须使用这些样式书写,以便正确显示间距。
This RFC has been produced using the styles & procedures defined within. You may follow the instructions below for creating the RFC Heading and RFC Text styles or simply acquire a copy of the MS Word (.rtf) file from one of the locations above, delete the body text, insert your rfc text and apply the styles to the body and headers as appropriate.
此RFC是使用中定义的样式和程序生成的。您可以按照以下说明创建RFC标题和RFC文本样式,或者只需从上面的一个位置获取MS Word(.rtf)文件的副本,删除正文,插入RFC文本,并根据需要将样式应用于正文和标题。
*** Do not use bold, underlining, italics, etc., or you will lose the WYSIWYG editing feature since these settings affect the number of characters that can occur on a line. When the resulting Internet draft is saved as plain text, all that formatting will be lost anyway. ***
*** Do not use bold, underlining, italics, etc., or you will lose the WYSIWYG editing feature since these settings affect the number of characters that can occur on a line. When the resulting Internet draft is saved as plain text, all that formatting will be lost anyway. ***
3) Print the document to the Generic Text Printer, and save the output to file. If you do not have the Generic Text Printer driver installed, install it from the Control Panel. (Printers, Add Printer, local/My Computer, any LPT port (you will be printing to a file), select Generic, Generic/Text Only from the combo box). When you print to a file, a pop-up will ask for the file name.
3) 将文档打印到通用文本打印机,并将输出保存到文件。如果未安装通用文本打印机驱动程序,请从控制面板安装。(打印机、添加打印机、本地/我的计算机、任何LPT端口(将打印到文件),从组合框中选择“通用”、“通用/仅文本”)。打印到文件时,弹出窗口将询问文件名。
4) Run the CRLF program in a DOS window to automatically add carriage returns.
4) 在DOS窗口中运行CRLF程序,自动添加回车。
Usage is CRLF <source> <destination>
Usage is CRLF <source> <destination>
Where <source> is the name of the file produced by printing to the generic text printer, and <destination> is the name of the text draft you are producing. An example (where the files CRLF.EXE and draft-00.prn are in the C:/TEMP directory) would be:
其中,<source>是通过打印到通用文本打印机生成的文件名,<destination>是正在生成的文本草稿名。例如(文件CRLF.EXE和draft-00.prn位于C:/TEMP目录中)如下:
cd c:/temp crlf draft-00.prn draft-00.txt
cd c:/temp crlf draft-00.prn draft-00.txt
5) Check to see if any non-ASCII characters have slipped in by viewing the document with a simple text viewer. The Unix program 'less'[1] will highlight non-ASCII characters. If a non-Microsoft operating systems is not available, the Notepad program will display and not-try to re-interpret any special characters.
5) 通过使用简单的文本查看器查看文档,查看是否有任何非ASCII字符滑入。Unix程序“less”[1]将突出显示非ASCII字符。如果非Microsoft操作系统不可用,记事本程序将显示,并且不会尝试重新解释任何特殊字符。
These are settings used to define the RFC Text and RFC Heading styles. Note: the menu options to set these are enclosed in parenthesis and are listed for Microsoft Word 97. They may differ slightly for other versions of Microsoft Word.
这些设置用于定义RFC文本和RFC标题样式。注意:用于设置这些选项的菜单选项包含在括号中,并针对Microsoft Word 97列出。对于其他版本的Microsoft Word,它们可能略有不同。
1) Set measurement units to points.
1) 将测量单位设置为点。
Tools Options General Measurement units = points
工具选项通用测量单位=点
2) Set margins as follows: (File, Page Setup, Margins)
2) 按如下方式设置页边距:(文件、页面设置、页边距)
Top: 24 pts Bottom: 0 pts Left: 0 pts Right: 93.6 pts Gutter: 0 pts Header: 0 pts Footer: 0 pts
顶部:24分底部:0分左侧:0分右侧:93.6分排水沟:0分页眉:0分页脚:0分
The right margin is what determines 72 characters per line. Using 12 pt font, 10 chars/inch, 72 chars = 7.2". Using paper that is 8.5" wide. 8.5" - 7.2" = 1.3" = 93.6 pts If you get "one or more margins are outside the printable area" message, select Ignore. This seems to depend on the printer you currently have selected.
右边距决定了每行72个字符。使用12磅字体,10个字符/英寸,72个字符=7.2英寸。使用8.5英寸宽的纸张。8.5“-7.2”=1.3”=93.6分如果您收到“一个或多个页边距在可打印区域之外”消息,请选择“忽略”。这似乎取决于您当前选择的打印机。
3) Set paper size as follows:
3) 按如下方式设置纸张大小:
File Page Setup Paper Size Width: 612 pt (8.5") Height: 660 pt (12pt * 55 lines per page)
文件页面设置纸张尺寸宽度:612磅(8.5英寸)高度:660磅(12磅*55行/页)
The height of the paper is what determines 55 lines per page.
纸张的高度决定了每页55行。
4) Set headers/footers to be different for the first page.
4) 将第一页的页眉/页脚设置为不同。
File Page Setup Layout
文件页面设置布局
5) Define a RFC Heading Style.
5) 定义RFC标题样式。
Format Style New
格式样式新
RFC Heading: Heading1 + Font: Courier New, 12pt, Not Bold, Line spacing exactly 12pt., Space before 0 pt after 0 pt, Level 1
RFC标题:标题1+字体:Courier New,12磅,不加粗,行距正好为12磅,0磅之前的空格在0磅之后,级别1
NOTE: Line Spacing Exactly 12pt is very important. Set this through Format: Paragraph
注:行距精确到12pt非常重要。通过以下格式设置:段落
Additional Heading levels can be defined by repeating this step and incrementing the Level #. If Numbered Headings are desired:
通过重复此步骤并增加级别#,可以定义其他标题级别。如果需要编号标题:
Format Bullets and Numbering Outline Numbered Select preferred style Customize More Link level to style RFC Heading
格式项目符号和编号大纲编号选择首选样式自定义更多链接级别到样式RFC标题
6) Define a RFC Text Style.
6) 定义RFC文本样式。
Format Style New
格式样式新
RFC Text: Normal+Font: Courier New, 12pt, Indent: Left 21.6pt, Line Spacing Exactly 12 pt.
RFC文本:普通+字体:Courier New,12磅,缩进:左21.6磅,行距正好12磅。
Line Spacing and indent are set through Format, Paragraph. This leaves a 3 character left indent for the RFC text
行距和缩进通过格式段落设置。这将为RFC文本留下3个字符的左缩进
7) Fix the Header Style.
7) 修正标题样式。
Format Style Header
格式样式标题
Header: Normal+Font: Courier New, 12pt, Line Spacing Exactly 12pt, Clear the tabs previously defined, and add Tabs 252 pt Centered, 504 pt Right Flush
页眉:普通+字体:Courier New,12pt,行距正好12pt,清除先前定义的制表符,并添加制表符252 pt居中,504 pt右齐平
8) Fix the Footer Style.
8) 修复页脚样式。
Format Style Footer
格式样式页脚
Footer: Normal+Font: Courier New, 12pt, Line Spacing Exactly 12pt, Tabs 252 pt Centered, 504 pt Right Flush
页脚:普通+字体:Courier New,12pt,行距正好12pt,制表符252 pt居中,504 pt右对齐
9) Define your headers and footers for the first page.
9) 定义第一页的页眉和页脚。
View Headers ( on first page)
查看标题(在第一页上)
Header: No Header Footer: Blank line Blank line AuthorName <tab> <tab> [Page <page number field>]
Header: No Header Footer: Blank line Blank line AuthorName <tab> <tab> [Page <page number field>]
10) Define subsequent headers and footers.
10) 定义后续的页眉和页脚。
View Headers (on second page)
查看标题(第二页)
Header: <tab> Title <tab> Month, Year Blank line Blank line Footer: Blank line Blank line AuthorName <tab> Expiration <tab> [Page <page number field>]
Header: <tab> Title <tab> Month, Year Blank line Blank line Footer: Blank line Blank line AuthorName <tab> Expiration <tab> [Page <page number field>]
11) Set Tabs to be every three spaces.
11) 将制表符设置为每三个空格一次。
Format Style RFC Text Tabs: Left 21.6, 43.2, 64.8, 86.4, 108, 129.6, 151.2,172.8, 194.4, 216, 237.6, 259.2, 280.8, 302.4, 324, 345.6,367.2, 388.8, 410.4, 432, 453.6, 475.2, 496.8
格式样式RFC文本选项卡:左21.6、43.2、64.8、86.4、108、129.6、151.2172.8、194.4、216、237.6、259.2、280.8、302.4、324、345.6367.2、388.8、410.4、432、453.6、475.2、496.8
12) Fix the Table-of-contents Styles. Repeat for each level.
12) 修复目录样式。对每个级别重复此操作。
Format Style TOC1: RFC text +, Automatically update, Clear all tabs, Add tab Rt. Flush, 504pt, ... leader TOC2: RFC text + Indent: Left 43.2pt, Automatically update, Clear all tabs, Add tab Rt. Flush, 504pt, ... leader TOC3: RFC text + Indent: Left 64.8pt, Automatically update, Clear all tabs, Add tab Rt. Flush, 504pt, ... leader
格式样式TOC1:RFC text+,自动更新,清除所有选项卡,添加选项卡Rt.Flush,504pt。。。引线TOC2:RFC文本+缩进:左43.2pt,自动更新,清除所有选项卡,添加选项卡Rt.刷新,504pt。。。引线TOC3:RFC文本+缩进:左64.8pt,自动更新,清除所有选项卡,添加选项卡Rt.Flush,504pt。。。领导
The 'Table' tool can be used to assist with justification of the document identifiers on the first page. Each cell in the table maintains its own justification characteristics, so getting left and right justification on the same line is simplified. On the Toolbar select the icon that looks like a grid with a dark bar across the top. This will pop-up a table array. Drag the mouse across to select the number of rows and columns (for the opening header 4 rows x 2 columns, unless there are several authors). Select the table that was just inserted by click-and-hold in the left margin, and then clear the boarders.
“表格”工具可用于帮助对第一页上的文档标识符进行对齐。表中的每个单元格都保持其自身的对齐特征,因此在同一行上进行左对齐和右对齐可以简化。在工具栏上选择一个图标,该图标看起来像一个网格,顶部有一个黑色条。这将弹出一个表数组。拖动鼠标以选择行数和列数(对于开头标题,4行x 2列,除非有多个作者)。通过单击并按住左边距选择刚刚插入的表格,然后清除边界。
Format Borders and Shading None
格式化边框和着色无
Select the cells on the right (position the cursor just above the top cell, when the cursor becomes an arrow pointing down, click) and set justification right. (The default is to take justification from the line it is being positioned on, so the left column shouldn't need changing.)
选择右侧的单元格(将光标放置在顶部单元格的正上方,当光标变成向下箭头时,单击),然后将对正设置为右侧。(默认设置是从其所在的行进行对齐,因此不需要更改左列。)
Format Paragraph Right
格式段落右侧
If necessary, move the center divider to the right for the document title. Select the left column of cells, then position the cursor over the dividing line. When it changes to parallel bars with right/left arrows, click-and-hold, then drag the line as necessary.
如有必要,将文档标题的中心分隔符向右移动。选择单元格的左列,然后将光标放在分割线上。当它变为带有右/左箭头的平行线时,单击并按住,然后根据需要拖动该线。
For those who frequently update drafts, and find they occasionally forget to update the current save and expire dates, there is a way to automate those fields. While it is rather complex to set up the expire-month field, it only needs to be done once in a template file, and all future drafts benefit.
对于那些经常更新草稿并发现偶尔忘记更新当前保存和过期日期的人,有一种方法可以自动化这些字段。虽然设置expire month字段相当复杂,但只需在模板文件中执行一次,所有未来的草稿都会受益。
To automatically set the current date on save, select the lower right cell in the table created above, and insert the save date.
要在保存时自动设置当前日期,请在上面创建的表中选择右下角的单元格,然后插入保存日期。
Insert Field Date and Time SaveDate In the box below the sample "field codes", modify as necessary to make it look like: - SAVEDATE \@ "MMMM YYYY" - (between the -'s). OK
在示例“字段代码”下方的框中插入字段日期和时间保存日期,根据需要进行修改,使其看起来像:-SaveDate\@“MMMM yyy”-(介于-之间)。好啊
The field will have a gray background on the screen, but will not affect the printed version. Double click on the field, copy, and then replace the Month, Year in the header (10 in Layout Styles above) with a paste.
该字段将在屏幕上显示灰色背景,但不会影响打印版本。双击该字段,复制,然后将标题中的月、年(上面布局样式中的10个)替换为粘贴。
Setting up the expire-date is similar, but requires inserting nested fields. Select the location for the month then insert an IF field.
设置过期日期类似,但需要插入嵌套字段。选择月份的位置,然后插入IF字段。
Insert Field MailMerge IF OK
如果确定,则插入字段MailMerge
This will result in an error. Right click on the error message, and select Toggle Field Codes. This will allow further editing. Select the space after the initial IF, then insert another field: SaveDate (as above but this time only the month digit is used "M"). Right click on the number it inserts and Toggle Field Codes again. Follow
这将导致错误。在错误消息上单击鼠标右键,然后选择“切换字段代码”。这将允许进一步编辑。选择初始IF后面的空格,然后插入另一个字段:SaveDate(如上所述,但这次仅使用月份数字“M”)。在插入的数字上单击鼠标右键,然后再次切换字段代码。跟随
the right brace } with =, then the month to test, followed by the month name 6 months later. At this point loop and insert another IF, until all 12 are done. Follow the last one with a "" to complete the syntax. The resulting expanded field code will look like:
右大括号}带=,然后是要测试的月份,后面是6个月后的月份名称。在这一点上循环并插入另一个IF,直到所有12个都完成。在最后一个后面加一个“”以完成语法。生成的扩展字段代码如下所示:
{ IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 1 July { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 2 August { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 3 September { IF { SAVEDATE \@ "M" \* MERGEFORMAT} = 4 October { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 5 November { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 6 December { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 7 January { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 8 February { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 9 March { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 10 April { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 11 May { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 12 June "" \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT }
{ IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 1 July { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 2 August { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 3 September { IF { SAVEDATE \@ "M" \* MERGEFORMAT} = 4 October { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 5 November { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 6 December { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 7 January { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 8 February { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 9 March { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 10 April { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 11 May { IF { SAVEDATE \@ "M" \* MERGEFORMAT } = 12 June "" \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT } \* MERGEFORMAT }
Space over and set the expire-year with a field in a similar manner. This time there are only 2 IF fields, comparing halves of the year. The printed value on true will be the SaveDate year value and the expanded result will look like:
以类似的方式用一个字段分隔并设置过期年份。这一次只有2个IF字段,与上半年相比。true上的打印值将是SaveDate year值,扩展结果如下所示:
{ IF { SAVEDATE \@ "M" \* MERGEFORMAT } < 7 { SAVEDATE \@ "YYYY" \* MERGEFORMAT } { IF { SAVEDATE \@ "M" \* MERGEFORMAT } > 6 { = { SAVEDATE \@ "YYYY" \* MERGEFORMAT } + 1 \*MERGEFORMAT } "" \* MERGEFORMAT }
{ IF { SAVEDATE \@ "M" \* MERGEFORMAT } < 7 { SAVEDATE \@ "YYYY" \* MERGEFORMAT } { IF { SAVEDATE \@ "M" \* MERGEFORMAT } > 6 { = { SAVEDATE \@ "YYYY" \* MERGEFORMAT } + 1 \*MERGEFORMAT } "" \* MERGEFORMAT }
Revert the field codes to normal text by right click, Toggle Field Codes or Update Field. Select both of these fields by clicking on one, then shift click on the other. Copy, then paste in the footer (9 & 10 in Layout Styles above), replacing the Month, Year.
通过右键单击、切换字段代码或更新字段,将字段代码还原为正常文本。通过单击其中一个字段选择这两个字段,然后按住shift键并单击另一个字段。复制,然后粘贴到页脚(在上面的布局样式中为9和10),替换月份、年份。
To support automatic updates of reference numbers, make the following changes. (Requires the document to be a single section prior to the Reference heading.)
要支持参考号的自动更新,请进行以下更改。(要求文件在参考标题之前为单个章节。)
1) Insert a section break on the line after Reference heading.
1) 在参考标题后的行上插入分节符。
Insert Break Section Break Continuous
插入中断段中断连续
2) Format the style of the Endnote References and Text.
2) 设置尾注参照和文字的样式格式。
Format Style Endnote reference Modify Based on 'underlying paragraph' Format Font clear the check box for 'superscript' Endnote text Modify Based on 'RFC text' Format Paragraph Indentation Left 21.6 Special Hanging 21.6
格式样式尾注参考基于“基础段落”格式字体清除“上标”尾注文本复选框基于“RFC文本”格式段落缩进左侧21.6特殊悬挂21.6
3) Set up the location of the references, and number style.
3) 设置参照的位置和编号样式。
Insert Footnote Endnote Autonumber Options Place at 'End of section' Numeric style '1,2,3'
插入脚注尾注自动编号选项放置在“章节末尾”数字样式“1,2,3”
4) Select the location for the first reference. Between the user typed [ ] characters, insert an endnote.
4) 选择第一个参照的位置。在用户键入的[]个字符之间插入尾注。
Insert Footnote (endnote will already be selected, as will auto 1,2,3) OK
插入脚注(已选择尾注,自动1,2,3也将选择尾注)OK
When the endnote is inserted, the lower pane will appear. Type in the text describing the reference. The first time a reference is inserted, the Endnote Separator should be cleared (the continuation separator may need it as well). Find the pull down, just above the reference text, and change it to each of the options to make sure all but the 'All Endnotes' are cleared.
插入尾注后,将显示下部窗格。键入描述引用的文本。第一次插入引用时,应清除尾注分隔符(延续分隔符也可能需要它)。找到参考文本上方的下拉列表,并将其更改为每个选项,以确保清除除“所有尾注”之外的所有选项。
Endnote Separator Select and delete any text
尾注分隔符选择并删除任何文本
The reference number in the text and the endnote table will automatically track as changes are made. If the endnote window is closed and changes need to be made, select:
文本和尾注表中的参考号将在进行更改时自动跟踪。如果尾注窗口已关闭且需要进行更改,请选择:
View Footnotes
查看脚注
To automatically add updated cross-references for previous footnotes, select the location of the cross-reference. Between the user typed [ ] characters insert a cross-reference.
要自动为以前的脚注添加更新的交叉引用,请选择交叉引用的位置。在用户键入的[]个字符之间插入交叉引用。
Insert Cross-reference Select reference type 'endnote' Clear the checkbox for 'Insert as hyperlink' Select the reference from the endnote list Insert
插入交叉引用选择引用类型“尾注”清除“插入为超链接”复选框从尾注列表中选择引用插入
Each line needs to be terminated by a CRLF, but when printing your document to the Generic Text Printer driver, some blank lines will be terminated only with a line feed. Consider a traditional text line printer, printing a line of text, followed by 3 blank lines. The output would look as follows:
每一行都需要由CRLF终止,但在将文档打印到通用文本打印机驱动程序时,某些空行将仅使用换行符终止。考虑一个传统的文本行打印机,打印一行文本,后面跟着3行空行。输出如下所示:
Line of Text<CR><LF><LF><LF>.
文本行<CR><LF><LF><LF>。
This was done because there was no need to move the print carriage head for the blank lines, only line feeds were necessary.
这是因为不需要移动打印头的空白行,只有线饲料是必要的。
The following example provides the source for a CRLF fixup program.
以下示例提供了CRLF修复程序的源代码。
/*************************************************************** * CRLF.C - Sample source code to format documents produced by * the MS Word IETF template so that they comply to IETF draft * and RFC guidelines * Change CR/FF ; FF/CR/LF ; FF/LF ; CR/FF/CR/LF into CR/LF/FF ***************************************************************/
/*************************************************************** * CRLF.C - Sample source code to format documents produced by * the MS Word IETF template so that they comply to IETF draft * and RFC guidelines * Change CR/FF ; FF/CR/LF ; FF/LF ; CR/FF/CR/LF into CR/LF/FF ***************************************************************/
#include <stdio.h> #include <io.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <memory.h> #include <string.h> #include <stdlib.h>
#include <stdio.h> #include <io.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <memory.h> #include <string.h> #include <stdlib.h>
#define CR 13 #define LF 10 #define FF 12 #define TRUE 1 #define FALSE 0
#定义CR 13#定义LF 10#定义FF 12#定义真1#定义假0
typedef int BOOL;
typedef int BOOL;
int main(int argc, char *argv[]) { int fSrc, fDest; int iNumBytesRead; int iNumLines; char cr = CR; char lf = LF; char ff = FF; unsigned char buff[3]; BOOL bPrecedingCR = FALSE; BOOL bPrecedingLF = FALSE; BOOL bPrecedingFF = FALSE;
int main(int argc, char *argv[]) { int fSrc, fDest; int iNumBytesRead; int iNumLines; char cr = CR; char lf = LF; char ff = FF; unsigned char buff[3]; BOOL bPrecedingCR = FALSE; BOOL bPrecedingLF = FALSE; BOOL bPrecedingFF = FALSE;
if(argc != 3) { printf("Usage:\n\n"); printf(" crlf <srcfile> <dstfile>\n\n"); return 0; }
if(argc != 3) { printf("Usage:\n\n"); printf(" crlf <srcfile> <dstfile>\n\n"); return 0; }
fSrc = open(argv[1], O_RDONLY | O_BINARY); fDest = open(argv[2], O_CREAT | O_RDWR | O_BINARY | O_TRUNC, S_IREAD | S_IWRITE);
fSrc = open(argv[1], O_RDONLY | O_BINARY); fDest = open(argv[2], O_CREAT | O_RDWR | O_BINARY | O_TRUNC, S_IREAD | S_IWRITE);
if(fSrc == -1) { printf("Could not open file (%s) for reading.\n", argv[1]); printf( strerror(errno)); return 0; }
if(fSrc == -1) { printf("Could not open file (%s) for reading.\n", argv[1]); printf( strerror(errno)); return 0; }
if(fDest == -1) { printf("Count not open file (%s) for writing.\n", argv[2]); printf( strerror(errno)); return 0; }
if(fDest == -1) { printf("Count not open file (%s) for writing.\n", argv[2]); printf( strerror(errno)); return 0; }
// Using the MS Word with the generic text printer, an // extra CR LF starts the file. Skip over these first 2 // bytes, iNumBytesRead = _read(fSrc, buff, 2);
// Using the MS Word with the generic text printer, an // extra CR LF starts the file. Skip over these first 2 // bytes, iNumBytesRead = _read(fSrc, buff, 2);
bPrecedingCR = FALSE; bPrecedingLF = TRUE; bPrecedingFF = FALSE; iNumLines = 0;
bPrecedingCR = FALSE; bPrecedingLF = TRUE; bPrecedingFF = FALSE; iNumLines = 0;
// Prepare to parse through the file iNumBytesRead = _read(fSrc, buff, 1); while(iNumBytesRead > 0) { if (buff[0] == FF) { // Found FF if (bPrecedingCR == TRUE) { // Some drivers write CR/FF w/o LF // Insert LF between _write(fDest, &lf, 1); _write(fDest, &(buff[0]), 1); } else if (bPrecedingLF == TRUE) { // If driver writes LF/FF, assume preceding CR } else if (bPrecedingFF == TRUE) { // If we just set FF from line count, ignore this // one } else if (bPrecedingLF == FALSE && bPrecedingCR == FALSE) { // Some drivers write FF alone ; insert CR/LF // for RFC rule of FF on line by itself _write(fDest, &cr, 1); _write(fDest, &lf, 1); _write(fDest, &(buff[0]), 1); } // reset flags bPrecedingFF = TRUE; bPrecedingCR = FALSE; bPrecedingLF = FALSE; iNumLines = 0; }
// Prepare to parse through the file iNumBytesRead = _read(fSrc, buff, 1); while(iNumBytesRead > 0) { if (buff[0] == FF) { // Found FF if (bPrecedingCR == TRUE) { // Some drivers write CR/FF w/o LF // Insert LF between _write(fDest, &lf, 1); _write(fDest, &(buff[0]), 1); } else if (bPrecedingLF == TRUE) { // If driver writes LF/FF, assume preceding CR } else if (bPrecedingFF == TRUE) { // If we just set FF from line count, ignore this // one } else if (bPrecedingLF == FALSE && bPrecedingCR == FALSE) { // Some drivers write FF alone ; insert CR/LF // for RFC rule of FF on line by itself _write(fDest, &cr, 1); _write(fDest, &lf, 1); _write(fDest, &(buff[0]), 1); } // reset flags bPrecedingFF = TRUE; bPrecedingCR = FALSE; bPrecedingLF = FALSE; iNumLines = 0; }
else if (buff[0] == CR) { // Found CR if (bPrecedingFF == TRUE) { // Some drivers write CR/FF/CR/LF // ignore second CR/LF as it creates a 59th line } else { // This CR counts bPrecedingCR = TRUE; bPrecedingLF = FALSE; bPrecedingFF = FALSE; if (++iNumLines < 59) { // Not end of page write it out _write(fDest, &(buff[0]), 1); } else { // Some drivers write 66 lines per page as LF // write end of page & skip to next CR in LF test _write(fDest, &cr, 1); _write(fDest, &lf, 1); _write(fDest, &ff, 1); bPrecedingFF = TRUE; bPrecedingCR = FALSE; bPrecedingLF = FALSE; iNumLines = 0; } } } else if (buff[0] == LF && bPrecedingFF == TRUE) { // Ignore up LF to next CR } else if (buff[0] == LF && bPrecedingCR == TRUE) { // Found a LF after a preceding CR // write it out and reset flags bPrecedingLF = TRUE; bPrecedingCR = FALSE; bPrecedingFF = FALSE; _write(fDest, &(buff[0]), 1); } else if (buff[0] == LF && bPrecedingCR == FALSE) {
else if (buff[0] == CR) { // Found CR if (bPrecedingFF == TRUE) { // Some drivers write CR/FF/CR/LF // ignore second CR/LF as it creates a 59th line } else { // This CR counts bPrecedingCR = TRUE; bPrecedingLF = FALSE; bPrecedingFF = FALSE; if (++iNumLines < 59) { // Not end of page write it out _write(fDest, &(buff[0]), 1); } else { // Some drivers write 66 lines per page as LF // write end of page & skip to next CR in LF test _write(fDest, &cr, 1); _write(fDest, &lf, 1); _write(fDest, &ff, 1); bPrecedingFF = TRUE; bPrecedingCR = FALSE; bPrecedingLF = FALSE; iNumLines = 0; } } } else if (buff[0] == LF && bPrecedingFF == TRUE) { // Ignore up LF to next CR } else if (buff[0] == LF && bPrecedingCR == TRUE) { // Found a LF after a preceding CR // write it out and reset flags bPrecedingLF = TRUE; bPrecedingCR = FALSE; bPrecedingFF = FALSE; _write(fDest, &(buff[0]), 1); } else if (buff[0] == LF && bPrecedingCR == FALSE) {
// Found a LF without a preceding CR if (bPrecedingLF == TRUE) { // Inject a CR to precede the LF only // if still in the first col if (++iNumLines < 59) { // Not end of page write it out _write(fDest, &cr, 1); _write(fDest, &(buff[0]), 1); bPrecedingLF = TRUE; } else { // Driver writing longer than page // write end of page & skip to next CR _write(fDest, &cr, 1); _write(fDest, &lf, 1); _write(fDest, &ff, 1); iNumLines = 0; bPrecedingFF = TRUE; bPrecedingCR = FALSE; bPrecedingLF = FALSE; } } else { //ignore the random LF and clear flag bPrecedingLF = FALSE; } } else { // Other text, write it out and clear flags bPrecedingCR = FALSE; bPrecedingLF = FALSE; bPrecedingFF = FALSE; _write(fDest, &(buff[0]), 1); } // Read next byte iNumBytesRead = _read(fSrc, &buff[0], 1); } _close(fSrc); _close(fDest);
// Found a LF without a preceding CR if (bPrecedingLF == TRUE) { // Inject a CR to precede the LF only // if still in the first col if (++iNumLines < 59) { // Not end of page write it out _write(fDest, &cr, 1); _write(fDest, &(buff[0]), 1); bPrecedingLF = TRUE; } else { // Driver writing longer than page // write end of page & skip to next CR _write(fDest, &cr, 1); _write(fDest, &lf, 1); _write(fDest, &ff, 1); iNumLines = 0; bPrecedingFF = TRUE; bPrecedingCR = FALSE; bPrecedingLF = FALSE; } } else { //ignore the random LF and clear flag bPrecedingLF = FALSE; } } else { // Other text, write it out and clear flags bPrecedingCR = FALSE; bPrecedingLF = FALSE; bPrecedingFF = FALSE; _write(fDest, &(buff[0]), 1); } // Read next byte iNumBytesRead = _read(fSrc, &buff[0], 1); } _close(fSrc); _close(fDest);
return 0; }
return 0; }
During the development of this document there were reports that some version combinations of Windows and Word cut off characters on the left. One approach to resolve this is to set the left and right margins to 36 and 57.6, thus shifting the text right. If text clipping was not a problem for the version combination, these values produce leading spaces. This doesn't affect the overall appearance, but makes the file larger than necessary, and violates the RFC line length rule. Adjustment of the margins for any specific version combination of Windows and Word will have to be locally appropriate; just make sure to move both in equal increments of 12 to the point where all characters appear.
在本文档的开发过程中,有报告称Windows和Word的某些版本组合在左侧截断了字符。解决此问题的一种方法是将左右边距设置为36和57.6,从而将文本向右移动。如果文本剪辑对于版本组合不是问题,则这些值会产生前导空格。这不会影响整体外观,但会使文件超出需要,并违反RFC行长度规则。Windows和Word的任何特定版本组合的边距调整必须在本地进行;只需确保以12的相等增量移动到所有字符出现的位置即可。
If you try to print the draft you are working on from within Microsoft Word to an actual printer (not to a file using the Generic Text printer driver), you may receive an error message indicating the margins are outside of the printable area of the printer. If you continue printing, the first 2 characters of each heading will be truncated. It is recommended that you produce a printed copy of the draft you are working on by using the CRLF program to produce a text file, and then redirect it to a printer (so that you do not need to deal with other programs like NOTEPAD, etc. adding their own margins.) Example:
如果试图将正在处理的草稿从Microsoft Word打印到实际打印机(而不是使用通用文本打印机驱动程序打印到文件),则可能会收到一条错误消息,指示页边距超出打印机的可打印区域。如果继续打印,每个标题的前2个字符将被截断。建议您使用CRLF程序生成文本文件,然后将其重定向到打印机(这样您就不需要处理其他程序,如记事本等,添加自己的页边距),从而生成正在处理的草稿的打印副本。示例:
- Print to a file using the generic text printer - CRLF draft.prn draft.txt - NET USE lpt1 <\\printername\sharename> - TYPE draft.txt > LPT1
- 使用通用文本打印机打印到文件-CRLF draft.prn draft.txt-NET USE lpt1<\\printername\sharename>-键入draft.txt>lpt1
As an alternative, if the final draft.txt file is opened with Word, setting all 4 margins to .65" will position it on the page.
另一种选择是,如果最终的draft.txt文件是用Word打开的,那么将所有4个边距设置为.65“将在页面上定位它。
File Page Setup Top .65 Bottom .65 Left .65 Right .65
文件页面设置顶部。65底部。65左侧。65右侧。65
If you use the underscore character "_" within the RFC Text and RFC Heading style, it will not be displayed on most screens. (It appears as a blank space.) It will print correctly and will appear as an underscore character in the final draft output.
如果在RFC文本和RFC标题样式中使用下划线字符“\u1”,它将不会显示在大多数屏幕上。(显示为空白)。它将正确打印,并在最终草稿输出中显示为下划线字符。
The formal definition of RFC format is defined in RFC 2223 [2] and Internet Draft instructions are available at [3].
RFC格式的正式定义见RFC 2223[2],互联网草案说明见[3]。
Caution is advised when opening any document that may contain a macro virus. The template files originally provided to the Internet-drafts & RFC editors did not contain any macros, and unless tampered with, should not now. If there are concerns about using the template doc file, the instructions provided here will allow the creation of one from scratch. Further details about Microsoft Word macro virus concerns are available at: http://www.microsoft.com/. To find the current documents, search for 'macro virus'.
打开任何可能包含宏病毒的文档时,请务必小心。最初提供给Internet草稿和RFC编辑器的模板文件不包含任何宏,除非被篡改,否则现在不应包含宏。如果担心使用模板文档文件,此处提供的说明将允许从头创建一个模板文档文件。有关Microsoft Word宏病毒问题的更多详细信息,请访问:http://www.microsoft.com/. 要查找当前文档,请搜索“宏病毒”。
References
工具书类
[1] http://www.greenwoodsoftware.com/less/
[1] http://www.greenwoodsoftware.com/less/
[2] Postel, J. and J. Reynolds, "Instructions to RFC Authors", RFC 2223, October 1997.
[2] Postel,J.和J.Reynolds,“RFC作者须知”,RFC 2223,1997年10月。
[3] http://www.ietf.org/ietf/1id-guidelines.txt
[3] http://www.ietf.org/ietf/1id-guidelines.txt
Acknowledgements
致谢
The authors would like to acknowledge the comments from around the community in helping refine this document. We would like to give particular recognition to DJ Son and Aaron Falk, of the RFC Editor staff, for aligning the details of this document with the current RFC Editor process.
作者希望感谢来自社区各地的意见,以帮助完善本文件。我们要特别感谢RFC编辑团队的DJ Son和Aaron Falk,他们将本文档的细节与当前的RFC编辑流程保持一致。
Authors' Addresses
作者地址
Mike Gahrns Microsoft One Microsoft Way Redmond, Wa. USA
Mike Gahrns微软一路微软华盛顿州雷德蒙。美国
Phone: 1-425-936-9833 EMail: mikega@microsoft.com
电话:1-425-936-9833电子邮件:mikega@microsoft.com
Tony Hain Cisco 500 108th Ave Bellevue, Wa. USA
Tony Hain Cisco 500,华盛顿州贝勒维街108号。美国
Phone: 1-425-468-1061 EMail: ahain@cisco.com
电话:1-425-468-1061电子邮件:ahain@cisco.com
Full Copyright Statement
完整版权声明
Copyright (C) The Internet Society (2002). All Rights Reserved.
版权所有(C)互联网协会(2002年)。版权所有。
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.
本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。
Acknowledgement
确认
Funding for the RFC Editor function is currently provided by the Internet Society.
RFC编辑功能的资金目前由互联网协会提供。