[英]Pandoc Lua Filter: How to access the title variable?
My document looks like this我的文档看起来像这样
---
title: 'Test'
---
lorem ipsum
I want to access the title variable to print it like this:我想访问 title 变量以这样打印:
function Image (elem)
elem.attributes.caption = 'Image of chapter ' .. title
return elem
The caption of all images should be: 'Image of chapter Test'
.所有图像的标题应为: 'Image of chapter Test'
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.