4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS7にTexLive 2019をインストール

Last updated at Posted at 2020-01-02

CentOS7にTex Live 2019をインストールしたため,その手順を備忘録兼ねて投稿します.

動作環境

以下のCentOS7の環境で行いました.

[toran@localhost]$ cat /etc/centos-release
CentOS Linux release 7.7.1908 (Core)

TeXLive 2019のインストール

今回はJAISTのリポジトリからダウンロードし,インストール.

[toran@localhost]# wget http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz
[toran@localhost]# tar xvf install-tl-unx.tar.gz
[toran@localhost]# cd install-tl-20200102/
[toran@localhost]# sudo ./install-tl -no-gui

ちなみに,ここでCan't locate Digest/MD5.pm in @INCのようなエラーが出たら,
perl-Digest-MD5パッケージのインストールが必要です.

[toran@localhost]# yum install perl-Digest-MD5

順調にいけば,以下のように「I」と入力すればインストールが開始されます.
環境にも依りますが,30分くらいかかります.

[toran@localhost]# sudo ./install-tl -no-gui
Loading http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb
Installing TeX Live 2019 from: http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet (verified)
Platform: x86_64-linux => 'GNU/Linux on x86_64'
Distribution: net  (downloading)
Using URL: http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet
Directory for temporary files: /tmp/_39MOkYRTS
======================> TeX Live installation procedure <=====================

======>   Letters/digits in <angle brackets> indicate   <=======
======>   menu items for actions or customizations      <=======

 Detected platform: GNU/Linux on x86_64

 <B> set binary platforms: 1 out of 16

 <S> set installation scheme: scheme-full

 <C> set installation collections:
     40 collections out of 41, disk space required: 6326 MB

 <D> set directories:
   TEXDIR (the main TeX directory):
     /usr/local/texlive/2019
   TEXMFLOCAL (directory for site-wide local files):
     /usr/local/texlive/texmf-local
   TEXMFSYSVAR (directory for variable and automatically generated data):
     /usr/local/texlive/2019/texmf-var
   TEXMFSYSCONFIG (directory for local config):
     /usr/local/texlive/2019/texmf-config
   TEXMFVAR (personal directory for variable and automatically generated data):
     ~/.texlive2019/texmf-var
   TEXMFCONFIG (personal directory for local config):
     ~/.texlive2019/texmf-config
   TEXMFHOME (directory for user-specific files):
     ~/texmf

 <O> options:
   [ ] use letter size instead of A4 by default
   [X] allow execution of restricted list of programs via \write18
   [X] create all format files
   [X] install macro/font doc tree
   [X] install macro/font source tree
   [ ] create symlinks to standard directories

 <V> set up for portable installation

Actions:
 <I> start installation to hard disk
 <P> save installation profile to 'texlive.profile' and exit
 <H> help
 <Q> quit

Enter command: I

IPAフォントのインストール

IPAフォント用のディレクトリを作成します.

[toran@localhost]# mkdir /usr/share/fonts/japanese
[toran@localhost]# mkdir /usr/share/fonts/japanese/TrueType

こちらから,IPAフォントファイルをダウンロードします.

  • IPA Fonts/IPAex Fonts 4書体パック_IPAフォント (Ver.003.03)
  • IPA Fonts/IPAex Fonts 2書体パック_IPAexフォント(ver.002.01)
[toran@localhost]# wget https://ja.osdn.net/projects/ipafonts/downloads/51868/IPAfont00303.zip
[toran@localhost]# wget https://ja.osdn.net/projects/ipafonts/downloads/57330/IPAexfont00201.zip

.ttfファイルを移動し,インストールします.

[toran@localhost]# mv IPAfont00303/*.ttf /usr/share/fonts/japanese/TrueType/
[toran@localhost]# mv IPAexfont00201/*.ttf /usr/share/fonts/japanese/TrueType/
[toran@localhost]# fc-cache -fv

動作確認

以下のtest.texをテストファイルとします.

test.tex
\documentclass[a4j]{jarticle}
\begin{document}
こんにちは\LaTeX
\end{document}

コンパイルしてPDF化します.

[toran@localhost]$ platex test
[toran@localhost]$ dvipdfmx test
[toran@localhost]$ ls
temp.aux  temp.dvi  temp.log  temp.pdf  temp.tex

PDFが無事に表示されれば完了です.

参考にしたページ

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?