Skip to content

A simple LaTeX template for markdown documents that render using pandoc. 🔥 📄

License

Notifications You must be signed in to change notification settings

mariuskiessling/phoenix-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix - a simple template for markdown documents and pandoc

Setup

  1. Install pandoc for your platform.
  2. Place the phoenix.latex file inside the ~/.pandoc/templates directory (create the directory if it does not exist yet).

Usage

You can tell pandoc to use the phoenix template using the --template phoenix argument. The most basic pandoc command hence looks like this:

pandoc example.md -o example.pdf --template phoenix

Example output

Parameters

The template provides some variables you can set inside the YAML meta data block. The block is surrounded by --- and can be located anywhere inside your markdown document. In most cases the block is located at the beginning of your document.

You can also completely remove the meta data block. In this case the default values apply. The following code block shows a simple YAML meta data block:

title: Using the phoenix template with panoc
author: Marius Kießling
titlepage: yes
header:
  - left: I appear in the upper left corner on every page

title (default: empty): Set the title displayed on the title page and PDF meta data

author (default: empty): Set the author displayed on the title page and PDF meta data

date (default: empty): Set the date displayed on the title page

titlepage (yes or no; default: no): Enable or disable the title page

colorlinks (yes or no; default: no): Enable or disable colorful links

defaultfont (yes or no; default: no): Set to yes if the document font should be set to Computer Modern. If set to no Open Sans will be used as a default. This behavior can be overwritten by the preamble keyword.

header (list; default: no header): left, center, right keys specify the values displayed in the corresponding location.

footer (yes or no or list; default: no footer): If a boolean is given the footer is displayed or hidden. If the boolean simply set to yes the footer displays the author(s) in the lower left corner and the current page in the lower right corner. This behavior can be overwritten by providing a list of values that specify the content of the footer. The list consists out of the keys left, center, right.

margin (default: see description): If no margin option is supplied the default margins (top & bottom: 1.25cm, left & right: 2cm) are used. They can be overwritten by supplying a list consisting of the keys top, right, bottom, left. The values provided in the list have to include a valid LaTeX unit.

preamble (list; default: no commands): The list supplied under this keyword is included at the end of the preamble and right before the content of the document. You can include your own valid LaTeX commands here if need to specify any needed packages or overwrite the default template behavior.

fontsize (default: not set): Sets the font size of the document. This includes the header and footer thus only use this option if it is really needed. The option only supports the font sizes 10, 11 and 12pts. The unit has to be supplied as well.

Trivia

The name of this project is derived from the old Phoenix coal mining area inside my hometown that is now partially rebuild and repurposed; something old now serves a new and more general purpose.

About

A simple LaTeX template for markdown documents that render using pandoc. 🔥 📄

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published