tags: scientific publishing, LaTeX, Pandoc, reproducible research, Docker, CI/CD
990
Panpreposterous is a containerized command-line application for turning Markdown manuscripts into reproducible preprint and postprint PDFs.
It is designed for researchers who want a plain-text manuscript workflow: write the article in Markdown, keep references in BibTeX, choose a CSL citation style, and run one Docker command to produce a formatted PDF with Pandoc, XeLaTeX, a bundled article template, and Lua filters.
Panpreposterous takes an article folder containing files such as:
article/
manuscript.md
references.bib
journal.csl
figs/
fig1.svg
tables/
table1.tex
and produces a formatted PDF such as:
article/
manuscript-preprint.pdf
The build runs inside the container, so Pandoc, XeLaTeX, the template, Lua filters, and TeX dependencies travel together in one reproducible environment.
You need Docker installed and running.
Docker Desktop is one common option on macOS and Windows. On Linux, a standard Docker Engine installation is sufficient.
docker pull costantinicarlo/panpreposterous:latest
Open a terminal in the folder containing your manuscript files, then run:
docker run --rm -v "$PWD":/work costantinicarlo/panpreposterous:latest \
panpreposterous manuscript.md --bibliography references.bib --csl journal.csl -o manuscript.pdf
This command:
/workmanuscript.pdfarticle/
manuscript.md
references.bib
journal.csl
figs/
fig1.svg
s1.png
tables/
table1.tex
output/
Example build command:
docker run --rm -v "$PWD":/work costantinicarlo/panpreposterous:latest \
panpreposterous manuscript.md --bibliography references.bib --csl journal.csl -o output/manuscript-preprint.pdf
---
title: "Example Manuscript"
author:
- name: "First Author"
affiliation: [1]
corresponding: true
affiliations:
- id: 1
name: "Department of Biology"
running_title: "Example"
doc_version: "Preprint"
twocolumn: true
correspondence:
- [email protected] (F. Author)
---
# Introduction
This is a citation [@Smith2024].
{#fig:main width=0.9\\columnwidth}
# References {-}
::: {#refs}
:::
Common YAML options include:
twocolumn: truerunning_title: "Short title"doc_version: "Preprint" or doc_version: "Postprint"correspondence: ["[email protected] (A. Smith)"]csl_entry_spacing_extra: 0.25preprint_doi, preprint_doi_labelpublished_doi, published_doi_labelWrap supplementary content in a fenced Div:
::: supplementary
**Supplementary note text.**
{#fig:s1 width=0.9\\columnwidth}
Table: **Supplementary table legend.**
:::
The supplementary filter moves supplementary content to the end of the PDF, creates lists of supplementary figures and tables when applicable, and starts supplementary figures/tables on separate pages.
For complex tables, especially in two-column layouts, use a LaTeX table file and include it from Markdown:
::: {.texinclude src="tables/table1.tex"}
:::
In two-column mode, Markdown tables are suppressed by default unless explicitly allowed. Use .onecol for a one-column table island or .allowmd to render a Markdown table inline.
To build the image locally from the source repository:
docker build -t panpreposterous -f Dockerfile .
Then use panpreposterous instead of costantinicarlo/panpreposterous:latest in docker run commands.
Source code, examples, documentation, and release notes are available at:
https://github.com/costantinicarlo/panpreposterous
Panpreposterous is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
This project is adapted from:
The upstream source notes that it was forked and modified from:
Content type
Image
Digest
sha256:30e721aef…
Size
859 MB
Last updated
3 months ago
docker pull costantinicarlo/panpreposterous