Code Monkey home page Code Monkey logo

pandoc-school's Introduction

Pandoc assignment kit

Command

$ pandoc in.md  -o out.pdf --pdf-engine=lualatex  -V mainfont="Palatino" -H header.tex
  • in.md is the source file
  • -o ... is the output file (out.pdf here)
  • --pdf-engine=lualatex is the latex plugin
  • -H is the latex header file (header.tex here) that contains latex commands that are prepended to your input file (in.md)

Latex header file

\usepackage{fancyhdr}
\usepackage{lastpage}

\newcommand\hffont{\fontsize{08pt}{08pt}\selectfont}

\pagestyle{fancy}
\fancyhf{}
\lhead{\hffont{Unit 3.7: Assessment for feedback}}
\rhead{\hffont{SBI4U}}
\lfoot{\hffont{Jeffrey Shevlen 99419720}}
\fancyfoot[R]{\hffont{\thepage\ of \pageref{LastPage}}}
\renewcommand{\headrulewidth}{0.3pt}
\renewcommand{\footrulewidth}{0.3pt}
  • \usepackage{...} loads latex relevent packages
  • newcommand is a user/me generated thing called hffort where I specify the header and fooder size
  • no idea what pagestyle{fancy}, fancyhf{} do
  • left head, right foot are \lhead{} and \rfoot{}
  • \fancyfoot[R]{...} is like \rfoot, the [R] for right
  • \renewcommand is a bit of a mystery to me
  • \headrulewidth{} sets header line width

Markdown header

You don't need to add anything in Obsidian anyway. The -H ... pandoc arg is enough.

You may see something like this on the web.

---
output:
  pdf_document:
    includes:
      in-header: header.tex
---

Didn't work for me in this context.

References

pandoc-school's People

Contributors

eljfe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.