[Cjk] Problems with cjk-enc.el - getting it to work
Markus Müller
mmuell25 at ix.urz.uni-heidelberg.de
Fri Sep 26 12:37:03 CEST 2003
Hi all,
sorry for bothering you all, but I desperately need help.
I want to create Latex-documents including chinese characters. I am using
miktex 2.3 on Windows 98, emacs 20.7 (I am a beginner on emacs, sorry.)
Emacs and Auctex seem to work fine since I can process all my previous non
chinese documents. CJK seems also properly installed since I can process the
precompiled *.cjk examples.
But I have following problems - mainly related to cjk-enc.el:
1. I have put the cjk-enc file int to site-lisp directory and added
following lines to my _emacs file (my home directory is c:\emacs\): (setq
load-path (cons "~/site-lisp" load-path))
(load-library "cjk-enc")
(global-set-key "\C-c\C-q" 'cjk-write-file) ; CTRL C CTRL W writes CJK file
I added the last line, since from the documentation cjk-enc.doc I don't
understand and don't get any idea how to start the precomiling process to
get a *.cjk file (sorry). CTRL C CTRL W worked once but since that never.
Whenever I try it I got following message in the minibuffer window:
"TeX-debug-bad-boxes: on" or "TeX-debug-bad-boxes: off".
Any Help how to start the precompiling process? Is there another possiblity
to start it without CTRL C CTRL W ?
2. I have also problems to the get the full auctex support for cjk. It looks
that the auctex setup for miktex is different from the assumtions in
cjk-enc.doc, since auctex provides a special file for miktex and tex-site.el
links to it through: (when (memq system-type '(windows-nt))
;; Try to make life easy for MikTeX users.
(require 'tex-mik))
In tex-mik.el the TeX-command-list is provided, therefore I added: (list
"CJKLaTeX" "%l '\\nonstopmode\\input{%s.cjk}'" 'TeX-run-CJK-LaTeX nil t) to
this list an CJKLatex is now in the sroll-down-command-menu at emacs.
Since I don't know where to put the rest, I copied according to the cjk
documentation the following to the end of the_emacs file: (defun
TeX-run-CJK-LaTeX (name command file)
"Create a process for NAME using COMMAND to format FILE with CJK/LaTeX."
; use next line for Mule -- no multifile document support! ;
(cjk-write-file)
(cjk-write-all-files (concat file ".tex"))
(TeX-run-LaTeX name command file))
;; replace the error source file `*.cjk' with `*.tex' (resp. `*-cjk.bib'
;; with `*.bib'), 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"))
(if (string-match "\\(.*\\)-cjk\.bib$" file)
(setq file
(concat
(substring file
(match-beginning 1)
(match-end 1))
".bib"))))))
Was this correct? The problem is also, when I want to process my one and
only *.cjk file with CJKLatex from the emacs menu I got following error
message (the tex and the cjk file are in the same directory):
Running `CJKLaTeX' on `test' with ``latex --src-specials
'\nonstopmode\input{test.cjk}'''
This is TeX, Version 3.141592 (MiKTeX 2.3)
! I can't find file `'.tex'.
<to be read again>
\nonstopmode
<*> '\nonstopmode
\input{test.cjk}'
Please type another input file name:
Any suggestions how to solve this?
3. What is the best character set to save tex-files with chinese? Right know
I am using GB and mule displays the charactes fine, but whenever I save and
reload the file, instead of the characteers there are empty black boxes and
all my Umlauts (ö, ä and so on) are gone.
sorry for bothering you with all these beginner questions, but I've spent a
huge amount of hours to get all this work, and I am pretty frustrated now.
Thank you very much for helping me. I looking forward for your help.
Markus
More information about the Cjk
mailing list