#!/bin/sh # # Compiler script for groff # # [-k (preconv)] Convert encoding to something groff understands # [-e (eqn)] Format equations for troff or MathML # [-t (tbl)] Format tables for troff # [-p (pic)] Compile pictures for troff or TeX # [-G (grap)] Typesetting graphs (grap usually not installed by default) # [-j (chem)] Chemical structure diagrams (messes up spacing!) # Configuration BIB="$HOME/Documents/bibliography" # Bibliography file MAC="$HOME/.config/groff/" # Macros dir GROMACS="-mspdf" # groff macros PRE="-ketpG" # Preprocessors OUT="pdf" # Output format # groff-img: Personal script, image manipulation # soelim: Enable macros dir # refer: Enable bibliography groff-img "$1" | soelim -I "$MAC" | refer -p "$BIB" | groff "$GROMACS" -T "$OUT" -U "$PRE"