Per-Document Headers & Footers

Tammy's Avatar


26 Jul, 2017 01:46 PM


I'm using Marked 2 version 2.5.10 (930) on a MacBook Pro running macOS Sierra 10.12.5. I'm not able to get the per-document headers and footers working as described here in this help document:

I have three files,, and Each file contains the following metadata at the top of the document. There are no line breaks above, and only one line break below:

Print Header Left: %title
Print Header Right: %md_chapter
Print Footer Right: %page
Chapter: Introduction

[document markdown begins here]

For each document only the Chapter: metadata changes. For example:

Chapter: Introduction

Chapter: Chapter One

Chapter: Chapter Two

The file I'm opening in Marked 2 is And when I use the export to PDF Paginated feature, the Header Right always prints whatever is in the file -- in this case, "Introduction".

Any help would be much appreciated. Thank you.

  • T
  1. 1 Posted by Tammy on 26 Jul, 2017 02:16 PM

    Tammy's Avatar

    Here's a VERY simplified example of how it's not working. I'm certain I'm doing something incorrectly.

  2. Support Staff 2 Posted by Brett on 26 Jul, 2017 02:59 PM

    Brett's Avatar

    Hi Tammy,

    Unfortunately this isn't the way per-document settings work. "Document"
    refers to the entire document, with all included files concatenated.
    Because rendering requires documents to be combined first, individual
    includes cannot contain metadata (or at least it won't be registered).
    Furthering the issue, at the time of printing (including paginated PDF
    export) the document is already converted (with metadata removed) and
    pagination is determined by the print system, so Marked can't know where
    to change the headers.


  3. 3 Posted by Tammy on 29 Jul, 2017 04:14 PM

    Tammy's Avatar

    Thanks for the reply. That makes sense.

    • T

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac