Go to page:

Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

Japanese

Categories: Japanese, Windows, Mac
<< | Page list | >>

How to set up LyX for Japanese

I. Windows

1. Setup TeX environment and tune up LyX

  • Install LyX for Windows. If you intend to use pTeX only, you don't have to install MikTeX during the installation process. Otherwise, make sure to set paths correctly so that pTeX which will be installed in the next step does not conflict with MikTeX.
  • 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".
    1. Extract the package file texinst756.zip to the folder C:\pTeX
    2. 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
    1. After finishing installation, start dviout and open menu Option -> Setup Parameters...
    2. In the Font tab, set TEXROOT, TEXPK and TEXFONTS variables appropriately. Pushing "Guess" button may help.
    3. In the Font2 tab, set gen: appropriately. Pushing "gen:" button does automatic search for you.
    4. In the WinJFont tab, choose appropriate Japanese font for "Windows Font". Normally "MS Mincho" (font name may be shown in Japanese name) is used.
  • Add ghostscript fonts:
    If you use Japanese variant of ghostscript, you may need to add URW fonts with Cyrill characters. In such a case, please download one of the following files and expand it in the ghostscript folder (e.g. if it is C:\gs\gs8.63, each font file should go in C:\gs\gs8.63\fonts):
    1. http://www.int.otaru-uc.ac.jp/lyx-howto/install/gs-urw-fonts-1.0.7pre22.zip(approve sites)
    2. http://www.int.otaru-uc.ac.jp/lyx-howto/install/gs-urw-fonts-1.0.7pre22.lzh(approve sites)
  • Make dvips kanji-aware which comes with pTeX:
    • Edit C:\tex\texmf\fonts\map\dvips\base\kanji.map (which may not exist by default) to contain the following lines:
% Japanese
rml         Ryumin-Light--H
rmlv        Ryumin-Light--V
gbm         GothicBBB-Medium-H
gbmv        GothicBBB-Medium-V

nrml        Ryumin-Light-H
ngbm        GothicBBB-Medium-H

% Morisawa
ryumin-l    Ryumin-Light-H
ryumin-l-v  Ryumin-Light-V
gtbbb-m     GothicBBB-Medium-H
gtbbb-m-v   GothicBBB-Medium-V
futomin-b   FutoMinA101-Bold-H
futomin-b-v FutoMinA101-Bold-V
futogo-b    FutoGoB101-Bold-H
futogo-b-v  FutoGoB101-Bold-V
jun101-l    Jun101-Light-H
jun101-l-v  Jun101-Light-V

MJKanji     KozMinStd-Bold-90pv-H
MJKanji-v   KozMinStd-Bold-90pv-V
MJKata-h    MojikumiKata-EB-90pv-H
MJKata-v    MojikumiKata-EB-90pv-V
  • From command line, execute updmap -add kanji.map and mktexlsr.
  • Install the LaTeX-package "japanese":
    1. Download it from here
    2. Extract the zip file to C:\pTeX\share\texmf\tex\latex\japanese
    3. Open a console, change to the directory C:\pTeX\share\texmf\tex\latex\japanese and execute the command
      platex japanese.ins
    4. Change in the console to the folder C:\pTeX\bin and execute the command
      texhash
  • (Only for LyX-1.5.x) Install Japanese layout files:
    Download following Japanese layout files to C:\Program Files\LyX15\Resources\layouts
    1. jarticle.layout
    2. jreport.layout
    3. jbook.layout
    4. jsarticle.layout
    5. jsbook.layout
  • (Only for LyX-1.5.x) 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).
  • (Only for LyX-1.5.x) 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.

  • (Only for LyX-1.5.x) Open the menu Tool -> Preferences -> Converters
    1. Remove the converter definition "LaTeX (plain) -> DraftDVI"
    2. Add a converter definition "LaTeX (plain) -> DVI" with the converter platex $$i
    3. Push "Apply" button
  • Open the menu Tool -> Preferences -> Converters
    1. Select the converter definition "DVI -> Postscript"
    2. Modify the converter definition from dvips -o $$o $$i to dvips -Ppdf -z -o $$o $$i.
    3. Push "Modify" button
    4. Push "Apply" button
  • Open the menu Tool -> Preferences -> File formats
    1. Choose "DVI" from the "File formats" pane
    2. Modify "Viewer:" to the path of dviout, say C:\usr\dviout\dviout if it is in the folder C:\usr\dviout\
    3. Push "Apply" button
  • Open the menu Tool -> Preferences -> Language setting -> Language
    1. Change the "Default language:" to "Japanese"
    2. Push "Save" button

(Notes)

  • You need for all steps of the Windows installation administrator privileges.
  • There is currently no Japanese spellchecker dictionary available.
  • pdflatex cannot be used with Japanese language. Use dvipdfm or ps2pdf.

II. Mac

  1. Install LyX for Mac as explained on this Wiki page.
  2. Install the pTeX-package for MacOS as explained here.
  3. Follow the steps from 3. to 6. from the Windows installation routine (Use the platex path of your system and not C:\pTeX\bin)

III. Categories

Japanese / Windows / Mac

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2016-11-01 17:19 CET