我正在尝试使用YAML元数据块在Pordoc的Markdown文档中指定一些文档属性,我将要转换为LaTeX Beamer。我在这里阅读了描述:http://johnmacfarlane.net/pandoc/README.html#extension-yaml_metadata_block并尝试了以下文档:
---
title: Some title
---
# This is a test slideshow.
## This should turn into a slide...
...with some content.
我使用pandoc -t beamer file.md -V theme:SomeTheme -o file.pdf
将文件转换为PDF。它似乎与主题等正常工作,除了文档开头的YAML块转换为第一张幻灯片中的表格,其中包含顶部和底部规则以及文本"标题:一些标题&#34 ;。我做错了什么?
答案 0 :(得分:2)
不确定为什么你的元数据不起作用,因为我的工作正常。
尝试做(标题后面有空格):
---
title: Some title
---
# This is a test slideshow.
## This should turn into a slide...
...with some content.
或(有句号):
---
title: Some title
...
# This is a test slideshow.
## This should turn into a slide...
...with some content.
或(带引号):
---
title: "Some title"
---
# This is a test slideshow.
## This should turn into a slide...
...with some content.
这些都可以吗?