Thanks! Ideally, however, I would be able to define the set of design meta-data in the actual YAML header of the document and not in the make script or the pandoc CLI parameters. I think the most straightforward way would be a LUA filter like `include-meta` that does something similar to `pandoc-include`. In the YAML header of the document: ``` title: The title include-meta: acme-design-settings.yaml ``` LUA filter for `include-meta`: ``` # pseudo-code if meta.include-meta is not nil: for each filename in meta.include-meta: additional_meta = parse(filename) for each entry in additional_meta: if meta[entry.key] is nil: meta[entry.key] = entry.value # recursion not shown in here, needed for nested YAML else: if len(meta[entry.key]) == 1: meta[entry.key] = list(meta[entry.key]) if len(entry.key) == 1: entry.key = list(entry.key) meta[entry.key].extend(entry.key) On Wednesday, November 3, 2021 at 5:15:42 PM UTC+1 John MacFarlane wrote: > > Another possibility is to use --defaults with a defaults file > that specifies the input file and all necessary parameters, > including metadata. > > Martin Hepp writes: > > > Dear all: > > > > I am trying to build a cleanly organized environment for deriving > slides, reports, papers, lecture notes etc. centered on Pandoc. > > > > In order to avoid redundancy and hence ease maintenance etc., it would > be good to put different groups of meta-data into different places: > > > > a) _user_ meta-data (like the default path for the BIB file, the author > name, ...) > > > > Example: my-meta-data.yaml > > --- > > author: Martin Hepp > > bibliography: my_references.json > > ... > > > > b) output format-dependent meta-data defaults (one file for e.g. Beamer > slides, one for Eisvogel reports, one for LNCS papers, ...) > > > > Example: eisvogel-defaults.yaml > > --- > > toc-own-page: true > > ... > > > > c) output format-dependent meta-data for specific renderings (e.g. logos > for multiple institutes or if a research project requires specific colors > or texts) > > > > Example: eisvogel-project1.yaml > > --- > > titlepage-text-color: "000000" > > titlepage-rule-color: "00A19B" > > titlepage-rule-height: 15 > > titlepage-background: "background-project1.pdf" > > logo: "templates/static/logo1.pdf" > > logo-width: 10cm > > ... > > > > d) document-specific meta-data in the YAML header block of the actual > document > > Example: my-report.md > > --- > > title: Pandoc is simply great > > ... > > > > < Actual content goes here> > > > > > > Now, the details from c) (like the logo path, colors, and the footer > texts) should be referenced in the document d), not repeated, like so: > > > > > > Example: my-report.md > > --- > > title: Pandoc is simply great > > include-metadata-from: eisvogel-project1.yaml > > ... > > > > I am using --metadata-file to load the various defaults in their order > of priority. But the settings from c) should be ideally set by referencing > c) in the actual document d). > > > > > > My question: Is that possible with Pandoc's included batteries? > > > > Currently, I see only two options: > > > > 1. Add the file-name of c) to the list of input files, like > > > > $ pandoc my-report.md eisvogel-project1.yaml -o my-report.pdf > --metadata-file=my-meta-data.yaml --metadata-file=eisvogel-defaults.yaml > > > > 2. Use https://github.com/DCsunset/pandoc-include, which allows > including YAML files in the YAML header block, like so > > > > --- > > title: Title > > --- > > > > !include-header header.yaml > > > > # Section > > > > Body > > > > See https://github.com/DCsunset/pandoc-include#header-include > > > > But I hesitate to add a hard dependency to #2. > > > > Thanks for your help! > > > > Best wishes > > Martin > > > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "pandoc-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/87056507-2301-49C2-A061-C87ABF35F3C9%40gmail.com > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/26d7de22-e65d-4596-8223-22e2666e9e93n%40googlegroups.com.