Doku-Base
Texi2html Linux Dokumentation
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.9 Formatting (or not) a paragraph and a preformatted region


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

7.9.1 Paragraph and preformatted region formatting

The formatting of a paragraph region or a preformatted region, is controlled by function references:

Function Reference: $paragraph_text paragraph $text $alignement $index $formatting_command $formatting_command_formatted \$paragraph_number $format $item_number $enumerate_style $number $command_stack_at_end $command_stack_at_begin

This function formats a paragraph. $text is the text of the paragraph, $alignement is the empty string when no alignement command has been seen, otherwise it is the current alignement command name. See section Commands used for centering and flushing of text. $indent holds ‘noindent’ or ‘indent’ if the corresponding @-command appeared in the paragraph. $command_stack_at_end and $command_stack_at_begin are arrays containing the opened @-commands at end and at beginning of the paragraph, latest on top.

The remaining arguments are usefull when the paragraph appears within a list or table. It is usefull whenever the paragraph has to be formatted differently when appearing in such environments. Moreover in that case the format command (@itemize…) may have an associated formatting command. $formatting_command is this formatting command (like @minus). $formatting_command_formatted is the command formatted in html in case the formatting command is a leading command (like @minus) which should be leading the first paragraph. \$paragraph_number is a reference on the number of paragraphs in that format command. The corresponding variable should be increased when a paragraph is added. $format is the format command. See section Formatting individual table and list items.

If the $format is an enumerate, $item_number is the number of the item in the list, $enumerate_style is the argument of the enumerate, $number is the number or letter corresponding with this item.

Function Reference: $preformatted_text preformatted $text $style $region_name $formatting_command $formatting_command_formatted \$preformatted_number $format $item_number $enumerate_style $number $command_stack_at_end $command_stack_at_begin

This function formats a preformatted region. $text is the text of the preformatted region, $style is the css style associated with that preformatted region (see section Customizing the texi2html css lines). $region_name is the name of the command opening the preformatted region (example…, see Formatting of complex formats (@example, @display…)) or a identifier for the preformatted context (for example menu-comment, see Menu formatting). The alignment commands are not taken into account, as the spaces are preserved in preformatted regions, you should flush and center by hand. $command_stack_at_end and $command_stack_at_begin are arrays containing the opened @-commands at end and at beginning of the preformatted region, latest on top.

The remaining arguments are usefull when the preformatted region appears within a list or table. It is usefull whenever the preformatted region has to be formatted differently when appearing in such environments. Moreover in that case the format command (@itemize…) may have an associated formatting command. $formatting_command is this formatting command (like @minus). $formatting_command_formatted is the command formatted in html in case the formatting command is a leading command (like @minus) which should be leading the first preformatted region. \$preformatted_number is a reference on the number of preformatted regions in that format command. The corresponding variable should be increased when a preformatted region is added. $format is the format command. See section Formatting individual table and list items.

If the $format is an enumerate, $item_number is the number of the item in the list, $enumerate_style is the argument of the enumerate, $number is the number or letter corresponding with this item.


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

7.9.2 Avoiding paragraphs in formats

It is possible to avoid that a format closes the previous paragraph or preformatted region and reopens one, by putting the format command in a hash, %format_in_paragraph with a true value.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]


Doku-Base

This document was created by Netzdino using texi2html.