skills/43-wentorai-research-plugins/skills/writing/latex/md-to-pdf-academic/SKILL.md
Convert Markdown to publication-quality PDF with LaTeX math rendering
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research md-to-pdf-academicInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Many researchers prefer writing in Markdown for its simplicity and readability, but academic publishing demands the typographic quality of LaTeX-rendered PDFs. The Markdown to PDF Academic skill bridges this gap by providing a complete workflow for converting Markdown documents—including mathematical equations, citations, cross-references, figures, and tables—into publication-quality PDFs using Pandoc and LaTeX as the rendering backend.
This approach gives you the best of both worlds: you write in clean, portable Markdown that is easy to version-control and collaborate on, while producing output that is indistinguishable from a paper written directly in LaTeX. The workflow supports all standard academic elements including numbered equations, BibTeX citations, figure floats, and custom LaTeX templates for specific journal or conference formats.
This skill is particularly useful for researchers who find LaTeX syntax cumbersome for drafting but need LaTeX-quality output, for teams where some members are not comfortable with LaTeX, and for documents that need to be published in multiple formats (PDF, HTML, DOCX) from a single source.
Install the following tools:
# macOS
brew install pandoc
brew install --cask mactex # Full LaTeX distribution
# or for a minimal install:
brew install basictex
sudo tlmgr install collection-fontsrecommended latexmk
# Ubuntu/Debian
sudo apt-get install pandoc texlive-full
# Verify installation
pandoc --version
pdflatex --version
Install useful Pandoc filters for academic writing:
# Citation processing
pip install pandoc-citeproc # or use --citeproc flag (built-in since Pandoc 2.11)
# Cross-referencing (figures, tables, equations, sections)
pip install pandoc-crossref
# Include code from external files
pip install pandoc-include
Download or create a LaTeX template for your target venue. The Eisvogel template is an excellent general-purpose starting point:
# Download Eisvogel template
mkdir -p ~/.pandoc/templates
wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest/download/Eisvogel.tar.gz
tar -xzf Eisvogel.tar.gz -C ~/.pandoc/templates/
Start your Markdown document with YAML metadata:
---
title: "Your Paper Title"
author:
- name: "Author One"
affiliation: "University of Example"
email: "[email protected]"
- name: "Author Two"
affiliation: "Institute of Research"
date: "March 2026"
abstract: |
This is the abstract of the paper. It can span
multiple lines using the YAML block scalar syntax.
keywords: ["keyword one", "keyword two", "keyword three"]
bibliography: references.bib
csl: ieee.csl
numbersections: true
header-includes:
- \usepackage{amsmath}
- \usepackage{booktabs}
---
Use standard LaTeX math syntax within Markdown. Pandoc processes these natively:
Inline math: The loss function $\mathcal{L}(\theta)$ is minimized.
Display math (numbered):
$$
\mathcal{L}(\theta) = -\sum_{i=1}^{N} \log p(y_i | x_i; \theta) {#eq:loss}
$$
Multi-line equations:
$$
\begin{aligned}
\nabla_\theta \mathcal{L} &= \frac{1}{N} \sum_{i=1}^{N} \nabla_\theta \log p(y_i | x_i; \theta) \\
\theta_{t+1} &= \theta_t - \eta \nabla_\theta \mathcal{L}
\end{aligned}
$$
Reference: As shown in @eq:loss (requires pandoc-crossref).
Reference entries in your BibTeX file using @citekey syntax:
Recent work has shown promising results [@smith2024; @jones2025].
@smith2024 demonstrated that transformers scale efficiently.
For a comprehensive review, see [-@wang2023].
{#fig:arch width=80%}
As shown in Figure @fig:arch, the architecture consists of...
| Method | Accuracy | F1 Score | Params (M) |
|--------|----------|----------|------------|
| Baseline | 82.3 | 79.1 | 110 |
| **Ours** | **87.6** | **84.9** | 95 |
: Comparison of methods on the benchmark dataset. {#tbl:results}
Results in Table @tbl:results show that...
pandoc paper.md \
-o paper.pdf \
--pdf-engine=pdflatex \
--citeproc \
--filter pandoc-crossref \
--number-sections \
--bibliography=references.bib \
--csl=ieee.csl \
--template=eisvogel
Create a Makefile for consistent builds:
PAPER = paper
PANDOC_FLAGS = --pdf-engine=pdflatex \
--citeproc \
--filter pandoc-crossref \
--number-sections \
--bibliography=references.bib
pdf: $(PAPER).md
pandoc $(PAPER).md -o $(PAPER).pdf $(PANDOC_FLAGS) --template=eisvogel
docx: $(PAPER).md
pandoc $(PAPER).md -o $(PAPER).docx $(PANDOC_FLAGS)
html: $(PAPER).md
pandoc $(PAPER).md -o $(PAPER).html $(PANDOC_FLAGS) --standalone --mathjax
clean:
rm -f $(PAPER).pdf $(PAPER).docx $(PAPER).html
.PHONY: pdf docx html clean
For specific journal formats, create a custom Pandoc template. Start from the default and modify:
# Export default template
pandoc -D latex > my-template.tex
# Edit my-template.tex to match your journal's requirements
# Then use it:
pandoc paper.md -o paper.pdf --template=my-template.tex
Key template variables you can set from YAML front matter:
documentclass: article, report, book, or a journal's custom classfontsize: 10pt, 11pt, 12ptgeometry: margins (e.g., margin=1in)linestretch: line spacing (1.0 = single, 1.5 = one-and-a-half, 2.0 = double)tlmgr install <package-name>--pdf-engine=xelatex or lualatex instead of pdflatex.bib filepandoc-crossref; use {#eq:label} syntax after display equations\usepackage{adjustbox} in header-includes and use \adjustbox{max width=\textwidth} in the templatedevelopment
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.