Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

11
10

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.

日本語LaTeXドキュメントへのIPAフォントの埋め込み

Posted at

概要

ビューワでプレビューすると全文がゴシック体で出てしまった,みたいなあるある話を解決できます.TeXLiveが入っていればLinuxでもWindowsでもMacでもいけるはずです.

1番めの参考URLにあるように

$ dvipdfmx -f ptex-ipa.map

としてもよいのですが,この手の重要な設定がtexファイル本体に紐付いていないのはなんとも不便です.というわけで調べてみました.

方法

texファイルの先頭に

\AtBeginDvi{\special{pdf:mapfile ptex-ipa.map}}

を記述するだけでOKです.ptex-ipa.map の部分を別のマップファイルに変更すれば,他のフォントを割り当てることもできます.

私はlatexmkを使ってコンパイルしているのですが,ファイルごと(書類とプレゼンとか)で埋め込みたいフォントが異なるため,設定ファイルにオプションを記述するのは嫌だったのですが,これならtexファイルに直書きできるので重宝しています.

参考

11
10
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
11
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?