Skip to content

include-files.lua fails with relative path if not executed from the main document directory #238

@chrisaga

Description

@chrisaga

All relative paths are processed relatively to the working directory.
Relative path in a document (main source file) are obviously relative to the directory of this document.
So the filter works only if the working directory (from which the pandoc command is run) is the directory where the main document is stored.

This should be easily fixed if we could access to the sourcefile variable set by Pandoc (see Pandoc's manual).
I was not able to figure out how it can be accessed from a lua filter.

NB1. I suspect the same restriction applies to include-code-files.lua
NB2. With this restriction we can not even build clean test cases with all files stored in a test subdirectory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions