Using Panzer + Pandoc + custom filters for scientific writing
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bibliography/styles
bin
cleanup
filter
graphics
postflight
preflight
styles
template
LICENSE
README.md

README.md

Pancake

Pancakes !

Using Panzer + Pandoc + custom filters for scientific writing. This project is a custom Panzer v1.4.1 configuration folder that contains various tools to write scientific papers in Markdown. All this is made for Pandoc v2.1.2.

General organisation

Filters

pandoc-science

Main component for scientific writing. It is an old personnal filter I recoded recently. Strongly inspired by pandoc-amsthm it mainly add cref support. Here is an example of its usage with the fenced divs of Pandoc 2 :

    ::: {.definition #def:resolver name="Resolvers"}
    A resolver is a potential causal link defined as a tuple $r = \langle a_s, a_t, f\rangle$
    ::::::::::::::::::::::::::::::::::::::::::::::::

Also, one can use code blocks to write pseudocode using

    ~~~ {.algorithm #alg:example name="A smart caption" startLine="1"}
    \Function{example}{Stuff $s$, Problem $\mathcal{P}$} \EndFunction
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pandoc-crossref

Filter used to make smart cross references. Compiled version from latest version of this github repository (v0.3.0.2)

pandoc-table

Filter used to be able to use tables in two-column mode, adapted from here.

Dependancies

apt

Packages to install on Ubuntu 16.04 () :

sudo apt install xzdec librsvg2-bin inotify-tools git python3-pip

You can also install texlive and Pandoc from the default repositories but it is outdated and will limit the possibilities of modifications needed for Pancake:

  • sudo apt install texlive-science texlive-fonts-recommended texlive-latex-extra texlive-generic-extra
  • sudo apt install pandoc pandoc-citeproc

pandoc

I use the latest version of Pandoc built directly from cabal :

    cabal update
    cabal install pandoc
    cabal install pandoc-citeproc
    cabal install pandoc-crossref

latex

Manual Latex install [optional]:

wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
dtrx install-tl-unx.tar.gz
cd install-tl-unx
sudo ./install-tl

CTAN package (sudo tlmgr install):

  • xcolor-solarized

python

  • pip3 install --upgrade git+https://github.com/msprev/panzer pandocfilters

bin

Simply copy the script in ./bin/pancake to the system (somewhere like /usr/local/bin/)

  • Usage : pancake FILE [FORMAT]
  • FORMAT : odt, tex, pdf (default)