質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
LaTeX

LaTeXは、レスリー・ランポートが開発したテキストベースの文書整形システムです。 電子製版ソフトウェアである「TeX」にマクロパッケージを組み込む形で構成されており、 通常のTeXより扱いやすくなっているのが特徴です。

TeX

フリーの組版システムで、字や図版などの要素を紙面に配置するという作業をコンピュータで行います

Q&A

2回答

5233閲覧

LaTeXで画像が表示されません。

mashiroyuya

総合スコア24

LaTeX

LaTeXは、レスリー・ランポートが開発したテキストベースの文書整形システムです。 電子製版ソフトウェアである「TeX」にマクロパッケージを組み込む形で構成されており、 通常のTeXより扱いやすくなっているのが特徴です。

TeX

フリーの組版システムで、字や図版などの要素を紙面に配置するという作業をコンピュータで行います

0グッド

0クリップ

投稿2018/12/25 04:20

mactex2018を使ってmacにLaTeX環境を作り
以下のようなコードで画像を出力しようと思ったのですが、figure1というラベルと画像があるべきスペースは表示されますが、画像は表示されません。
なぜでしょうか。どのように解決すべきか教えていただきたいです。後ろにlogファイルの出力を貼っておきます。

tex

1\documentclass{article} 2\usepackage[dvipdfmx]{graphicx} 3 4\begin{document} 5\LaTeX 6 7\begin{figure} 8 \includegraphics[width=6cm]{./figures/image1.pdf} 9 \caption{} 10 \label{} 11\end{figure} 12\end{document}

log

1 2This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2018.12.25) 25 DEC 2018 13:17 3entering extended mode 4 restricted \write18 enabled. 5 file:line:error style messages enabled. 6 %&-line parsing enabled. 7**test.tex 8(./test.tex 9LaTeX2e <2018-04-01> patch level 2 10Babel <3.18> and hyphenation patterns for 84 language(s) loaded. 11(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls 12Document Class: article 2014/09/29 v1.4h Standard LaTeX document class 13(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo 14File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) 15) 16\c@part=\count80 17\c@section=\count81 18\c@subsection=\count82 19\c@subsubsection=\count83 20\c@paragraph=\count84 21\c@subparagraph=\count85 22\c@figure=\count86 23\c@table=\count87 24\abovecaptionskip=\skip41 25\belowcaptionskip=\skip42 26\bibindent=\dimen102 27) 28(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphicx.sty 29Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR) 30 31(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty 32Package: keyval 2014/10/28 v1.15 key=value parser (DPC) 33\KV@toks@=\toks14 34) 35(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/graphics.sty 36Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR) 37 38(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/trig.sty 39Package: trig 2016/01/03 v1.10 sin cos tan (DPC) 40) 41(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/graphics.cfg 42File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration 43) 44Package graphics Info: Driver file: dvipdfmx.def on input line 99. 45 46(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/dvipdfmx.def 47File: dvipdfmx.def 2017/06/24 v5.0g Graphics/color driver for dvipdfmx 48)) 49\Gin@req@height=\dimen103 50\Gin@req@width=\dimen104 51) 52(./test.aux) 53\openout1 = `test.aux'. 54 55LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4. 56LaTeX Font Info: ... okay on input line 4. 57LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. 58LaTeX Font Info: ... okay on input line 4. 59LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. 60LaTeX Font Info: ... okay on input line 4. 61LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. 62LaTeX Font Info: ... okay on input line 4. 63LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. 64LaTeX Font Info: ... okay on input line 4. 65LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. 66LaTeX Font Info: ... okay on input line 4. 67LaTeX Font Info: External font `cmex10' loaded for size 68(Font) <7> on input line 5. 69LaTeX Font Info: External font `cmex10' loaded for size 70(Font) <5> on input line 5. 71File: ./figures/image1.pdf Graphic file (type pdf) 72<./figures/image1.pdf> 73 74Overfull \hbox (117.72874pt too wide) in paragraph at lines 8--9 75[][] 76 [] 77 78[1{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map} 79 80] 81(./test.aux) ) 82Here is how much of TeX's memory you used: 83 583 strings out of 492649 84 7277 string characters out of 6129621 85 65028 words of memory out of 5000000 86 4527 multiletter control sequences out of 15000+600000 87 3640 words of font info for 14 fonts, out of 8000000 for 9000 88 1141 hyphenation exceptions out of 8191 89 25i,4n,21p,181b,236s stack positions out of 5000i,500n,10000p,200000b,80000s 90</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/c 91m/cmr10.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/ 92cmr7.pfb> 93Output written on test.pdf (1 page, 19776 bytes). 94PDF statistics: 95 16 PDF objects out of 1000 (max. 8388607) 96 10 compressed objects within 1 object stream 97 0 named destinations out of 1000 (max. 500000) 98 1 words of extra memory for PDF output out of 10000 (max. 10000000) 99 100

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

\includegraphics[width=6cm]{./figures/image1.pdf}

\includegraphics{./figures/image1.pdf}
に変更してみてください。

これで表示できれば、[width=6cm]という画像の横幅指定が間違っていたことになります。
また[width=12cm]で試すのもよいかもしれません。

投稿2018/12/25 14:30

fu7mu4

総合スコア1088

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

File: ./figures/image1.pdf Graphic file (type pdf)

<./figures/image1.pdf>
Overfull \hbox (117.72874pt too wide) in paragraph at lines 8--9

[直訳]\hboxがはみ出しました(117.72874pt広すぎです)

との警告メッセージが出ています。左右の余白を大きくとっているなら余白を狭くする、./figures/image1.pdfというファイルの画像の幅を狭めるなどして、はみ出さないようにすれば良いのではないでしょうか。
はみ出しているのが118pt(約41.3mm)ですから、調整できるのではないかと思います。

投稿2018/12/25 05:12

coco_bauer

総合スコア6915

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問