Node: Add, Next: , Previous: Info Search, Up: Expert Info



Adding a new node to Info

To add a new topic to the list in the Info directory, you must:

  1. Create some nodes, in some file, to document that topic.
  2. Put that topic in the menu in the directory. See Menu.

Usually, the way to create the nodes is with Texinfo (see Overview of Texinfo); this has the advantage that you can also make a printed manual or HTML from them. You would use the @dircategory and @direntry commands to put the manual into the Info directory. However, if you want to edit an Info file manually and install it manually, here is how.

The new node can live in an existing documentation file, or in a new one. It must have a ^_ character before it (invisible to the user; this node has one but you cannot see it), and it ends with either a ^_, a ^L ("formfeed"), or the end of file.1

The ^_ starting a node must be followed by a newline or a ^L newline, after which comes the node's header line. The header line must give the node's name (by which Info finds it), and state the names of the Next, Previous, and Up nodes (if there are any). As you can see, this node's Up node is the node Expert Info. The Next node is Menus.

The keywords Node, Next, Previous, and Up may appear in any order, anywhere in the header line, but the recommended order is the one in this sentence. Each keyword must be followed by a colon, spaces and tabs, and then the appropriate name. The name may be terminated with a tab, a comma, or a newline. A space does not end it; node names may contain spaces. The case of letters in the names is insignificant.

A node name has two forms. A node in the current file is named by what appears after the Node: in that node's first line. For example, this node's name is Add. A node in another file is named by (filename)node-within-file, as in (info)Add for this node. If the file name starts with "./", then it is relative to the current directory; otherwise, it is relative starting from the standard directory for Info files of your site. The name (filename)Top can be abbreviated to just (filename). By convention, the name Top is used for the "highest" node in any single file--the node whose Up points out of the file. The Directory node is (dir), it points to a file dir which holds a large menu listing all the Info documents installed on your site. The Top node of a document file listed in the Directory should have an Up: (dir) in it.

The node name * is special: it refers to the entire file. Thus, g* shows you the whole current file. The use of the node * is to make it possible to make old-fashioned, unstructured files into nodes of the tree.

The Node: name, in which a node states its own name, must not contain a file name, since when Info searches for a node, it does not expect a file name to be there. The Next, Previous and Up names may contain them. In this node, since the Up node is in the same file, it was not necessary to use one.

Note that the nodes in this file have a file name in the header line. The file names are ignored by Info, but they serve as comments to help identify the node for the user.


Footnotes

  1. If you put in a ^L to end a new node, be sure that there is a ^_ after it to start the next one, since ^L cannot start a node. Also, a nicer way to make a node boundary be a page boundary as well is to put a ^L right after the ^_.