我正在尝试将远程图像插入 pdf,但尽管图像可用,Context 却无法将其插入文档。图像的位置只有一个灰色方块。
以下是 MWE:
\starttext
\startsection[
title=Digits 0-10]
\startsubsection[title=0]
\tfd{Hose}
\externalfigure[https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg][width=2cm]
\stopsubsection
\stopsection
\stoptext
更新@aditya 问题:上下文版本:当前版本:2017.03.02 22:23 Curl:已安装输出:
graphics > inclusion > using locations 'local,global'
graphics > inclusion > using paths '. .. ../..'
resolvers > schemes > hashing 'https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg' to 'https-cdn-vectorstock-com-i-thumb-large-48-82-green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg'
resolvers > schemes > fetching 'https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg', protocol 'https', method 'curl'
JFIFHHhttp://ns.adobe.com/xap/1.0/<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:creator> <rdf:Seq> <rdf:li>VectorStock.com/15644882</rdf:li> </rdf:Seq> </dc:creator> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?>C
C
D
!1AQaq#2BRbCSrDc$%4!1AQaq2R#b34BCr
?S@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ALd gePQ²MS<t
答案1
这不是一个答案,但它包含比评论中可以传达的更多信息。
- 您使用的是哪个版本的 ConTeXt?
- https 文件是使用 检索的
curl
。您curl
安装了吗? 您可以通过运行以下命令更好地了解正在发生的事情:
context --trackers=graphics.locating,resolvers.schemes --directives=schemes.threshold=0 --once test
在我的系统上,这给出
resolvers > schemes > hashing 'https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg' to 'https-cdn-vectorstock-com-i-thumb-large-48-82-green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg'
resolvers > schemes > fetching 'https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg', protocol 'https', method 'curl'
resolvers > schemes > using cached 'https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg', protocol 'https', cachename '/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/schemes/https-cdn-vectorstock-com-i-thumb-large-48-82-green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg'
graphics > inclusion > file '/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/schemes/https-cdn-vectorstock-com-i-thumb-large-48-82-green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg' has format 'jpg'
graphics > inclusion > url 'https://cdn.vectorstock.com/i/thumb-large/48/82/green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg' is resolved to '/home/adityam/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/schemes/https-cdn-vectorstock-com-i-thumb-large-48-82-green-garden-hose-agriculture-tool-cartoon-vector-15644882.jpg'
graphics > inclusion > format 'jpg' natively supported by backend
如上面第二行所示,正在使用 获取文件curl
。该标志--directives=schemes.threshold=0
用于强制下载文件(通常,仅当缓存超过一天时,才会缓存文件并重新下载)。