编写手册页的最佳方式?

发布于 2024-08-30 14:20:38 字数 1432 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

滥情空心 2024-09-06 14:20:38

我以前使用过 nroff 的 GNU 版本(称为 groff)来编写手册页。

这里有一篇很好的介绍文章:

http://www.linuxjournal.com/article/1158

I have previously used the GNU version of nroff called groff to write man pages.

Nice intro article on it here:

http://www.linuxjournal.com/article/1158

自在安然 2024-09-06 14:20:38

Tcl 社区中常用的工具是 doctools,它可以生成受限制(但有用)的子集手册页格式,适合使用 groff 或 nroff 进行渲染。它还可以直接生成纯文本和 HTML。

A tool that is commonly used in the Tcl community is doctools which can produce a restricted (but useful) subset of the manpage format, suitable for rendering with groff or nroff. It can also generate both plain text and HTML directly.

街角卖回忆 2024-09-06 14:20:38

对于我的 atinout 程序,我一直在使用 ronn 它允许您以非常非常易读的类似 Markdown 的语法编写手册页。我对此非常满意。

atinout(1) -- Send AT commands to modem, capturing the response
===============================================================

## SYNOPSIS

`atinout` <input_file>|`-` <modem_device> <output_file>|`-`<br>
`atinout` `--version`<br>
`atinout` `--usage`<br>
`atinout` `--help`<br>

## DESCRIPTION

**Atinout** reads a list of AT commands. It sends those commands one by one
to the modem, waiting for the final result code for the
currently running command before continuing with the next command in
the list. The output from the commands is saved.
...

在此处查看整个页面

For my atinout program I have been using ronn which lets you write man pages in a very, very readable markdown like syntax. I am extremely happy with it.

atinout(1) -- Send AT commands to modem, capturing the response
===============================================================

## SYNOPSIS

`atinout` <input_file>|`-` <modem_device> <output_file>|`-`<br>
`atinout` `--version`<br>
`atinout` `--usage`<br>
`atinout` `--help`<br>

## DESCRIPTION

**Atinout** reads a list of AT commands. It sends those commands one by one
to the modem, waiting for the final result code for the
currently running command before continuing with the next command in
the list. The output from the commands is saved.
...

see the whole page here.

长安忆 2024-09-06 14:20:38

如果您希望编写一次并生成不同的输出格式,例如联机帮助页、HTML、纯 txt,甚至 PDF,那么 docbook 应该效果最好。

If you are looking at writing once and generating different output formats such as manpages, HTML, plain txt, or even PDF, then docbook should work best.

酒与心事 2024-09-06 14:20:38

Doxygen 就是您正在寻找的。
请记住,它旨在记录源代码,但您可以轻松调整它。

它也可以生成 html、pdf 和 Latex 文档。

Doxygen is what you are looking for.
Keep in mind that it is designed to document source code but you could easily adapt it.

It can generate html, pdf, and latex documentation too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文