2011/08/07

latex tips: how to set up UTF-8 latex environment in Ubuntu 10.04LTS/amd64

I show you utf-8 latex installation steps for utf-8 encodings in Ubuntu-10.04 LTS (amd64) 2011/08/07. I am not sure this is the most effective way, but this can work very well on Ubuntu-10.04 LTS ;-) If you through below steps, you can compile utf-8 encoded tex files and also compile sphinx document!! (And..., if you want to convert sphinx document to pdf format and get ExtBabel error when uses "make all-pdf-ja" command, you should also check here)

Step1. install dvipsk-ja (default package is broken at 2011.06.11 JST)
> sudo add-apt-repository ppa:cosmos-door/dvipsk-ja
> sudo aptitude update
> sudo aptitude upgrade
> sudo aptitude install dvipsk-ja

Step2. install packages
> sudo aptitude install texlive texlive-math-extra texlive-latex-extra texlive-latex-extra-doc texlive-fonts-extra texlive-fonts-extra-doc texlive-fonts-recommended texlive-fonts-recommended-doc texlive-formats-extra texlive-latex-recommended texlive-latex-recommended texlive-extra-utils texlive-font-utils texlive-doc-ja ptex-bin jbibtex-bin mendexk okumura-clsfiles latex-cjk-japanese cmap-adobe-japan1 cmap-adobe-japan2 cmap-adobe-cns1 cmap-adobe-gb1 gs-cjk-resource ghostscript xdvik-ja dvi2ps dvi2ps-fontdesc-morisawa5 jmpost latexmk latex-mk pybliographer yatex

Step3. update latex environment
> updmap
> sudo mktexlsr
> sudo updmap-sys
> sudo dpkg-reconfigure ptex-jisfonts
> sudo jisftconfig add

Step4. get iso image of texlive2010 (this includes platex for utf8)

Step5. mount iso image of texlive2010
sudo mount -o loop texlive2010-20100826.iso /mnt3

Step6. install texlive2010
> sudo ./install-tl
...
Enter command: O [options]
Enter command: L [create symlinks in standard directories]
New value for binary directory [/usr/local/bin]: Enter
New value for man directory    [/usr/local/man]: Enter
New value for info directory   [/usr/local/info]: Enter
Enter command: R
Enter command: I
Installing to: /usr/local/texlive/2010
Installing [0001/2133, time/total: ??:??/??:??]: 12many [376k]
Installing [0002/2133, time/total: 00:00/00:00]: 2up [66k]
Installing [0003/2133, time/total: 00:00/00:00]: ANUfinalexam [3k]
Installing [0004/2133, time/total: 00:00/00:00]: AkkTeX [16k]
Installing [0005/2133, time/total: 00:00/00:00]: Asana-Math [433k]
Installing [0006/2133, time/total: 00:00/00:00]: ESIEEcv [137k]
Installing [0007/2133, time/total: 00:01/18:36]: FAQ-en [4943k]
Installing [0008/2133, time/total: 00:01/03:12]: HA-prosper [266k]
Installing [0009/2133, time/total: 00:01/03:03]: IEEEconf [188k]
Installing [0010/2133, time/total: 00:01/02:58]: IEEEtran [1325k]
Installing [0011/2133, time/total: 00:01/02:28]: MemoirChapStyles [669k]
Installing [0012/2133, time/total: 00:02/04:32]: SIstyle [338k]
Installing [0013/2133, time/total: 00:02/04:22]: SIunits [284k]
....
Installing [2129/2133, time/total: 03:33/03:33]: zhmetrics [66k]
Installing [2130/2133, time/total: 03:33/03:33]: zhspacing [165k]
Installing [2131/2133, time/total: 03:33/03:33]: ziffer [3k]
Installing [2132/2133, time/total: 03:33/03:33]: zwgetfdate [242k]
Installing [2133/2133, time/total: 03:33/03:33]: zwpagelayout [520k]
Time used for installing the packages: 03:33
running mktexlsr /usr/local/texlive/2010/texmf-dist /usr/local/texlive/2010/texmf
mktexlsr: Updating /usr/local/texlive/2010/texmf-dist/ls-R...
mktexlsr: Updating /usr/local/texlive/2010/texmf/ls-R...
mktexlsr: Done.
writing fmtutil.cnf data to /usr/local/texlive/2010/texmf-var/web2c/fmtutil.cnf
writing updmap.cfg to /usr/local/texlive/2010/texmf-config/web2c/updmap.cfg
writing language.dat data to /usr/local/texlive/2010/texmf-var/tex/generic/config/language.dat
writing language.def data to /usr/local/texlive/2010/texmf-var/tex/generic/config/language.def
writing language.dat.lua data to /usr/local/texlive/2010/texmf-var/tex/generic/config/language.dat.lua
running mktexlsr /usr/local/texlive/2010/texmf-var
mktexlsr: Updating /usr/local/texlive/2010/texmf-var/ls-R...
mktexlsr: Done.
running updmap-sys...done
re-running mktexlsr /usr/local/texlive/2010/texmf-var
mktexlsr: Updating /usr/local/texlive/2010/texmf-var/ls-R...
mktexlsr: Done.
pre-generating all format files (fmtutil-sys --all), be patient...done
running path adjustment actions
finished with path adjustment actions
running package specific postactions
finished with package specific postactions

 See
   /usr/local/texlive/2010/index.html
 for links to documentation.  The TeX Live web site (http://tug.org/texlive/)
 contains updates and corrections.

 TeX Live is a joint project of the TeX user groups around the world;
 please consider supporting it by joining the group best for you. The
 list of groups is available on the web at http://tug.org/usergroups.html.

 Add /usr/local/texlive/2010/texmf/doc/man to MANPATH, if not dynamically determined.
 Add /usr/local/texlive/2010/texmf/doc/info to INFOPATH.

 Most importantly, add /usr/local/texlive/2010/bin/x86_64-linux
 to your PATH for current and future sessions.

 Welcome to TeX Live!
Logfile: /usr/local/texlive/2010/install-tl.log

Step7. check platex can corporate with utf-8 encoded text (see -kanji=STRING option)
> platex --help
Usage: ptex [option] texfile
     : ptex [option] &format texfile

-fmt=NAME               use NAME instead of program name or %&format.
-halt-on-error          stop processing at the first error
[-no]-file-line-error   disable/enable file:line:error style messages
-ini                    be iniptex.
-interaction=STRING     set interaction mode (STRING=batchmode|nonstopmode|
                          scrollmode|errorstopmode)
-ipc                    send DVI output to a socket as well as the usual
                          output file
-ipc-start              as -ipc, and also start the server at the other end
-jobname=STRING         set the job name to STRING
-kanji=STRING           set Japanese encoding (STRING=euc|jis|sjis|utf8)
-kpathsea-debug=NUMBER  set path searching debugging flags according to
                          the bits of NUMBER
[-no]-mktex=FMT         disable/enable mktexFMT generation (FMT=tex/tfm)
-mltex                  enable MLTeX extensions such as \charsubdef
-output-comment=STRING  use STRING for DVI file comment instead of date
-output-directory=DIR   use DIR as the directory to write files to
[-no]-parse-first-line  disable/enable parsing of the first line of the
                          input file
-progname=STRING        set program (and fmt) name to STRING
-recorder               enable filename recorder
[-no]-shell-escape      disable/enable \write18{SHELL COMMAND}
-src-specials           insert source specials into the DVI file
-src-specials=WHERE     insert source specials in certain places of
                          the DVI file. WHERE is a comma-separated value
                          list: cr display hbox math par parend vbox
-translate-file=TCXNAME use the TCX file TCXNAME
-help                   print this message and exit.
-version                print version information and exit.

Email bug reports to ptex-staff@ml.asciimw.jp.

No comments:

Post a Comment

100