[l2h] heblatex problems

Tzafrir Cohen tzafrir@technion.ac.il
Thu, 14 Jun 2001 02:12:49 +0300 (IDT)


Hi

I'm trying to produce html versions of latex documents that are produced
using the heblatex package (part of babel as of 3.7, but can be downloaded
seperately), which handles issues dealing with Hebrew: encoding,
bidirectionality, calendar, etc.

The version I have installed is latex2html-99.2beta8 which comes with
linux mandrake 7.2 .

(BTW: in two places there is a dictionary of languages with lists "hebrew"
as "iw", instead of "he")

I have created styles/hebrew.perl and versions/iso-8859-8-i.perl , and
modified babel.perl to point to hebrew.perl and inputenc.perl to point
to iso-8859-8.perl.

However, things don't seem to work, and Ican't figure out how to make them
work:

1. Consider a simple test document:

My current test document is:

\documentclass{article}
\usepackage[english,hebrew]{babel}

\begin{document}
\L{A}
\end{document}

The macros \L{} and \R{} are used to toggle both input direction 

I kept getting errors about missing images. When looking at images.tex I
saw:

% !!! IMAGES START HERE !!!

{\newpage\clearpage
\lthtmlinlineA{tex2html_nomath_inline8}%
\L%
\lthtmlinlineZ
\lthtmlcheckvsize\clearpage}

As you can see, the \L is considered a seperate macro by latex2html, and
elatex fails to latex it, as expected.

I have tried adding to beoth hebrew.pl or babel.pl the following:

## Ignore \L{} and \R{} . Hopefully it will be similar enough to implicit
bidi
&ignore_commands( <<_IGNORED_CMDS_);
L # {}
R # {}
L
R
_IGNORED_CMDS_

(I first tried only 'L # {}' and 'R # {}', but this didn't work, so I
tried adding 'L' and 'R' as well).
But latex2html still keeps trying to create \L as an image.

Where and how am I supposed to add directives to ignore some instructions?

A seperate issue is the html page charset. I have failed to set it to
ISO8859-8-i, it is always iso8859-1 .

When I run latex2html I see:

Loading /usr/lib/latex2html/styles/texdefs.perl...
Loading /usr/lib/latex2html/styles/article.perl
Loading /usr/lib/latex2html/styles/babel.perl
Loading /usr/lib/latex2html/versions/lang.pl [english]
Loading /usr/lib/latex2html/styles/english.perl [hebrew]
Loading /usr/lib/latex2html/styles/hebrew.perl
Reading ...

This means that hebrew.perl, which is supposed to set the charset to
iso8859-8-i does get loaded, and this happens after english. With babel,
the last package in the package order is the default language for the
document.

Let me know if you need any other details.

A couple of other notes:

* Could somebody please fix the list information in the list's archive? Or
at least arange for majordomo@tug.org to give an automated reply with the
new settings...

* I'm not yet sure about the exact details of converting hebrew latex to
html. The thing is that heblatex uses explicit bidirectionality, and html
uses implicit bidirectionality.

I will need to add a couple of other things. For instance: for babel, if
the language is hebrew or arabic, the <html> tag should have an added
dir="rtl" attribute.

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir