Ala*_*tko 66
GNU Info 旨在提供全面、超链接且可以输出为多种格式的文档。
手册页可用,它们非常擅长提供打印输出。然而,它们的设计使得每个手册页都有一个相当小的内容集。手册页可能会讨论单个 C 函数,例如 printf(3),或者会描述 ls(1) 命令。
当你进入更大的系统时,这会崩溃。您如何将 Emacs 的文档放入手册页?这个问题的一个例子是 Perl 手册页,它列出了 174 个单独的手册页,您可以阅读以获取信息。您如何浏览它,或者进行搜索以找出 && 的含义?
作为对手册页的改进,Info 为我们提供了:
它仍然相关吗?如今,大多数人会说“此文档不属于联机帮助页”,而是将其放入 PDF 或 HTML 中。事实上,几个操作系统上的帮助系统都是基于 HTML 的。然而,当 GNU Info 诞生时(1986 年),HTML 还不存在。现在 texinfo 允许您创建 PDF、Info 或其他格式,因此您可以根据需要使用这些格式。
这就是 GNU Info 被发明的原因。
Kyl*_*nes 43
发明信息系统的原因是必要的,但我想“懒惰、傲慢和急躁”同样是一个很好的解释。
GNU 项目的目的是开发一个可自由修改和自由分发的操作系统和工具。传统的 Unix man 系统是基于贝尔实验室的 nroff/troff 文档格式化系统,当时它是商业(非自由)软件。最终该系统被逆向工程并创建了一个名为 groff 的免费替代品,但那是在 GNU 项目启动几年之后。因此,在此之前使用 GNU 文档的 man 系统需要实现 troff 替换,这是一项艰巨的任务。
与此同时,GNU Emacs 是 GNU 的第一个大项目,它需要大量的文档。面对实现 GNU 系统的大量工作,Richard Stallman 开始寻找可以在他的系统中使用的现有软件。TeX 已经存在并且具有强大的文档格式化功能。与 nroff/troff 不同,TeX 可以免费使用和重新分发。Texinfo 被创建为一个文档系统,以利用 TeX 的力量来打印手册和 GNU Emacs 来处理和在线文档阅读。最初的 Texinfo 处理器和 Info 文档浏览器都是用 Lisp 编写的,并在 Emacs 中运行。独立的 Texinfo 实用程序在几年后出现。
Fah*_*tha 22
正如维基百科页面所说,TeXinfo 被 Richard Stallman 设计为 GNU 项目的官方文档。它是 TeX 之上的一组宏,专为编写软件手册而设计。我认为 Stallman 认为手册页不足以完成这项任务。与手册页相比,Texinfo 的两个优点是它具有超链接,其次,它在设计上易于转换为其他格式。
附录:虽然与问题没有严格的相关性,但请注意,手册页仍然被视为自由类 Unix 系统(如运行在 Linux 内核之上的那些以及各种 BSD 风格的系统)上的标准文档系统。例如,Debian 包模板鼓励为任何命令添加手册页,并且 lintian 检查手册页。Texinfo 在 GNU 项目之外仍然没有被广泛使用。
从实用的角度来看,info
是三个级别的参考文档中最详细的:
这三个层次通常在细节上是递增的:
--help
作为通用命令选项 - 简短的使用摘要,
man
- 经典手册页,快速参考,以及
info
- 更详细的 GNU 特定手册 -完整的官方文档。
如果info
页面不可用,手册页通常包含完整的文档。
请注意,手册页包含--help
与 GNU coreutils 的许多命令的输出完全相同的信息- 例如ls
;
比较ls --help
并man ls
看到差异仅在于格式。
info
。pinfo
,GUI konqueror
:
pinfo ls
konqueror info:ls
(请参阅下面的命令备忘单)
手册页是扁平的。
info
是一棵树。
两者都是基于文本的,因此它们可以在低级系统开发期间使用(与 http 不同,它需要完整的 GUI 和浏览器才能使用。)
这也很有用,因为 linux 可以在许多低资源机器上运行,例如,可以在info
.
手册页不能有可操作的超链接。 (在这项技术中这是不可能的。)
info
从节点到节点,或从节点到叶节点,可以而且确实有许多可操作的链接,从而可以更轻松地快速浏览大型手册。
(历史:info
与gopher类似,如果你还记得的话。这是我们在进入 GUI 操作系统之前刚刚拥有的东西,万维网爆炸了。我记得 gopher 在查找信息方面工作得很好,而且速度很快并且简单。它很容易扩展,完全基于文本,而且速度很快。)
许多标准包也有一个姐妹-doc包。通常,此内容只能在 inside 中找到info
。
这些文档包在信息中添加了小册子,包括部分和子部分。在info
行话中,这些被称为nodes
,并且节点可以nodes
在树结构中包含其他。
但H 提供的帮助无济于事。看起来更像是某个机器人的输出。
我将他们的帮助复制到 Gnote 中,并手动对其进行了重组(如下)。我还注意到许多击键是重复的,有 2 或 3 种方式来执行给定的命令。 它看起来非常像 emacs。
有一些命令可以绕过树,这里有一些例子:
如果您正在阅读并逐行向下滚动,那么您将访问每本小册子的所有部分。
最后
* l -最后即返回。它就像Web 浏览器上的后退按钮。- 返回到此窗口中看到的最后一个节点(最初我们只有一个窗口)。 哇,我们也可以将文档窗口一分为二!
家长
* ü - ü P上水平。例如,从第 2.1 节转到第 2 节。
兄弟姐妹
* ñ - ñ在这个层面上扩展节点。例如第2部分- >部3(未2.1)
* p - p在这个层面上revious节点。例如第 3 节 -> 第 2 节
Children
* ] - 文档中的下一个节点,例如 section 2 -> section 2.1
* [ -文档中的上一个节点,例如 section 2.1 -> section 2
人
· d - d irectory(主)节点。- 这是 INFO 树的顶部。包含家庭链接:
Family
* t - t本文档的 op 节点。- 一般是目录
HELP - info - commands
#####################################################################################################################################################
Short list - 'basic' Info command keys (see below for full list)
C-g Cancel the current operation.
H Close this help window. (toggle help window)
q Quit Info altogether.
h Invoke the Info tutorial.
Move in this node
Up Move up one line.
Down Move down one line.
PgUp Scroll backward one screenful. - also backspace
PgDn Scroll forward one screenful. - also space
Home Go to the beginning of this node.
End Go to the end of this node.
TAB Skip to the next hypertext link.
/ Search forward for a specified string.
} Search for next occurrence.
{ Search for previous occurrence.
Move to other nodes
RET Follow the hypertext link under the cursor.
1...9 Pick the first...ninth item in this node's menu.
0 Pick the last item in this node's menu.
l Last in history. Go back to the last node seen in this window (initially we only have one window). (?? history)
d Go to the main 'directory' node. my people
the Info main menu - "This is the top of the INFO tree."
t Go to the top node of this document. my family Generally the table of contents
u Go up one level. my parent e.g. go from Section 2.1, to Section 2.
n Go to the next node on this level. my siblings e.g. section 2 -> section 3 (not 2.1)
p Go to the previous node on this level.
] Go to the next node in the document. my children e.g. section 2 -> section 2.1
[ Go to the previous node in the document. (?siblings)
m <name> Pick a menu item specified by name.
f Follow a cross reference specified by name.
g Go to a node specified by name.
i Search for a specified string in the index (if there is an index), and select the node referenced by the first entry found.
I Synthesize menu of matching index entries. ???
#####################################################################################################################################################
Full list - of commands available in Info windows:
Notes:
M- (meta) is Alt; (also you can use an Esc prefix instead of meta)
M-C- means hold both Ctrl and Alt down at same time
* Basic commands (listed above)
HELP
* H (get-help-window) Toggle display of help message
* h (get-info-help-node) Visit Info node '(info)Help' (this gets: man info )
CANCEL
* C-g C-x C-g M-C-g (abort-key) Cancel current operation (?? esc)
* q C-c (quit) Quit using Info
C-x C-c (quit) Quit using Info
WINDOWS
C-l (redraw-display) Redraw the display
x C-x 0 (delete-window) Delete the current window
C-x 1 (keep-one-window) Delete all other windows (leaving 1)
C-x 2 (split-window) Split the current window (into 2)
C-x t (tile-windows) Divide the available screen space among the visible windows
C-x ^ (grow-window) Grow (or shrink) this window
C-x o (next-window) Select the next window (other)
C-x C-b (list-visited-nodes) Make a window containing a menu of all of the currently visited nodes
C-x w (toggle-wrap) Toggle the state of line wrapping in the current window
VIEW OTHER FILE
C-x C-f (view-file) Read the name of a file and select it
C-x C-v (view-file) Read the name of a file and select it
SCROLL
C-v (scroll-forward-page-only) Scroll forward in this window staying within node ('v' looks like a down arrow)
M-v (scroll-backward-page-only) Scroll backward in this window staying within node (meta-v is the reverse, or up arrow)
* PgDn SPC (scroll-forward) Scroll forward in this window (at end moving to next node??)
* PgUp DEL C-h (scroll-backward) Scroll backward in this window (at end moving to next node??) (DEL = Backspace or Del)
M-C-v ESC PgDn (scroll-other-window) Scroll the other window
ESC PgUp (scroll-other-window-backward) Scroll the other window backward
CURSOR MOVEMENT (within a 'node' / page)
Right C-f ( forward-char) Move forward a character
Left C-b (backward-char) Move backward a character
M-b (backward-word) Move backward a word
M-f ( forward-word) Move forward a word
C-a (beginning-of-line) Move to the start of the line
C-e (end-of-line) Move to the end of the line
* Up C-p (prev-line) Move up to the previous line
* Down C-n (next-line) Move down to the next line
M-r (move-to-window-line) Move the cursor to a specific line of the window
* Home b ESC < (beginning-of-node) Move to the start of this node
* End e ESC > (end-of-node) Move to the end of this node
SEARCHING
/ (search) Read a string and search for it
s (search) Read a string and search for it
? (search-backward) Read a string and search backward for it
R (toggle-regexp) Toggle the usage of regular expressions in searches
S (search-case-sensitively) Read a string and search for it case-sensitively
* } C-x n (search-next) Repeat last search in the same direction
* { C-x N (search-previous) Repeat last search in the reverse direction
C-s (isearch-forward) Search interactively for a string as you type it
C-r (isearch-backward) Search interactively for a string as you type it
M-/ (tree-search) Search this node and subnodes for a string.
M-} (tree-search-next) Go to next match in Info sub-tree
M-{ (tree-search-previous) Go to previous match in Info sub-tree
JUMP TO NODE CROSS REFERENCES (underlined links to nodes)
* TAB (move-to-next-xref) Move to the next cross reference
BackTab M-TAB (move-to-prev-xref) Move to the previous cross reference (Shift-tab)
SELECT A NODE (hyperlink)
* RET (select-reference-this-line) Select reference or menu item appearing on this line
* 1 .. 9 (menu-digit) Select this menu item (link) # in this node's menu (this page's menu)
* 0 (last-menu-item) Select the last menu item (link) in this node's menu (this page's menu)
< (first-node) Select the first node in this file
> (last-node) Select the last node in this file
* d (dir-node) Select the 'dir' node (in all files?) the Info main menu - "This is the top of the INFO tree."
* t (top-node) Select the 'Top' node in this file Generally the table of contents
* u ( up-node) Select the 'Up' node in this file i.e. go from Section 2.1, to Section 2.
* n (next-node) Select the Next node i.e. section 2.1 -> section 2.2
* p (prev-node) Select the Prev node
* g <name> (goto-node) Read a node name and select it
* m <item> (menu-item) Read a menu item and select its node ???
C-x b (select-visited-node) Select a node which has been previously visited in a visible window (c-x=Window, back)
MOVE TO ANOTHER NODE (in the tree)
* [ (global-prev-node) Move backwards or up through node structure (tree within this file)
* ] (global-next-node) Move forwards or down through node structure (tree within this file)
* l (history-node) last - Select the most recently selected node
GET NODE INFORMATION
= (display-file-info) Show full file name of node being displayed
O (goto-invocation-node) Find the node describing program invocation
READ IN NEW MENUS
G <menus> (menu-sequence) Read a list of menus starting from dir and follow them ???
INDEX
* i (index-search) Look up a string in the index for this file (Search for a specified string in the index
(if there is an index), and select the node referenced by the first entry found.
, (next-index-match) Go to the next matching index item from the last 'i' command
* I (virtual-index) List all matches of a string in the index
C-x f (all-files) Show all matching files
FOOTNOTES
* f (xref-item) Read a footnote or cross reference and select its node
r (xref-item) Read a footnote or cross reference and select its node
M-C-f (show-footnotes) Show the footnotes associated with this node in another window
NUMERIC
C-u (universal-argument) Start (or multiply by 4) the current numeric argument
M-- (add-digit-to-numeric-arg) Add this digit to the current numeric argument
M-0 .. M-9 (add-digit-to-numeric-arg) Add this digit to the current numeric argument
MISC
M-x (execute-command) Read a command name in the echo area and execute it ?? pwd and ls don't work
#####################################################################################################################################################
The following text commands can only be invoked via M-x (Alt-x):
This is a list of longer commands that can be typed, all prefixed with Alt-x:
M-x scroll-forward-set-window Scroll forward in this window and set default window size
M-x scroll-backward-set-window Scroll backward in this window and set default window size
M-x scroll-forward-page-only-set-window Scroll forward in this window staying within node and set default window size
M-x scroll-backward-page-only-set-window Scroll backward in this window staying within node and set default window size
M-x down-line Scroll down by lines
M-x up-line Scroll up by lines
M-x scroll-half-screen-down Scroll down by half screen size
M-x scroll-half-screen-up Scroll up by half screen size
M-x prev-window Select the previous xwindow
M-x set-screen-height <number> Set the height of the displayed window
M-x find-menu Move to the start of this node's menu
M-x visit-menu Visit as many menu items at once as possible
M-x man <name of man page> Read a manpage reference and select it
M-x print-node Pipe the contents of this node through INFO_PRINT_COMMAND
M-x clear-search Clear displayed search matches
M-x describe-key <key combo> Print documentation for KEY (one line of documentation)
M-x where-is Show what to type to execute a given command
M-x describe-command Read the name of an Info command and describe it
M-x index-apropos Grovel all known info file's indices for a string and build a menu (grep widely, and make a menu of what is found)
M-x describe-variable Explain the use of a variable
M-x set-variable Set the value of an Info variable
M-x info-version Display version of Info being run
#####################################################################################################################################################
Commands available in the 'echo' area (i.e. at bottom of screen):
(M- (meta) = Fn (not alt))
C-l (redraw-display) Redraw the display
C-g Esc (echo-area-abort) Cancel or quit operation
M-C-g (echo-area-abort) Cancel or quit operation
MOVE
C-a Hom
归档时间: |
|
查看次数: |
11241 次 |
最近记录: |