How to modify

Modifying Pandoc templates sounds like fun!!

Start modifying the files in one of the template title pages. Currently this is vline and bg-image.

Are you kidding me?

No way! I have a static title page and I want to use that.

Go to one of the static examples (end in -static) and modify there.

What’s the difference? They both are being listed in template-partials in the YAML. -static is using a static title page. It is not using the values from the YAML at all. However before-body.tex still needs to be listed in template-partials to override the template that Quarto (and Pandoc) uses.

How it works

  • Defines titlepage or frontmatter via a pandoc template in before-body.tex.
  • Passes that template in via template-partials. This is needed so that you can reference the YAML variables, things like author.
  • Specifies the extra things (packages) that are needed for the LaTeX header in in-header.tex.

Adding an abstract to my frontmatter

This applies to front matter of any other type of front matter like preface or copyright page.

This is happening in the before-body.tex template partial. Adding abstract: to your Quarto yml won’t do anything because that would normally be in before-body.tex. You need to add your abstract to before-body.tex. There are many ways you might do this and it depends on the format of what you are producting. An article is different than a book is different than a thesis.

See the before-body.tex file in titlepages/academic-static to see one way that you can add your abstract.

The YAML - example

format:
  pdf:
    documentclass: scrartcl 
    number-sections: true
    template-partials:
      - "before-body.tex"
      - "_titlepage.tex" 
    include-in-header: 
      - "in-header.tex"
    toc: true
    lof: true
    lot: true

What is going on:

LaTeX document class affects the look; scrartcl or srcbook are the Quarto defaults. The cls folder in the repo has a few more in it.

    documentclass: scrartcl

Articles generally don’t have # (header 1) but instead just use ## (header 2). If you use, # (header 1) in scrartcl, then you need to set

    number-sections: true 

so the numbering isn’t whack.

This is the custom title page stuff. You don’t need to have the .tex files in the base directory. Often these files are stored in a tex or partials directory. If you do that, add the directory to the file, e.g. partials/before-body.tex.

    template-partials:
      - "before-body.tex"
      - "_titlepage.tex" 
    include-in-header: 
      - "in-header.tex"

Next bit indicates if you want table of contents (toc), list of fig (lof), or list of tables (lot).

    toc: true
    lof: true
    lot: true