Page Layout ⇒ Help: Compiling multiple files / working with YAML
Help: Compiling multiple files / working with YAML
I am new to LaTeX and trying to get my head around it. I want to use a markdown file and use Pandoc/LaTeX to format it and would really appreciate some help understanding how I could concatenate several documents (potentially using YAML too, as I describe below):
Here's what I'd like to do:
1. Create a markdown file
2. Compile with Pandoc/LaTeX AND add some additional 'pages' automatically
3. Output as a PDF
In compiling it I would like to concatenate a cover page + copyright page + [ markdown file ] + end page.
My questions are:
a) how can I include the cover page + copyright page + end page without adding the full text to the markdown file? (I guess I am talking about some kind of include file?)
1. Could I add some YAML to the start of the Markdown file which is then read by Pandoc/ and used pass variables to build those pages?
2. Or, can I some how pass the pages in a set to the command line during the compile process to say add: cover page + copyright page + [markdown file] + end page all together?
Does anyone have a code snippet or example they could share to help me understand how this could be done?
I'm 'hacking away' at learning LaTeX but it is steep learning curve.
Thanks so much!
R
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Help: Compiling multiple files / working with YAML
BTW: This is not a LaTeX page layout question. It is a Pandoc usage question. Perhaps it could be moved to Conversion Tools if that forum would be applicable.

Help: Compiling multiple files / working with YAML
Thank you Ijon, this does what I was hoping very nicely! Much appreciated.
Help: Compiling multiple files / working with YAML
r2997790 wrote:Ijon Tichy wrote:You can add stuff at the begin or end of the body using options -B and -A. See the options in the Pandoc manual for more information.
Thank you Ijon, this does what I was hoping very nicely! Much appreciated.