[l2h] Customising the appearance of web pages created with l2h
Fred L. Drake, Jr.
fdrake@acm.org
Mon, 24 Sep 2001 16:54:45 -0400
Paul Lussier writes:
> I'm trying to convert a large document created with LyX to a
> web-based document with l2h. All the documents our group creates has
> a relatively standard look and feel which I'm trying to maintain with
> this document.
>
> What I need to do is relatively simple:
>
> 1. set the background color of the page
> 2. set the link and vlink colors
These are best done in the style sheet these days. What I do for
the Python documentation is to copy in our style sheet after
latex2html is done. Make sure you set $BODYTEXT to '' so nothing set
up from the configuration script pollutes the HTML pages with style
information, though!
> 3. create a 1-row x 3 column table at the top of every
> node which contains our Company and group logos (lef/right)
> and the document title (centered).
Using a little Perl for this is reasonably easy. Define a new sub,
top_navigation_panel(), and generate the table there. To get both
your table and the navigation panel that latex2html generates now, use
the navigation_panel() function:
--------------------------------------------------------------------------
$MY_HEADER = <<__EOF__
<table BORDER=0 WIDTH="100%">
<tr>
<td ALIGN=LEFT WIDTH="33%">
<img SRC="images/logo.gif" WIDTH=167 HEIGHT=66>
</td>
<td WIDTH="34%" ALIGN=CENTER>
<h1>System Administration Homepage</h1>
</td>
<td ALIGN=RIGHT WIDTH="33%">
<img SRC="images/sys_admin.gif" ALT="sysadmin logo" WIDTH=169 height=69>
</td>
</tr>
</table>
<hr>
__EOF__
sub top_navigation_panel {
return $MY_HEADER . navigation_panel();
}
--------------------------------------------------------------------------
> Does anyone have any ideas how l2h could help? I get the impression
> that it can, I just can't figure out how.
It can do a lot if you are willing to feed it a little code. Or a
lot of code. It can be a hungry beast...
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation