<< How to set up LyX on Windows for Hebrew | Page list | How to set up LyX for Vietnamese >>
How to set up LyX for Japanese
I. Windows
1. Setup TeX environment and tune up LyX
There is a Japanese installer in this Japanese page, which automates the process after "Install Japanese layout files" in this section (you still need to go through "2. Modify LyX settings").
- Install LyX for Windows using the official installer or this this alternative installer
- Install pTeX (Japanese-specific LaTeX-programs) from this page:
- Download all packages from there to a folder on your computer that doesn't have spaces in its path, e.g. to "C:\pTeX".
- Extract the package file texinst756.zip to the folder C:\pTeX
- Open a console, change to the folder C:\pTeX and execute the command
texinst756 C:\pTeX
- Download dviout (DVI viewer that can handle Japanese characters) from CTAN and install
- After finishing installation, start
dviout and open menu Option -> Setup Parameters...
- In the Font tab, set TEXROOT, TEXPK and TEXFONTS variables appropriately. Pushing "Guess" button may help.
- In the Font2 tab, set gen: appropriately. Pushing "gen:" button does automatic search for you.
- In the WinJFont tab, choose appropriate Japanese font for "Windows Font". Normally "MS Mincho" (font name may be shown in Japanese name) is used.
- Install the LaTeX-package "japanese":
- Download it from here
- Extract the zip file to C:\pTeX\share\texmf\tex\latex\japanese
- Open a console, change to the directory C:\pTeX\share\texmf\tex\latex\japanese and execute the command
platex japanese.ins
- Change in the console to the folder C:\pTeX\bin and execute the command
texhash
- Install Japanese layout files:
Download following Japanese layout files to C:\Program Files\LyX15\Resources\layouts
- jarticle.layout
- jreport.layout
- jbook.layout
- jsarticle.layout
- jsbook.layout
- Open C:\Program Files\LyX15\Resources\languages file with an editor and find a line beginning with "japanese" and edit as follows:
japanese "" "Japanese" false shift-jis-plain ja_JP ""
|
Note: The return code of the file is not for Windows, so lines may look mixed depending on the editor you choose (e.g. notepad).
- Open C:\Program Files\LyX15\Resources\encodings file with an editor and add the following lines
# Japanese TeX programs require neither CJK nor inputenc package
Encoding euc-jp-plain EUC-JP-pLaTeX EUC-JP variable none
End
Encoding jis-plain JIS-pLaTeX ISO-2022-JP variable none
End
Encoding shift-jis-plain SJIS-pLaTeX CP932 variable none
End
|
2. Modify LyX settings
After starting LyX, modify the settings as follows.
- Open the menu Tool -> Preferences -> Converters
- Remove the converter definition "LaTeX (plain) -> DraftDVI"
- Add a converter definition "LaTeX (plain) -> DVI" with the converter
platex $$i
- Push "Apply" button
- Open the menu Tool -> Preferences -> File formats
- Choose "DVI" from the "File formats" pane
- Modify "Viewer:" to the path of
dviout, say C:\usr\dviout\dviout if it is in the folder C:\usr\dviout\
- Push "Apply" button
- Open the menu Tool -> Preferences -> Language setting -> Language
- Change the "Default language:" to "Japanese"
- Push "Save" button
(Notes)
- You need for all steps of the Windows installation administrator privileges.
- There is currently no Japanese spellchecker dictionary available.
II. Mac
- Install LyX for Mac as explained on this Wiki page.
- Install the pTeX-package for MacOS as explained here.
- Follow the steps 3. and 4. from the Windows installation routine (Use the platex path of your system and not C:\pTeX\bin)
III. Categories
Japanese / Windows / Mac