我尝试插入一张图片(来自这里) 具有透明度,就像 PDF 版本 2.0 中的那样。
问题在于所讨论图像的透明度管理不善。如果不明确使用 PDF 版本 2.0,则不存在任何特殊问题。以下是问题的说明(左侧 PDF 1.5,右侧 PDF 2.0):
\documentclass{article}
\pdfvariable majorversion 2 % PDF version 2.0
\pdfvariable minorversion 0
\usepackage{graphicx}
\begin{document}
\includegraphics{image.png}
\end{document}
LuaLaTeX 不支持 PDF 2.0 版本和图像透明度吗?
文件log
:
This is LuaHBTeX, Version 1.14.0 (MiKTeX 22.1) (format=lualatex 2022.2.22) 26 FEB 2022 22:30
system commands enabled.
**test.tex
(./test.tex
LaTeX2e <2021-11-15> patch level 1
Lua module: luaotfload 2021-05-21 3.18 Lua based OpenType font support
Lua module: lualibs 2021-05-20 2.74 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2021-05-20 2.74 ConTeXt Lua libraries -- extended c
ollection.
luaotfload | conf : Root cache directory is "C:/Users/intri/AppData/Local/MiKTeX
/luatex-cache/generic/names".
luaotfload | init : Loading fontloader "fontloader-2021-05-20.lua" from kpse-res
olved path "C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/luatex/luaotfload/f
ontloader-2021-05-20.lua".
Lua-only attribute luaotfload@noligature = 1
Lua-only attribute luaotfload@syllabe = 2
luaotfload | init : Context OpenType loader version 3.116
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Inserting `luaotfload.glyph_stream' at position 1 in `glyph_stream_provider'.
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua-only attribute luaotfload_color_attribute = 3
luaotfload | conf : Root cache directory is "C:/Users/intri/AppData/Local/MiKTeX
/luatex-cache/generic/names".
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_opentype_file'.
Inserting `luaotfload.harf.strip_prefix' at position 1 in `find_truetype_file'.
Inserting `luaotfload.harf.finalize_vlist' at position 1 in `post_linebreak_filt
er'.
Inserting `luaotfload.harf.finalize_hlist' at position 2 in `hpack_filter'.
Inserting `luaotfload.cleanup_files' at position 1 in `wrapup_run'.
Inserting `luaotfload.harf.finalize_unicode' at position 1 in `finish_pdffile'.
Inserting `luaotfload.glyphinfo' at position 1 in `glyph_info'.
Lua-only attribute luaotfload.letterspace_done = 4
Inserting `luaotfload.aux.set_sscale_dimens' at position 1 in `luaotfload.patch_
font'.
Inserting `luaotfload.aux.set_font_index' at position 2 in `luaotfload.patch_fon
t'.
Inserting `luaotfload.aux.patch_cambria_domh' at position 3 in `luaotfload.patch
_font'.
Inserting `luaotfload.aux.fixup_fontdata' at position 1 in `luaotfload.patch_fon
t_unsafe'.
Inserting `luaotfload.aux.set_capheight' at position 4 in `luaotfload.patch_font
'.
Inserting `luaotfload.aux.set_xheight' at position 5 in `luaotfload.patch_font'.
Inserting `luaotfload.rewrite_fontname' at position 6 in `luaotfload.patch_font'
. L3 programming layer <2022-02-05>
Inserting `tracingstacklevels' at position 1 in `input_level_string'.
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/base/size10.clo
File: size10.clo 2021/10/04 v1.4n Standard LaTeX file (size option)
luaotfload | db : Font names database loaded from C:/Users/intri/AppData/Local/M
iKTeX/luatex-cache/generic/names/luaotfload-names.luc)
\c@part=\count183
\c@section=\count184
\c@subsection=\count185
\c@subsubsection=\count186
\c@paragraph=\count187
\c@subparagraph=\count188
\c@figure=\count189
\c@table=\count190
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen137
)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/graphics/graphicx.sty
Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/graphics/graphics.sty
Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/graphics/trig.sty
Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/graphics-cfg/graphics.c
fg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: luatex.def on input line 107.
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/graphics-def/luatex.def
File: luatex.def 2021/06/01 v1.2c Graphics/color driver for luatex
))
\Gin@req@height=\dimen138
\Gin@req@width=\dimen139
)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/l3backend/l3backend-lua
tex.def
File: l3backend-luatex.def 2022-02-07 L3 backend support: PDF output (LuaTeX)
\l__color_backend_stack_int=\count191
\l__pdf_internal_box=\box50
) (./test.aux)
\openout1 = test.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 OMS/cmsy/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 T1/cmr/m/n on input line 5.
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 5.
LaTeX Font Info: Trying to load font information for TS1+cmr on input line 5
.
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info: ... okay on input line 5.
LaTeX Font Info: Checking defaults for TU/lmr/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.
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/context/base/mkii/supp-pdf.mk
ii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count192
\scratchdimen=\dimen140
\scratchbox=\box51
\nofMPsegments=\count193
\nofMParguments=\count194
\everyMPshowfont=\toks17
\MPscratchCnt=\count195
\MPscratchDim=\dimen141
\MPnumerator=\count196
\makeMPintoPDFobject=\count197
\everyMPtoPDFconversion=\toks18
)
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/epstopdf-pkg/epstopdf-b
ase.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.
(C:/Users/intri/AppData/Local/Programs/MiKTeX/tex/latex/00miktex/epstopdf-sys.c
fg
File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX
))
<image.png, id=1, 317.185pt x 317.185pt>
File: image.png Graphic file (type png)
<use image.png>
Package luatex.def Info: image.png used on input line 6.
(luatex.def) Requested size: 317.1842pt x 317.1842pt.
[1
{C:/Users/intri/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map}<./image.png>]
(./test.aux))
Here is how much of LuaTeX's memory you used:
1358 strings out of 477794
100000,383344 words of node,token memory allocated
406 words of node memory still in use:
3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec,
4 attribute_list, 1 write nodes
avail lists: 1:1,2:35,3:4,4:1,5:23,6:2,7:34,9:38
22058 multiletter control sequences out of 65536+600000
15 fonts using 723367 bytes
55i,5n,59p,189b,123s stack positions out of 5000i,500n,10000p,200000b,80000s
<//?/c:/users/intri/appdata/local/programs/miktex/fonts/opentype/public/lm/lmrom
an10-regular.otf>
Output written on test.pdf (1 page, 15116 bytes).
PDF statistics: 13 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 131072)
1 words of extra memory for PDF output out of 10000 (max. 100000000)