[Cjk] CJKTeX -> HTML
Danai SAE-HAN (=?iso-2022-jp?B?GyRCNFpDI0JRGyhC?=)
danai.sae-han at skynet.be
Sun Jul 6 15:29:04 CEST 2003
From: jsbien at mimuw.edu.pl (Janusz S. Bień)
Subject: [Cjk] CJKTeX -> HTML
Date: 06 Jul 2003 13:27:48 +0200
Message-ID: <87brw7rj2j.fsf at mimuw.edu.pl>
jsbien> What is the simplest way to convert a CJK TeX document to HTML?
jsbien>
jsbien> The document in question is a mixture of Polish and Japanese. Can
jsbien> such a document be handled by pTeX and the japanese version of
jsbien> latex2html?
I don't know about pTeX, but there is an, imho, incredibly easy
solution. The only things you need are: Mule-UCS and LaTeX2HTML.
Copy your LaTeX file to a temporary file, and open it with Emacs.
Make sure that `DEB_MULEUCS_UNICODE=1' is set if you're running Debian
and Mule-UCS doesn't load automatically.
You probably have saved your LaTeX file with the emacs-mule encoding,
so now you have to encode it to UTF-8. Press `C-x RET f' and choose
utf-8-unix. If you have any local variables at the end of the file,
you may want to set
%%% coding: utf-8-unix
to let Emacs use the correct encoding the next time you open this
file.
Now you just have to run latex2html on it, and change all the
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
lines with
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">.
You can neglect most of the warnings. If you're using furigana, then
I don't think you can easily convert them, unless you either use
tables or use Ruby Annotation[1], but this isn't widely supported
(yet).
It saddens me a bit that latex2html is still using plain old HTML3.2
instead of XHTML1 though. But there's always the `tidy.el' package. :D
There's always HyperLaTeX, but I haven't tried it yet with CJK. One
of the nice things about HyperLaTeX is that you can use specific LaTeX
and specific HTML code, using \texonly{} and \htmlonly{}, or \T and \W
respectively.
[1] http://www.w3.org/TR/ruby/
Happy TeXing. :)
Danai SAE-HAN
韓達耐
--
题目:《春怀示邻里》
作者:陈师道(1053-1101)
断墙着雨蜗成字,老屋无僧燕作家,
剩欲出门追语笑,却嫌归鬓著尘沙。
风翻蛛网开三面,雷动蜂窠趁两衙。
屡失南邻春事约,只今容有未开花。
More information about the Cjk
mailing list