使用pandoc的滑动离线

时间:2013-07-08 16:07:13

标签: slideshow offline pandoc

我正在使用Pandoc将Markdown转换为Slidy幻灯片格式。但我需要使用slidy离线,所以我把我从他们的网站http://www.w3.org/Talks/Tools/Slidy2/slidy.zip下载的滑动脚本的副本放在一个文件夹“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>
...

但是滑动根本不起作用。

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

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".

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

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

我不确切地知道问题是什么,但更改将滑动脚本src="Slidy2/scripts/slidy.js.gz"的压缩版本加载到未压缩版本src="Slidy2/scripts/slidy.js"的行解决了问题。