[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
• Useful Highlighting | Highlighting provides useful information. | |
9.1.1 @code {sample-code} | Indicating program code. | |
9.1.2 @kbd {keyboard-characters} | Showing keyboard input. | |
9.1.3 @key {key-name} | Specifying keys. | |
9.1.4 @samp {text} | A literal sequence of characters. | |
9.1.5 @verb {<char>text<char>} | A verbatim sequence of characters. | |
9.1.6 @var {metasyntactic-variable} | Indicating metasyntactic variables. | |
9.1.7 @env {environment-variable} | Indicating environment variables. | |
9.1.8 @file {file-name} | Indicating file names. | |
9.1.9 @command {command-name} | Indicating command names. | |
9.1.10 @option {option-name} | Indicating option names. | |
9.1.11 @dfn {term} | Specifying definitions. | |
9.1.12 @cite {reference} | Referring to books not in the Info system. | |
9.1.13 @acronym {acronym} | Indicating acronyms. | |
9.1.14 @url {uniform-resource-locator} | Indicating a World Wide Web reference. | |
9.1.15 @email {email-address[, displayed-text]} | Indicating an electronic mail address. |
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 texi2any.