代码之家  ›  专栏  ›  技术社区  ›  user3250502

在手册页上运行aspell

  •  1
  • user3250502  · 技术社区  · 10 年前

    我想在手册页上使用Aspell,但我对单词分割有问题。 我使用man-man|col-bx|aspell(…),但“man-man| col-bx”返回带有吐词的文本,即:

    "man formats and displays the on-line man-
    ual pages. If you specify section, man on-
    ly looks in that section of the manual."
    

    所以Aspell将这个词返回为错误的。

    你知道怎么关掉它吗?

    1 回复  |  直到 10 年前
        1
  •  4
  •   bazzargh    10 年前

    您希望格式化手册页而不使用连字符。这应该做到:

     groff -mtty-char -Tutf8 -man -rHY=0 /usr/share/man/man1/man.1
    

    或者告诉它,页面太宽了,它从不连字符:

     groff -mtty-char -Tutf8 -man -rLL=1000000 /usr/share/man/man1/man.1
    

    现在来解释一下,这样你就知道在哪里可以找到这些东西了。 man 设置页面格式 nroff ,这只是一个脚本 groff 。您可以通过以下方式了解它的作用:

    sh -x $(which nroff) -man /usr/share/man/man1/man.1
    

    这反过来会吐出一个 格罗夫 命令与上面的命令类似。然后,您可以了解groff在内部使用什么 -V :

    groff -mtty-char -Tutf8 -man -V /usr/share/man/man1/man.1
    

    …并了解我使用的连字符标志

    man groff_man