Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
使用最新版本的 pandoc,您可以做到这一点:
您将获得格式良好的 PDF 幻灯片。
有关详细说明,请参阅pandoc 用户指南。
Using a recent version of pandoc, you can do this:
and you will get a nicely formatted PDF slide show.
For further instructions, see the pandoc User's Guide.
这应该是类似于 jleedev 提到使用 Markdown 进行投影仪演示文稿,无论如何,这看起来更简单(并且有更好的文档记录!)。我要提到 bitbucket 上的一些 pandoc“过滤器”, https://bitbucket.org/mpastell/pandoc-过滤器,包括一个用于投影仪的过滤器。它提供了普通的 pandoc 图像导入语法,这是值得的。
它们通过我不太了解的 Pandoc 的 json 机制以及 http: //johnmacfarlane.net/pandoc/scripting.html。我不确定为什么使用通过 json 的路由。效果与上面帖子中使用的 perl 替换没有太大不同。无论如何,这个命令:
似乎对分为一级部分的非常简单的文本运行良好。 -- 有一个附带条件,
\begin{document}
后面紧跟着一个\end {frame}
。考虑到文件 https://bitbucket 的极端简单性,这可能是不可避免的。 org/mpastell/pandoc-filters/src/6cd7b8522cf5/beamer.hs 这很像第一个示例 Behead.hs在“使用 Pandoc 编写脚本”页面上。无论如何,很明显,您应该使用一些 LaTeX(可能是特定于 Beamer 的)来开始您的 Markdown 文件。 粘贴类似的内容如果您在 Markdown 文件的开头 ,那么一切都可以正常工作,但我认为是针对更特定于投影仪的内容。需要更多的文档就可以了!
中间的过程,
runhaskell beamer.hs
非常慢,但是如果你编译并运行它,它是瞬时的This should be a comment akin jleedev's mentioning the post on using markdown for beamer presentations, which in any case seems a little simpler (and better documented!). I was going to mention some pandoc 'filters' on bitbucket, https://bitbucket.org/mpastell/pandoc-filters, including one for beamer. It provides for ordinary pandoc image import syntax, for what that is worth.
They work through Pandoc's json machinery which I don't know much about, together with the sort of transformation explained in http://johnmacfarlane.net/pandoc/scripting.html. I'm not sure why the route through json is used. The effect is not that different from the perl substitutions used the in post above. In any case, this command:
seems to work fine on a very simple text divided into level one sections. -- With the one proviso, that
\begin{document}
is immediately followed by an\end {frame}
. This may be inevitable given the extreme simplicity of the file https://bitbucket.org/mpastell/pandoc-filters/src/6cd7b8522cf5/beamer.hs which is much like the first example Behead.hs on the "Scripting with Pandoc" page. In any case, it is clear that you are meant to begin your markdown file with a bit of LaTeX, presumably beamer-specific. If you stick something likeat the start of your markdown file, it all works fine, but I assume something more beamer-specific is intended. It could do with a little more documentation!
The middle process,
runhaskell beamer.hs
is very slow, but it's instantaneous if you compile it and run您可能想看看 MMD2PDF,这是一个命令行实用程序,可以将 MultiMarkDown 文本文件转换为 PDF 文档,添加一些额外的选项,例如包含网页和分页符支持。它是一个便携式实用程序,不会在注册表或文件系统中留下任何痕迹。
http://code.google.com/p/mmd2pdf
You might want to take a look at MMD2PDF, a command line utility, converts MultiMarkDown text files to PDF documents, adding a few extra's like options to include webpages and support for page-breaks. It is a portable utility, it will leave no traces in registry or on your file system.
http://code.google.com/p/mmd2pdf
Pandoc 中有原生的 Beamer 支持功能(以及 S5 和许多其他开放的 PPT 替代品);阅读文档,搜索邮件列表,您会发现很多详细信息。顺便说一句,FFR pandoc 邮件列表反应非常灵敏,包括直接从 John M(首席开发人员)本人那里获得快速反馈。
关于您关于部分分页符的问题的具体内容,这是 LaTeX 的正常功能,因此 Pandoc 完全支持 - 只需使用正常的 pandocs 选项指定乳胶样式表并坚持使用 pandocs 原生 Markdown 输入。
当然,这确实需要一点乳胶知识,但在我看来,这比处理完全不同的包更好。
There are native beamer support features (along with S5 and many other open PPT-replacements) in Pandoc; read the docs, search the mail list and you'll find lots of details. BTW FFR the pandoc mailing list is very responsive, including getting quick feedback from John M (the lead developer) himself directly.
Regarding the specific content of your question regarding page-breaks on sections, this is a normal feature of LaTeX, therefore fully supported in Pandoc - just use the normal pandocs option to specify a latex stylesheet and stick with the pandocs native markdown input.
Of course, this does require a little latex knowledge, but IMO better that than having to deal with an entirely different package.
我无法让任何 pandoc 解决方案发挥作用。 (虽然我没有花任何时间试图找出原因。)
假设您正在使用诸如 Slidify 之类的 Slidy 来获取 HTML 幻灯片,您可以尝试这个对我来说效果出奇好的解决方法:
我只是从在 Chrome 中。将布局设置为横向以及背景颜色和图像的选项给了我所有的好处。
I couldn't get any of the pandoc solutions to work. (Though I didn't spend any time trying to figure out why.)
Assuming you're using something like Slidify of Slidy to obtain your HTML slides, you could try this workaround that did surprisingly well for me:
I merely printed to PDF from within Chrome. Setting the layout to landscape and options to background colors and images gave me all the goodies.