2

我正在使用 Pandoc 从 Markdown 转换为 Slidy 幻灯片格式。但我需要离线使用 slidy,所以我将我从他们的网站http://www.w3.org/Talks/Tools/Slidy2/slidy.zip下载的 slidy 脚本的副本放在文件夹“Slidy2”下,然后我使用命令

 pandoc -s -t slidy -V slidy-url=Slidy2 

为了链接我本地的 slidy 副本,pandoc 生成以下 html 代码

...
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" type="text/css" media="screen, projection, print"
    href="Slidy2/styles/slidy.css" />
<script src="Slidy2/scripts/slidy.js.gz"
    charset="utf-8" type="text/javascript"></script>
</head>
...

但 slidy 根本不起作用。

在滑动页面中,提到了以下选项:

1. Use relative URIs depending on your local setup to access the appropriate files. 
   Use the same directory structure as on the W3C server, ie, ".../2005/Talks/...".

2. Run a Web server on your machine so that the directory above can be accessed via
   http://localhost/Talks/Tools/Slidy2 and use the URIs of the form   
   "/Talks/Tools/Slidy2/styles/slidy.css", "/Talks/Tools/Slidy2/scripts/slidy.js".

我不知道这可能是什么问题。

4

2 回答 2

0

我不知道到底是什么问题,但是将加载 slidy 脚本src="Slidy2/scripts/slidy.js.gz"的压缩版本的行更改为未压缩版本src="Slidy2/scripts/slidy.js"可以解决问题。

于 2013-07-11T13:47:34.983 回答
0

尝试使用 --self-contained 选项生成自给自足的 HTML 代码。您的 HTML 代码不完整。它缺少<html>, <body>元素

于 2013-07-10T17:32:24.490 回答