2012-03-07 32 views
0

我在.org文件中有一个嵌入式图像,然后我发布为html。包括在.ORG文件中的行是用svg图像导出数字

[[./img/fig.svg]] 

这被翻译成HTML作为

<p><img src="./img/fig.svg" alt="./img/fig.svg" /> 
</p> 

此图像显示了在Chrome和Opera,当我加载页面,但在Firefox我只看到了链接为文本(“./img/fig.svg”)。我想知道我需要做什么来导出svg,以便它能够在Firefox中加载 - 无论是在org模式还是在html导出之后。谢谢

回答

2

我不能再现此问题(关于组织和org-export-as-html)。我用下面的测试:

ORG
#+property: cache yes 

* SVG test 

This is a test to see if SVG images load properly in firefox 

[[./img/Bitmap.svg]] 

Small codeblock simply for extra content 
#+name: testing 
#+begin_src emacs-lisp 
    (message "this is a test") 
#+end_src 

#+RESULTS[cb71d15e075dd84e5bc916f61562820a5695d056]: testing 
: this is a test 
HTML
<h1 class="title">SVG test</h1> 

<p>This is a test to see if SVG images load properly in firefox 
</p> 
<p> 
<img src="./img/Bitmap.svg" alt="./img/Bitmap.svg" /> 
</p> 
<p> 
Small codeblock simply for extra content 
</p> 


<pre class="src src-emacs-lisp">(message "this is a test") 
</pre> 

这显示没有问题,在Opera 11.61,火狐10.0.2但在IE8与该协议是不可用的消息失败。当您尝试查看它们时,其他SVG是否可以在Firefox中使用?

+0

感谢您提醒调试的基础知识。它可以与其他SVG一起工作。我最初使用的SVG是从Adobe Illustrator导出的 - 那里肯定存在问题。奇怪的是,它会在其他浏览器工作,但... – hatmatrix 2012-03-07 16:03:33

+0

@crippledlambda你可以发布SVG的地方?这会让人更容易分辨为什么它不能正常工作... – 2012-03-08 02:39:13

+0

@BorisZbarsky,非常感谢 - 我在Illustrator中重新创建了这个图形,现在看起来很好......我认为它之前没有正确保存。 – hatmatrix 2012-03-08 07:13:51