Viewing and creating Japanese documents under GNU/Linux
Last modified 2014-Feb-07.
Creating Japanese documents
- Enabling system-wide Japanese input.
(Note that emacs has its own separate Japanese input method, so if you
only want to create Japanese text using emacs you can skip this.)
To enable system-wide Japanese input
in recent versions of GNU/Linux such as Fedora 13+,
use the Anthy method via IBus. If you are using the Xfce window manager,
yum install ibus-anthy imssettings-xfce im-chooser-xfce
Then configure it via
Apps menu -> Settings -> Input Method Selector
Use IBus
Preferences -> tab General
Keyboard shortcut, next input method: Control SPACE
tab Input Method
check "Customize active input methods"
Select an input method -> show all -> japanese -> select Anthy
click on "+ Add"
"Close"
Japanese- Anthy is now there in the list after English
To activate Anthy, press CTRL+SPACE. Then you can type in romaji and
hiragana will appear. To start cycling thorugh kanji for the underlined
region, press SPACE. To accept the current form press RETURN. To toggle to/from
Katakana, press F7. To switch off Anthy press CTRL+SPACE again.
Emacs users:
Note that CTRL+SPACE is also the key combination used for "set mark" in emacs.
If you want to avoid a conflict, you can change the Anthy enabling sequence
to something else, like CTRL+SLASH, by right-clicking on the IBus icon
in the panel and selecting "Preferences". Under the "General" tab,
look at the first item, "Keyboard Shortcuts > Enable or disable".
Click on the three dots to the right, highlight "Control+space", and
in the editable text entry box labelled "Key code" change "space" to "slash",
then "Apply", and then click "OK".
-
Creating a simple Japanese text file using emacs:
How to create a Japanese text file using emacs.
-
Typesetting Japanese text using LaTeX:
How to create Japanese language
documents under GNU/Linux using LaTeX.
Viewing Japanese documents
With the correct fonts installed,
a Japanese text file can be viewed with emacs (as long as the
correct coding is specified, see How to create Japanese text file using emacs),
or with a web browser.
And a Japanese PostScript or PDF file can be viewed
using evince, gv, xpdf, or the Acrobat Reader.
-
Install the system-wide Japanese font packages
In Fedora 19 the relevant packages are japanese-bitmap-fonts,
vlgothic-fonts, and vlgothic-p-fonts.
Once the bitmap font packages are installed, make sure they are in the
X11 font path. List the contents of /etc/X11/fontpath.d
(xset q will tell you if X knows about
this font catalogue directory).
There should be a japanese-bitmap entry
(or "fonts-japanese" in earlier releases).
-
Japanese PDF
If you use evince or xpdf then it should work, using the
system-wide Japanese fonts. If you want to use Adobe's
acroread then it may require an extra step.
For acroread 6,7,8 you just go to
The
Adobe font pack website, specify your platform and acroread version,
and download the font pack file. Untar it and (as root)
run the INSTALL command in the resultant JPNKIT
directory. The default place to install the fonts,
/usr/local/Adobe/Acrobat7.0/Resource/Font, is the correct one,
assuming you have a generic installation of acroread.
Printing Japanese documents
Most printers outside Japan do not have Japanese fonts resident on them,
so even if your computer has the Japanese fonts installed, they will
not appear in printout.
I use PostScript printers: when setting up the printer (using
system-config-printer under Fedora) you
should go to the "Driver Options" tab for the printer queue
and under "Ghostscript pre-filtering" select "Embed ghostscript fonts only".
This will cause Japanese fonts to be uploaded to the printer.
Mark Alford's home page
alford(at)physics.wustl.edu