-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Org Abstract Block Export #57
Comments
Yes, this is possible, but requires some trickery. A simple way is to use a Lua filter: Put the following into a file and name it -- file: abstract-div-to-meta.lua
local abstract = {}
function Div (div)
if div.classes:includes 'ABSTRACT' then
abstract = div.content
return {}
end
end
function Meta (meta)
meta.abstract = pandoc.MetaBlocks(abstract)
return meta
end Now tell pandoc to use this by altering the variable |
Thanks for the quick response, this does indeed seem to be the way to do it. However I'm currently getting an error with the LUA script:
Just to clarify, it runs without an abstract block, but not with one. |
OK, I found a way to achieve more or less the desired functionality, using instead a top-level Abstract header: Thanks. |
Happy the other filter works for you. The error is puzzling, |
Ah - that does appear to be the issue, 2.0.2. Thanks! |
Is it possible to allow export of the abstract block, i.e.
#+BEGIN_ABSTRACT
as a pandoc_metadata 'abstract'? This would allow export of an abstract before the TOC in latex documents, which currently requires a long:
#+PANDOC_METADATA "abstract: very long line"
The text was updated successfully, but these errors were encountered: