MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

UserTag [dropcaps]



This is a usertag for creating drop-capitals. Does the docs project also include a central repository for UserTags and GlobalSubs?

-August

# dropcaps
#
# Generates HTML formatted drop-capitals from a string
#
# Usage:
# [dropcaps]Any string[/dropcaps]

UserTag dropcaps HasEndTag 1
UserTag dropcaps Interpolate 1
UserTag dropcaps Routine <<EOF
sub {
        my $message = shift();
        my $message_caps = $message;
        my @message_caps;
        my $character;
        my $out;

        $message_caps =~ tr/a-z/A-Z/;
        @message_caps = split //, $message_caps;

        $out = "\<FONT SIZE\=\"\+1\"\>";
        $out .= shift(@message_caps);
        $out .= "\<\/FONT\>";

        while (@message_caps) { 
          $character = shift(@message_caps);
          $out .= $character; 
          if ($character eq " ") {
             $out .= "\<FONT SIZE\=\"\+1\"\>";
             $out .= shift(@message_caps);
             $out .= "\<\/FONT\>";
          }
        }

        return $out;
}
EOF



Search for: Match: Format: Sort by: