以下 LaTeX 代码生成一个空的 fbox,其中应包含 .png 图片。如何才能使其正常工作?
% Test for importing screenshots in LaTeX - png
\documentclass[a4paper]{article}
\usepackage[dvipdfmx,final]{graphicx}
\usepackage{bmpsize}
\begin{document}
% sizes
\setlength{\oddsidemargin}{0mm}\setlength{\evensidemargin}{0mm}
\setlength{\textwidth}{160mm}\setlength{\fboxsep}{0pt}
\setlength{\unitlength}{1mm}
% ruler
\par\noindent%
\begin{picture}(0,0)(0,0)%
\multiput(0,0)(10,0){16}{\line(0,1){3}}\multiput(5,0)(10,0){16}{\line(0,1){2}}%
\multiput(0,0)(1,0){155}{\line(0,1){1.5}}%
\thicklines\multiput(0,0)(50,0){4}{\line(0,1){4}}%
\end{picture}
% test
\par\noindent\fbox{\includegraphics[width=148mm,keepaspectratio]{AscToH2.png}}
\end{document}
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9 64-bit) (preloaded format=latex 2015.2.25) 30 JUN 2016 08:34
entering extended mode
**GraphxTestpng.tex
(GraphxTestpng.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 68 languages loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: dvipdfmx.def on input line 91.
(C:\Users\Ray\AppData\Roaming\MiKTeX\2.9\tex\latex\dvipdfmx-def\dvipdfmx.def
File: dvipdfmx.def 2014/07/25 v4.03 LaTeX color/graphics driver for dvipdfmx (T
eX Live/ChoF)
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\bmpsize.sty"
Package: bmpsize 2009/09/04 v1.6 Extract size/resolution from bitmap files (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is not detected.
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"
Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode.
)
("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\bmpsize-base.sty"
Package: bmpsize-base 2009/09/04 v1.6 Basic part of bmpsize (HO)
(C:\Users\Ray\AppData\Roaming\MiKTeX\2.9\tex\latex\fp\fp-basic.sty
Package: fp-basic 1996/05/13
`Basic Fixed Point Arithmetic', Version 1.2d (C) Michael Mehlich
\FP@xs=\count87
\FP@xia=\count88
\FP@xib=\count89
\FP@xfa=\count90
\FP@xfb=\count91
\FP@rega=\count92
\FP@regb=\count93
\FP@regs=\count94
\FP@times=\count95
) (C:\Users\Ray\AppData\Roaming\MiKTeX\2.9\tex\latex\fp\fp-snap.sty
Package: fp-snap 1995/04/05
`Fixed Point Snap Off', Version 1.0a (C) Michael Mehlich )
) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\bmpsize-dvipdfmx.def"
File: bmpsize-dvipdfmx.def 2009/09/04 v1.6 Graphics bitmap driver for dvipdfmx
(HO)
\@bmpsize@count=\count96
))
(GraphxTestpng.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
( FP-DIV ) ( FP-DIV )
File: AscToH2.png Graphic file (type bmp)
<AscToH2.png>
Overfull \hbox (76.90077pt too wide) in paragraph at lines 18--19
[]
[]
[1
] (GraphxTestpng.aux) )
Here is how much of TeX's memory you used:
1061 strings out of 493699
14581 string characters out of 3144444
81402 words of memory out of 3000000
4421 multiletter control sequences out of 15000+200000
3640 words of font info for 14 fonts, out of 3000000 for 9000
1025 hyphenation exceptions out of 8191
32i,5n,27p,212b,144s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on GraphxTestpng.dvi (1 page, 3744 bytes).