{"id":50567892,"url":"https://github.com/border-lab/r01-latex-template","last_synced_at":"2026-06-04T16:01:13.660Z","repository":{"id":359202861,"uuid":"1244998509","full_name":"border-lab/r01-latex-template","owner":"border-lab","description":"Reusable LaTeX template for NIH R01 grant submissions","archived":false,"fork":false,"pushed_at":"2026-05-21T01:23:43.000Z","size":2733,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T02:05:23.887Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/border-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/data-management.tex","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-20T20:08:29.000Z","updated_at":"2026-05-21T01:23:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/border-lab/r01-latex-template","commit_stats":null,"previous_names":["border-lab/r01-latex-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/border-lab/r01-latex-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fr01-latex-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fr01-latex-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fr01-latex-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fr01-latex-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/border-lab","download_url":"https://codeload.github.com/border-lab/r01-latex-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/border-lab%2Fr01-latex-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33912343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-04T16:01:12.701Z","updated_at":"2026-06-04T16:01:13.653Z","avatar_url":"https://github.com/border-lab.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# R01 LaTeX template\n\nReusable LaTeX scaffolding for NIH R01 submissions. Each `.tex` file holds\nthe NIH-required section structure with `% TODO` markers in place of prose,\nready to be filled in for a new application.\n\nBuilds 14 PDFs out of the box (all empty stubs) so you can verify your\ntoolchain works before writing any content.\n\nOverengineered with the help of an AI coding assistant (duh).\n\n## Sample output\n\n![Preview of the four pages of pdf/combined.pdf](docs/combined-preview.png)\n\nThe default build of `science/combined.tex` (Specific Aims + Research\nStrategy + bibliography) renders to four pages of Arial in NIH formatting:\nspecific aims on the first page, then the research-strategy sections with\n`\\lipsum`-filled bodies, the demo `wrapfigure` (the rectangular placeholder\nin the upper-right of the Significance page) with its caption, and the\nempty References block at the end. The actual PDF is committed at\n[`pdf/combined.pdf`](pdf/combined.pdf).\n\n## Quick start\n\nCopy the template to a new grant directory:\n\n```bash\ngit clone https://github.com/border-lab/r01-latex-template myinst-r01-2027\ncd myinst-r01-2027\nrm -rf .git build pdf      # drop the template's git history and stale artifacts\ngit init                   # start fresh history for this grant\n./build.sh all             # smoke-test that lualatex + biber work\n```\n\nYou should see 14 PDFs in `pdf/`. The science-section files ship with\n`\\lipsum[N]` placeholder paragraphs so the build produces visibly multi-page\noutput you can flip through. Open `pdf/combined.pdf` to skim the scaffold;\nthen start filling in the `% TODO` markers in `science/` and `support/`.\n\nOnce you've replaced most of the lorem-ipsum with real content, run\n`./strip-lipsum.sh` to delete every `\\lipsum[...]` call and the\n`\\usepackage{lipsum}` / `\\RequirePackage{lipsum}` loads in one pass. The\nscript is idempotent — safe to run more than once.\n\n## Layout\n\n```\n.\n├── build.sh                # build driver\n├── nih-r01.sty             # research-strategy formatting + biblatex\n├── nih-r01-support.sty     # support-doc formatting (no bib)\n├── references.bib          # Bibliography — add @article entries here\n├── science/                # research-strategy sources\n│   ├── specific-aims.tex          # 1-page Specific Aims (no bib)\n│   ├── significance.tex           # A. Significance\n│   ├── innovation.tex             # B. Innovation\n│   ├── approach.tex               # C. Approach (standalone driver)\n│   ├── approach-intro.tex         # PI / collaborators / datasets / SABV / sharing\n│   ├── approach-aim1.tex          # C.1 Aim 1\n│   ├── approach-aim2.tex          # C.2 Aim 2\n│   ├── approach-aim3.tex          # C.3 Aim 3 (optional, off by default)\n│   ├── approach-timeline.tex      # Timeline\n│   ├── research-strategy.tex      # A+B+C combined (no bib)\n│   ├── combined.tex               # Specific Aims + Research Strategy + bib\n│   └── bibliography.tex           # Standalone bibliography (reuses .bbl)\n├── support/                # NIH-required admin documents\n│   ├── project-title.tex\n│   ├── project-summary.tex\n│   ├── project-narrative.tex\n│   ├── resource-sharing.tex\n│   ├── data-management.tex\n│   ├── equipment.tex\n│   ├── facilities.tex\n│   └── development-plan.tex       # Optional (RFA-dependent, e.g., NHGRI early-career R01)\n├── figures/                # \\includegraphics assets (graphicspath = ../figures/)\n├── build/                  # LaTeX intermediates (.aux/.bbl/...) — gitignored\n└── pdf/                    # Final PDFs — gitignored\n```\n\n**Why `.sty` and `.bib` live at project root**: Overleaf was found to\nsilently ignore project-level `latexmkrc` recursive-path tricks, so\n`lualatex` / `biber` couldn't resolve these files when they lived in `sty/`\nand `science/`. Putting them at the root means kpathsea finds them via the\ndefault CWD search with zero configuration — same behavior in Overleaf,\nplain `lualatex`, and `./build.sh`.\n\n**Biosketch is not included** — generate via NCBI SciENcv and attach to the\nsubmission package separately.\n\n## Build\n\n```bash\n./build.sh all              # build everything; PDFs land in pdf/\n./build.sh aims             # specific-aims only\n./build.sh significance\n./build.sh innovation\n./build.sh approach         # also emits bibliography.pdf (when refs exist)\n./build.sh research-strategy\n./build.sh combined\n./build.sh support          # all 8 support docs\n```\n\nEach target runs `lualatex + biber + lualatex` (or a single `lualatex` for\ndocs without citations). `build.sh` sets `TEXINPUTS` so the project root\n(holding `.sty` and `.bib`), `science/`, `support/`, and `build/` are all\non the search path.\n\n## What goes where in the NIH application\n\n| PDF                       | Where it goes in the submission package                      |\n| ------------------------- | ------------------------------------------------------------ |\n| `specific-aims.pdf`       | \"Specific Aims\" attachment (Research Plan form)              |\n| `research-strategy.pdf`   | \"Research Strategy\" attachment (Research Plan form)          |\n| `bibliography.pdf`        | \"Bibliography \u0026 References Cited\" attachment                 |\n| `project-title.pdf`       | enter the title directly in the form; PDF is for reference   |\n| `project-summary.pdf`     | \"Project Summary/Abstract\" attachment                        |\n| `project-narrative.pdf`   | \"Project Narrative\" attachment                               |\n| `resource-sharing.pdf`    | \"Resource Sharing Plan\" attachment                           |\n| `data-management.pdf`     | \"Data Management and Sharing Plan\" attachment                |\n| `facilities.pdf`          | \"Facilities \u0026 Other Resources\" attachment                    |\n| `equipment.pdf`           | \"Equipment\" attachment                                       |\n| `development-plan.pdf`    | Required for some RFAs (e.g., NHGRI early-career R01); skip otherwise |\n| `approach.pdf`            | Internal use — same content as the Approach section of `research-strategy.pdf` but with its own bibliography for standalone review |\n| `combined.pdf`            | Internal use — Specific Aims + Research Strategy in one file for reading drafts |\n| `innovation.pdf`          | Internal use — Innovation section as standalone PDF          |\n| `significance.pdf`        | Internal use — Significance section as standalone PDF        |\n\nThe \"internal use\" PDFs are convenient during writing; NIH receives only\nthe standalone Specific Aims, Research Strategy, Bibliography, and the\nsupport documents.\n\n## 2-aim vs. 3-aim\n\nThe default is a 2-aim grant. To switch to 3-aim:\n\n1. In `science/approach.tex`, uncomment `\\input{approach-aim3.tex}`.\n2. In `science/research-strategy.tex`, uncomment the matching `\\input` line.\n3. Add Aim 3 stanzas to `science/specific-aims.tex` and\n   `science/innovation.tex` (each has a commented-out `Aim 3` block).\n\nThe timeline header (`C.3 Timeline` vs `C.4 Timeline`) auto-renumbers from\nan `\\ifaimthree` flag in `nih-r01.sty` — no manual edit needed.\n\nTo go back to 2-aim, re-comment the two `\\input{approach-aim3.tex}` lines.\n\n## Using on Overleaf\n\nThe template builds on Overleaf without any tweaks. `nih-r01.sty`,\n`nih-r01-support.sty`, and `references.bib` live at the project root so\nOverleaf's kpathsea / biber find them via the default CWD search — no\n`latexmkrc`, no compiler flags, no `TEXINPUTS` magic.\n\n\u003e *Historical note:* an earlier version of this template kept the styles in\n\u003e `sty/` and the bibliography in `science/`, relying on a `latexmkrc` to add\n\u003e them to the recursive search path. That worked locally but failed silently\n\u003e on Overleaf (the `latexmkrc` was honored inconsistently or not at all),\n\u003e producing `! LaTeX Error: File 'nih-r01.sty' not found.` Moving the three\n\u003e files to the root made the problem go away.\n\nTo use:\n\n1. Upload the whole template repo as a new Overleaf project (Menu → Upload\n   ZIP), or import from a GitHub repo.\n2. Set the compiler to **LuaLaTeX** (Menu → Settings → Compiler).\n3. Set the main document (Menu → Settings → Main document). For most\n   writing sessions, `science/combined.tex` is the best choice — see\n   workflow notes below.\n4. Recompile.\n\n### Recommended writing workflow\n\nSet **`science/combined.tex` as the main document and leave it there**.\nYou can edit any sub-include (`significance.tex`, `approach-aim1.tex`,\netc.) — autocompile-on-save rebuilds the full combined PDF every time,\nso you always see the section you're editing in the context of the\nwhole proposal.\n\nTo see just the section you're working on:\n\n- **Ctrl-click / ⌘-click** in the editor → PDF preview jumps to that\n  exact spot (SyncTeX). Reverse direction works too (click in PDF →\n  editor jumps). This is the right move 90% of the time.\n- For heavy iteration on one section, temporarily switch the main\n  document to that section (e.g., `science/significance.tex`). Compile\n  is ~10× faster because only that section rebuilds and the preview\n  shows only that section. Switch back to `combined.tex` when you want\n  to see context.\n\n**Compile speed reality check.** With the shipped lipsum placeholders\nand no figures, full `combined` compile is 2–3 seconds. With a finished\nR01 (real biblatex bibliography of ~80 entries, 8–10 figures), expect\n~10 seconds per compile on Overleaf Free. Switching the active section\nto \"main\" during heavy editing cuts that to 1–2 seconds.\n\n### Overleaf-specific caveats\n\n- **`%!TEX root` directives are ignored.** The directives at the top of\n  every `.tex` file are honored by Sublime / TeXShop / VS Code-LaTeX /\n  vimtex but not by Overleaf — Overleaf only respects the project-level\n  \"main document\" setting. The directives don't hurt anything, they're\n  just inert there.\n- **No `./build.sh all` equivalent.** You compile one main document at a\n  time; plan to switch the main document a few times during a submission\n  push to get each of the upload PDFs.\n- **No standalone `bibliography.pdf` flow.** The local build's two-PDF\n  split for the Approach (one *with* bibliography, one *without*, plus a\n  standalone `bibliography.pdf`) doesn't work on Overleaf because it\n  depends on shell-level `\\def\\nobib{1}` and copying `approach.bbl`.\n  Workarounds:\n  - For internal review, compile `combined.tex` — Aims + Research\n    Strategy + bibliography in one PDF.\n  - For NIH submission, compile `research-strategy.tex` for the Research\n    Strategy upload (bibliography suppressed), then create a second\n    Overleaf project (or switch the main document) that compiles\n    `bibliography.tex` after manually copying the `.bbl` from Overleaf's\n    logs. Easier: just keep using the local `build.sh` for the final\n    submission build, and use Overleaf only for collaborative writing.\n\n## Editing workflow\n\nSuggested order for filling in a new grant:\n\n1. **`science/specific-aims.tex`** — write this first. It anchors the whole\n   proposal; everything else expands on it.\n2. **`support/project-title.tex`** and **`support/project-narrative.tex`** —\n   short, derive from Aims.\n3. **`support/project-summary.tex`** — 30-line abstract, derives from Aims.\n4. **`science/significance.tex`** and **`science/innovation.tex`** — the\n   shorter Research Strategy sections.\n5. **`science/approach-intro.tex`** — PI, collaborators, datasets, SABV,\n   data sharing.\n6. **`science/approach-aim1.tex`**, **`-aim2.tex`** (and **`-aim3.tex`** if\n   3-aim) — the longest sections, written iteratively as preliminary\n   results land.\n7. **`science/approach-timeline.tex`** — once aim structure is stable.\n8. **`support/facilities.tex`**, **`equipment.tex`**, **`resource-sharing.tex`**,\n   **`data-management.tex`** — mostly boilerplate adaptable from prior R01s.\n9. **`support/development-plan.tex`** — only if the RFA requires it.\n\nFind outstanding work with:\n\n```bash\ngrep -rn \"TODO\" science/ support/\ngrep -rn \"\u003c.*\u003e\" science/ support/   # placeholder titles like \u003cAim 1 title\u003e\n```\n\n## Adding citations\n\n`references.bib` (at the project root) is the only bib source. Add `@article` /\n`@incollection` / `@misc` entries as you cite them; the `numeric-comp`\nstyle emits them in citation order so you don't have to worry about\nordering. Cite in text with `\\cite{key}` (which is aliased to `\\autocite`\nfor superscript citations).\n\nUntil you cite at least one entry, the bibliography PDF is silently\nskipped — the build script will say\n`(skipped — bibliography is empty; cite something in references.bib)`.\n\n## Adding figures\n\nDrop image files into `figures/` at the repo root. Reference them by name\nin `\\includegraphics{name.pdf}` — `\\graphicspath{{../figures/}}` in\n`nih-r01.sty` resolves them from both `science/` and `support/`.\n\nThe shared style provides `wrapfig` for inline figures; the approach aim\nfiles have commented `wrapfigure` scaffolds you can uncomment and edit.\n\n## Dependencies\n\n- **`lualatex`** (TeX Live 2022+)\n- **`biber`**\n- **Arial font** — check with `fc-list | grep -i arial`. To fall back to\n  another NIH-approved font (Georgia, Helvetica, Palatino), edit the\n  `\\setmainfont{Arial}` line in both `nih-r01.sty` and\n  `nih-r01-support.sty`.\n- **LaTeX packages**: `fontspec`, `unicode-math`, `geometry`, `setspace`,\n  `graphicx`, `wrapfig`, `caption`, `booktabs`, `array`, `tabularx`,\n  `longtable`, `colortbl`, `enumitem`, `ulem`, `titlesec`, `biblatex`,\n  `xcolor`, `fancyhdr`, `docmute`.\n\nOn Ubuntu / Debian:\n\n```bash\nsudo apt install texlive-luatex texlive-latex-extra texlive-fonts-extra \\\n                 texlive-bibtex-extra biber fonts-liberation\n```\n\n(`fonts-liberation` provides Liberation Sans, a metric-compatible Arial\nsubstitute; install Arial proper if your institution has it licensed.)\n\n## Troubleshooting\n\n- **`! Package fontspec Error: The font \"Arial\" cannot be found.`** —\n  Arial isn't installed. Either install it or switch the font (see\n  Dependencies above).\n- **`bibliography.pdf` not produced.** Expected when no citations exist.\n  Add at least one `\\cite{...}` referencing an entry in `references.bib`.\n- **A figure isn't found.** Confirm the file is in `figures/` at the repo\n  root (not under `science/figures/` or `support/figures/`).\n- **Stale build artifacts cause weird errors.** `rm -rf build pdf \u0026\u0026\n  ./build.sh all` for a clean rebuild.\n- **`biber` complains about a missing `.bcf`.** Run `./build.sh \u003ctarget\u003e`\n  rather than `lualatex` directly — the script handles the multi-pass\n  ordering and copies `references.bib` into `build/` where biber expects it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborder-lab%2Fr01-latex-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborder-lab%2Fr01-latex-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborder-lab%2Fr01-latex-template/lists"}