This is an old revision of the document!
Notes on getting japanese inputs/fonts working on linux and learning japanese. My presentation on the topic is here: https://fluxcoil.net/files/speeches/latex_japlinux/japlinux.pdf .
# cjk $ yum -y install yum install texlive-cjk.noarch texlive-collection-langcjk.noarch $ cat minimal_japanese_example.tex \documentclass{beamer} \usepackage[encapsulated]{CJK} \usepackage{ucs} \usepackage[utf8x]{inputenc} \newcommand{\jptext}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}} \begin{document} \jptext{日本語} \end{document} $ pdflatex minimal_japanese_example.tex && evince minimal_japanese_example.pdf
I use this on Fedora:
xterm -en UTF-8 -fg white -bg black \ -fn -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1 -e bash
Also i tried different fons with xterm, a listing of the available fonts comes back from executing “xlsfonts”. To grab these out containing 'ja' and try them out:
for i in $(xlsfonts|grep ja); do echo "current font: $i"; xterm -fn $i -e 'echo ちち; sleep 10'; done
emacs ~/.emacs # and add this: ;;;;;;;;;;;;;;;;;;;; ;; unicode-setup (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (setq default-buffer-file-coding-system 'utf-8) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) ;; make japanese default choice for input system (set-input-method 'japanese) emacs -nw test.tex # now you can use C-x C-m C-\ and are asked to enter an input method. # jap<tab><tab> shows a selection, here # 'japanese' works for hiragana directly/katakana with <blank> after hiragana-inputs # 'japanese-katakana' works for katakana-input # then you can input japanese as with uim. # use C-\ to switch between english<->japanese input
$ echo '私は馬鹿です'| kakasi -JK -i utf8 -o utf8 ワタシはバカです
$ echo 例文文章です。|mecab --node-format='%pS%m[%f[7]]' --eos-format='\n' 例文[レイブン]文章[ブンショウ]です[デス]。[。]