3408 |
@section Bypassing normal formatting |
@section Bypassing normal formatting |
3409 |
|
|
3410 |
It is possible to bypass completely the normal formatting of @@-commands |
It is possible to bypass completely the normal formatting of @@-commands |
3411 |
with braces. In that case the @@-commands and the text within |
with braces and raw regions |
3412 |
|
(@code{@@html}, @code{@@tex}, @code{@@xml}@dots{} regions). |
3413 |
|
In that case the @@-commands and the text within |
3414 |
are passed to a user defined function early, in a pass when no expansion |
are passed to a user defined function early, in a pass when no expansion |
3415 |
of output takes place, called the collecting pass. Another user defined |
of output takes place, called the collecting pass. Another user defined |
3416 |
function is called during the output expansion phase. |
function is called during the output expansion phase. |
3429 |
a hash used to specify the user defined function references. |
a hash used to specify the user defined function references. |
3430 |
The key of the hash reference are @code{'init'} for the function |
The key of the hash reference are @code{'init'} for the function |
3431 |
reference called during the collecting pass, and @code{'expand'} |
reference called during the collecting pass, and @code{'expand'} |
3432 |
during the expansion pass. Here is an example: |
during the expansion pass. Here is an example for an @@-command with |
3433 |
|
braces: |
3434 |
|
|
3435 |
@example |
@example |
3436 |
$command_handler@{'math'@} = |
$command_handler@{'math'@} = |
3437 |
@{ 'init' => \&Texi2HTML::LaTeX2HTML::to_latex, |
@{ 'init' => \&Texi2HTML::LaTeX2HTML::to_latex, |
3438 |
'expand' => \&Texi2HTML::LaTeX2HTML::do_tex |
'expand' => \&Texi2HTML::LaTeX2HTML::do_tex |
3439 |
@}; |
@}; |
3440 |
|
@end example |
3441 |
|
|
3442 |
|
And an example for a raw region @@-command: |
3443 |
|
|
3444 |
|
@example |
3445 |
|
$command_handler@{'tex'@} = |
3446 |
|
@{ 'init' => \&Texi2HTML::LaTeX2HTML::to_latex, |
3447 |
|
'expand' => \&Texi2HTML::LaTeX2HTML::do_tex |
3448 |
|
@}; |
3449 |
@end example |
@end example |
3450 |
|
|
3451 |
The function references are called like: |
The function references are called like: |