Solution 1 :

The include-files Lua filter should do what you need. You’ll need to download the include-files.lua file and pass it to pandoc via --lua-filter include-files.lua.

The syntax is

``` {.include}
GRAMPS: How to

Problem :

I’ve been trying to figure out if there is a simple way to do this, and if not if there is a pandoc way to do this outside of using cat to combine files.

What I want to do is say I have the following set of files:

  • Gramps: How to Install.pandoc
  • Gramps: How to Backup Tree.pandoc
  • Gramps: How to Enter a person.pandoc
  • Gramps: Geneology Basics about entering people.pandoc
  • Gramps: How Plaucity of citation is bad
  • etc on and on

I would essential like to be able to write a pandoc document that can import the files above into itself and compile them as if they were in the document as well, without having to concatenate them in the shell first or without resorting to HTML links.

Something like:

% Gramps Research Document
% Mallow
% 2020.01.07

# Gramps Notes

This is a combination of all my notes into a single document

# Initial Gramps Installation and Backups

<import GRAMPS: How to Install>
<Import Gramps: How to Backup Tree.pandoc>

# Basic Information before entering data

<import Gramps: Geneology Basics about entering people.pandoc>

# Entering People

<import Gramps: How to Enter a person.pandoc>

# Entering Families


Typing the example above out reveals to me that maybe I would also need a mechanism that would deal with auto adjusting headers as well, but that could be a different story.

First I should know, is there a way to do a simulacrum of the example above where there is some sort of markup I can give a pandoc document so that the pandoc parser can directly import said files into the document based on what is in the document that combines these files?

If not I suppose that means it must be done with a custom script or filter, is there one out there that does what I’m hoping to do here?


Comment posted by Mallow

On my windows 10 machine I had to do –lua-filter=include-files.lua to get it to work. Awesome!

Comment posted by s6mike

–lua-filter without an s should work.