Page LayoutHelp: Compiling multiple files / working with YAML

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
r2997790
Posts: 5
Joined: Sat Aug 24, 2019 12:10 pm

Help: Compiling multiple files / working with YAML

Post by r2997790 »

Hi LaTeXers,

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Help: Compiling multiple files / working with YAML

Post by Ijon Tichy »

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.

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.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
r2997790
Posts: 5
Joined: Sat Aug 24, 2019 12:10 pm

Help: Compiling multiple files / working with YAML

Post by r2997790 »

[quote="Ijon Tichy"]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.
r2997790
Posts: 5
Joined: Sat Aug 24, 2019 12:10 pm

Help: Compiling multiple files / working with YAML

Post by r2997790 »

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.
Post Reply