This commit is contained in:
wassname
2026-06-02 07:20:42 +00:00
parent 923de6dbe6
commit cf3ecc40f8
15 changed files with 264 additions and 5540 deletions
+17 -7
View File
@@ -405,15 +405,25 @@ journal:
paper:
cd docs/writeup && tectonic main.tex && echo "-> docs/writeup/main.pdf"
# QC: compile, dump PDF to text (pymupdf), then grep for unfilled markers.
# The author's loop: read paper.txt + qc_report.txt to see what the COMPILED
# pdf shows -- unresolved refs print as "??", citations as "[?]", plus our
# \TODO macro. SHOULD: qc_report lists every TODO/?? so none ship by accident.
# QC: compile, dump the RENDERED pdf to text per-page (pdfplumber), then grep
# for unfilled markers. The author's loop: read paper.txt + qc_report.txt to see
# what the COMPILED pdf shows -- unresolved refs render as "??", undefined
# citations as "[?]", plus our \TODO macro. paper.txt is page-delimited so you
# can check page count and per-page content / bibliography as rendered.
# SHOULD: qc_report lists every TODO/?? so none ship by accident.
paper-qc: paper
cd docs/writeup && \
uv run --with pymupdf python -c "import fitz,sys; d=fitz.open('main.pdf'); open('paper.txt','w').write(chr(12).join(p.get_text() for p in d))" && \
( echo '### unresolved refs / citations (?? or [?]):'; grep -nF '??' paper.txt || echo ' none'; \
uv run --with pdfplumber python -c "import pdfplumber; d=pdfplumber.open('main.pdf'); open('paper.txt','w').write(''.join(f'\n===== page {i+1}/{len(d.pages)} =====\n'+(p.extract_text() or '') for i,p in enumerate(d.pages)))" && \
( echo "### pages:"; grep -c '===== page' paper.txt; \
echo; echo '### unresolved refs / citations (?? or [?]):'; grep -nF '??' paper.txt || echo ' none'; \
echo; echo '### TODO markers in compiled pdf:'; grep -nF 'TODO' paper.txt || echo ' none'; \
echo; echo '### TODO markers in source:'; grep -nE '\\TODO|TODO' main.tex refs.bib || echo ' none' ) \
| tee qc_report.txt
@echo "-> docs/writeup/qc_report.txt (+ paper.txt for LLM read-through)"
@echo "-> docs/writeup/qc_report.txt (+ paper.txt: page-delimited rendered text)"
# tex -> markdown (pandoc). For the LW blog draft + cheap LLM read-throughs.
# --citeproc resolves \cite against refs.bib so the md shows author-year, not [?].
paper-md:
cd docs/writeup && \
pandoc main.tex -f latex -t gfm --citeproc --bibliography=refs.bib \
-o main.md && echo "-> docs/writeup/main.md"