2
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.

mintedをusepackageしただけで図の配置が崩れるとき

Posted at

問題

シンタックスハイライトのために

\usepackage{minted}

と書いただけで図の配置が崩れてしまう!なんでやねん!

原因

dvipdfmではなくdvipdfmxを使わないと図がズレるのは有名な話だと思いますが,おそらくそれに関する問題です.TeX素人なので推測ですが,mintedが内部でdvipdfmを使っており,dvipdfmxをかき消してしまうのが原因だと思われます.この直感をもとに

\usepackage{minted}
\usepackage[dvipdfmx]{graphicx}

の順番で書くようにすると見事に解決しました.2時間ぐらい費やしたので同じ被害者が出ないためにも書き残しておきます…

2
1
1

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
2
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?