Skip to content

Commit c9eb3e5

Browse files
committed
docs/paper: arXiv submission build script + .gitignore tarball
1 parent cc35ec9 commit c9eb3e5

3 files changed

Lines changed: 80 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ htmlcov/
2424
*.synctex.gz
2525
*.toc
2626
docs/paper/main.pdf
27+
docs/paper/dcp-arxiv-*.tar.gz
2728

2829
# Local MCP / Claude Desktop configs (user-specific paths and ports)
2930
.mcp.json

docs/paper/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ pdflatex main
2626

2727
Output: `main.pdf`.
2828

29+
## Submit to arXiv
30+
31+
```powershell
32+
# Builds figures + paper + arXiv-ready tarball
33+
.\build-arxiv.ps1
34+
```
35+
36+
Outputs `dcp-arxiv-vX.Y.Z.tar.gz` (~80 KB). Upload it at
37+
[arxiv.org/submit](https://arxiv.org/submit):
38+
39+
- **Primary category:** `cs.NI` (Networking and Internet Architecture)
40+
- **Secondary (optional):** `cs.DC` (Distributed Computing) and/or `cs.LG`
41+
- **License:** arXiv non-exclusive license
42+
- **Title:** match the LaTeX `\title{}`
43+
- **Abstract:** copy from LaTeX `\begin{abstract}`
44+
45+
arXiv will run pdflatex itself; the tarball already includes the precompiled
46+
`main.bbl` so the bibliography resolves on first pass.
47+
48+
The tarball is `.gitignored` — regenerate before each upload.
49+
2950
## Before submitting to arXiv
3051

3152
1. **Authors.** Replace `deeplethe` and the placeholder email. arXiv lets

docs/paper/build-arxiv.ps1

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Build an arXiv-ready tarball of the DCP paper.
2+
#
3+
# Usage:
4+
# cd docs/paper
5+
# .\build-arxiv.ps1
6+
#
7+
# Output: docs/paper/dcp-arxiv-v0.X.tar.gz
8+
#
9+
# Bumps the version by reading the project version from pyproject.toml.
10+
11+
$ErrorActionPreference = "Stop"
12+
$paperDir = $PSScriptRoot
13+
Set-Location $paperDir
14+
15+
# Pull version from pyproject.toml for the filename.
16+
$pyproject = Get-Content "..\..\pyproject.toml" -Raw
17+
$version = if ($pyproject -match '(?m)^version\s*=\s*"([^"]+)"') { $matches[1] } else { "dev" }
18+
19+
Write-Output "=== regenerating figures ==="
20+
python figures\make_figures.py
21+
22+
Write-Output "`n=== rebuilding paper (latexmk pdflatex bibtex pdflatex pdflatex) ==="
23+
latexmk -pdf -interaction=nonstopmode main.tex | Out-Null
24+
25+
if (-not (Test-Path "main.pdf")) {
26+
Write-Error "main.pdf not produced; check main.log"
27+
exit 1
28+
}
29+
if (-not (Test-Path "main.bbl")) {
30+
Write-Error "main.bbl not produced; bibtex did not run"
31+
exit 1
32+
}
33+
34+
$stage = Join-Path $env:TEMP "dcp-arxiv-staging"
35+
if (Test-Path $stage) { Remove-Item -Recurse -Force $stage }
36+
New-Item -ItemType Directory -Path $stage | Out-Null
37+
New-Item -ItemType Directory -Path "$stage\figures" | Out-Null
38+
39+
Copy-Item main.tex $stage
40+
Copy-Item refs.bib $stage
41+
Copy-Item main.bbl $stage
42+
Copy-Item figures\*.pdf "$stage\figures\"
43+
44+
$out = Join-Path $paperDir "dcp-arxiv-v$version.tar.gz"
45+
if (Test-Path $out) { Remove-Item $out }
46+
tar -czf $out -C $stage .
47+
48+
$size = [math]::Round((Get-Item $out).Length / 1KB, 1)
49+
Write-Output "`n=== done ==="
50+
Write-Output " $out ($size KB)"
51+
Write-Output " contains: main.tex, refs.bib, main.bbl, 5 figures"
52+
Write-Output ""
53+
Write-Output "Upload to arXiv:"
54+
Write-Output " 1. arxiv.org -> Submit"
55+
Write-Output " 2. Primary category: cs.NI (or cs.DC for distributed/systems)"
56+
Write-Output " 3. Cross-list: cs.LG (machine learning) optional"
57+
Write-Output " 4. License: arXiv non-exclusive"
58+
Write-Output " 5. Upload the tar.gz above; arXiv builds latex itself"

0 commit comments

Comments
 (0)