Next: @xref
, Previous: Different Cross-reference Commands, Up: Cross-references [Contents][Index]
A cross-reference command requires only one argument, which is the name of the node to which it refers. Here is a simple example:
@xref{Node name}.
In Info output, this produces
*Note Node name::.
In a printed manual, the output is
See Section nnn [Node name], page ppp.
A cross-reference command may contain up to four additional arguments. By using these arguments, you can provide a cross-reference name, a topic description or section title for the printed output, the name of a different manual file, and the name of a different printed manual. To refer to another manual as a whole, the manual file and/or the name of the printed manual are the only required arguments (see Referring to a Manual as a Whole).
Here is an example of a full five-part cross-reference:
@xref{Node name, Online Label, Printed Label, info-file-name, A Printed Manual}, for details.
which produces
*Note Online Label: (info-file-name)Node name, for details.
in Info and
See section “Printed Label” in A Printed Manual, for details.
in a printed book.
The five possible arguments for a cross-reference are:
@node
to define the node (see Writing a @node
Line), or
@anchor
(see @anchor
: Defining Arbitrary Cross-reference Targets).
Write a node name in a cross-reference in exactly the same way as in
the @node
line, including the same capitalization; otherwise, the
formatters may not find the reference.
The template for a full five argument cross-reference looks like this:
@xref{node-name, online-label, printed-label, info-file-name, printed-manual-title}
Whitespace before and after the commas separating these arguments is
ignored. To include a comma in one of the arguments, use
@comma{}
(see Inserting ‘,’ with @comma{}
).
When processing with TeX, a comma is automatically inserted after the page number for cross-references to within the same manual, unless the closing brace of the argument is followed by non-whitespace (such as a comma or period). This gives you the choice of whether to have a comma there in Info or HTML output. For example,
@xref{Another Section} for more information
produces ‘See Another Section, page ppp, for more information’ in the printed output, and ‘*Note Another Section:: for more information’ in the Info output.
If an unwanted comma is added, follow the argument with a command such as ‘@:’. For example, ‘@xref{Hurricanes}@: --- for the details’ produces
See Hurricanes, page ppp — for the details
instead of ‘See Hurricanes, page ppp, — for the details’.
Cross-references with one, two, three, four, and five arguments are
described separately following the description of @xref
.
makeinfo
warns when the text of a cross-reference (and node
names and menu items) contains a problematic construct that will
interfere with its parsing in Info. If you don’t want to see the
warnings, you can set the customization variable
INFO_SPECIAL_CHARS_WARNING
to ‘0’ (see Other Customization Variables).
Next: @xref
, Previous: Different Cross-reference Commands, Up: Cross-references [Contents][Index]