在手册页上运行aspell [英] Run aspell on manpage

查看:74
本文介绍了在手册页上运行aspell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在手册页上使用Aspell,但是我在分词方面遇到问题.我用男人男人col -bx |aspell(...),但"man man | col -bx"返回带有吐痰单词的文本,即:

I want use Aspell on man page but i have problem with word splitting. I use man man | col -bx | aspell (...) but "man man | col -bx " return text with spitted words i.e:

"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认为这句话是错误的.

So Aspell return this words as wrong.

任何想法如何将其关闭?

Any ideas how switch it off?

推荐答案

您要设置手册页的格式而不加连字符.这应该做到:

You want to format the man pages without hyphenation. This should do it:

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

或者告诉它页面是如此之宽以至于它永远不会连字符:

Alternatively tell it the page is so wide that it never hyphenates:

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

现在有一些解释,所以您知道在哪里可以找到这些东西. man 使用 nroff 格式化页面,这只是围绕 groff 的脚本.您可以找到它的作用:

And now some explanation, so you know where to find this stuff. man formats pages with nroff, which is just a script around groff. You can find out what that does with:

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

这反过来会吐出与上面类似的 groff 命令.然后,您可以找出groff在内部使用 -V 的作用:

This in turn will spit out a groff command similar to the one above. You can then find out what groff does internally with -V:

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

...并找出与我一起使用的连字符标志

...and find out about the hyphenation flags I used with

man groff_man

这篇关于在手册页上运行aspell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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