LoginSignup
13
9

More than 5 years have passed since last update.

TeXにpng画像を挿入するときの注意

Posted at

2と3はどちらかのみで構わない。

  1. プリアンブルに \usepackage[dvipdfmx]{graphicx} のように dvipdfmx を付けて記述(colorを使用する場合、そちらにも \usepackage[dvipdfmx]{color} のように dvipdfmx を付けなければならない)。
  2. $ extractbb hoge.png で xbb ファイルを作成する(/usr/local/texlive/texmf/web2c/texmf.cnf の shell_escape_commands に extractbb を記述しておけば自動的に xbb ファイルを作成してくれるので便利)
  3. \includegraphics[bb=0 0 1000 1000,width=0.8\textwidth]{hoge.png} のように四隅を「bb=」以降に記述。

2は以下のように extractbb,\ を追記する。

shell_escape_commands = \
bibtex,bibtex8,\
kpsewhich,\
makeindex,\
repstopdf,\
extractbb,\
13
9
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
13
9