# Books and papers for mathematical research

Organize mathematical books and papers in Manifield. Import PDFs and LaTeX, link their results to your notes and let your AI assistant cite the source items.

## Two kinds of reference

- **A source** is a book or paper you import once and attach to any project that cites it. It lives in its own library under `~/Documents/Manifield/Sources/`, can be split into citable items, and is shared by every project it is attached to.
- **A document** is a file kept with one project: the PDF of a paper you want at hand, a scan you will organize later, the `.tex` your notes grew out of. It lives in the project's `documents/` folder.

## Importing a source

Choose a PDF or `.tex` file and Manifield stores the original, then makes a full text designed for agents: headers and footers removed, hyphenation undone, split by page, with the PDF's own outline as a table of contents and a search index of its own.

Optionally, it also **processes the source into citable items**, chapter by chapter, with a model: the book's definitions and theorems become items you can cite. A long book costs time and tokens, and Manifield says so before it starts. Untick *Process into citable items* to keep a source as a document only, with no model calls at all.

Imports run in the background. You can close the sheet, switch projects and come back; a progress pill in the Sources header shows how far it got.

## Citing

Attach a source to a project and its items become citable. A citation is written in an item's `depends_on` as `source-slug:item-id`, for example `casey-euclid:prop-i-47`, and appears in the dependency graph as a literature node. Results you use without proof get their own status, **Cited literature**, which only you can set.

The assistant searches attached sources alongside your own theory and cites their items directly. In the chat, a cited source item is a link like any other, and opens beside the conversation.

## Full texts, with permission

A 400-page book would flood any model's context, and you may not want every chat to read it. So the assistant knows a full text exists but reads it only:

- when you allow it in the chat (Allow or Deny), or
- when you switch on standing access in the composer.

Even then it reads through capped, search-first tools: it searches, reads the table of contents, then reads the pages it needs. Research branches and the prover can read full texts only under standing access, because a background run has nobody to ask.

## Documents kept with a project

**Import → Add files to the project** copies PDFs or `.tex` files into `documents/` and extracts their text on your Mac, with no model calls. They appear in the sidebar's **Files** section, where you can read them in the built-in PDF viewer, rename them, re-extract the text after OCR, or hand them to the Organizer later.

When you import notes into the library, *Keep the original file in the project* is on by default, and the file is stored before the first model call: a cancelled or failed import still leaves you the file.

## Sharing

**File → Export as Package…** writes a `.manifieldpack`: a zip of the project's theory, notation, macros and metadata, without your chat sessions, run records or search index. Kept documents and source texts travel inside it, so share a package only when you have the right to redistribute them. A package can say who wrote it, under what licence, and how to cite it.
