RTF 项目符号列表示例 [英] RTF Bullet List Example

查看:53
本文介绍了RTF 项目符号列表示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于像这样的 RTF 项目符号列表,似乎不可能找到一个非常简单的工作示例:

  • 你好
  • 世界
    • 嵌套(但请使用正方形作为项目符号)
    • 也嵌套(也是方形项目符号)
  • 再次定期

我尝试使用 Word 或 TextEdit.app 制作一个小样本,但它们产生了大量垃圾.有人可以帮忙吗?

解决方案

如果您在 Word 或 Wordpad 格式的 RTF 中查看足够长的时间,您会发现一些如下所示的行:

<块引用>

{\f2 {\pntext \'B7\tab}{*\pn\pnlvlblt\pnstart1{\pntxtb\'B7}}{\ltrch这是一个测试.}\li720\ri0\sa0\sb0\jclisttab\tx720\fi-360\ql\par}

{\f2 {\pntext \'B7\tab}{*\pn\pnlvlblt\pnstart1{\pntxtb\'B7}}{\ltrch也是这个.}\li720\ri0\sa0\sb0\jclisttab\tx720\fi-360\ql\par}

这将是这样的格式

  • 这是一个测试.
  • 也是这样.

嵌套列表可能有点难,但如果您没有任何嵌套列表,这就是您想要的.

现在这取决于你想用它做什么.如果你只是展示它,每个标签都意味着一些有用的东西.当我处理列表时,我将它们转换为 HTML,因此很多格式化标签(\li,\ri,\tx等),我不需要我的应用程序,因为我只是使用

    • 标签.看到它的主要内容是标记 \pnlvlblt,这使该列表成为项目符号列表.此外,\'B7 是项目符号的实际 unicode 标记,·

      RTF 的最新规范在这里:

      https://www.microsoft.com/en-us/download/details.aspx?id=10725

      It seems impossible to find a very simple working example for an RTF bullet list that looks like this:

      • Hello
      • World
        • Nested (but with square as bullet please)
        • Also nested (also square bullet)
      • and regular again

      I tried to make a small sample by using Word or TextEdit.app but they produce a lot of garbage. Can anyone help out?

      解决方案

      If you looked in the Word or Wordpad formatted RTF long enough, you would find some lines that look like this:

      {\f2 {\pntext \'B7\tab}{*\pn\pnlvlblt\pnstart1{\pntxtb\'B7}}{\ltrch This is a test.}\li720\ri0\sa0\sb0\jclisttab\tx720\fi-360\ql\par}

      {\f2 {\pntext \'B7\tab}{*\pn\pnlvlblt\pnstart1{\pntxtb\'B7}}{\ltrch So is this.}\li720\ri0\sa0\sb0\jclisttab\tx720\fi-360\ql\par}

      This will format like this

      • This is a test.
      • So is this.

      Nested lists are probably a little bit harder, but this is what you'll want if you don't have any nested lists.

      Now it depends on what you want to do with this. If you're just displaying it, every tag means something useful. When I worked with lists, I was converting them to HTML, so a lot of the formatting tags (\li,\ri,\tx, etc.), I didn't need for my application because I was just using <ol>,<ul> and <li> tags. The main thing to see it the tag \pnlvlblt, which makes this list a bulleted list. Also, \'B7 is the actual unicode tag for the bullet, ·

      The most updated specification of RTF is here:

      https://www.microsoft.com/en-us/download/details.aspx?id=10725

      这篇关于RTF 项目符号列表示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆