<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">### File: html3.0.pl
### Language definitions for HTML 3.0
### Written by Marcus E. Hennecke &lt;marcush@leland.stanford.edu&gt;
### Version 0.4,  February 2, 1996

## Copyright (C) 1995 by Marcus E. Hennecke
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

### Extend declarations
%declarations = (
#     'tiny', '&lt;SMALL CLASS="TINY"&gt;&lt;/SMALL&gt;',
#     'scriptsize', '&lt;SMALL CLASS="SCRIPT"&gt;&lt;/SMALL&gt;',
#     'footnotesize', '&lt;SMALL CLASS="FOOTNOTE"&gt;&lt;/SMALL&gt;',
#     'small', '&lt;SMALL CLASS="SMALL"&gt;&lt;/SMALL&gt;',
#     'large', '&lt;BIG CLASS="LARGE"&gt;&lt;/BIG&gt;',
#     'Large', '&lt;BIG CLASS="XLARGE"&gt;&lt;/BIG&gt;',
#     'LARGE', '&lt;BIG CLASS="XXLARGE"&gt;&lt;/BIG&gt;',
#     'huge', '&lt;BIG CLASS="HUGE"&gt;&lt;/BIG&gt;',
#     'Huge', '&lt;BIG CLASS="XHUGE"&gt;&lt;/BIG&gt;',
     'centering', '&lt;DIV ALIGN="CENTER"&gt;&lt;/DIV&gt;',
     'center', '&lt;DIV ALIGN="CENTER"&gt;&lt;/DIV&gt;',
     'flushleft', '&lt;DIV ALIGN="LEFT"&gt;&lt;/DIV&gt;',
     'raggedright', '&lt;DIV ALIGN="LEFT"&gt;&lt;/DIV&gt;',
     'flushright', '&lt;DIV ALIGN="RIGHT"&gt;&lt;/DIV&gt;',
     'raggedleft', '&lt;DIV ALIGN="RIGHT"&gt;&lt;/DIV&gt;',
     %declarations
);

sub do_cmd_underline {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    &amp;lost_argument("underline") unless ($&amp;);
    join('',"&lt;U&gt;$2&lt;/U&gt;",$_); 
}

### Allow for alignment to work

sub do_env_center {
    local($_) = @_;
    "&lt;DIV ALIGN=\"CENTER\"&gt;\n&lt;P ALIGN=\"CENTER\"&gt;$_&lt;/P&gt;\n&lt;/DIV&gt;";
}
sub do_env_flushright {
    local($_) = @_;
    "&lt;DIV ALIGN=\"RIGHT\"&gt;\n&lt;P ALIGN=\"RIGHT\"&gt;$_&lt;/P&gt;\n&lt;/DIV&gt;";
}
sub do_env_flushleft {
    local($_) = @_;
    "&lt;DIV ALIGN=\"LEFT\"&gt;\n&lt;P ALIGN=\"LEFT\"&gt;$_&lt;/P&gt;\n&lt;/DIV&gt;";
}

sub do_cmd_centerline {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    &amp;lost_argument("centerline") unless ($&amp;);
    "&lt;DIV ALIGN=\"CENTER\"&gt;$&amp;&lt;BR&gt;\n&lt;/DIV&gt;$_";
}

sub do_cmd_leftline {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    &amp;lost_argument("leftline") unless ($&amp;);
    "&lt;DIV ALIGN=\"LEFT\"&gt;$&amp;&lt;BR&gt;\n&lt;/DIV&gt;$_";
}

sub do_cmd_rightline {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    &amp;lost_argument("rightline") unless ($&amp;);
    "&lt;DIV ALIGN=\"RIGHT\"&gt;$&amp;&lt;BR&gt;\n&lt;/DIV&gt;$_";
}

</pre></body></html>