Info Node: (texinfo)Writing a Node

CFHT HOME texinfo: Writing a Node


up: @node next: Node Line Requirements prev: Node Names Back to Software Index

6.1.2 Writing an '@node' Line
-----------------------------

The easiest and preferred 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

  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.
(Note: Texinfo Mode, and Note: 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.

  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, as
described above.

  It's, 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.

  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.

  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.


automatically generated by info2www version 1.2