Mercurial > emacs
annotate man/info.texi @ 33861:db68a40e2c01
Fix typos.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 24 Nov 2000 16:48:51 +0000 |
parents | 16e0918fed9d |
children | ddf7d535df2a |
rev | line source |
---|---|
25839 | 1 \input texinfo @c -*-texinfo-*- |
2 @comment %**start of header | |
3 @setfilename ../info/info | |
4 @settitle Info 1.0 | |
5 @comment %**end of header | |
6 | |
7 @direntry | |
8 * Info: (info). Documentation browsing system. | |
9 @end direntry | |
10 | |
11 @iftex | |
12 @finalout | |
13 @end iftex | |
14 | |
15 @ifinfo | |
16 This file describes how to use Info, | |
17 the on-line, menu-driven GNU documentation system. | |
18 | |
19 Copyright (C) 1989, 1992 Free Software Foundation, Inc. | |
20 | |
21 | |
32315 | 22 Permission is granted to copy, distribute and/or modify this document |
23 under the terms of the GNU Free Documentation License, Version 1.1 or | |
24 any later version published by the Free Software Foundation; with no | |
25 Invariant Sections, with the Front-Cover texts being ``A GNU | |
26 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the | |
27 license is included in the section entitled ``GNU Free Documentation | |
28 License'' in the Emacs manual. | |
25839 | 29 |
32315 | 30 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
31 this GNU Manual, like GNU software. Copies published by the Free | |
32 Software Foundation raise funds for GNU development.'' | |
25839 | 33 |
32315 | 34 This document is part of a collection distributed under the GNU Free |
35 Documentation License. If you want to distribute this document | |
36 separately from the collection, you can do so by adding a copy of the | |
37 license to the document, as described in section 6 of the license. | |
25839 | 38 @end ifinfo |
39 | |
40 @setchapternewpage odd | |
41 @titlepage | |
42 @sp 11 | |
43 @center @titlefont{Info} | |
44 @sp 2 | |
45 @center The | |
46 @sp 2 | |
47 @center On-line, Menu-driven | |
48 @sp 2 | |
49 @center GNU Documentation System | |
50 | |
51 @page | |
52 @vskip 0pt plus 1filll | |
53 Copyright @copyright{} 1989, 1992, 1993 Free Software Foundation, Inc. | |
54 @sp 2 | |
55 | |
56 Published by the Free Software Foundation @* | |
57 59 Temple Place, Suite 330 @* | |
58 Boston, MA 02111-1307 USA @* | |
59 | |
32315 | 60 Permission is granted to copy, distribute and/or modify this document |
61 under the terms of the GNU Free Documentation License, Version 1.1 or | |
62 any later version published by the Free Software Foundation; with no | |
63 Invariant Sections, with the Front-Cover texts being ``A GNU | |
64 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the | |
65 license is included in the section entitled ``GNU Free Documentation | |
66 License'' in the Emacs manual. | |
25839 | 67 |
32315 | 68 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
69 this GNU Manual, like GNU software. Copies published by the Free | |
70 Software Foundation raise funds for GNU development.'' | |
25839 | 71 |
32315 | 72 This document is part of a collection distributed under the GNU Free |
73 Documentation License. If you want to distribute this document | |
74 separately from the collection, you can do so by adding a copy of the | |
75 license to the document, as described in section 6 of the license. | |
25839 | 76 @end titlepage |
77 | |
78 @paragraphindent 3 | |
79 @ifinfo | |
80 @node Top, Getting Started, (dir), (dir) | |
81 @top Info: An Introduction | |
82 | |
83 Info is a program for reading documentation, which you are using now. | |
84 | |
85 To learn how to use Info, type the command @kbd{h}. It brings you | |
86 to a programmed instruction sequence. If at any time you are ready to | |
87 stop using Info, type @samp{q}. | |
88 | |
89 @c Need to make sure that `Info-help' goes to the right node, | |
90 @c which is the first node of the first chapter. (It should.) | |
91 @c (Info-find-node "info" | |
92 @c (if (< (window-height) 23) | |
93 @c "Help-Small-Screen" | |
94 @c "Help"))) | |
95 | |
96 To learn advanced Info commands, type @kbd{n} twice. This brings you to | |
97 @cite{Info for Experts}, skipping over the `Getting Started' chapter. | |
98 @end ifinfo | |
99 | |
100 @menu | |
101 * Getting Started:: Getting started using an Info reader. | |
102 * Advanced Info:: Advanced commands within Info. | |
103 * Create an Info File:: How to make your own Info file. | |
104 @end menu | |
105 | |
106 @node Getting Started, Advanced Info, Top, Top | |
107 @comment node-name, next, previous, up | |
108 @chapter Getting Started | |
109 | |
110 This first part of the Info manual describes how to get around inside | |
111 of Info. The second part of the manual describes various advanced | |
112 Info commands, and how to write an Info as distinct from a Texinfo | |
113 file. The third part is about how to generate Info files from | |
114 Texinfo files. | |
115 | |
116 @iftex | |
117 This manual is primarily designed for use on a computer, so that you can | |
118 try Info commands while reading about them. Reading it on paper is less | |
119 effective, since you must take it on faith that the commands described | |
120 really do what the manual says. By all means go through this manual now | |
121 that you have it; but please try going through the on-line version as | |
122 well. | |
123 | |
124 There are two ways of looking at the online version of this manual: | |
125 | |
126 @enumerate | |
127 @item | |
128 Type @code{info} at your shell's command line. This approach uses a | |
129 stand-alone program designed just to read Info files. | |
130 | |
131 @item | |
132 Type @code{emacs} at the command line; then type @kbd{C-h i} (Control | |
133 @kbd{h}, followed by @kbd{i}). This approach uses the Info mode of the | |
134 Emacs program, an editor with many other capabilities. | |
135 @end enumerate | |
136 | |
137 In either case, then type @kbd{mInfo} (just the letters), followed by | |
138 @key{RET}---the ``Return'' or ``Enter'' key. At this point, you should | |
139 be ready to follow the instructions in this manual as you read them on | |
140 the screen. | |
141 @c FIXME! (pesch@cygnus.com, 14 dec 1992) | |
142 @c Is it worth worrying about what-if the beginner goes to somebody | |
143 @c else's Emacs session, which already has an Info running in the middle | |
144 @c of something---in which case these simple instructions won't work? | |
145 @end iftex | |
146 | |
147 @menu | |
148 * Help-Small-Screen:: Starting Info on a Small Screen | |
149 * Help:: How to use Info | |
150 * Help-P:: Returning to the Previous node | |
151 * Help-^L:: The Space, Rubout, B and ^L commands. | |
152 * Help-M:: Menus | |
153 * Help-Adv:: Some advanced Info commands | |
154 * Help-Q:: Quitting Info | |
155 @end menu | |
156 | |
157 @node Help-Small-Screen, Help, , Getting Started | |
158 @comment node-name, next, previous, up | |
159 @section Starting Info on a Small Screen | |
160 | |
161 @iftex | |
162 (In Info, you only see this section if your terminal has a small | |
163 number of lines; most readers pass by it without seeing it.) | |
164 @end iftex | |
165 | |
166 Since your terminal has an unusually small number of lines on its | |
167 screen, it is necessary to give you special advice at the beginning. | |
168 | |
169 If you see the text @samp{--All----} at near the bottom right corner | |
170 of the screen, it means the entire text you are looking at fits on the | |
171 screen. If you see @samp{--Top----} instead, it means that there is | |
172 more text below that does not fit. To move forward through the text | |
173 and see another screen full, press the Space bar, @key{SPC}. To move | |
174 back up, press the key labeled @samp{Delete} or @key{DEL}. | |
175 | |
176 @ifinfo | |
177 Here are 40 lines of junk, so you can try Spaces and Deletes and | |
178 see what they do. At the end are instructions of what you should do | |
179 next. | |
180 @format | |
181 This is line 17 | |
182 This is line 18 | |
183 This is line 19 | |
184 This is line 20 | |
185 This is line 21 | |
186 This is line 22 | |
187 This is line 23 | |
188 This is line 24 | |
189 This is line 25 | |
190 This is line 26 | |
191 This is line 27 | |
192 This is line 28 | |
193 This is line 29 | |
194 This is line 30 | |
195 This is line 31 | |
196 This is line 32 | |
197 This is line 33 | |
198 This is line 34 | |
199 This is line 35 | |
200 This is line 36 | |
201 This is line 37 | |
202 This is line 38 | |
203 This is line 39 | |
204 This is line 40 | |
205 This is line 41 | |
206 This is line 42 | |
207 This is line 43 | |
208 This is line 44 | |
209 This is line 45 | |
210 This is line 46 | |
211 This is line 47 | |
212 This is line 48 | |
213 This is line 49 | |
214 This is line 50 | |
215 This is line 51 | |
216 This is line 52 | |
217 This is line 53 | |
218 This is line 54 | |
219 This is line 55 | |
220 This is line 56 | |
221 @end format | |
222 If you have managed to get here, go back to the beginning with | |
223 Delete, and come back here again, then you understand Space and | |
224 Delete. So now type an @kbd{n} ---just one character; don't type | |
225 the quotes and don't type the Return key afterward--- to | |
226 get to the normal start of the course. | |
227 @end ifinfo | |
228 | |
229 @node Help, Help-P, Help-Small-Screen, Getting Started | |
230 @comment node-name, next, previous, up | |
231 @section How to use Info | |
232 | |
233 You are talking to the program Info, for reading documentation. | |
234 | |
235 Right now you are looking at one @dfn{Node} of Information. | |
236 A node contains text describing a specific topic at a specific | |
237 level of detail. This node's topic is ``how to use Info''. | |
238 | |
239 The top line of a node is its @dfn{header}. This node's header (look at | |
240 it now) says that it is the node named @samp{Help} in the file | |
241 @file{info}. It says that the @samp{Next} node after this one is the node | |
242 called @samp{Help-P}. An advanced Info command lets you go to any node | |
243 whose name you know. | |
244 | |
245 Besides a @samp{Next}, a node can have a @samp{Previous} or an | |
246 @samp{Up}. This node has a @samp{Previous} which is | |
247 @samp{Help-Small-Screen}, and an @samp{Up} which is @samp{Getting | |
248 Started}. Some nodes have no @samp{Previous} and some have no | |
249 @samp{Up}. | |
250 | |
251 Now it is time to move on to the @samp{Next} node, named @samp{Help-P}. | |
252 | |
253 @format | |
254 >> Type @samp{n} to move there. Type just one character; | |
255 do not type the quotes and do not type a @key{RET} afterward. | |
256 @end format | |
257 | |
258 @samp{>>} in the margin means it is really time to try a command. | |
259 | |
260 @node Help-P, Help-^L, Help, Getting Started | |
261 @comment node-name, next, previous, up | |
262 @section Returning to the Previous node | |
263 | |
264 This node is called @samp{Help-P}. The @samp{Previous} node, as you see, | |
265 is @samp{Help}, which is the one you just came from using the @kbd{n} | |
266 command. Another @kbd{n} command now would take you to the next | |
267 node, @samp{Help-^L}. | |
268 | |
269 @format | |
270 >> But do not do that yet. First, try the @kbd{p} command, which takes | |
271 you to the @samp{Previous} node. When you get there, you can do an | |
272 @kbd{n} again to return here. | |
273 @end format | |
274 | |
275 This all probably seems insultingly simple so far, but @emph{do not} be | |
276 led into skimming. Things will get more complicated soon. Also, | |
277 do not try a new command until you are told it is time to. Otherwise, | |
278 you may make Info skip past an important warning that was coming up. | |
279 | |
280 @format | |
281 >> Now do an @kbd{n} to get to the node @samp{Help-^L} and learn more. | |
282 @end format | |
283 | |
284 @node Help-^L, Help-M, Help-P, Getting Started | |
285 @comment node-name, next, previous, up | |
286 @section The Space, Delete, B and ^L commands. | |
287 | |
288 This node's header tells you that you are now at node @samp{Help-^L}, and | |
289 that @kbd{p} would get you back to @samp{Help-P}. The node's title is | |
290 underlined; it says what the node is about (most nodes have titles). | |
291 | |
292 This is a big node and it does not all fit on your display screen. | |
293 You can tell that there is more that is not visible because you | |
294 can see the string @samp{--Top-----} rather than @samp{--All----} near | |
295 the bottom right corner of the screen. | |
296 | |
297 The Space, Delete and @kbd{B} commands exist to allow you to ``move | |
298 around'' in a node that does not all fit on the screen at once. | |
299 Space moves forward, to show what was below the bottom of the screen. | |
300 Delete moves backward, to show what was above the top of the screen | |
301 (there is not anything above the top until you have typed some spaces). | |
302 | |
303 @format | |
304 >> Now try typing a Space (afterward, type a Delete to return here). | |
305 @end format | |
306 | |
307 When you type the space, the two lines that were at the bottom of | |
308 the screen appear at the top, followed by more lines. Delete takes | |
309 the two lines from the top and moves them to the bottom, | |
310 @emph{usually}, but if there are not a full screen's worth of lines | |
311 above them they may not make it all the way to the bottom. | |
312 | |
313 Space and Delete scroll through all the nodes in an Info file as a | |
314 single logical sequence. In this sequence, a node's subnodes appear | |
315 following their parent. If a node's menu is on the screen, Space takes | |
316 you into the subnodes listed in the menu, one by one. Once you reach | |
317 the end of a node, Space takes you to the next node or back to the | |
318 parent node. | |
319 | |
320 If your screen is ever garbaged, you can tell Info to print it out | |
321 again by typing @kbd{C-l} (@kbd{Control-L}, that is---hold down ``Control'' and | |
322 type an @key{L} or @kbd{l}). | |
323 | |
324 @format | |
325 >> Type @kbd{C-l} now. | |
326 @end format | |
327 | |
328 To move back to the beginning of the node you are on, you can type | |
329 a lot of Deletes. You can also type simply @kbd{b} for beginning. | |
330 @format | |
331 >> Try that now. (We have put in enough verbiage to push this past | |
332 the first screenful, but screens are so big nowadays that perhaps it | |
333 isn't enough. You may need to shrink your Emacs or Info window.) | |
334 Then come back, with Spaces. | |
335 @end format | |
336 | |
337 If your screen is very tall, all of this node might fit at once. | |
338 In that case, "b" won't do anything. Sorry; what can we do? | |
339 | |
340 You have just learned a considerable number of commands. If you | |
341 want to use one but have trouble remembering which, you should type | |
342 a @key{?} which prints out a brief list of commands. When you are | |
343 finished looking at the list, make it go away by typing a @key{SPC}. | |
344 | |
345 @format | |
346 >> Type a @key{?} now. After it finishes, type a @key{SPC}. | |
347 @end format | |
348 | |
349 (If you are using the standalone Info reader, type `l' to return here.) | |
350 | |
351 From now on, you will encounter large nodes without warning, and | |
352 will be expected to know how to use Space and Delete to move | |
353 around in them without being told. Since not all terminals have | |
354 the same size screen, it would be impossible to warn you anyway. | |
355 | |
356 @format | |
357 >> Now type @kbd{n} to see the description of the @kbd{m} command. | |
358 @end format | |
359 | |
360 @node Help-M, Help-Adv, Help-^L, Getting Started | |
361 @comment node-name, next, previous, up | |
362 @section Menus | |
363 | |
364 Menus and the @kbd{m} command | |
365 | |
366 With only the @kbd{n} and @kbd{p} commands for moving between nodes, nodes | |
367 are restricted to a linear sequence. Menus allow a branching | |
368 structure. A menu is a list of other nodes you can move to. It is | |
369 actually just part of the text of the node formatted specially so that | |
370 Info can interpret it. The beginning of a menu is always identified | |
371 by a line which starts with @samp{* Menu:}. A node contains a menu if and | |
372 only if it has a line in it which starts that way. The only menu you | |
373 can use at any moment is the one in the node you are in. To use a | |
374 menu in any other node, you must move to that node first. | |
375 | |
376 After the start of the menu, each line that starts with a @samp{*} | |
377 identifies one subtopic. The line usually contains a brief name | |
378 for the subtopic (followed by a @samp{:}), the name of the node that talks | |
379 about that subtopic, and optionally some further description of the | |
380 subtopic. Lines in the menu that do not start with a @samp{*} have no | |
381 special meaning---they are only for the human reader's benefit and do | |
382 not define additional subtopics. Here is an example: | |
383 | |
384 @example | |
385 * Foo: FOO's Node This tells about FOO | |
386 @end example | |
387 | |
388 The subtopic name is Foo, and the node describing it is @samp{FOO's Node}. | |
389 The rest of the line is just for the reader's Information. | |
390 [[ But this line is not a real menu item, simply because there is | |
391 no line above it which starts with @samp{* Menu:}.]] | |
392 | |
393 When you use a menu to go to another node (in a way that will be | |
394 described soon), what you specify is the subtopic name, the first | |
395 thing in the menu line. Info uses it to find the menu line, extracts | |
396 the node name from it, and goes to that node. The reason that there | |
397 is both a subtopic name and a node name is that the node name must be | |
398 meaningful to the computer and may therefore have to be ugly looking. | |
399 The subtopic name can be chosen just to be convenient for the user to | |
400 specify. Often the node name is convenient for the user to specify | |
401 and so both it and the subtopic name are the same. There is an | |
402 abbreviation for this: | |
403 | |
404 @example | |
405 * Foo:: This tells about FOO | |
406 @end example | |
407 | |
408 @noindent | |
409 This means that the subtopic name and node name are the same; they are | |
410 both @samp{Foo}. | |
411 | |
412 @format | |
413 >> Now use Spaces to find the menu in this node, then come back to | |
414 the front with a @kbd{b} and some Spaces. As you see, a menu is | |
415 actually visible in its node. If you cannot find a menu in a node | |
416 by looking at it, then the node does not have a menu and the | |
417 @kbd{m} command is not available. | |
418 @end format | |
419 | |
420 The command to go to one of the subnodes is @kbd{m}---but @emph{do | |
421 not do it yet!} Before you use @kbd{m}, you must understand the | |
422 difference between commands and arguments. So far, you have learned | |
423 several commands that do not need arguments. When you type one, Info | |
424 processes it and is instantly ready for another command. The @kbd{m} | |
425 command is different: it is incomplete without the @dfn{name of the | |
426 subtopic}. Once you have typed @kbd{m}, Info tries to read the | |
427 subtopic name. | |
428 | |
429 Now look for the line containing many dashes near the bottom of the | |
430 screen. There is one more line beneath that one, but usually it is | |
431 blank. If it is empty, Info is ready for a command, such as @kbd{n} | |
432 or @kbd{b} or Space or @kbd{m}. If that line contains text ending | |
433 in a colon, it mean Info is trying to read the @dfn{argument} to a | |
434 command. At such times, commands do not work, because Info tries to | |
435 use them as the argument. You must either type the argument and | |
436 finish the command you started, or type @kbd{Control-g} to cancel the | |
437 command. When you have done one of those things, the line becomes | |
438 blank again. | |
439 | |
440 The command to go to a subnode via a menu is @kbd{m}. After you type | |
441 the @kbd{m}, the line at the bottom of the screen says @samp{Menu item: }. | |
442 You must then type the name of the subtopic you want, and end it with | |
443 a @key{RET}. | |
444 | |
445 You can abbreviate the subtopic name. If the abbreviation is not | |
446 unique, the first matching subtopic is chosen. Some menus put the | |
447 shortest possible abbreviation for each subtopic name in capital | |
448 letters, so you can see how much you need to type. It does not matter | |
449 whether you use upper case or lower case when you type the subtopic. Do | |
450 not put spaces at the end of the subtopic name; in the middle of the | |
451 subtopic name, use one space (no more!) wherever the menu item name has | |
452 a space. | |
453 | |
454 You can also use the @dfn{completion} feature to help enter the subtopic | |
455 name. If you type the Tab key after entering part of a name, it will | |
456 magically fill in more of the name---as much as follows uniquely from | |
457 what you have entered. | |
458 | |
459 If you move the cursor to one of the menu subtopic lines, then you do | |
460 not need to type the argument: you just type a Return, and it stands for | |
461 the subtopic of the line you are on. | |
462 | |
463 Here is a menu to give you a chance to practice. | |
464 | |
465 @menu | |
466 This menu gives you three ways of going to one place, Help-FOO. | |
467 | |
468 * Foo: Help-FOO. A node you can visit for fun. | |
469 * Bar: Help-FOO. Strange! two ways to get to the same place. | |
470 * Help-FOO:: And yet another! | |
471 @end menu | |
472 | |
473 @format | |
474 >> Now type just an @kbd{m} and see what happens: | |
475 @end format | |
476 | |
477 Now you are ``inside'' an @kbd{m} command. Commands cannot be used | |
478 now; the next thing you will type must be the name of a subtopic. | |
479 | |
480 You can change your mind about doing the @kbd{m} by typing Control-g. | |
481 | |
482 @format | |
483 >> Try that now; notice the bottom line clear. | |
484 | |
485 >> Then type another @kbd{m}. | |
486 | |
487 >> Now type @samp{BAR} item name. Do not type Return yet. | |
488 @end format | |
489 | |
490 While you are typing the item name, you can use the Delete key to | |
491 cancel one character at a time if you make a mistake. | |
492 | |
493 @format | |
494 >> Type one to cancel the @samp{R}. You could type another @samp{R} to | |
495 replace it. You do not have to, since @samp{BA} is a valid abbreviation. | |
496 | |
497 >> Now you are ready to go. Type a @key{RET}. | |
498 @end format | |
499 | |
500 After visiting Help-FOO, you should return here. | |
501 | |
502 @format | |
503 >> Type @kbd{n} to see more commands. | |
504 @end format | |
505 | |
506 @c If a menu appears at the end of this node, remove it. | |
507 @c It is an accident of the menu updating command. | |
508 | |
509 @node Help-FOO, , , Help-M | |
510 @comment node-name, next, previous, up | |
511 @subsection The @kbd{u} command | |
512 | |
513 Congratulations! This is the node @samp{Help-FOO}. Unlike the other | |
514 nodes you have seen, this one has an @samp{Up}: @samp{Help-M}, the node you | |
515 just came from via the @kbd{m} command. This is the usual | |
516 convention---the nodes you reach from a menu have @samp{Up} nodes that lead | |
517 back to the menu. Menus move Down in the tree, and @samp{Up} moves Up. | |
518 @samp{Previous}, on the other hand, is usually used to ``stay on the same | |
519 level but go backwards'' | |
520 | |
521 You can go back to the node @samp{Help-M} by typing the command | |
522 @kbd{u} for ``Up''. That puts you at the @emph{front} of the | |
523 node---to get back to where you were reading you have to type | |
32338
5bd182bded06
Mention that `u' might or might not restore point.
Eli Zaretskii <eliz@gnu.org>
parents:
32315
diff
changeset
|
524 some @key{SPC}s. (Some Info readers, such as the one built into Emacs, |
5bd182bded06
Mention that `u' might or might not restore point.
Eli Zaretskii <eliz@gnu.org>
parents:
32315
diff
changeset
|
525 put you at the same place where you were reading in @samp{Help-M}.) |
25839 | 526 |
527 @format | |
528 >> Now type @kbd{u} to move back up to @samp{Help-M}. | |
529 @end format | |
530 | |
531 @node Help-Adv, Help-Q, Help-M, Getting Started | |
532 @comment node-name, next, previous, up | |
533 @section Some advanced Info commands | |
534 | |
535 The course is almost over, so please stick with it to the end. | |
536 | |
537 If you have been moving around to different nodes and wish to | |
538 retrace your steps, the @kbd{l} command (@kbd{l} for @dfn{last}) will | |
539 do that, one node-step at a time. As you move from node to node, Info | |
540 records the nodes where you have been in a special history list. The | |
541 @kbd{l} command revisits nodes in the history list; each successive | |
542 @kbd{l} command moves one step back through the history. | |
543 | |
544 If you have been following directions, an @kbd{l} command now will get | |
545 you back to @samp{Help-M}. Another @kbd{l} command would undo the | |
546 @kbd{u} and get you back to @samp{Help-FOO}. Another @kbd{l} would undo | |
547 the @kbd{m} and get you back to @samp{Help-M}. | |
548 | |
549 @format | |
550 >> Try typing three @kbd{l}'s, pausing in between to see what each | |
551 @kbd{l} does. | |
552 @end format | |
553 | |
554 Then follow directions again and you will end up back here. | |
555 | |
556 Note the difference between @kbd{l} and @kbd{p}: @kbd{l} moves to | |
557 where @emph{you} last were, whereas @kbd{p} always moves to the node | |
558 which the header says is the @samp{Previous} node (from this node, to | |
559 @samp{Help-M}). | |
560 | |
561 The @samp{d} command gets you instantly to the Directory node. | |
562 This node, which is the first one you saw when you entered Info, | |
563 has a menu which leads (directly, or indirectly through other menus), | |
564 to all the nodes that exist. | |
565 | |
566 @format | |
567 >> Try doing a @samp{d}, then do an @kbd{l} to return here (yes, | |
568 @emph{do} return). | |
569 @end format | |
570 | |
571 Sometimes, in Info documentation, you will see a cross reference. | |
572 Cross references look like this: @xref{Help-Cross, Cross}. That is a | |
573 real, live cross reference which is named @samp{Cross} and points at | |
574 the node named @samp{Help-Cross}. | |
575 | |
576 If you wish to follow a cross reference, you must use the @samp{f} | |
577 command. The @samp{f} must be followed by the cross reference name | |
578 (in this case, @samp{Cross}). While you enter the name, you can use the | |
579 Delete key to edit your input. If you change your mind about following | |
580 any reference, you can use @kbd{Control-g} to cancel the command. | |
581 | |
582 Completion is available in the @samp{f} command; you can complete among | |
583 all the cross reference names in the current node by typing a Tab. | |
584 | |
585 @format | |
586 >> Type @samp{f}, followed by @samp{Cross}, and a @key{RET}. | |
587 @end format | |
588 | |
589 To get a list of all the cross references in the current node, you can | |
590 type @kbd{?} after an @samp{f}. The @samp{f} continues to await a | |
591 cross reference name even after printing the list, so if you don't | |
592 actually want to follow a reference, you should type a @kbd{Control-g} | |
593 to cancel the @samp{f}. | |
594 | |
595 @format | |
596 >> Type "f?" to get a list of the cross references in this node. Then | |
597 type a @kbd{Control-g} and see how the @samp{f} gives up. | |
598 | |
599 >> Now type @kbd{n} to see the last node of the course. | |
600 @end format | |
601 | |
602 @c If a menu appears at the end of this node, remove it. | |
603 @c It is an accident of the menu updating command. | |
604 | |
605 @node Help-Cross, , , Help-Adv | |
606 @comment node-name, next, previous, up | |
607 @unnumberedsubsec The node reached by the cross reference in Info | |
608 | |
609 This is the node reached by the cross reference named @samp{Cross}. | |
610 | |
611 While this node is specifically intended to be reached by a cross | |
612 reference, most cross references lead to nodes that ``belong'' | |
613 someplace else far away in the structure of Info. So you cannot expect | |
614 the footnote to have a @samp{Next}, @samp{Previous} or @samp{Up} pointing back to | |
615 where you came from. In general, the @kbd{l} (el) command is the only | |
616 way to get back there. | |
617 | |
618 @format | |
619 >> Type @kbd{l} to return to the node where the cross reference was. | |
620 @end format | |
621 | |
622 @node Help-Q, , Help-Adv, Getting Started | |
623 @comment node-name, next, previous, up | |
624 @section Quitting Info | |
625 | |
626 To get out of Info, back to what you were doing before, type @kbd{q} | |
627 for @dfn{Quit}. | |
628 | |
629 This is the end of the course on using Info. There are some other | |
630 commands that are meant for experienced users; they are useful, and you | |
631 can find them by looking in the directory node for documentation on | |
632 Info. Finding them will be a good exercise in using Info in the usual | |
633 manner. | |
634 | |
635 @format | |
636 >> Type @samp{d} to go to the Info directory node; then type | |
637 @samp{mInfo} and Return, to get to the node about Info and | |
638 see what other help is available. | |
639 @end format | |
640 | |
641 @node Advanced Info, Create an Info File, Getting Started, Top | |
642 @comment node-name, next, previous, up | |
643 @chapter Info for Experts | |
644 | |
645 This chapter describes various advanced Info commands, and how to write | |
646 an Info as distinct from a Texinfo file. (However, in most cases, writing a | |
647 Texinfo file is better, since you can use it @emph{both} to generate an | |
648 Info file and to make a printed manual. @xref{Top,, Overview of | |
649 Texinfo, texinfo, Texinfo: The GNU Documentation Format}.) | |
650 | |
651 @menu | |
652 * Expert:: Advanced Info commands: g, s, e, and 1 - 5. | |
653 * Add:: Describes how to add new nodes to the hierarchy. | |
654 Also tells what nodes look like. | |
655 * Menus:: How to add to or create menus in Info nodes. | |
656 * Cross-refs:: How to add cross-references to Info nodes. | |
657 * Tags:: How to make tags tables for Info files. | |
658 * Checking:: Checking an Info File | |
659 * Emacs Info Variables:: Variables modifying the behavior of Emacs Info. | |
660 @end menu | |
661 | |
662 @node Expert, Add, , Advanced Info | |
663 @comment node-name, next, previous, up | |
664 @section Advanced Info Commands | |
665 | |
666 @kbd{g}, @kbd{s}, @kbd{1}, -- @kbd{9}, and @kbd{e} | |
667 | |
668 If you know a node's name, you can go there by typing @kbd{g}, the | |
669 name, and @key{RET}. Thus, @kbd{gTop@key{RET}} would go to the node | |
670 called @samp{Top} in this file (its directory node). | |
671 @kbd{gExpert@key{RET}} would come back here. | |
672 | |
673 Unlike @kbd{m}, @kbd{g} does not allow the use of abbreviations. | |
674 | |
675 To go to a node in another file, you can include the filename in the | |
676 node name by putting it at the front, in parentheses. Thus, | |
677 @kbd{g(dir)Top@key{RET}} would go to the Info Directory node, which is | |
678 node @samp{Top} in the file @file{dir}. | |
679 | |
680 The node name @samp{*} specifies the whole file. So you can look at | |
681 all of the current file by typing @kbd{g*@key{RET}} or all of any | |
682 other file with @kbd{g(FILENAME)@key{RET}}. | |
683 | |
684 The @kbd{s} command allows you to search a whole file for a string. It | |
685 switches to the next node if and when that is necessary. You type | |
686 @kbd{s} followed by the string to search for, terminated by @key{RET}. | |
687 To search for the same string again, just @kbd{s} followed by @key{RET} | |
688 will do. The file's nodes are scanned in the order they are in in the | |
689 file, which has no necessary relationship to the order that they may be | |
690 in in the tree structure of menus and @samp{next} pointers. But | |
691 normally the two orders are not very different. In any case, you can | |
692 always do a @kbd{b} to find out what node you have reached, if the | |
693 header is not visible (this can happen, because @kbd{s} puts your cursor | |
694 at the occurrence of the string, not at the beginning of the node). | |
695 | |
696 @kbd{Meta-s} is equivalent to @kbd{s}. That is for compatibility with | |
697 other GNU packages that use @kbd{M-s} for a similar kind of search | |
698 command. | |
699 | |
700 If you grudge the system each character of type-in it requires, you | |
701 might like to use the commands @kbd{1}, @kbd{2}, @kbd{3}, @kbd{4}, ... | |
702 @kbd{9}. They are short for the @kbd{m} command together with an | |
703 argument. @kbd{1} goes through the first item in the current node's | |
704 menu; @kbd{2} goes through the second item, etc. | |
705 | |
706 If your display supports multiple fonts, and you are using Emacs' Info | |
707 mode to read Info files, the @samp{*} for the fifth menu item is | |
708 underlined, and so is the @samp{*} for the ninth item; these underlines | |
709 make it easy to see at a glance which number to use for an item. | |
710 | |
711 On ordinary terminals, you won't have underlining. If you need to | |
712 actually count items, it is better to use @kbd{m} instead, and specify | |
713 the name. | |
714 | |
715 The Info command @kbd{e} changes from Info mode to an ordinary | |
716 Emacs editing mode, so that you can edit the text of the current node. | |
717 Type @kbd{C-c C-c} to switch back to Info. The @kbd{e} command is allowed | |
718 only if the variable @code{Info-enable-edit} is non-@code{nil}. | |
719 | |
720 @node Add, Menus, Expert, Advanced Info | |
721 @comment node-name, next, previous, up | |
722 @section Adding a new node to Info | |
723 | |
724 To add a new topic to the list in the Info directory, you must: | |
725 @enumerate | |
726 @item | |
727 Create some nodes, in some file, to document that topic. | |
728 @item | |
729 Put that topic in the menu in the directory. @xref{Menus, Menu}. | |
730 @end enumerate | |
731 | |
732 Usually, the way to create the nodes is with Texinfo @pxref{Top,, Overview of | |
733 Texinfo, texinfo, Texinfo: The GNU Documentation Format}); this has the | |
734 advantage that you can also make a printed manual from them. However, | |
735 if you want to edit an Info file, here is how. | |
736 | |
737 The new node can live in an existing documentation file, or in a new | |
738 one. It must have a @key{^_} character before it (invisible to the | |
739 user; this node has one but you cannot see it), and it ends with either | |
740 a @key{^_}, a @key{^L}, or the end of file. Note: If you put in a | |
741 @key{^L} to end a new node, be sure that there is a @key{^_} after it | |
742 to start the next one, since @key{^L} cannot @emph{start} a node. | |
743 Also, a nicer way to make a node boundary be a page boundary as well | |
744 is to put a @key{^L} @emph{right after} the @key{^_}. | |
745 | |
746 The @key{^_} starting a node must be followed by a newline or a | |
747 @key{^L} newline, after which comes the node's header line. The | |
748 header line must give the node's name (by which Info finds it), | |
749 and state the names of the @samp{Next}, @samp{Previous}, and @samp{Up} nodes (if | |
750 there are any). As you can see, this node's @samp{Up} node is the node | |
751 @samp{Top}, which points at all the documentation for Info. The @samp{Next} | |
752 node is @samp{Menus}. | |
753 | |
754 The keywords @dfn{Node}, @dfn{Previous}, @dfn{Up}, and @dfn{Next}, | |
755 may appear in any order, anywhere in the header line, but the | |
756 recommended order is the one in this sentence. Each keyword must be | |
757 followed by a colon, spaces and tabs, and then the appropriate name. | |
758 The name may be terminated with a tab, a comma, or a newline. A space | |
759 does not end it; node names may contain spaces. The case of letters | |
760 in the names is insignificant. | |
761 | |
762 A node name has two forms. A node in the current file is named by | |
763 what appears after the @samp{Node: } in that node's first line. For | |
764 example, this node's name is @samp{Add}. A node in another file is | |
765 named by @samp{(@var{filename})@var{node-within-file}}, as in | |
766 @samp{(info)Add} for this node. If the file name starts with ``./'', | |
767 then it is relative to the current directory; otherwise, it is relative | |
768 starting from the standard Info file directory of your site. | |
769 The name @samp{(@var{filename})Top} can be abbreviated to just | |
770 @samp{(@var{filename})}. By convention, the name @samp{Top} is used for | |
771 the ``highest'' node in any single file---the node whose @samp{Up} points | |
772 out of the file. The Directory node is @file{(dir)}. The @samp{Top} node | |
773 of a document file listed in the Directory should have an @samp{Up: | |
774 (dir)} in it. | |
775 | |
776 The node name @kbd{*} is special: it refers to the entire file. | |
777 Thus, @kbd{g*} shows you the whole current file. The use of the | |
778 node @kbd{*} is to make it possible to make old-fashioned, | |
779 unstructured files into nodes of the tree. | |
780 | |
781 The @samp{Node:} name, in which a node states its own name, must not | |
782 contain a filename, since Info when searching for a node does not | |
783 expect one to be there. The @samp{Next}, @samp{Previous} and @samp{Up} names may | |
784 contain them. In this node, since the @samp{Up} node is in the same file, | |
785 it was not necessary to use one. | |
786 | |
787 Note that the nodes in this file have a file name in the header | |
788 line. The file names are ignored by Info, but they serve as comments | |
789 to help identify the node for the user. | |
790 | |
791 @node Menus, Cross-refs, Add, Advanced Info | |
792 @comment node-name, next, previous, up | |
793 @section How to Create Menus | |
794 | |
795 Any node in the Info hierarchy may have a @dfn{menu}---a list of subnodes. | |
796 The @kbd{m} command searches the current node's menu for the topic which it | |
797 reads from the terminal. | |
798 | |
799 A menu begins with a line starting with @samp{* Menu:}. The rest of the | |
800 line is a comment. After the starting line, every line that begins | |
801 with a @samp{* } lists a single topic. The name of the topic--the | |
802 argument that the user must give to the @kbd{m} command to select this | |
803 topic---comes right after the star and space, and is followed by a | |
804 colon, spaces and tabs, and the name of the node which discusses that | |
805 topic. The node name, like node names following @samp{Next}, @samp{Previous} | |
806 and @samp{Up}, may be terminated with a tab, comma, or newline; it may also | |
807 be terminated with a period. | |
808 | |
809 If the node name and topic name are the same, then rather than | |
810 giving the name twice, the abbreviation @samp{* NAME::} may be used | |
811 (and should be used, whenever possible, as it reduces the visual | |
812 clutter in the menu). | |
813 | |
814 It is considerate to choose the topic names so that they differ | |
815 from each other very near the beginning---this allows the user to type | |
816 short abbreviations. In a long menu, it is a good idea to capitalize | |
817 the beginning of each item name which is the minimum acceptable | |
818 abbreviation for it (a long menu is more than 5 or so entries). | |
819 | |
820 The nodes listed in a node's menu are called its ``subnodes'', and | |
821 it is their ``superior''. They should each have an @samp{Up:} pointing at | |
822 the superior. It is often useful to arrange all or most of the | |
823 subnodes in a sequence of @samp{Next} and @samp{Previous} pointers so that someone who | |
824 wants to see them all need not keep revisiting the Menu. | |
825 | |
826 The Info Directory is simply the menu of the node @samp{(dir)Top}---that | |
827 is, node @samp{Top} in file @file{.../info/dir}. You can put new entries | |
828 in that menu just like any other menu. The Info Directory is @emph{not} the | |
829 same as the file directory called @file{info}. It happens that many of | |
830 Info's files live on that file directory, but they do not have to; and | |
831 files on that directory are not automatically listed in the Info | |
832 Directory node. | |
833 | |
834 Also, although the Info node graph is claimed to be a ``hierarchy'', | |
835 in fact it can be @emph{any} directed graph. Shared structures and | |
836 pointer cycles are perfectly possible, and can be used if they are | |
837 appropriate to the meaning to be expressed. There is no need for all | |
838 the nodes in a file to form a connected structure. In fact, this file | |
839 has two connected components. You are in one of them, which is under | |
840 the node @samp{Top}; the other contains the node @samp{Help} which the | |
841 @kbd{h} command goes to. In fact, since there is no garbage | |
842 collector, nothing terrible happens if a substructure is not pointed | |
843 to, but such a substructure is rather useless since nobody can | |
844 ever find out that it exists. | |
845 | |
846 @node Cross-refs, Tags, Menus, Advanced Info | |
847 @comment node-name, next, previous, up | |
848 @section Creating Cross References | |
849 | |
850 A cross reference can be placed anywhere in the text, unlike a menu | |
851 item which must go at the front of a line. A cross reference looks | |
852 like a menu item except that it has @samp{*note} instead of @kbd{*}. | |
853 It @emph{cannot} be terminated by a @samp{)}, because @samp{)}'s are | |
854 so often part of node names. If you wish to enclose a cross reference | |
855 in parentheses, terminate it with a period first. Here are two | |
856 examples of cross references pointers: | |
857 | |
858 @example | |
859 *Note details: commands. (See *note 3: Full Proof.) | |
860 @end example | |
861 | |
862 They are just examples. The places they ``lead to'' do not really exist! | |
863 | |
864 @node Tags, Checking, Cross-refs, Advanced Info | |
865 @comment node-name, next, previous, up | |
866 @section Tags Tables for Info Files | |
867 | |
868 You can speed up the access to nodes of a large Info file by giving | |
869 it a tags table. Unlike the tags table for a program, the tags table for | |
870 an Info file lives inside the file itself and is used | |
871 automatically whenever Info reads in the file. | |
872 | |
873 To make a tags table, go to a node in the file using Emacs Info mode and type | |
874 @kbd{M-x Info-tagify}. Then you must use @kbd{C-x C-s} to save the | |
875 file. | |
876 | |
877 Once the Info file has a tags table, you must make certain it is up | |
878 to date. If, as a result of deletion of text, any node moves back | |
879 more than a thousand characters in the file from the position | |
880 recorded in the tags table, Info will no longer be able to find that | |
881 node. To update the tags table, use the @code{Info-tagify} command again. | |
882 | |
883 An Info file tags table appears at the end of the file and looks like | |
884 this: | |
885 | |
886 @example | |
887 ^_ | |
888 Tag Table: | |
889 File: info, Node: Cross-refs^?21419 | |
890 File: info, Node: Tags^?22145 | |
891 ^_ | |
892 End Tag Table | |
893 @end example | |
894 | |
895 @noindent | |
896 Note that it contains one line per node, and this line contains | |
897 the beginning of the node's header (ending just after the node name), | |
898 a Delete character, and the character position in the file of the | |
899 beginning of the node. | |
900 | |
901 @node Checking, Emacs Info Variables, Tags, Advanced Info | |
902 @comment node-name, next, previous, up | |
903 @section Checking an Info File | |
904 | |
905 When creating an Info file, it is easy to forget the name of a node | |
906 when you are making a pointer to it from another node. If you put in | |
907 the wrong name for a node, this is not detected until someone | |
908 tries to go through the pointer using Info. Verification of the Info | |
909 file is an automatic process which checks all pointers to nodes and | |
910 reports any pointers which are invalid. Every @samp{Next}, @samp{Previous}, and | |
911 @samp{Up} is checked, as is every menu item and every cross reference. In | |
912 addition, any @samp{Next} which does not have a @samp{Previous} pointing back is | |
913 reported. Only pointers within the file are checked, because checking | |
914 pointers to other files would be terribly slow. But those are usually | |
915 few. | |
916 | |
917 To check an Info file, do @kbd{M-x Info-validate} while looking at | |
918 any node of the file with Emacs Info mode. | |
919 | |
920 @node Emacs Info Variables, , Checking, Advanced Info | |
921 @section Emacs Info-mode Variables | |
922 | |
923 The following variables may modify the behaviour of Info-mode in Emacs; | |
924 you may wish to set one or several of these variables interactively, or | |
925 in your @file{~/.emacs} init file. @xref{Examining, Examining and Setting | |
926 Variables, Examining and Setting Variables, emacs, The GNU Emacs | |
927 Manual}. | |
928 | |
929 @table @code | |
930 @item Info-enable-edit | |
931 Set to @code{nil}, disables the @samp{e} (@code{Info-edit}) command. A | |
932 non-@code{nil} value enables it. @xref{Add, Edit}. | |
933 | |
934 @item Info-enable-active-nodes | |
935 When set to a non-@code{nil} value, allows Info to execute Lisp code | |
936 associated with nodes. The Lisp code is executed when the node is | |
937 selected. | |
938 | |
939 @item Info-directory-list | |
940 The list of directories to search for Info files. Each element is a | |
29307 | 941 string (directory name) or @code{nil} (try default directory). If not |
942 initialized Info uses the environment variable @env{INFOPATH} to | |
943 initialize it, or @code{Info-default-directory-list} if there is no | |
944 @env{INFOPATH} variable in the environment. | |
945 | |
946 @item Info-additional-directory-list | |
947 A list of additional directories to search for Info documentation files. | |
948 These directories are not searched for merging the @file{dir} file. | |
25839 | 949 |
950 @item Info-directory | |
951 The standard directory for Info documentation files. Only used when the | |
952 function @code{Info-directory} is called. | |
29307 | 953 |
25839 | 954 @end table |
955 | |
956 @node Create an Info File, , Advanced Info, Top | |
957 @comment node-name, next, previous, up | |
958 @chapter Creating an Info File from a Makeinfo file | |
959 | |
960 @code{makeinfo} is a utility that converts a Texinfo file into an Info | |
961 file; @code{texinfo-format-region} and @code{texinfo-format-buffer} are | |
962 GNU Emacs functions that do the same. | |
963 | |
964 @xref{Create an Info File, , Creating an Info File, texinfo, the Texinfo | |
965 Manual}, to learn how to create an Info file from a Texinfo file. | |
966 | |
967 @xref{Top,, Overview of Texinfo, texinfo, Texinfo: The GNU Documentation | |
968 Format}, to learn how to write a Texinfo file. | |
969 | |
970 @bye |