Rich Text Format (RTF) 中文版规范,版本 1.6[3]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

        以下Word 97-2000关键字并不遵守以上所说的关键字不允许包含任何的大写字母的要求。所有编辑器应该仍然遵守这个规定,而Word的下一个版本也将是关键字完全使用小写字母的版本。同时,建议那些查看器将以下关键字作为例外:

  • \clFitText
  • \clftsWidthN
  • \clNoWrap
  • \clwWidthN
  • \tdfrmtxtBottomN
  • \tdfrmtxtLeftN
  • \tdfrmtxtRightN
  • \tdfrmtxtTopN
  • \trftsWidthAN
  • \trftsWidthBN
  • \trftsWidthN
  • \trwWidthAN
  • \trwWidthBN
  • \trwWidthN
  • \sectspecifygenN

The following Word 97-2000 keywords do not currently follow the requirement that keywords may not contain any uppercase alphabetic characters. All writers should still follow this rule, and Word will also emit completely lowercase versions of all these keywords in the next version. In the meantime, those implementing readers are advised to treat them as exceptions:

  • \clFitText
  • \clftsWidthN
  • \clNoWrap
  • \clwWidthN
  • \tdfrmtxtBottomN
  • \tdfrmtxtLeftN
  • \tdfrmtxtRightN
  • \tdfrmtxtTopN
  • \trftsWidthAN
  • \trftsWidthBN
  • \trftsWidthN
  • \trwWidthAN
  • \trwWidthBN
  • \trwWidthN
  • \sectspecifygenN

        一个RTF控制字的结束由分隔符标记,以下字符可以作为分隔符:

  • 一个空格。在这种情况下,空格作为关键字的一部分。
  • 一个数字或连字符(-), 意味着它是一个数字参数。这数字序列的长度由其后的一个空格或除了字母和数字的其他字符划定。这个参数可以是正数或者负数,它的取值范围通常是从-32767到32767。然而,Word的取值范围可以到达由-31680到31680。Word 允许关键字的小数字参数取值范围在-2,147,483,648到2,147,483,648(特别的,\bin, \revdttm,和一些图像属性)。(再议:a small number of keywords不知所指,应该指这些二进制文件吧。)一个RTF解析器应该能够将一个随意写出的数字字符串转换为一个关键字的合法值。如果一个数值参数紧跟着控制字,这个参数就是控制字的一部分。这时,控制字通过一个空格或非字母数字字符分隔出来,和分隔其他控制字的方式相同。
  • 除了字母和数字的其他字符。这种情况下,此分隔字符结束控制字,而它并不属于控制字的一部分。

The delimiter marks the end of an RTF control word, and can be one of the following:

  • A space. In this case, the space is part of the control word.
  • A digit or a hyphen (-), which indicates that a numeric parameter follows. The subsequent digital sequence is then delimited by a space or any character other than a letter or a digit. The parameter can be a positive or a negative number. The range of the values for the number is generally –32767 through 32767. However, Word tends to restrict the range to –31680 through 31680. Word allows values in the range -2,147,483,648 to 2,147,483,648 for a small number of keywords (specifically \bin, \revdttm, and some picture properties). An RTF parser must handle an arbitrary string of digits as a legal value for a keyword. If a numeric parameter immediately follows the control word, this parameter becomes part of the control word. The control word is then delimited by a space or a nonalphabetic or nonnumeric character in the same manner as any other control word.
  • Any character other than a letter or a digit. In this case, the delimiting character terminates the control word but is not actually part of the control word.

        如果是第一种情况,空格并不会出现在文档中。分隔符之后的所有字符,包括空格,将被写入文档。基于这个理由,你应该尽在需要的情况下使用空格,不要只是将空格用在分隔RTF代码。
If a space delimits the control word, the space does not appear in the document. Any characters following the delimiter, including spaces, will appear in the document. For this reason, you should use spaces only where necessary; do not use spaces merely to break up RTF code.

本文关键:Rich Text Format (RTF) 中文版规范,版本 1.6
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top