Skip to content

Add Markdown/DOCX → NIME PDF pipeline via pandoc - #22

Draft
cpmpercussion wants to merge 1 commit into
mainfrom
markdown-docx-pipeline
Draft

Add Markdown/DOCX → NIME PDF pipeline via pandoc#22
cpmpercussion wants to merge 1 commit into
mainfrom
markdown-docx-pipeline

Conversation

@cpmpercussion

Copy link
Copy Markdown
Contributor

Adds an alternative authoring route: write a NIME paper in Markdown (with YAML front matter) or convert from a Word .docx and render it to a NIME-formatted PDF using the same nimeart LaTeX class as the existing .tex templates.

Usage

make md-pdf                              # builds the example -> example.pdf
make md-pdf   SRC=mypaper.md
make docx-pdf SRC=mypaper.docx META=mypaper-meta.yaml
make docx-md  SRC=mypaper.docx           # extract .docx -> editable Markdown

Requires pandoc 3.x in addition to the existing LaTeX toolchain.

What's included (pandoc/)

  • nime.latex — custom pandoc template mapping YAML front matter onto the nimeart/acmart front-matter commands (title, authors, affiliations, abstract, keywords, teaser, acknowledgments).
  • nime-tables.lua — renders Markdown tables as table+tabular floats.
  • nime-defaults.yaml — pandoc options (natbib + ACM-Reference-Format, template, filter, variables).
  • example.md / example-meta.yaml — worked examples covering every supported field.
  • README.md — metadata reference and usage docs.

Plus Makefile targets (md-pdf, docx-pdf, docx-md), top-level README.md section, and .gitignore rules for generated outputs.

Notes on the integration

acmart/nimeart provides its own fonts, hyperref, and geometry, so the template omits pandoc's font/geometry partials. Three issues found and fixed during real compilation:

  1. \Bbbk clash — don't reload amssymb; acmart provides maths via newtxmath.
  2. longtable not in 1-column mode — pandoc emits longtable for every table, which fails in two-column sigconf; the Lua filter converts them to tabular floats.
  3. Duplicate \bibliographystyle — now exactly one (ACM-Reference-Format), so bibtex picks the right style.

Both pipelines were verified to compile end-to-end (pandoc → pdflatex + bibtex) and the rendered PDFs were visually checked.

Known limitation

Pandoc only parses [@key] citation syntax from Markdown-family input, not from .docx text. For cited work the Markdown path (or docx-mdmd-pdf) is recommended. Documented in pandoc/README.md.

Not included

CI is left untouched — the existing xu-cheng/latex-action container may not bundle pandoc. Happy to add a CI job for this pipeline if wanted.

🤖 Generated with Claude Code

Authors can now write a NIME paper in Markdown (with YAML front matter)
or convert from a Word .docx and render it to a NIME-formatted PDF using
the same nimeart LaTeX class as the .tex templates.

- pandoc/nime.latex: custom pandoc template mapping YAML metadata onto
  the nimeart/acmart front-matter commands (title, authors, affiliations,
  abstract, keywords, teaser, acks). Omits pandoc's font/geometry partials
  to avoid clashes with acmart (e.g. the \Bbbk amssymb conflict) and forces
  indent mode so parskip is not loaded.
- pandoc/nime-tables.lua: renders tables as table+tabular floats since
  pandoc's default longtable fails in two-column sigconf mode.
- pandoc/nime-defaults.yaml: pandoc options (natbib + ACM-Reference-Format,
  template, filter, variables).
- pandoc/example.md, pandoc/example-meta.yaml: worked examples.
- Makefile: md-pdf, docx-pdf, docx-md targets + clean updates.
- README.md / pandoc/README.md: usage and metadata documentation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cpmpercussion

Copy link
Copy Markdown
Contributor Author

let's keep this one in draft as an example pipeline for working in dox and then moving directly to pdf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant