[Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.80,1.81
Fred L. Drake
python-dev@python.org
Wed, 30 Aug 2000 23:22:56 -0700
Update of /cvsroot/python/python/dist/src/Doc/perl
In directory slayer.i.sourceforge.net:/tmp/cvs-serv22765/perl
Modified Files:
python.perl
Log Message:
Push some table header formatting to the style sheet; this also helps
separate some of the ties between l2hinit.perl and python.perl.
Revamp the "title page" construction to allow more flexibility.
Index: python.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -r1.80 -r1.81
*** python.perl 2000/08/11 20:04:19 1.80
--- python.perl 2000/08/31 06:22:54 1.81
***************
*** 933,938 ****
@col_aligns = ('<td>', '<td>', '<td>', '<td>');
- $TABLE_HEADER_BGCOLOR = $NAV_BGCOLOR;
-
sub fix_font{
# do a little magic on a font name to get the right behavior in the first
--- 933,936 ----
***************
*** 1011,1015 ****
return '<table border align="center" style="border-collapse: collapse">'
. "\n <thead>"
! . "\n <tr$TABLE_HEADER_BGCOLOR>"
. "\n $th1<b>$h1</b>\ </th>"
. "\n $th2<b>$h2</b>\ </th>"
--- 1009,1013 ----
return '<table border align="center" style="border-collapse: collapse">'
. "\n <thead>"
! . "\n <tr class=\"tableheader\">"
. "\n $th1<b>$h1</b>\ </th>"
. "\n $th2<b>$h2</b>\ </th>"
***************
*** 1136,1145 ****
}
! sub do_cmd_maketitle {
! local($_) = @_;
! my $the_title = "\n<div class='titlepage'><center>";
if ($t_title) {
$the_title .= "\n<h1>$t_title</h1>";
! } else { write_warnings("\nThis document has no title."); }
if ($t_author) {
if ($t_authorURL) {
--- 1134,1164 ----
}
!
! # These can be used to control the title page appearance;
! # they need a little bit of documentation.
! #
! # If $TITLE_PAGE_GRAPHIC is set, it should be the name of a file in the
! # $ICONSERVER directory, or include path information (other than "./"). The
! # default image type will be assumed if an extension is not provided.
! #
! # If specified, the "title page" will contain two colums: one containing the
! # title/author/etc., and the other containing the graphic. Use the other
! # four variables listed here to control specific details of the layout; all
! # are optional.
! #
! # $TITLE_PAGE_GRAPHIC = "my-company-logo";
! # $TITLE_PAGE_GRAPHIC_COLWIDTH = "30%";
! # $TITLE_PAGE_GRAPHIC_WIDTH = 150;
! # $TITLE_PAGE_GRAPHIC_HEIGHT = 150;
! # $TITLE_PAGE_GRAPHIC_ON_RIGHT = 0;
!
! sub make_my_titlepage() {
! my $the_title = "";
if ($t_title) {
$the_title .= "\n<h1>$t_title</h1>";
! }
! else {
! write_warnings("\nThis document has no title.");
! }
if ($t_author) {
if ($t_authorURL) {
***************
*** 1148,1173 ****
"<b><font size='+2'>$t_author</font></b>");
$the_title .= "\n<p>$href</p>";
! } else {
$the_title .= ("\n<p><b><font size='+2'>$t_author</font></b></p>");
}
! } else { write_warnings("\nThere is no author for this document."); }
if ($t_institute) {
! $the_title .= "\n<p>$t_institute</p>";}
if ($DEVELOPER_ADDRESS) {
! $the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";}
if ($t_affil) {
! $the_title .= "\n<p><i>$t_affil</i></p>";}
if ($t_date) {
$the_title .= "\n<p><strong>$t_date</strong>";
if ($PYTHON_VERSION) {
! $the_title .= "<br><strong>Release $PYTHON_VERSION</strong>";}
$the_title .= "</p>"
}
if ($t_address) {
$the_title .= "\n<p>$t_address</p>";
! } else { $the_title .= "\n<p>"}
if ($t_email) {
$the_title .= "\n<p>$t_email</p>";
! }# else { $the_title .= "</p>" }
$the_title .= "\n</center></div>";
return $the_title . $_ ;
--- 1167,1255 ----
"<b><font size='+2'>$t_author</font></b>");
$the_title .= "\n<p>$href</p>";
! }
! else {
$the_title .= ("\n<p><b><font size='+2'>$t_author</font></b></p>");
}
! }
! else {
! write_warnings("\nThere is no author for this document.");
! }
if ($t_institute) {
! $the_title .= "\n<p>$t_institute</p>";
! }
if ($DEVELOPER_ADDRESS) {
! $the_title .= "\n<p>$DEVELOPER_ADDRESS</p>";
! }
if ($t_affil) {
! $the_title .= "\n<p><i>$t_affil</i></p>";
! }
if ($t_date) {
$the_title .= "\n<p><strong>$t_date</strong>";
if ($PYTHON_VERSION) {
! $the_title .= "<br><strong>Release $PYTHON_VERSION</strong>";
! }
$the_title .= "</p>"
}
if ($t_address) {
$the_title .= "\n<p>$t_address</p>";
! }
! else {
! $the_title .= "\n<p>";
! }
if ($t_email) {
$the_title .= "\n<p>$t_email</p>";
! }
! return $the_title;
! }
!
! use File::Basename;
!
! sub make_my_titlegraphic() {
! my($myname, $mydir, $myext) = fileparse($TITLE_PAGE_GRAPHIC, '\..*');
! chop $mydir;
! if ($mydir eq '.') {
! $mydir = $ICONSERVER;
! }
! $myext = ".$IMAGE_TYPE"
! unless $myext;
! my $graphic = "<td class=\"titlegraphic\"";
! $graphic .= " width=\"$TITLE_PAGE_GRAPHIC_COLWIDTH\""
! if ($TITLE_PAGE_GRAPHIC_COLWIDTH);
! $graphic .= "><img";
! $graphic .= " width=\"$TITLE_PAGE_GRAPHIC_WIDTH\""
! if ($TITLE_PAGE_GRAPHIC_WIDTH);
! $graphic .= " height=\"$TITLE_PAGE_GRAPHIC_HEIGHT\""
! if ($TITLE_PAGE_GRAPHIC_HEIGHT);
! $graphic .= "\n src=\"$mydir/$myname$myext\"></td>\n";
! return $graphic;
! }
!
! sub do_cmd_maketitle {
! local($_) = @_;
! my $the_title = "\n<div class=\"titlepage\">";
! if ($TITLE_PAGE_GRAPHIC) {
! if ($TITLE_PAGE_GRAPHIC_ON_RIGHT) {
! $the_title .= ("\n<table border=\"0\" width=\"100%\">"
! . "<tr align=\"right\">\n<td>"
! . make_my_titlepage()
! . "</td>\n"
! . make_my_titlegraphic()
! . "</tr>\n</table>");
! }
! else {
! $the_title .= ("\n<table border=\"0\" width=\"100%\"><tr>\n"
! . make_my_titlegraphic()
! . "<td>"
! . make_my_titlepage()
! . "</td></tr>\n</table>");
! }
! }
! else {
! $the_title .= ("\n<center>"
! . make_my_titlepage()
! . "\n</center>");
! }
! $the_title .= "\n</div>";
! return $the_title . $_;
$the_title .= "\n</center></div>";
return $the_title . $_ ;