Skip to content

burlynb/quarto_titlepages

 
 

Repository files navigation

github DOI <-- Try it out!

quarto_titlepages

Read the documentation

A Quarto extension for adding a custom title page or book cover to your PDF output using the information in the YAML in your Quarto doc, i.e. from the xyz.qmd for an single doc and from index.qmd for a Quarto book.

Install the extension

quarto use template nmfs-opensci/quarto_titlepages

This will install the extension plus all the example files. Essentially, you will be cloning the repo into a new folder and you will be asked at installation for the name of the (empty) folder/directory that you want to install into.

Install or update for an existing document

You may also use this format with an existing Quarto project or document. This will install only the files in the _extension folder and will not install the files above that (the demo files). This is also how to update the extension if there have been changes.

From the quarto project or document directory, run the following command:

quarto install extension nmfs-opensci/quarto_titlepages

Usage

In your document yaml add the format and a titlepage theme.

format: 
  titlepage-pdf:
    titlepage: bg-image

Then render the document. See the documentation for the possible themes.

Example files

There are two example file. example_1.qmd shows an example with only a titlepage. example_2.qmd has a cover page, copyright page, title page and dedication page. The copyright and dedication pages are in the tex folder. This example will not run if you don't have those files. The examples also use images in the img folder. You will need those files or replace them with your own.

Customizing

All aspects of the title and cover pages can be customized and static pages (e.g. copyright) can be added after the title page. Read the documentation.

tldr; In your yaml, you pass in titlepage-theme: or coverpage-theme: with variables for things like font, fontstyle, position of elements, colors, background images, etc.

Getting rid of the QTDublinIrish.otf file

This is coming from the extension for the cover page demos. Find the _extension.yml file in the _extensions folder for the titlepage extension. Delete these lines

      format-resources:
        - "fonts/qualitype/opentype/QTDublinIrish.otf"

LaTeX users

If you have a title page and/or cover page, that you want to use directly. You might want to look at quarto_titlepages_v1. This shows you how to create your own Pandoc templates so you can get control of the title page in your tex files. Alternatively, if you have a static title or cover page, see the documentation chapter on using static tex files in your frontmatter.


This work is uses Quarto, citation. The default document classes for Quarto are scrbook and scrartcl. This repo also includes a copy of the Springer svmono document class, CRC/Chapman & Hall krantz document class, and the Elsevier elsarticle document class. The tex templates were written by Eli Holmes and the lua filter along with changes to the Pandoc templates to allow themes was written by Mickaël Canouil.

About

A Quarto extension for making title and cover pages for PDF output.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TeX 84.3%
  • Lua 15.7%