diff options
| author | Glenn Morris | 2014-02-27 22:25:47 -0800 |
|---|---|---|
| committer | Glenn Morris | 2014-02-27 22:25:47 -0800 |
| commit | 4486e5eb9e5a78f8cd8f11ed6f7b8ccc27a42b60 (patch) | |
| tree | 28242db127e7755397a8fd4dd19fc2e4d17d1214 /doc | |
| parent | 4a6311cd711ec72dc962f2d4a64d7e4b0edba8dc (diff) | |
| download | emacs-4486e5eb9e5a78f8cd8f11ed6f7b8ccc27a42b60.tar.gz emacs-4486e5eb9e5a78f8cd8f11ed6f7b8ccc27a42b60.zip | |
Remove no-longer-relevant text about writing Info nodes by hand
Ref: http://lists.gnu.org/archive/html/emacs-devel/2014-02/msg00359.html
* doc/misc/info.texi (Further Reading): Rename node from Expert Info.
Remove stuff about writing Info nodes by hand.
(Help-Cross): Move node from (mainly deleted) chapter 3 to chapter 1.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/misc/info.texi | 280 |
2 files changed, 30 insertions, 254 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 3bfc5c23674..e14fc7e2441 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2014-02-28 Glenn Morris <rgm@gnu.org> | 1 | 2014-02-28 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * info.texi (Further Reading): Rename node from Expert Info. | ||
| 4 | Remove stuff about writing Info nodes by hand. | ||
| 5 | (Help-Cross): Move node from (mainly deleted) chapter 3 to chapter 1. | ||
| 6 | |||
| 3 | * info.texi: Nuke hand-written node pointers. | 7 | * info.texi: Nuke hand-written node pointers. |
| 4 | 8 | ||
| 5 | 2014-02-28 Karl Berry <karl@gnu.org> | 9 | 2014-02-28 Karl Berry <karl@gnu.org> |
diff --git a/doc/misc/info.texi b/doc/misc/info.texi index 0dee18ab6be..06485d342bd 100644 --- a/doc/misc/info.texi +++ b/doc/misc/info.texi | |||
| @@ -79,7 +79,7 @@ Type @kbd{H} to see a summary of all available commands. | |||
| 79 | @menu | 79 | @menu |
| 80 | * Getting Started:: Getting started using an Info reader. | 80 | * Getting Started:: Getting started using an Info reader. |
| 81 | * Advanced:: Advanced Info commands. | 81 | * Advanced:: Advanced Info commands. |
| 82 | * Expert Info:: Info commands for experts. | 82 | * Further Reading:: Where to learn more about Info files. |
| 83 | * GNU Free Documentation License:: The license for this documentation. | 83 | * GNU Free Documentation License:: The license for this documentation. |
| 84 | * Index:: An index of topics, commands, and variables. | 84 | * Index:: An index of topics, commands, and variables. |
| 85 | @end menu | 85 | @end menu |
| @@ -89,9 +89,8 @@ Type @kbd{H} to see a summary of all available commands. | |||
| 89 | 89 | ||
| 90 | This first part of this Info manual describes how to get around inside | 90 | This first part of this Info manual describes how to get around inside |
| 91 | of Info. The second part of the manual describes various advanced | 91 | of Info. The second part of the manual describes various advanced |
| 92 | Info commands. The third part briefly explains how to generate Info | 92 | Info commands. The third part contains references to other sources, |
| 93 | files from Texinfo files, and describes how to write an Info file | 93 | which explain how to generate Info files from Texinfo files. |
| 94 | by hand. | ||
| 95 | 94 | ||
| 96 | @ifnotinfo | 95 | @ifnotinfo |
| 97 | This manual is primarily designed for browsing with an Info reader | 96 | This manual is primarily designed for browsing with an Info reader |
| @@ -809,6 +808,24 @@ set @code{Info-hide-note-references} to a value other than @code{t} | |||
| 809 | >> Now type @kbd{n} to learn more commands. | 808 | >> Now type @kbd{n} to learn more commands. |
| 810 | @end format | 809 | @end format |
| 811 | 810 | ||
| 811 | |||
| 812 | @node Help-Cross, , , Help-Xref | ||
| 813 | @subsection The node reached by the cross reference in Info | ||
| 814 | |||
| 815 | This is the node reached by the cross reference named @samp{Cross}. | ||
| 816 | |||
| 817 | While this node is specifically intended to be reached by a cross | ||
| 818 | reference, most cross references lead to nodes that ``belong'' | ||
| 819 | someplace else far away in the structure of an Info document. So you | ||
| 820 | cannot expect this node to have a @samp{Next}, @samp{Previous} or | ||
| 821 | @samp{Up} links pointing back to where you came from. In general, the | ||
| 822 | @kbd{l} (el) command is the only way to get back there. | ||
| 823 | |||
| 824 | @format | ||
| 825 | >> Type @kbd{l} to return to the node where the cross reference was. | ||
| 826 | @end format | ||
| 827 | |||
| 828 | |||
| 812 | @node Help-Int | 829 | @node Help-Int |
| 813 | @section Some intermediate Info commands | 830 | @section Some intermediate Info commands |
| 814 | 831 | ||
| @@ -1217,14 +1234,13 @@ this: | |||
| 1217 | @end vtable | 1234 | @end vtable |
| 1218 | 1235 | ||
| 1219 | 1236 | ||
| 1220 | @node Expert Info | 1237 | @node Further Reading |
| 1221 | @chapter Info for Experts | 1238 | @chapter Further Reading |
| 1222 | @cindex Texinfo | 1239 | @cindex Texinfo |
| 1223 | 1240 | ||
| 1224 | This chapter explains how to write an Info file by hand. However, | 1241 | Info files are created from Texinfo source files. You can use the |
| 1225 | in most cases, writing a Texinfo file is better, since you can use it | 1242 | same source file to make a printed manual or produce other formats, |
| 1226 | to make a printed manual or produce other formats, such as HTML and | 1243 | such as HTML and DocBook. |
| 1227 | DocBook, as well as for generating Info files. | ||
| 1228 | 1244 | ||
| 1229 | The @code{makeinfo} command converts a Texinfo file into an Info file; | 1245 | The @code{makeinfo} command converts a Texinfo file into an Info file; |
| 1230 | @code{texinfo-format-region} and @code{texinfo-format-buffer} are GNU | 1246 | @code{texinfo-format-region} and @code{texinfo-format-buffer} are GNU |
| @@ -1240,250 +1256,6 @@ Format}, for how to create an Info file from a Texinfo file. | |||
| 1240 | Documentation Format}, for how to install an Info file after you | 1256 | Documentation Format}, for how to install an Info file after you |
| 1241 | have created one. | 1257 | have created one. |
| 1242 | 1258 | ||
| 1243 | However, if you want to edit an Info file manually and install it manually, | ||
| 1244 | here is how. | ||
| 1245 | |||
| 1246 | @menu | ||
| 1247 | * Add:: Describes how to add new nodes to the hierarchy. | ||
| 1248 | Also tells what nodes look like. | ||
| 1249 | * Menus:: How to add to or create menus in Info nodes. | ||
| 1250 | * Cross-refs:: How to add cross-references to Info nodes. | ||
| 1251 | * Tags:: How to make tags tables for Info files. | ||
| 1252 | * Checking:: Checking an Info File. | ||
| 1253 | @end menu | ||
| 1254 | |||
| 1255 | @node Add | ||
| 1256 | @section Adding a new node to Info | ||
| 1257 | |||
| 1258 | To add a new topic to the list in the Info directory, you must: | ||
| 1259 | |||
| 1260 | @enumerate | ||
| 1261 | @item | ||
| 1262 | Create some nodes, in some file, to document that topic. | ||
| 1263 | @item | ||
| 1264 | Put that topic in the menu in the directory. @xref{Menus, Menu}. | ||
| 1265 | @end enumerate | ||
| 1266 | |||
| 1267 | @cindex node delimiters | ||
| 1268 | The new node can live in an existing documentation file, or in a new | ||
| 1269 | one. It must have a @samp{^_} character before it (invisible to the | ||
| 1270 | user; this node has one but you cannot see it), and it ends with either | ||
| 1271 | a @samp{^_}, a @samp{^L} (``formfeed''), or the end of file.@footnote{If | ||
| 1272 | you put in a @samp{^L} to end a new node, be sure that there is a | ||
| 1273 | @samp{^_} after it to start the next one, since @samp{^L} cannot | ||
| 1274 | @emph{start} a node. Also, a nicer way to make a node boundary be a | ||
| 1275 | page boundary as well is to put a @samp{^L} @emph{right after} the | ||
| 1276 | @samp{^_}.} | ||
| 1277 | |||
| 1278 | The @samp{^_} starting a node must be followed by a newline or a | ||
| 1279 | @samp{^L} newline, after which comes the node's header line. The | ||
| 1280 | header line must give the node's name (by which Info finds it), and | ||
| 1281 | state the names of the @samp{Next}, @samp{Previous}, and @samp{Up} | ||
| 1282 | nodes (if there are any). As you can see, this node's @samp{Up} node | ||
| 1283 | is the node @samp{Expert Info}. The @samp{Next} node is @samp{Menus}. | ||
| 1284 | |||
| 1285 | @cindex node header line format | ||
| 1286 | @cindex format of node headers | ||
| 1287 | The keywords @dfn{Node}, @dfn{Next}, @dfn{Previous}, and @dfn{Up} | ||
| 1288 | may appear in any order, anywhere in the header line, but the | ||
| 1289 | recommended order is the one in this sentence. Each keyword must be | ||
| 1290 | followed by a colon, spaces and tabs, and then the appropriate name. | ||
| 1291 | The name may be terminated with a tab, a comma, or a newline. A space | ||
| 1292 | does not end it; node names may contain spaces. The case of letters | ||
| 1293 | in the names is insignificant. | ||
| 1294 | |||
| 1295 | @cindex node name format | ||
| 1296 | @cindex Directory node | ||
| 1297 | A node name has two forms. A node in the current file is named by | ||
| 1298 | what appears after the @samp{Node: } in that node's first line. For | ||
| 1299 | example, this node's name is @samp{Add}. A node in another file is | ||
| 1300 | named by @samp{(@var{filename})@var{node-within-file}}, as in | ||
| 1301 | @samp{(info)Add} for this node. If the file name starts with @samp{./}, | ||
| 1302 | then it is relative to the current directory; otherwise, it is | ||
| 1303 | relative starting from the standard directory for Info files of your | ||
| 1304 | site. The name @samp{(@var{filename})Top} can be abbreviated to just | ||
| 1305 | @samp{(@var{filename})}. By convention, the name @samp{Top} is used | ||
| 1306 | for the ``highest'' node in any single file---the node whose @samp{Up} | ||
| 1307 | points out of the file. The @samp{Directory} node is @file{(dir)}, it | ||
| 1308 | points to a file @file{dir} which holds a large menu listing all the | ||
| 1309 | Info documents installed on your site. The @samp{Top} node of a | ||
| 1310 | document file listed in the @samp{Directory} should have an @samp{Up: | ||
| 1311 | (dir)} in it. | ||
| 1312 | |||
| 1313 | @cindex unstructured documents | ||
| 1314 | The node name @kbd{*} is special: it refers to the entire file. | ||
| 1315 | Thus, @kbd{g*} shows you the whole current file. The use of the | ||
| 1316 | node @kbd{*} is to make it possible to make old-fashioned, | ||
| 1317 | unstructured files into nodes of the tree. | ||
| 1318 | |||
| 1319 | The @samp{Node:} name, in which a node states its own name, must not | ||
| 1320 | contain a file name, since when Info searches for a node, it does not | ||
| 1321 | expect a file name to be there. The @samp{Next}, @samp{Previous} and | ||
| 1322 | @samp{Up} names may contain them. In this node, since the @samp{Up} | ||
| 1323 | node is in the same file, it was not necessary to use one. | ||
| 1324 | |||
| 1325 | Note that the nodes in this file have a file name in the header | ||
| 1326 | line. The file names are ignored by Info, but they serve as comments | ||
| 1327 | to help identify the node for the user. | ||
| 1328 | |||
| 1329 | @node Menus | ||
| 1330 | @section How to Create Menus | ||
| 1331 | |||
| 1332 | Any node in the Info hierarchy may have a @dfn{menu}---a list of subnodes. | ||
| 1333 | The @kbd{m} command searches the current node's menu for the topic which it | ||
| 1334 | reads from the terminal. | ||
| 1335 | |||
| 1336 | @cindex menu and menu entry format | ||
| 1337 | A menu begins with a line starting with @w{@samp{* Menu:}}. The | ||
| 1338 | rest of the line is a comment. After the starting line, every line | ||
| 1339 | that begins with a @samp{* } lists a single topic. The name of the | ||
| 1340 | topic---what the user must type at the @kbd{m}'s command prompt to | ||
| 1341 | select this topic---comes right after the star and space, and is | ||
| 1342 | followed by a colon, spaces and tabs, and the name of the node which | ||
| 1343 | discusses that topic. The node name, like node names following | ||
| 1344 | @samp{Next}, @samp{Previous} and @samp{Up}, may be terminated with a | ||
| 1345 | tab, comma, or newline; it may also be terminated with a period. | ||
| 1346 | |||
| 1347 | If the node name and topic name are the same, then rather than | ||
| 1348 | giving the name twice, the abbreviation @samp{* @var{name}::} may be | ||
| 1349 | used (and should be used, whenever possible, as it reduces the visual | ||
| 1350 | clutter in the menu). | ||
| 1351 | |||
| 1352 | It is considerate to choose the topic names so that they differ | ||
| 1353 | from each other very near the beginning---this allows the user to type | ||
| 1354 | short abbreviations. In a long menu, it is a good idea to capitalize | ||
| 1355 | the beginning of each item name which is the minimum acceptable | ||
| 1356 | abbreviation for it (a long menu is more than 5 or so entries). | ||
| 1357 | |||
| 1358 | The nodes listed in a node's menu are called its ``subnodes,'' and it | ||
| 1359 | is their ``superior''. They should each have an @samp{Up:} pointing at | ||
| 1360 | the superior. It is often useful to arrange all or most of the subnodes | ||
| 1361 | in a sequence of @samp{Next} and @samp{Previous} pointers so that | ||
| 1362 | someone who wants to see them all need not keep revisiting the Menu. | ||
| 1363 | |||
| 1364 | The Info Directory is simply the menu of the node @samp{(dir)Top}---that | ||
| 1365 | is, node @samp{Top} in file @file{.../info/dir}. You can put new entries | ||
| 1366 | in that menu just like any other menu. The Info Directory is @emph{not} the | ||
| 1367 | same as the file directory called @file{info}. It happens that many of | ||
| 1368 | Info's files live in that file directory, but they do not have to; and | ||
| 1369 | files in that directory are not automatically listed in the Info | ||
| 1370 | Directory node. | ||
| 1371 | |||
| 1372 | Also, although the Info node graph is claimed to be a ``hierarchy,'' | ||
| 1373 | in fact it can be @emph{any} directed graph. Shared structures and | ||
| 1374 | pointer cycles are perfectly possible, and can be used if they are | ||
| 1375 | appropriate to the meaning to be expressed. There is no need for all | ||
| 1376 | the nodes in a file to form a connected structure. In fact, this file | ||
| 1377 | has two connected components. You are in one of them, which is under | ||
| 1378 | the node @samp{Top}; the other contains the node @samp{Help} which the | ||
| 1379 | @kbd{h} command goes to. In fact, since there is no garbage | ||
| 1380 | collector on the node graph, nothing terrible happens if a substructure | ||
| 1381 | is not pointed to, but such a substructure is rather useless since nobody | ||
| 1382 | can ever find out that it exists. | ||
| 1383 | |||
| 1384 | @node Cross-refs | ||
| 1385 | @section Creating Cross References | ||
| 1386 | |||
| 1387 | @cindex cross reference format | ||
| 1388 | A cross reference can be placed anywhere in the text, unlike a menu | ||
| 1389 | item which must go at the front of a line. A cross reference looks | ||
| 1390 | like a menu item except that it has @samp{*note} instead of @samp{*}. | ||
| 1391 | It @emph{cannot} be terminated by a @samp{)}, because @samp{)}'s are | ||
| 1392 | so often part of node names. If you wish to enclose a cross reference | ||
| 1393 | in parentheses, terminate it with a period first. Here are two | ||
| 1394 | examples of cross references pointers: | ||
| 1395 | |||
| 1396 | @example | ||
| 1397 | *Note details: commands. (See *note 3: Full Proof.) | ||
| 1398 | @end example | ||
| 1399 | |||
| 1400 | @noindent | ||
| 1401 | @emph{These are just examples.} The places they ``lead to'' do not | ||
| 1402 | really exist! | ||
| 1403 | |||
| 1404 | @menu | ||
| 1405 | * Help-Cross:: Target of a cross-reference. | ||
| 1406 | @end menu | ||
| 1407 | |||
| 1408 | |||
| 1409 | @node Help-Cross | ||
| 1410 | @subsection The node reached by the cross reference in Info | ||
| 1411 | |||
| 1412 | This is the node reached by the cross reference named @samp{Cross}. | ||
| 1413 | |||
| 1414 | While this node is specifically intended to be reached by a cross | ||
| 1415 | reference, most cross references lead to nodes that ``belong'' | ||
| 1416 | someplace else far away in the structure of an Info document. So you | ||
| 1417 | cannot expect this node to have a @samp{Next}, @samp{Previous} or | ||
| 1418 | @samp{Up} links pointing back to where you came from. In general, the | ||
| 1419 | @kbd{l} (el) command is the only way to get back there. | ||
| 1420 | |||
| 1421 | @format | ||
| 1422 | >> Type @kbd{l} to return to the node where the cross reference was. | ||
| 1423 | @end format | ||
| 1424 | |||
| 1425 | @node Tags | ||
| 1426 | @section Tags Tables for Info Files | ||
| 1427 | |||
| 1428 | @cindex tags tables in Info files | ||
| 1429 | You can speed up the access to nodes of a large Info file by giving | ||
| 1430 | it a tags table. Unlike the tags table for a program, the tags table for | ||
| 1431 | an Info file lives inside the file itself and is used | ||
| 1432 | automatically whenever Info reads in the file. | ||
| 1433 | |||
| 1434 | @findex Info-tagify | ||
| 1435 | To make a tags table, go to a node in the file using Emacs Info mode and type | ||
| 1436 | @kbd{M-x Info-tagify}. Then you must use @kbd{C-x C-s} to save the | ||
| 1437 | file. Info files produced by the @code{makeinfo} command that is part | ||
| 1438 | of the Texinfo package always have tags tables to begin with. | ||
| 1439 | |||
| 1440 | @cindex stale tags tables | ||
| 1441 | @cindex update Info tags table | ||
| 1442 | Once the Info file has a tags table, you must make certain it is up | ||
| 1443 | to date. If you edit an Info file directly (as opposed to editing its | ||
| 1444 | Texinfo source), and, as a result of deletion of text, any node moves back | ||
| 1445 | more than a thousand characters in the file from the position | ||
| 1446 | recorded in the tags table, Info will no longer be able to find that | ||
| 1447 | node. To update the tags table, use the @code{Info-tagify} command | ||
| 1448 | again. | ||
| 1449 | |||
| 1450 | An Info file tags table appears at the end of the file and looks like | ||
| 1451 | this: | ||
| 1452 | |||
| 1453 | @example | ||
| 1454 | ^_^L | ||
| 1455 | Tag Table: | ||
| 1456 | File: info, Node: Cross-refs^?21419 | ||
| 1457 | File: info, Node: Tags^?22145 | ||
| 1458 | ^_ | ||
| 1459 | End Tag Table | ||
| 1460 | @end example | ||
| 1461 | |||
| 1462 | @noindent | ||
| 1463 | Note that it contains one line per node, and this line contains | ||
| 1464 | the beginning of the node's header (ending just after the node name), | ||
| 1465 | a @samp{DEL} character, and the character position in the file of the | ||
| 1466 | beginning of the node. | ||
| 1467 | |||
| 1468 | @node Checking | ||
| 1469 | @section Checking an Info File | ||
| 1470 | |||
| 1471 | When creating an Info file, it is easy to forget the name of a node when | ||
| 1472 | you are making a pointer to it from another node. If you put in the | ||
| 1473 | wrong name for a node, this is not detected until someone tries to go | ||
| 1474 | through the pointer using Info. Verification of the Info file is an | ||
| 1475 | automatic process which checks all pointers to nodes and reports any | ||
| 1476 | pointers which are invalid. Every @samp{Next}, @samp{Previous}, and | ||
| 1477 | @samp{Up} is checked, as is every menu item and every cross reference. In | ||
| 1478 | addition, any @samp{Next} which does not have a @samp{Previous} pointing | ||
| 1479 | back is reported. Only pointers within the file are checked, because | ||
| 1480 | checking pointers to other files would be terribly slow. But those are | ||
| 1481 | usually few. | ||
| 1482 | |||
| 1483 | @findex Info-validate | ||
| 1484 | To check an Info file, do @kbd{M-x Info-validate} while looking at any | ||
| 1485 | node of the file with Emacs Info mode. | ||
| 1486 | |||
| 1487 | @node GNU Free Documentation License | 1259 | @node GNU Free Documentation License |
| 1488 | @appendix GNU Free Documentation License | 1260 | @appendix GNU Free Documentation License |
| 1489 | @include doclicense.texi | 1261 | @include doclicense.texi |