Coder Social home page Coder Social logo

pandoc-latex-template's Introduction

Markdown to LaTeX with Pandoc

This repository explains how to setup a workflow to convert Markdown files to LaTeX using Pandoc and how to setup Zotero for adding citations easily.

This is a WIP. The default values work well if you want to use the Eisvogel template adapted for the HES-SO requirements.

The basic setup and most command will be the same if you use another template so feel free to use this as a base for your work.

Building the report

After completing the installation, just run build.bat or build.sh. I did not use Make because I wanted to keep the setup as simple as possible on Windows too.

Installation

Programs

Pandoc filters

  • Install pandoc-include via pip (pip install --user pandoc-include, https://github.com/DCsunset/pandoc-include)
    • Make sure the location of the pandoc-include executable is in your path (e.g. C:\Users\USERNAME\AppData\Roaming\Python\Python39\Scripts)
  • Install pandoc-crossref (https://github.com/lierdakil/pandoc-crossref)
    • Make sure to move the executable in a location that is in your path (e.g. C:\Users\USERNAME\AppData\Local\Pandoc\)
  • Install citeproc (https://github.com/jgm/citeproc)
    • Make sure to move the executable in a location that is in your path (e.g. C:\Users\USERNAME\AppData\Local\Pandoc\)

Setup Zotero

Syncing Zotero is usually done using an online account, however to keep everything at the same place, the database of Zotero is moved into a local git repository.

The two downside are that this setup does not work well if you have multiple project in Zotero and the database is in binary format, so it will not work for multi-user setups.

Edit > Preferences > Advanced > Files and Folders > Data Directory Location and set it to the zotero folder of this repo.

Zotero addons

  • Download and install https://retorque.re/zotero-better-bibtex/installation/
    • This allows to easily generate citation key, which does not seem possible without it
    • To make is easier to drag and drop for pandoc, in Zotero, go to Edit > Preferences > Better BibTeX > Quick Copy and set Quick Copy Format to Pandoc Citation
    • To make it auto-generate the bibliography.bib file, in Zotero, go to File > Export Library and set Format to Better BibTeX, tick Keep updated. You can then overwrite the existing bibliography.bib file in the src folder.

Suggested VSCode extensions

If you use VSCode to edit your files, the following extensions can be useful:

  • LTeX: a smart grammer/spell checker which takes LaTeX (and apparently Markdown) syntax into account
  • LaTeX Workshop: PDF preview, LaTeX autocomplete and highlighting (for tex files only)
  • Markdown All in One: MD preview, shortchuts, auto-format
  • Markdown Table: tool for markdown table

pandoc-latex-template's People

Contributors

blatoy 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.