A Thesis Workflow with 180MB PDFs, KaTeX and Local Search
Read literature, keep citations verifiable, and write math-heavy chapters locally with PDF search, KaTeX notes, and integrity-safe AI polish.

Key Takeaways
- Triage a literature pile with PDF full-text search instead of opening files one by one.
- Keep source notes and argument notes separate so citations remain verifiable.
- Write formulas in KaTeX and preview them in the same document pipeline you export.
- Use AI for language polish and structure checks, never for inventing citations or results.
1. Literature Triage: Search Before You Read
A PhD-sized literature folder is too large to read linearly. Start with a question, not a paper: write the exact claim you need to support, then search the whole PDF vault for its key terms. Search results tell you which documents are worth opening, which sections matter, and which papers only mention the term in passing.
Use quoted phrases for technical terms and boolean operators for alternatives. For example, `("connection pooling" OR "connection pool") AND timeout` narrows thousands of pages to a handful of relevant passages. Save the query and its date in your research log; a literature review is reproducible only if the search itself is reproducible.
When a document survives triage, add it to a shortlist with a one-line reason ("supports the latency claim", "contradicts section 3", "methodology reference"). The shortlist becomes the bibliography skeleton. Do not add papers you have not searched for and skimmed; a bloated bibliography is harder to defend than a focused one.
2. Notes That Survive the Draft: Source vs Argument
Maintain two note types. A source note records what a document says, with a page anchor and verbatim quote. An argument note records what you claim, with links to the source notes that support or contradict it. Mixing them produces prose that reads like an annotated bibliography and citations that cannot be traced.
Use a stable citation key and never renumber manually. If you use BibTeX or CSL, keep the key identical in the note, the manuscript, and the bibliography. When you rename a source, grep for the old key across the project before changing it; dangling keys are the academic equivalent of broken links.
Capture the exact quote, not your paraphrase, at note-taking time. Paraphrasing during reading loses the wording you may need to quote later and makes it impossible to distinguish your interpretation from the source. You can always paraphrase later, when the argument is clear; you cannot recover a quote you did not copy.
3. Writing Math in KaTeX Without Breaking the Export
Use inline math for symbols in a sentence and display math for equations that deserve their own line. Define macros once in the document preamble for repeated notation (for example `\newcommand{\R}{\mathbb{R}}`), so a notation change is one edit rather than fifty. Keep a notation table in the front matter and update it when you introduce a new symbol.
Preview the final export, not just the editor. A formula that renders in the live preview can still break in PDF or DOCX if it relies on a font or package the exporter does not embed. Build one representative chapter early and inspect the exported PDF at 100% zoom before writing ten more chapters with the same pattern.
Treat equations as numbered objects with stable labels. Reference them by label (`\eqref{latency-model}`) rather than "the equation above". Labels survive reordering; positional references do not. If your target venue requires Word, check that the DOCX export preserves equation numbering before submission week.
4. Using AI for Language, Never for Evidence
Use AI to improve sentences you have already written and sourced, not to generate claims. A safe prompt includes the claim, the supporting quote, and a constraint: "Rewrite this sentence for clarity. Keep every citation marker and do not introduce new claims." Review the diff against the quote before accepting.
Never ask a model to "add references" or "find papers". It will produce plausible-looking citations that may not exist, and fabricated references are academic misconduct regardless of intent. If you need more sources, search the PDF vault and your library databases; the model can help you phrase the query, not invent the answer.
Run a final integrity pass: for every paragraph that cites a source, open the source note and confirm the quote supports the sentence as written. This is slow, but it is the only defence against subtle drift introduced during polishing. A polished sentence that overstates the evidence is worse than a clumsy sentence that is accurate.
5. Export, Backup and the Submission Package
Export early and often. Produce a PDF after every major section, not only at the end, so layout problems surface while the content is still fresh. Keep the Markdown source, the bibliography file, and the exported PDF in the same versioned folder. The PDF is a build artifact; the Markdown and BibTeX are the source of truth. Name the export with the date so you can tell two similar drafts apart during a supervision meeting.
Name files so reviewers can navigate without instructions: `01-introduction.md`, `02-related-work.md`, and a `manuscript.pdf` at the root. Remove private notes and todo comments from the export. Check that line numbers, page numbers, and figure references match the version you described in your cover letter.
Back up outside the working machine. A local-first workflow protects your privacy, but it does not protect against a dead SSD. Use Git plus an encrypted off-site backup, and test a restore at least once. The final submission package should be buildable from a clean checkout with one documented command.
Explore the full production solution architecture
Frequently Asked Questions
Does using AI to polish my thesis count as plagiarism?
Policies vary by institution, so check your own guidelines and disclose tool use where required. Language polishing is generally treated differently from generating research content, but fabricating citations or results is misconduct in every policy we have seen. Keep your prompts, diffs, and source notes so the human authorship is auditable.
Can NexusNote read PDFs with formulas and figures?
Yes for PDFs with a text layer; images and layout are displayed as rendered, while formulas become searchable only if they are encoded as text. For scanned or formula-as-image documents, run OCR first. NexusNote indexes the extracted text and keeps the original page rendering side by side.
How large a PDF library can the search index handle?
The index is designed for personal research vaults: hundreds to low thousands of documents, with individual files up to a few hundred megabytes. Query latency depends on the extracted text volume, not the PDF byte size. For very large shared libraries, split by project or year so a single vault stays maintainable.
Does the workflow work fully offline?
Yes. Reading, indexing, search, KaTeX rendering, and export all run locally. If you connect Ollama or LM Studio, AI polishing also runs offline; only the optional cloud AI sends the selected text to an inference endpoint. This is why the workflow is suitable for unpublished or sensitive research.
Continue Reading
Experience Extreme Performance with NexusNote
Local-first native architecture, 12ms cold load, 100 free daily AI credits, and zero telemetry.