If auctex is installed after cjk-latex installation, the cjk-latex
support should be switched on by default or as a site-wide
installation option.
The required Lisp files are already provided by cjk-latex:
/usr/share/emacs/site-lisp/cjkspace.el
/usr/share/emacs/site-lisp/cjktilde.el
/usr/share/emacs/site-lisp/cjk-enc.el
however the crucial code relevant to AUC TeX, although also
included by cjk-latex, is hidden in
/usr/share/doc/cjk-latex/cjk-enc.doc.gz
Here is the most essential fragment:
-----------------------------------------------------------
Usage with AUCTeX
-----------------
Append this to your .emacs file to have special CJK support with AUCTeX:
(defun TeX-run-CJK-LaTeX (name command file)
"Create a process for NAME using COMMAND to format FILE with CJK/LaTeX."
(write-cjk-file)
(TeX-run-LaTeX name command file))
;; replace the error source file from *.cjk to *.tex, then C-c ` can
;; be used as usual.
(add-hook 'TeX-translate-location-hook
'(lambda ()
(if (string-match "\\(.*\\)\.cjk$" file)
(setq file
(concat
(substring file
(match-beginning 1)
(match-end 1))
".tex")))))
(defvar TeX-command-list
(list (list "TeX" "tex '\\nonstopmode\\input %t'" 'TeX-run-TeX nil t)
(list "TeX Interactive" "tex %t" 'TeX-run-interactive nil t)
(list "LaTeX" "%l '\\nonstopmode\\input{%t}'"
'TeX-run-LaTeX nil t)
(list "LaTeX Interactive" "%l %t" 'TeX-run-interactive nil t)
(list "LaTeX2e" "latex2e '\\nonstopmode\\input{%t}'"
'TeX-run-LaTeX nil t)
(list "CJKLaTeX" "%l '\\nonstopmode\\input{%s.cjk}'"
'TeX-run-CJK-LaTeX nil t)
(if (or window-system (getenv "DISPLAY"))
(list "View" "%v " 'TeX-run-background t nil)
(list "View" "dvi2tty -q -w 132 %s " 'TeX-run-command t nil))
(list "Print" "%p " 'TeX-run-command t nil)
(list "Queue" "%q" 'TeX-run-background nil nil)
(list "File" "dvips %d -o %f " 'TeX-run-command t nil)
(list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
(list "Index" "makeindex %s" 'TeX-run-command nil t)
(list "Check" "lacheck %s" 'TeX-run-compile nil t)
(list "Spell" "<ignored>" 'TeX-run-ispell nil nil)
(list "Other" "" 'TeX-run-command t t)
;; Not part of standard TeX.
(list "Makeinfo" "makeinfo %t" 'TeX-run-compile nil t)
(list "AmSTeX" "amstex '\\nonstopmode\\input %t'"
'TeX-run-TeX nil t)))
------------------------------------------------------------------------------------
It would be better not to overwrite the default value of
`TeX-command-list' but extend it.
Hi Werner, Janusz, Anthony, in the Debian Bugtracking system there is a request to include AUCTeX support for cjk-latex into the auctex package. I think it would be easier and cleaner if this would be directly integrated in the cjk-latex package (see below) or, even better, if the respective files would be integrated in auctex upstream. Note, Werner, that AUCTeX is now a GNU project and is planned to be integrated into GNU emacs one day. Looking at your address I guess you won't object to assigning copyright to fsf. If it is currently not possible to include this in AUCTeX upstream, I suggest to integrate it into the Debian package of cjk-latex: jsbien@mimuw.edu.pl (Janusz S. Bień) wrote: cjk-latex would have to put a file into /etc/emacs/site-start.d/ that tests for auctex and loads this stuff if it is present. The filename should make it be loaded after auctex, e.g. 60cjk-latex.el would do. I could try to help (or rather ask the gurus) with lisp stuff like checking whether auctex is yet loaded. It would also be good (but not necessary) to provide a /usr/lib/emacsen-common/packages/install/cjk-latex for byte-compilation of the el files. Regards, Frank
To the best of my knowledge, Japanese language support in cjk-latex was and still is broken. In my opinion, which is quoted in http://ffii.org/archive/mails/cjk/2002/Dec/0001.html it should be splitted into several packages. That is still the best way to go. I have suggested some changes allowing CJKTeX to share some mechanisms with e.g. Devanagari preprocessors, cf. http://ffii.org/archive/mails/cjk/2003/Jan/0001.html Good. Not a good idea for the reasons given above. Here is a fragment of my proposal mentioned above: On 04 Dec 2002 jsbien@mimuw.edu.pl (Janusz S. Bień) wrote: [...] > My first impression is that we should have several Debian > packages: [...] > cjktex-el Emacs files (unless included in AUCTeX) depending (i.e.) [...] [...] If you understand Debian Emacs policy, and it seems that you do :-), please create a Debian package just for the Emacs files. I will be glad to test it. Best regards Janusz
I'm passively following the development.
I've signed a general copyright assignment (at my wish :-) so I don't
have to sign papers again and again...
Werner
You mean the Debian package, right?
is already splitted in many parts. Here a list of the relevant files
in the TeXLive perforce repository:
TeXLive/texmf-dist/tpm:
CJK.tpm
bsmilp.tpm
cns.tpm
gbsnlp.tpm
korean.tpm
norasi.tpm
wadalab.tpm
wansong.tpm
[yi4latex.tpm]
TeXLive/texmf/tpm:
bin-cjkutils.tpm
collection-langcjk.tpm
For reference what the stuff is good for I've included the contents
of CJK.tpm below.
I neither have time nor knowledge to maintain packages for
distributions; if useful I can include spec files.
Werner
======================================================================
<!DOCTYPE rdf:RDF SYSTEM "../tpm.dtd">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
<rdf:Description about="http://texlive.dante.de/texlive/Package/CJK.zip">
<TPM:Name>CJK</TPM:Name>
<TPM:Type>Package</TPM:Type>
<TPM:Date>2003/03/28 23:10:20</TPM:Date>
<TPM:Version>4.2.0</TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>Support for Chinese/Japanese/Korean.</TPM:Title>
<TPM:Size>1468751</TPM:Size>
<TPM:Description>
A macro package and fonts which enables the use of
Chinese/Japanese/Korean with LaTeX2e.
</TPM:Description>
<TPM:Build/>
<TPM:RunFiles size="381187">
texmf-dist/fonts/map/dvips/CJK/bsmilp.map
texmf-dist/fonts/map/dvips/CJK/gbsnlp.map
texmf-dist/tex/latex/CJK/Bg5/Bg5.cap
texmf-dist/tex/latex/CJK/Bg5/Bg5.chr
texmf-dist/tex/latex/CJK/Bg5/Bg5.cpx
texmf-dist/tex/latex/CJK/Bg5/Bg5.enc
texmf-dist/tex/latex/CJK/Bg5/c00bsmi.fd
texmf-dist/tex/latex/CJK/Bg5/c00bsmi.fdv
texmf-dist/tex/latex/CJK/Bg5/c00cns.fd
texmf-dist/tex/latex/CJK/Bg5/c00song.fd
texmf-dist/tex/latex/CJK/Bg5/c01song.fd
texmf-dist/tex/latex/CJK/Bg5/c09song.fd
texmf-dist/tex/latex/CJK/CEF/c80song.fd
texmf-dist/tex/latex/CJK/CEF/c81song.fd
texmf-dist/tex/latex/CJK/CJK.enc
texmf-dist/tex/latex/CJK/CJK.sty
texmf-dist/tex/latex/CJK/CJKnumb.sty
texmf-dist/tex/latex/CJK/CJKulem.sty
texmf-dist/tex/latex/CJK/CJKvert.sty
texmf-dist/tex/latex/CJK/CNS/EUC-TW.bdg
texmf-dist/tex/latex/CJK/CNS/EUC-TW.chr
texmf-dist/tex/latex/CJK/CNS/EUC-TW.enc
texmf-dist/tex/latex/CJK/CNS/c31song.fd
texmf-dist/tex/latex/CJK/CNS/c32song.fd
texmf-dist/tex/latex/CJK/CNS/c33song.fd
texmf-dist/tex/latex/CJK/CNS/c34song.fd
texmf-dist/tex/latex/CJK/CNS/c35song.fd
texmf-dist/tex/latex/CJK/CNS/c36song.fd
texmf-dist/tex/latex/CJK/CNS/c37song.fd
texmf-dist/tex/latex/CJK/GB/GB.cap
texmf-dist/tex/latex/CJK/GB/GB.cpx
texmf-dist/tex/latex/CJK/GB/c10gbsn.fd
texmf-dist/tex/latex/CJK/GB/c10gbsn.fdv
texmf-dist/tex/latex/CJK/GB/c10song.fd
texmf-dist/tex/latex/CJK/GB/c11song.fd
texmf-dist/tex/latex/CJK/GB/c19song.fd
texmf-dist/tex/latex/CJK/GB/c20song.fd
texmf-dist/tex/latex/CJK/GB/c21song.fd
texmf-dist/tex/latex/CJK/JIS/EUC-JP.bdg
texmf-dist/tex/latex/CJK/JIS/EUC-JP.chr
texmf-dist/tex/latex/CJK/JIS/EUC-JP.enc
texmf-dist/tex/latex/CJK/JIS/JIS.cap
texmf-dist/tex/latex/CJK/JIS/JIS.cpx
texmf-dist/tex/latex/CJK/JIS/JISdnp.enc
texmf-dist/tex/latex/CJK/JIS/c40song.fd
texmf-dist/tex/latex/CJK/JIS/c41song.fd
texmf-dist/tex/latex/CJK/JIS/c42min.fd
texmf-dist/tex/latex/CJK/JIS/c42min.fdv
texmf-dist/tex/latex/CJK/JIS/c42song.fd
texmf-dist/tex/latex/CJK/JIS/c43song.fd
texmf-dist/tex/latex/CJK/JIS/c50song.fd
texmf-dist/tex/latex/CJK/JIS/c52min.fd
texmf-dist/tex/latex/CJK/JIS/c52min.fdv
texmf-dist/tex/latex/CJK/KS/HLaTeX/HLaTeX.chr
texmf-dist/tex/latex/CJK/KS/HLaTeX/KSHL.enc
texmf-dist/tex/latex/CJK/KS/HLaTeX/c63pmj.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c63pol.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c64pmj.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c64pol.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c64psm.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c65pmj.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c65pol.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/c65psm.fd
texmf-dist/tex/latex/CJK/KS/HLaTeX/pshan.sty
texmf-dist/tex/latex/CJK/KS/KS.chr
texmf-dist/tex/latex/CJK/KS/KS.enc
texmf-dist/tex/latex/CJK/KS/c60mj.fd
texmf-dist/tex/latex/CJK/KS/c61mj.fd
texmf-dist/tex/latex/CJK/KS/c62song.fd
texmf-dist/tex/latex/CJK/KS/hangul.cap
texmf-dist/tex/latex/CJK/KS/hangul.cpx
texmf-dist/tex/latex/CJK/KS/hangul2.cap
texmf-dist/tex/latex/CJK/KS/hangul2.cpx
texmf-dist/tex/latex/CJK/KS/hanja.cap
texmf-dist/tex/latex/CJK/KS/hanja.cpx
texmf-dist/tex/latex/CJK/SJIS/SJIS.bdg
texmf-dist/tex/latex/CJK/SJIS/SJIS.cap
texmf-dist/tex/latex/CJK/SJIS/SJIS.chr
texmf-dist/tex/latex/CJK/SJIS/SJIS.cpx
texmf-dist/tex/latex/CJK/SJIS/SJIS.enc
texmf-dist/tex/latex/CJK/SJIS/SJISdnp.chr
texmf-dist/tex/latex/CJK/SJIS/SJISdnp.enc
texmf-dist/tex/latex/CJK/SJIS/c49song.fd
texmf-dist/tex/latex/CJK/UTF8/UTF8.bdg
texmf-dist/tex/latex/CJK/UTF8/UTF8.chr
texmf-dist/tex/latex/CJK/UTF8/UTF8.enc
texmf-dist/tex/latex/CJK/UTF8/c70song.fd
texmf-dist/tex/latex/CJK/extended.chr
texmf-dist/tex/latex/CJK/extended.enc
texmf-dist/tex/latex/CJK/mule/MULEenc.sty
texmf-dist/tex/latex/CJK/pinyin.sty
texmf-dist/tex/latex/CJK/pmC.chr
texmf-dist/tex/latex/CJK/pmCbig.enc
texmf-dist/tex/latex/CJK/pmCsmall.enc
texmf-dist/tex/latex/CJK/ruby.sty
texmf-dist/tex/latex/CJK/standard.bdg
texmf-dist/tex/latex/CJK/standard.chr
texmf-dist/tex/latex/CJK/standard.enc
texmf-dist/tex/latex/CJK/thai/c90cmr.fd
texmf-dist/tex/latex/CJK/thai/c90cmss.fd
texmf-dist/tex/latex/CJK/thai/c90cmtt.fd
texmf-dist/tex/latex/CJK/thai/c90dbss.fd
texmf-dist/tex/latex/CJK/thai/c90enc.def
texmf-dist/tex/latex/CJK/thai/c90nrsr.fd
texmf-dist/tex/latex/CJK/thai/thaicjk.ldf
texmf-dist/tpm/CJK.tpm
</TPM:RunFiles>
<TPM:DocFiles size="912122">
texmf-dist/doc/latex/CJK/CEF.doc
texmf-dist/doc/latex/CJK/CJK.doc
texmf-dist/doc/latex/CJK/COPYING
texmf-dist/doc/latex/CJK/ChangeLog
texmf-dist/doc/latex/CJK/INSTALL
texmf-dist/doc/latex/CJK/README
texmf-dist/doc/latex/CJK/README.CD
texmf-dist/doc/latex/CJK/TDS.doc
texmf-dist/doc/latex/CJK/chinese/README
texmf-dist/doc/latex/CJK/chinese/READMEb5.tex
texmf-dist/doc/latex/CJK/chinese/READMEgb.tex
texmf-dist/doc/latex/CJK/chinese/emTeXb5.doc
texmf-dist/doc/latex/CJK/chinese/teTeXb5.doc
texmf-dist/doc/latex/CJK/cjk-enc.doc
texmf-dist/doc/latex/CJK/cjk/README
texmf-dist/doc/latex/CJK/cjk/READMEb5.cjk
texmf-dist/doc/latex/CJK/commands.doc
texmf-dist/doc/latex/CJK/contrib/wadalab/DNP.doc
texmf-dist/doc/latex/CJK/dvi/READMEb5.dvi
texmf-dist/doc/latex/CJK/dvi/READMEgb.dvi
texmf-dist/doc/latex/CJK/dvi/bg5conv.dvi
texmf-dist/doc/latex/CJK/dvi/cef5conv.dvi
texmf-dist/doc/latex/CJK/dvi/cefconv.dvi
texmf-dist/doc/latex/CJK/dvi/cefsconv.dvi
texmf-dist/doc/latex/CJK/dvi/extconv.dvi
texmf-dist/doc/latex/CJK/dvi/sjisconv.dvi
texmf-dist/doc/latex/CJK/dvidrv.doc
texmf-dist/doc/latex/CJK/examples/Big5.tex
texmf-dist/doc/latex/CJK/examples/Big5vert.tex
texmf-dist/doc/latex/CJK/examples/CEF_test.tex
texmf-dist/doc/latex/CJK/examples/CJKbabel.tex
texmf-dist/doc/latex/CJK/examples/GB.tex
texmf-dist/doc/latex/CJK/examples/JIS.tex
texmf-dist/doc/latex/CJK/examples/KS.tex
texmf-dist/doc/latex/CJK/examples/README
texmf-dist/doc/latex/CJK/examples/SJIS.tex
texmf-dist/doc/latex/CJK/examples/UTF8.tex
texmf-dist/doc/latex/CJK/examples/cjk/Big5.cjk
texmf-dist/doc/latex/CJK/examples/cjk/Big5vert.cjk
texmf-dist/doc/latex/CJK/examples/cjk/CEF_test.cjk
texmf-dist/doc/latex/CJK/examples/cjk/CJKbabel.cjk
texmf-dist/doc/latex/CJK/examples/cjk/SJIS.cjk
texmf-dist/doc/latex/CJK/examples/cjk/muletest.cjk
texmf-dist/doc/latex/CJK/examples/cjk/rubytest.cjk
texmf-dist/doc/latex/CJK/examples/cjk/thai.cjk
texmf-dist/doc/latex/CJK/examples/dvi/Big5.dvi
texmf-dist/doc/latex/CJK/examples/dvi/Big5vert.dvi
texmf-dist/doc/latex/CJK/examples/dvi/CEF_test.dvi
texmf-dist/doc/latex/CJK/examples/dvi/CJKbabel.dvi
texmf-dist/doc/latex/CJK/examples/dvi/GB.dvi
texmf-dist/doc/latex/CJK/examples/dvi/JIS.dvi
texmf-dist/doc/latex/CJK/examples/dvi/KS.dvi
texmf-dist/doc/latex/CJK/examples/dvi/SJIS.dvi
texmf-dist/doc/latex/CJK/examples/dvi/UTF8.dvi
texmf-dist/doc/latex/CJK/examples/dvi/muletest.dvi
texmf-dist/doc/latex/CJK/examples/dvi/py_test.dvi
texmf-dist/doc/latex/CJK/examples/dvi/pytest.dvi
texmf-dist/doc/latex/CJK/examples/dvi/rubytest.dvi
texmf-dist/doc/latex/CJK/examples/dvi/thai.dvi
texmf-dist/doc/latex/CJK/examples/muletest.tex
texmf-dist/doc/latex/CJK/examples/ps/Big5vert.ps
texmf-dist/doc/latex/CJK/examples/py_test.tex
texmf-dist/doc/latex/CJK/examples/rubytest.tex
texmf-dist/doc/latex/CJK/examples/thai.tex
texmf-dist/doc/latex/CJK/fonts.doc
texmf-dist/doc/latex/CJK/hbf2gf.doc
texmf-dist/doc/latex/CJK/history.2_5
texmf-dist/doc/latex/CJK/history.txt
texmf-dist/doc/latex/CJK/japanese/README
texmf-dist/doc/latex/CJK/japanese/ascii.doc
texmf-dist/doc/latex/CJK/japanese/japanese.doc
texmf-dist/doc/latex/CJK/japanese/japanese.jis
texmf-dist/doc/latex/CJK/japanese/jp-fonts.doc
texmf-dist/doc/latex/CJK/japanese/jp-tex.doc
texmf-dist/doc/latex/CJK/japanese/preview.doc
texmf-dist/doc/latex/CJK/japanese/shibuaki.doc
texmf-dist/doc/latex/CJK/man/dvi/bg5conv.dvi
texmf-dist/doc/latex/CJK/man/dvi/cef5conv.dvi
texmf-dist/doc/latex/CJK/man/dvi/cefconv.dvi
texmf-dist/doc/latex/CJK/man/dvi/cefsconv.dvi
texmf-dist/doc/latex/CJK/man/dvi/extconv.dvi
texmf-dist/doc/latex/CJK/man/dvi/sjisconv.dvi
texmf-dist/doc/latex/CJK/man/txt/bg5conv.txt
texmf-dist/doc/latex/CJK/man/txt/cef5conv.txt
texmf-dist/doc/latex/CJK/man/txt/cefconv.txt
texmf-dist/doc/latex/CJK/man/txt/cefsconv.txt
texmf-dist/doc/latex/CJK/man/txt/extconv.txt
texmf-dist/doc/latex/CJK/man/txt/sjisconv.txt
texmf-dist/doc/latex/CJK/pinyin.doc
texmf-dist/doc/latex/CJK/pyhyphen/pinyin.c
texmf-dist/doc/latex/CJK/pyhyphen/pinyin.ldf
texmf-dist/doc/latex/CJK/pyhyphen/pinyin.tr
texmf-dist/doc/latex/CJK/pyhyphen/pyhyph.tex
texmf-dist/doc/latex/CJK/pyhyphen/pyhyphen.doc
texmf-dist/doc/latex/CJK/pyhyphen/pytest.tex
texmf-dist/doc/latex/CJK/ruby.doc
texmf-dist/doc/latex/CJK/thaifont.doc
texmf-dist/doc/latex/CJK/vertical.doc
</TPM:DocFiles>
<TPM:SourceFiles size="175442">
texmf-dist/source/CJK/utils/lisp/cjkspace.el
texmf-dist/source/CJK/utils/lisp/cjktilde.el
texmf-dist/source/CJK/utils/lisp/emacs-20.3/cjk-enc.el
texmf-dist/source/CJK/utils/lisp/emacs-20.3/thai-word.el
texmf-dist/source/CJK/utils/lisp/mule-2.3/cjk-enc.el
</TPM:SourceFiles>
<TPM:Requires>
<TPM:Package name="dbtt"/>
</TPM:Requires>
<TPM:Installation>
<TPM:Execute function="addMap" parameter="wadalab.map"/>
<TPM:Execute function="addMap" parameter="wansong.map"/>
<TPM:Execute function="addMap" parameter="norasi.map"/>
<TPM:Execute function="addMap" parameter="gbsnlp.map"/>
<TPM:Execute function="addMap" parameter="bsmilp.map"/>
</TPM:Installation>
<TPM:Provides>Package/CJK</TPM:Provides>
</rdf:Description>
</rdf:RDF>
Werner LEMBERG <wl@gnu.org> schrieb: So, will you contact the AUCTeX maintainers in order to include the cjk-latex stuff? Or should I do it (I'm on the list anyway). Regards, Frank
What exactly should be included in AUCTeX? Given the complicated
dependencies of my CJK package I would rather prefer the creation of
another, small (Debian) package which installs cjk-latex.el on top of
AUCTeX.
Please do so.
Werner
Yes, of course. Good news. I am familiar with tpm files, but I stopped watching the TeXLive development. [...] On Wed, 17 Mar 2004 frank@kuesterei.ch (Frank Küster) wrote: [...] I think that in January 2003 there was some discussion about it on auc-tex list, but I don't remember the coclusion and I cannot find it quickly in my archive. BTW, is my impression correct that there is no publicly available auc-tex archiwe/ Best regards Janusz
Werner LEMBERG <wl@gnu.org> schrieb: At least cjkspace.el which says ;;; cjkspace.el --- provide a tilde character if you type a space. ;;; use this file with AUCTeX. But it seems to me that all the other files could be integrated, too, and auctex could make them automatically loaded as soon as it detects that CJK*.sty is used. Doesn't that make sense? Does anything need to be customized - like loading thai-word.el only when thai is to be used? I know that the AUCTeX upstream people usually prefer to integrate, as much as possible, files that enhance TeX (and texinfo) editing in Emacsen. However, I must admit that I don't use cjk-latex - I'm just caring for bug reports against the auctex package in Debian, and in general. If you think that integration would be really difficult, perhaps we shouldn't do it. On the other hand, the necessary customization has to be prepared anyway, be it inside AUCTeX or in a separate package, hasn't it? I'll point them to your files. Thanks, Frank
jsbien@mimuw.edu.pl (Janusz S. Bień) schrieb: You mean an archive for the list? It's in the gmane mail2news gateway, therefore you can search it there. http://search.gmane.org/search.php?query=cjk&email=&group=gmane.emacs.auc-tex&sort=date Regards, Frank
But this is only useful for editing files which use the CJK
environment of my CJK package.
thai-word.el is special: It should be integrated into Emacs itself.
It hasn't been done so due to the unknown license status of the Thai
word list. Meanwhile there are public word lists under the GPL or an
equivalent license (e.g. from ICU) which could be used, but I haven't
found the time (and interest) to update. Volunteers welcome.
Well, cjk-enc.el basically just provides an output encoding -- it
works without AUCTeX also, BTW.
Just do what you think is best.
Werner