[l2h] An Apparent Byte Size Limit for a Portable Network Graphics (.png) Image File Containing Simplified Chinese Characters Produced by LaTeX2HTML From a .tex File Containing LaTeX and Chinese/Japanese/Korean (CJK) for LaTeX Comma
Pat Somerville
l_pat_s at hotmail.com
Fri Aug 6 19:25:30 CEST 2010
Thank you, Professors Ross Moore and Shigeharu Takeno, for each of you
kindly taking the time to respond to me. Switching from
\usepackage{CJKutf8} to \usepackage{CJK} in a .tex file of the form
MyFile.tex did solve two problems:
1) In the case of a large segment of LaTeX commands beginning with
\begin{CJK}{UTF8}{gbsn} and ending with \end{CJK} in a .tex file, that
change eliminated the "Bad file descriptor error"s while the program
LaTeX2HTML attempted to generate some .png (Portable Network Graphics)
images. With the above change the number of .png images produced from a
tex file greatly increased due to the mathematical content, more like the
operation with which I was accustomed using LaTeX2HTML.
2) It was no longer necessary to have either an \end{CJK}command before a
command of the form \htmladdnormallink{http://../}{http://../} or another
\begin{CJK}{UTF8}{gbsn} command following the htmladdnormallink command.
But there was a negative side effect. From what I have read the Chinese
pinyin package, which is really the file pinyin.sty, is supposed to be a
part of the CJK (Chinese/Japanese/Korean) software package. With the
following set of commands among others in a test, .tex file of the form
MyFile.tex:
....
.....
\usepackage{CJK}
\usepackage{pinyin}
\begin{CJK}{UTF8}{gbsn}
\Wo \xi3\huan1 \chi1 \fan4.
\PYdeactivate
$\chi $ $\mu $
\PYactivate
\end{CJK}
\end{document}
, neither the pinyin expression corresponding to \Wo \xi3\huan1 \chi1 \fan4
nor the Greek letters chi and mu were displayed in the .html file produced
as a result of executing a command of the form "latex2html.......
MyFile.tex". But changing only the command \usepackage{CJK} to
\usepackage{CJKutf8}, the pinyin and Greek letters were displayed correctly
in such a .html file. Changing that command to \begin{CJK}{GB}{gbsn} also
resulted in the set of disappointing results. So for the moment in the .tex
file
a) using the LaTeX commands \usepackage{CJKutf8} and \usepackage{pinyin},
b) a number of short, CJK segments each beginning with
\begin{CJK}{UTF8}{gbsn} and ending with \end{CJK} to avoid the "Bad file
descriptor error"s in generating some .png images of the text and
mathematics between such delimiting commands,
c) surrounding each \htmladdnormallink{http://../}{http://..} command with a
\begin{CJK}{UTF8}{gbsn} and \end{CJK} pair of commands,
d) and surrounding a group of LaTeX commands and text containing commands
for Greek letters like $\chi $ and $\mu $ with the command \PYdeactivate
before them and sometime or sometimes the command \PYactivate after them, a
command which is probably necessary if some pinyin romanizations were to
follow the latter command,
is a strategy which enabled simplified Chinese characters, Greek letters,
hyperlinks, and pinyin romanizations to all be displayed correctly in a
html file produced by executing a command of the form
"latex2html..........MyFile.tex".
But concerning the use of the pinyin software package, apparently there is
something basic which is a problem somewhere. The following set of LaTeX
commands
\documentclass{article}
\usepackage{CJK}
\usepackage{pinyin}
\begin{document}
\begin{CJK}{Bg5}{fs}
\Wo \xi3\huan1 \chi1 \fan4.
\end{CJK}
\end{document}
in my test file Throwaway.tex differs from the set in
http://tug.org/TUGboat/Articles/tb18-3/cjkintro600.pdf only slightly in the
line of pinyin which begins with \Wo3 ..... and in not containing any
Chinese characters. Yet the output file Throwaway.html produced by executing
a command of the form "latex2html ........ Throwaway.tex" contained the
output 3 the lower-case Greek letter xi#xi; the lower-case Greek letter chi
or an X#chi;1 4. instead of good-looking pinyin. Changing the
\usepackage{CJK} and \begin{CJK}{Bg5}{fs} commands to \usepackage{CJKutf8}
and either the \begin{CJK}{UTF8}{fs} or the \begin{CJK}{Bg5}{fs} commands,
the output was good-looking pinyin containing the proper diacritical marks.
Again I am using LaTeX2HTML 1.70, a year-2002 version. And I could be using
CJK 4.7.0 for LaTeX, based on what I read inside the file CJKutf8.sty.--I
used the CJK software packages provided via the Internet using Yet another
Software Tool 2's (YaST2's) "Online Updates" in July of the year 2010 for
OpenSuSE-11.1, Linux. What is the cause of the problem here? And how can
it be fixed? Looking at "History of the CJK Package" at
http://cjk.ffii.org/history.txt on the Internet, for version 4.7.0 of CJK
one, pinyin-related error was mentioned:
"pinyin.sty:
The package didn't preserve `\ding' which is defined
in pifont.sty, causing problems with older versions of
the hyperref package and its `hpdftex' driver option."
In the above problematic sets of commands I used in Throwaway.tex hyperref
does not appear among them. So perhaps the problem I have found is not
directly mentioned among the errors for CJK 4.7.0. For version 4.8.1 of
CJK, which at least based on the contents of CJKutf8.sty I might not be
using, the following pinyin-related error was mentioned at
http://cjk.ffii.org/history.txt on the Internet:
"Pinyin syllable macros (defined in pinyin.sty) were not
robust, causing problems with indices, for example."
Pat
--------------------------------------------------
From: "Shigeharu TAKENO" <shige at iee.niit.ac.jp>
Sent: Monday, August 02, 2010 11:24 PM
To: "Pat Somerville" <l_pat_s at hotmail.com>
Cc: <latex2html at tug.org>
Subject: Re: [l2h] An Apparent Byte Size Limit for a Portable Network
Graphics (.png) Image File Containing Simplified Chinese Characters
Produced by LaTeX2HTML From a .tex File Containing LaTeX and
Chinese/Japanese/Korean (CJK) for LaTeX Commands
> shige 08/03 2010
> ----------------
>
> Pat Somerville wrote:
>> \documentclass{article}
>> \usepackage{CJKutf8}
>
> Latex2html does not support "CJKutf8" style file, but supports
> "CJK" style file. If you use "CJK.sty" instead "CJKutf8", the
> large image may not be made.
>
> cf.
> http://takeno.iee.niit.ac.jp/~shige/misc/data/testcjk-u.tex
> http://takeno.iee.niit.ac.jp/~shige/misc/data/testcjk-u.pdf
> http://takeno.iee.niit.ac.jp/~shige/misc/data/testcjk-u/index.html
>
> +========================================================+
> Shigeharu TAKENO NIigata Institute of Technology
> kashiwazaki,Niigata 945-1195 JAPAN
> shige at iee.niit.ac.jp TEL(&FAX): +81-257-22-8161
> +========================================================+
>
More information about the latex2html
mailing list