PerlPoint-Converters

 view release on metacpan or  search on metacpan

pp2html  view on Meta::CPAN

  if ($_[2] eq "TABLE_HL") {  # TABLE Headline 
    if ( join("", @BUFFER) =~ /^\s*$/){
      $td_was_empty = 1;
    } else {
      $td_was_empty = 0;
    }
    flush;
    if ($_[1]==DIRECTIVE_START) {
      $table_column ++ ;  # column counter
      my $align = "";
      if (defined $TABLE_COLUMN_ALIGN[$table_column]  and
           $TABLE_COLUMN_ALIGN[$table_column]){
        $align = " " . tab_align($TABLE_COLUMN_ALIGN[$table_column]);
      }  
      push_page $page_ref, "<TD$table_hl_bgcolor><B>";
    } else {
      if ($td_was_empty) {
        push_page $page_ref, "\&nbsp;";
      }
      push_page $page_ref, "</B></TD>";
    }
    return;
  } # 

  if ($_[2] eq "TABLE_ROW") { # TABLE Row 
    flush;
    if ($_[1]==DIRECTIVE_START) {
      push_page $page_ref, "<TR>\n";
      $table_column = -1;  # column counter
    } else {
      push_page $page_ref, "</TR>\n";
      $table_hl_bgcolor="";
    }
    return;
  } # 

  if ($_[2] eq "TABLE_COL") { # TABLE Column 
    if ( join("", @BUFFER) =~ /^\s*$/){
      $td_was_empty = 1;
    } else {
      $td_was_empty = 0;
    }
    flush;
    if ($_[1]==DIRECTIVE_START) {
      $table_column ++ ;  # column counter
      my $align = "";
      if (defined $TABLE_COLUMN_ALIGN[$table_column]  and
           $TABLE_COLUMN_ALIGN[$table_column]){
        $align = " " . tab_align($TABLE_COLUMN_ALIGN[$table_column]);
      }  
      push_page $page_ref, "<TD$table_hl_bgcolor$align>";
    } else {
      if ($td_was_empty) {
        push_page $page_ref, "\&nbsp;";
      }
      push_page $page_ref, "</TD>";
    }
    return;
  } # 

  if ($_[2] eq "EMBED") { # embeded HTML 
    flush;
    if ($_[1]==DIRECTIVE_START) {
      if ( !defined $_[3]->{'lang'}) {
        pp_warn "*** ERROR: EMBED without 'lang' parameter\n";
      }
      elsif ($_[3]->{'lang'} =~ /HTML/i){
        $embedded_html = 1;
      }
    } else {
      $embedded_html = 0;
    }
    @BUFFER=();
    return;
  } # 

  if ($_[2] eq "INDEXRELATIONS") { # index relation based cross reference, first trial implementation, jstenzel 
    if ($_[1]==DIRECTIVE_START) {

     # get headline data
     my $data=$backend->headlineIds2Data([map {$_->[0]} @{$_[3]->{__data}}]);

     # write intro text, if necessary
     push_page($page_ref, "\n$_[3]->{intro}\n") if $_[3]->{intro};

     # make it into a list: open list
     push_page($page_ref, "\n\n",
               $_[3]->{format} eq 'numbers' ? '' : $_[3]->{format} eq 'enumerated' ? '<OL>': '<UL>',
               "\n"
               );

     # transform data into the format feed to LOCALTOC
     @$data=map {[@{$_}[3, 4]]} @$data;

     # fill list
     for (@$data){
             my $link = escapes($_->[1]);

             push_page($page_ref,
		     $_[3]->{format} eq 'numbers' ? "_INTERN_PAGE:".$link.":_END" : '  <li> ',
		     ' ', 
		     $_[3]->{type} eq 'linked' ? "_INTERN_SECTION:".$link.":_END" : $_->[1], # ste
		     $_[3]->{format} eq 'numbers' ? "<BR>" : '  </li> ',
		    ) 
           }

	   # close list
           push_page($page_ref, "\n",
		     $_[3]->{format} eq 'numbers' ? '' : $_[3]->{format} eq 'enumerated' ? '</OL>': '</UL>',
		     "\n\n"
		    );
          }

    return;
  } # 

  if ($_[2] eq 'LOCALTOC') { #  ste, ldo
     # act mode dependend - we only need to handle this once, there is no tag body
     if ($_[1]==DIRECTIVE_START)
       {
        # get local toc
        my $toc=$backend->toc(
                              $backend->currentChapterNr,
                              exists $_[3]->{depth} ? $_[3]->{depth} : 0,
                             );

pp2html  view on Meta::CPAN

to permitted operations. By this option you can declare which opcode (or opcode tag) is
permitted. Please see the B<Safe> and B<Opcode> manual pages for further details. (These modules
come with perl.)

Pass C<ALL> to allow I<everything>.

This option can be used multiply.

You may want to store these options in default option files, see below for details.


For the examples used in I<ppdoc.pp> you should use

 --safeOpcode=:filesys_open --safeOpcode=:still_to_be_decided --safeOpcode=:browse


=item --set=flag

This option allows you to pass certain settings - of your choice - to active contents
(like conditions) where it can be accessed via the $PerlPoint hash reference. For
example, your PerlPoint code could contain a condition like

  ? $PerlPoint->{userSettings}{special}

  Special part.

  ? 1

The special part enclosed by the two conditions would then be processed I<only> if you
call C<pp2html> with

  --set special

and if active contents was enabled by I<-active>, of course.

This option can be used multiply.

=item --trans_table=filename

The C<--trans_table> option specifies a the filename of a tanslation table
for non ASCII characters like german Umlaute etc. The characters are
specifed as octal numbers as in the folowing example:

  #Translation Table for German Umlaute (this is the default)

  \334 &Uuml;
  \374 &uuml;

  \326 &Ouml;
  \366 &ouml;

  \304 &Auml;
  \344 &auml;

  \337 &szlig;


=item --filter=regexp

This specifies a regular expression C<regexp> which should match
all allowed languages for EMBEDed code. The expression is evaluated
caseinsensitively.

Example: --filter="perl|html"

=item --nocopyright

suppresses the copyright message;

=item --noinfo

supresses runtime informations;

=item --nowarn

supresses warnings;

=item --quiet

a shortcut for "--nocopyright --noinfo --nowarn": all non critical runtime messages are suppressed;

=item --count_only

If this option is set, only a counter will indicate that slides are created. Otherwise 
for all slides the full header is printed while generating the slides.


=item --box_color=color

=item --boxtext_color=color

Set background and forground colors for block paragraphs


=item --bgcolor=color

=item --fgcolor=color

=item --idx_bgcolor=color

=item --idx_fgcolor=color

=item --toc_bgcolor=color

=item --toc_fgcolor=color

=item --top_bgcolor=color

=item --top_fgcolor=color

=item --bot_bgcolor=color

=item --bot_fgcolor=color

=item --linkcolor=color

=item --alinkcolor=color

=item --vlinkcolor=color

Set the background and foreground color for all HTML pages. The C<idx_> and C<toc_> options



( run in 0.758 second using v1.01-cache-2.11-cpan-71847e10f99 )