[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1 Indicating Definitions, Commands, etc.

Texinfo has commands for indicating just what kind of object a piece of text refers to. For example, metasyntactic variables are marked by @var, and code by @code. Since the pieces of text are labelled by commands that tell what kind of object they are, it is easy to change the way the Texinfo formatters prepare such text. (Texinfo is an intentional formatting language rather than a typesetting formatting language.)

For example, in a printed manual, code is usually illustrated in a typewriter font; @code tells TeX to typeset this text in this font. But it would be easy to change the way TeX highlights code to use another font, and this change would not affect how keystroke examples are highlighted. If straight typesetting commands were used in the body of the file and you wanted to make a change, you would need to check every single occurrence to make sure that you were changing code and not something else that should not be changed.

Highlighting Commands are Useful

The highlighting commands can be used to extract useful information from the file, such as lists of functions or file names. It is possible, for example, to write a program in Emacs Lisp (or a keyboard macro) to insert an index entry after every paragraph that contains words or phrases marked by a specified command. You could do this to construct an index of functions if you had not already made the entries.

The commands serve a variety of purposes:

@code{sample-code}

Indicate text that is a literal example of a piece of a program.

@kbd{keyboard-characters}

Indicate keyboard input.

@key{key-name}

Indicate the conventional name for a key on a keyboard.

@samp{text}

Indicate text that is a literal example of a sequence of characters.

@var{metasyntactic-variable}

Indicate a metasyntactic variable.

@env{environment-variable}

Indicate an environment variable.

@file{file-name}

Indicate the name of a file.

@command{command-name}

Indicate the name of a command.

@option{option}

Indicate a command-line option.

@dfn{term}

Indicate the introductory or defining use of a term.

@cite{reference}

Indicate the name of a book.

@acronym{acronym}

Indicate an acronym.

@url{uniform-resource-locator}

Indicate a uniform resource locator for the World Wide Web.

@email{email-address[, displayed-text]}

Indicate an electronic mail address.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on a sunny day using texi2html.