[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
19 Defining New Texinfo Commands
Texinfo provides several ways to define new commands (in all cases, it’s not recommended to try redefining existing commands):
-
A Texinfo macro allows you to define a new Texinfo command as any
sequence of text and/or existing commands (including other macros). The
macro can have any number of parameters—text you supply each
time you use the macro.
Incidentally, these macros have nothing to do with the
@defmac
command, which is for documenting macros in the subject area of the manual (see section The Template for a Definition). - ‘@alias’ is a convenient way to define a new name for an existing command.
- ‘@definfoenclose’ allows you to define new commands with customized output for all non-TeX output formats.
Most generally of all (not just for defining new commands), it is
possible to invoke any external macro processor and have Texinfo
recognize so-called #line
directives for error reporting.
If you want to do simple text substitution, @set
and
@value
is the simplest approach (see section Flags: @set
, @clear
, conditionals, and @value
).
19.1 Defining Macros | Defining and undefining new commands. | |
19.2 Invoking Macros | Using a macro, once you’ve defined it. | |
19.3 Macro Details and Caveats | Limitations of Texinfo macros. | |
19.4 ‘@alias new=existing’ | Command aliases. | |
19.5 @definfoenclose : Customized Highlighting | Customized highlighting. | |
19.6 External Macro Processors: Line Directives | #line directives.
|
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 2, 2013 using texi2html 5.0.