Date: Thu, 23 Sep 1999 06:10:39 +0100
From: David Halsted <halstedd@tcimet.net>
Subject: Re: 13.0204 perl script for browser problem
My guess is that the way to do this is to spit the rows out as individual
tables and put the anchors right above each line. Two advantages here: the
browser should start rendering more quickly, and the problems mentioned
below should be avoided. Something like this:
<a name="lineanchor"></a>
<table>
<tr>
<td width=[something]>line number><td<td>line</td>
<td colspan=2>moreinfo</td>
<td colspan=2>moreinfo</td>
<td colspan=2>moreinfo</td>
</tr>
</table>
I've used this trick before and know some others who have used it to deal
with large tables. The width setting on the first td cell should make them
line up . . . and to get an indent in the moreinfo lines you could use
another <td> with a couple of entites dropped into them . . .
Dave Halsted
----- Original Message -----
From: Humanist Discussion Group <humanist@kcl.ac.uk>
To: Humanist Discussion Group <humanist@lists.Princeton.EDU>
Sent: Wednesday, September 22, 1999 2:33 AM
> Humanist Discussion Group, Vol. 13, No. 204.
> Centre for Computing in the Humanities, King's College London
> <http://www.princeton.edu/~mccarty/humanist/>
> <http://www.kcl.ac.uk/humanities/cch/humanist/>
>
> Date: Wed, 22 Sep 1999 06:28:20 +0100
> From: Chuck Bearden <cbearden@rice.edu>
> Subject: Re: 13.0199 ideas on browser problem
>
> On Mon, 20 Sep 1999, Humanist Discussion Group wrote:
>
> > --[4]------------------------------------------------------------------
> > Date: Mon, 20 Sep 1999 21:12:37 +0100
> > From: Garvin Tate <gltate@d-a-c.com>
> > >
> [etc.]
> >
> > I looked at the source code for one of the right-hand frames. If I
> > understand the proposed problem, one possible remedy might be to move
> > the <a name="...."> tags outside the <td> tags. Also, the way the code
> > is marked up, anchors split across table columns -- not recommended.
>
> I wrote a small Perl script to un-split the anchor tags and move them
> all into the first table cell, around just the number:
>
> <tr><td valign="TOP"><a name="1.018">18</a></td><td><pre>obstabatque
aliis
> aliud quia corpore in uno</pre></td></tr>
>
> instead of
>
> <tr><td valign="TOP"><a name="1.018">18</td><td><pre>obstabatque aliis
> aliud qui a corpore in uno</a></pre></td></tr>
>
> I am appending the script to this message. It saves the original
> files by appending '.bak' to their names. Once this problem is fixed,
> and a DOCTYPE is added, your text pages should validate as HTML 4.0
> Transitional.
>
> > In other words, replace
> >
> > <tr><td valign="TOP"><a name="10.021">21</td><td><pre>Tartara,
descendi,
> > nec uti villosa colubris</a>
> >
> > with something like
> >
> > <tr><a name="10.021"></a><td valign="TOP">21</td><td><pre>Tartara,
> > descendi, nec uti villosa colubris
>
> I modified the script to do this as well, but it didn't remedy the
> problem with the Win/Netscape workstations I was able to test it on.
> In fact, putting the anchor tags between the <tr> and the <td> cause
> links like:
>
> <a
href="http://wlm.cc.kcl.ac.uk/onomasticon-sample/txt/met-01.htm#1.018">
>
> to stop working altogether: the page/frame just stays at the top of
> the page instead of jumping down to the anchor name.
>
> Chuck
> ======================================================================
> Chuck Bearden Electronic Resources Librarian Rice University
> cbearden@rice.edu 713.527.8101x3634 713.737.5859 (fax)
> ======================================================================
>
> ---------------Begin Script---------------
> #!/usr/bin/perl -wni.bak
>
> chomp;
> if (m|^(.*?<a name=".*?">\d+)(.*?)(</a>)(.*)$|) {
> print $1, $3, $2, $4, "\n";
> } else {
> print $_, "\n";
> }
>
>
>
>
>
> -------------------------------------------------------------------------
> Humanist Discussion Group
> Information at <http://www.kcl.ac.uk/humanities/cch/humanist/>
> <http://www.princeton.edu/~mccarty/humanist/>
> =========================================================================
>
>
>
-------------------------------------------------------------------------
Humanist Discussion Group
Information at <http://www.kcl.ac.uk/humanities/cch/humanist/>
<http://www.princeton.edu/~mccarty/humanist/>
=========================================================================