There seems to be a bug in the rendering of some browsers, at least Galeon and Mozilla in Linux, in that if a table line starts with a unicode character &#nnn; the line is displayed as the intended character followed by a dirty smudge. You can remove the smudge by dragging the mouse over it, miraculously displaying what was intended!

I have also tried Internet Explorer and Netscape in Windows, which are OK, and Opera in Linux, which is OK.

If you precede the unicode character with a no-break space (&#nbsp;) the rendering is OK. So I have made a fix that does this to every line in a table generated from hyperlatex from a tabbing environment: every line, not just the affected ones, to keep the relative indentation. The whole table appears to be shifted one space to the right, but that seems a small price to pay.

The fix is to the last few lines of hyperlatex-final-substitutions, which become

    ;; finally, convert the magic chars to their real counterpart
    (goto-char (point-min))
    (while (re-search-forward hyperlatex-meta-all nil t)
      (replace-match
       (char-to-string (- (preceding-char) hyperlatex-meta-offset)) t))
    ;; lines in tables that start with &#nnn; are not displayed
    ;; properly in some browsers, including Mozilla in Linux.
    ;; To fix this, insert   in front of all lines
    ;; This also has the advantage of preserving empty lines in
    ;; tabbing environments.
    ;; CWG 6/4/04
    (goto-char (point-min))
    (while (search-forward "colspan=\"99\" align=\"left\">" nil t)
      (replace-match "colspan=\"99\" align=\"left\"> " t t))
    ;; make labels
    (goto-char (point-min))
    (while (search-forward hyperlatex-meta-X nil t)
      (replace-match "")
      (if (looking-at "[ \t\n]*[^<> \t\n]+\\([ \t\n]\\)")
          (goto-char (match-beginning 1))
        (insert "&nbsp;"))
      (insert "</a>"))
    ;; put back protected characters
    (goto-char (point-min))
    (while (re-search-forward meta-iso-regexp nil t)
      (replace-match (char-to-string
                      (string-to-number
                       (buffer-substring (match-beginning 1)
                                         (match-end 1)))) t))))

(Forgive me for not reporting this in the form of a patch, but I have many other changes to hyperlatex.el for the way we use hyperlatex. The only change is the insertion of the comment about lines in tables and the following 3 lines of lisp.)

As you can see from the comment this also fixes a problem in that empty lines in tabbing environments disappear.

Finally, there is also correction of what I think is a typo in the original of the above: "/a" was "/A".

Regards,

Chris George



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Hyperlatex-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hyperlatex-users

Reply via email to