3
1

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 5 years have passed since last update.

[Ubuntu]Latexでフォントを埋め込む

Last updated at Posted at 2017-04-28

はじめに

探せば色々あるんですが、自分用のメモも兼ねて。
フォントをきちんと埋め込むことによって括弧が左にずれたり、環境によっては明朝体がゴシック体になるなどのトラブルが避けられます。

実行環境

Ubuntu 16.04
e-pTeX 3.14159265-p3.6-141210-2.6 (utf8.euc) (TeX Live 2015/Debian)

やり方

たとえば、Takaoフォントを埋め込みたい時。
terminalで

$cd /usr/share/fonts/truetype
$ls

すると、

abyssinica       font-awesome               lato           solomos
adf              fonts-guru-extra           liberation     takao-gothic
ancient-scripts  fonts-japanese-gothic.ttf  lohit-punjabi  takao-mincho
artemisia        fonts-japanese-mincho.ttf  lyx            tibetan-machine

たくさんフォントが出てくるので

$cd takao-mincho
$ls

からTrueTypeフォントファイルを確認。

TakaoExMincho.ttf  TakaoMincho.ttf  TakaoPMincho.ttf

同様にしてゴシックフォントのファイル名も確認したら、texファイルと同じ場所に以下のようなmapファイル(takao.map)を作成し

rml   H  :0:TakaoMincho.ttf
rmlv  V  :0:TakaoMincho.ttf
gbm   H  :0:TakaoGothic.ttf
gbmv  V  :0:TakaoGothic.ttf

dvipdfmxの引数に指定してやれば良い。

dvipdfmx -f takao.map sample.dvi

Takao明朝を例に書きましたが、今回の流れは自分でインストールしたフォント(Notoフォント)とかでも変わらないはずなんで、参考になれば幸いです。

3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?