Re: CJK LaTeX export


Subject: Re: CJK LaTeX export
From: Vlad Harchev (hvv@hippo.ru)
Date: Sun Nov 12 2000 - 23:33:41 CST


On Mon, 13 Nov 2000, Chih-Wei Huang wrote:

> Vlad Harchev ¼g¹D¡G
> > On Sun, 12 Nov 2000, Chih-Wei Huang wrote:
> > > In short, LaTeX export WORKS for CJK
> > > (or, at least Big5 Chinese).
> >
> > Nice to hear that.
> > But it's too late, I've sent p5 :)
> >
> > OK, could you research what should be put inside
> > \begin{document}\end{document} for GB2312?
> >
> > After you tell this, I can make corresponding changes to AW (or you can do it
> > yourself).
>
> For GB, use
> \begin{CJK*}{GB}{fs}
> \end{CJK*}
>
> However, I am not sure if it's appropriate to add
> such preamble/postamble,
> since it depends what "Chinese LaTeX" you used.
> For ChiTeX, no such preamble/postamble is needed.
> For other "Chinese LaTeX", it may be different.
> Even for CJK for LaTeX, the third parameter in
> \begin{CJK*}{GB}{fs} is the default font name,
> it is dist/vendor dependent.
> Therefore, it may be not a good idea to add a fixed
> preamble/postamble.
>
> A solution is to show a popup window
> to give the user an option.
> If it is too troublesome, I tend to
> not add anything.
> How did you think about it?

 I think with the following architecure change, AW can be made very flexible
wrt latex exporting:
 The proposed change applies to all locales, not only CJK:
Instead of \begin{document} and \end{document} AW should emit:
 \begin{abidocument} \end{abidocument}
To inject definition of 'abidocument' environment, AW should
physically _include_ files with the following names into .latex file being
exported, in the order listed:
${prefix}/AbiWord/common.latex
${prefix}/AbiWord/common-$LANGNAME.latex
${prefix}/AbiWord/common-$LANGNAME-$TERRNAME.latex
${prefix}/AbiWord/common-$LANGNAME-$TERRNAME.$ENCNAME.latex
~/AbiSuite/common.latex
~/AbiSuite/common-$LANGNAME.latex
~/AbiSuite/common-$LANGNAME-$TERRNAME.latex
~/AbiSuite/common-$LANGNAME-$TERRNAME.$ENCNAME.latex

 Of course, not all files need to exist. This way, user's file could override
system defaults. Distribution's authors could ship their own .latex files that
correspond to their *Tex distribution packages.

 What $LANGNAME, $TERRNAME, $ENCNAME mean:
for $LANG=ru_RU.KOI8-R,
        $LANGNAME=ru
        $TERRNAME=RU
        $ENCNAME=KOI8-R
 
 This seems to be the perfect solution. The only problem - we probably should
reorganize AW dir layout a little (e.g introduce ExporterConfig and
ImporterConfig dirctories and put all latex exporter-oriented files into
ExporterConfig/latex).
 Same for ~/.AbiSuite
(but it seems that intermediate dir with name AbiWord should be added to
~/.AbiSuite in order
not to mix AW and other AbiSuite apps' settings).

 Sorry I don't have time to code this (at least for free). But I'm willing
to give advices and thoughts.

>
> --
> ~ Chih-Wei Huang (cwhuang)
> 'v' E-Mail : cwhuang@linux.org.tw
> // \\ CLDP Project : http://www.linux.org.tw/CLDP/ (Coordinator)
> /( )\ CLE Project : http://cle.linux.org.tw/CLE/ (Developer)
> ^`~'^ HomePage : http://www.cwhuang.idv.tw/
>

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Mon Nov 13 2000 - 00:25:47 CST