Skip to content
Discussion options

You must be logged in to vote

There are at least two ways:

  • you can define a new template, and then use Pandoc's template syntax to iterate over that list
  • you can write a Lua filter that reads the values from the metadata and then inserts them in the proper place in the document.

Let me give you an example of the latter. In your document, you write:

---
filters: 
 - filter.lua
admin:
  staff:
  - name: John Doe
  - name: Jane Doe
# note here that i'm not using the indirection you want; but you should
# be able to adapt this to your needs.
---

Admin Staff: []{#admin-placeholder}
-- filter.lua

local admin_staff
local capture_meta = {
  Meta = function(meta)
    admin_staff = meta.admin.staff
  end
}

local replace_list 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rputikar
Comment options

Answer selected by rputikar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
lua Issues related to the lua codebase, filter chain, etc
2 participants