Next: Node Line Requirements, Previous: Node Names, Up: Nodes [Contents][Index]
@node
LineThe easiest way to write an @node
line is to write @node
at the beginning of a line and then the name of the node, like this:
@node node-name
After you have inserted an @node
line, you should immediately
write an @-command for the chapter or section and insert its name.
Next (and this is important!), put in several index entries. Usually,
you will find at least two and often as many as four or five ways of
referring to the node in the index. Use them all. This will make it
much easier for people to find the node.
If you wish, you can ignore @node
lines altogether in your
first draft and then use the texinfo-insert-node-lines
command
to create @node
lines for you. However, we do not recommend
this practice. It is better to name the node itself at the same time
that you write a segment so you can easily make cross-references.
Useful cross-references are an especially important feature of a good
Texinfo manual.
Even when you explicitly specify all pointers, you cannot write the nodes in the Texinfo source file in an arbitrary order! Because formatters must process the file sequentially, irrespective of node pointers, you must write the nodes in the order you wish them to appear in the output. For Info format one can imagine that the order may not matter, but it matters for the other formats.
You may optionally follow the node name argument to @node
with up to three optional arguments on the rest of the same line,
separating the arguments with commas. These are the names of the
‘Next’, ‘Previous’, and ‘Up’ pointers, in that order. We recommend
omitting them if your Texinfo document is hierarchically organized,
as virtually all are (see makeinfo
Pointer Creation).
Any spaces before or after each name on the @node
line are
ignored.
The template for a fully-written-out node line with ‘Next’, ‘Previous’, and ‘Up’ pointers looks like this:
@node node-name, next, previous, up
The node-name argument must be present, but the others are
optional. If you wish to specify some but not others, just insert
commas as needed, as in: ‘@node mynode,,,uppernode’. However,
we recommend leaving off all the pointers and letting makeinfo
determine them.
If you are using GNU Emacs, you can use the update node commands
provided by Texinfo mode to insert the names of the pointers; or
(recommended), you can leave the pointers out of the Texinfo file and
let makeinfo
insert node pointers into the Info file it
creates. (See Texinfo Mode, and makeinfo
Pointer Creation.)
Alternatively, you can insert the ‘Next’, ‘Previous’, and ‘Up’ pointers yourself. If you do this, you may find it helpful to use the Texinfo mode keyboard command C-c C-c n. This command inserts ‘@node’ and a comment line listing the names of the pointers in their proper order. The comment line helps you keep track of which arguments are for which pointers. This comment line is especially useful if you are not familiar with Texinfo.
Next: Node Line Requirements, Previous: Node Names, Up: Nodes [Contents][Index]