Skip to content

Add publication-pipeline guide: prompt -> code -> paper -> journal - #7

Open
mdenolle wants to merge 1 commit into
mainfrom
docs/publication-pipeline
Open

Add publication-pipeline guide: prompt -> code -> paper -> journal#7
mdenolle wants to merge 1 commit into
mainfrom
docs/publication-pipeline

Conversation

@mdenolle

Copy link
Copy Markdown
Owner

Summary

  • New research/publication-pipeline/ guide: a validated, end-to-end workflow for version-controlling a paper the same way code is version-controlled (Quarto Markdown source in the same repo as the analysis code, an automated Markdown-to-journal-LaTeX build, and a GitHub Action that syncs the built manuscript to a paper-only repo Overleaf's GitHub Sync reads from).
  • Includes a gotchas appendix cataloguing real LaTeX/pandoc/journal-class conflicts hit while validating this on an actual GJI submission draft, with fixes.
  • Includes a copyable template/ (genericized build.py + sync workflow YAML) so a new project can adapt rather than write from scratch.
  • Linked from research/README.md alongside the existing Gaia entry.

Worked example this is extracted from

Denolle-Lab/codameter (code + paper source) synced to Denolle-Lab/codameter-paper (Overleaf-linked), both currently running this exact pipeline.

Test plan

  • build.py template: syntax-checked, --help runs cleanly
  • Workflow YAML: valid YAML, mirrors the exact structure already running in codameter
  • All internal markdown anchor links verified against GitHub's actual heading-slug rules (not just eyeballed)
  • All relative links to template/ files verified to resolve to real paths

🤖 Generated with Claude Code

A validated, end-to-end workflow for version-controlling a paper the same
way code is version-controlled: a Quarto Markdown source in the same repo
as the analysis code, one build script that renders it to a journal's
LaTeX class, and a GitHub Action that syncs the built manuscript to a
paper-only repo Overleaf's GitHub Sync reads from -- so co-authors keep
working in Overleaf with no new tooling, and their feedback comes back to
the code repo as GitHub issues instead of evaporating in email/Slack.

Extracted from a real submission draft (Denolle-Lab/codameter /
Denolle-Lab/codameter-paper), including a gotchas appendix of the specific
LaTeX/pandoc/class conflicts that cost real debugging time (a natbib
length-register collision, a hardcoded bibliography-heading case Quarto's
own template does not expose a metadata knob for, a class that silently
drops the LaTeX float-placement argument, and a Pandoc raw-table parsing
edge case), plus a copyable template (build.py + sync workflow) genericized
from the same two files.

Linked from research/README.md alongside the existing Gaia entry.
Copilot AI review requested due to automatic review settings July 22, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new research guide describing an end-to-end “prompt → code → paper → journal” workflow, including a copyable template (build.py + GitHub Actions sync) for maintaining a Quarto/LaTeX manuscript in the same repo as analysis code while syncing compiled artifacts to an Overleaf-linked paper-only repo.

Changes:

  • Add research/publication-pipeline/ guide documenting the workflow, rationale, and common LaTeX/Pandoc gotchas.
  • Add template/ with a Python build script and a GitHub Actions workflow for syncing built manuscript artifacts to an Overleaf-linked repo.
  • Link the new guide from research/README.md.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
research/README.md Links the new publication-pipeline guide from the research index.
research/publication-pipeline/README.md New end-to-end workflow write-up, worked example, and gotchas appendix.
research/publication-pipeline/template/README.md Quick-start instructions for copying/adapting the template files.
research/publication-pipeline/template/build.py Template build script to render Quarto → TeX/PDF with optional patch+recompile.
research/publication-pipeline/template/.github/workflows/sync-to-overleaf.yml Template GitHub Actions workflow to sync built paper artifacts to a paper-only repo for Overleaf GitHub Sync.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


This guide describes a pipeline where **the code, the figures, and the paper text are versioned together in one git history**, the LaTeX a journal wants is *generated*, not hand-typeset, and the one genuinely manual step — turning a colleague's Overleaf comment into a code change — is captured as a GitHub issue instead of a Slack message that evaporates.

It is not a framework to install. It is five small, standard tools wired together in a specific order. Every piece is something you already have a account/license for as an academic: Python, git, GitHub, Quarto, Overleaf.
This pipeline is not hypothetical — it is running today on:
- **Code repo**: [`Denolle-Lab/codameter`](https://github.com/Denolle-Lab/codameter) — `paper/manuscript_marine.qmd` is the source, `paper/build.py` is the generator, `src/codameter/` is the analysis code the figures come from.
- **Paper repo**: [`Denolle-Lab/codameter-paper`](https://github.com/Denolle-Lab/codameter-paper) — synced automatically from the code repo, linked to an Overleaf project via Overleaf's GitHub Sync.
- **Sync automation**: `.github/workflows/sync-paper-to-overleaf.yml` in the code repo.
Comment on lines +94 to +98
# .github/workflows/sync-paper-to-overleaf.yml — the shape of it (full version in template/)
on:
push:
branches: [main]
paths: ["paper/manuscript.tex", "paper/*.bib", "paper/*.cls", "literature/figs/**"]
Comment on lines +113 to +114
if not changed:
return
## Files

- **`build.py`** → copy to `paper/build.py`. Edit the three `CONFIG` blocks at the top: your manuscript's filename(s), any figure-regeneration commands, and (only if your journal's class needs it) the literal `.tex` string patches described in the parent README's gotchas appendix.
- **`.github/workflows/sync-to-overleaf.yml`** → copy to `.github/workflows/sync-to-overleaf.yml` in your code repo. Edit the four `CONFIG` blocks: branch name, trigger paths, paper repo name, and the exact filenames staged in the commit step.
Comment on lines +55 to +57
- "paper/*.cls" # your journal's class file, if any
- "paper/*.bst" # your journal's bibliography style, if any
- "figures/**" # wherever your figures live
Comment on lines +92 to +94
cp paper/*.cls paper-repo/ 2>/dev/null || true
cp paper/*.bst paper-repo/ 2>/dev/null || true
rsync -a --delete figures/ paper-repo/figures/
# co-authors' Overleaf project reads, so only stage what this
# workflow is actually meant to manage.
git add manuscript.tex references.bib figures/
git add *.cls *.bst 2>/dev/null || true
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.

2 participants