[l2h] bad ALT string in CJK package

Shigeharu TAKENO shige@iee.niit.ac.jp
Thu Jan 30 11:38:15 CET 2003

shige 01/30 2003

Using CJK package, long math expression including 2byte code may 
make bad "ALT=" string.

For example, from a LaTeX code:

  && \lim_{x\rightarrow 0}\frac{\displaystyle f(x)-f(0)-f'(0)x
  =\lim_{x\rightarrow 0}\frac{f'(x)-f'(0)-f''(0)x}{3x^2}
  && \mbox{(long 2 byte code string)}

"ALT=" string is made as the following:

  && \lim_{x\rightarrow 0}\frac{\displaystyle f(x)-f(0)-f'(0)x-...
  ...(tail of 2 byte code string)}

by the code:

 if ( length($alt) > 163 ) {
     $start = substr($alt,0,80);
     $end = substr($alt,length($alt)-80,80);
     $alt = join('',$start,"...\n ...",$end);

But, it does not seems to consider 2 byte characters and the 
divided strings may end with 1st byte of a 2byte char, or may 
start with 2nd byte.

Are there any solutions for the problem ?

 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 shige@iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161

More information about the latex2html mailing list