# Preprint & editions

A paper often goes out in several forms: the anonymous submission, a named preprint on arXiv, the appendix as a separate supplementary PDF, and later perhaps a journal version. VersoFold builds them all from one LaTeX source. Nothing is copied, so the editions never drift apart: a typo fixed once is fixed in every PDF. For the common case, step by step, see [Make a preprint](preprint.md); for how editions differ from the paper's phase, see [Phases and editions](paper-phases.md#phases-and-editions).

Next to the paper's phase, under its title, the edition switcher says which edition you are looking at: **Paper ▾** at first. With only the paper so far, clicking it offers to make a **Preprint** or **Supplementary material**. The editions themselves are in **Publish → Preprint & editions**. You can also type **Editions** in **⌘K**, use **Preprint & editions…** in the phase menu (from Submission on) or in the switcher's menu, or start from the **Checklist** tab.

## The editions

| Edition | What it is |
| --- | --- |
| Submission | The paper itself, built from its main file. Its name follows the phase: Paper, Submission or Camera-ready. |
| Preprint | The same paper as you post it on arXiv: the authors named, no page limit, the appendix included, and the venue style in its preprint mode when the style has one. |
| Supplementary material | A separate PDF with the appendix only. It refers to the paper's figure and section numbers and keeps the submission's anonymity. |
| Copy as a new edition | A standalone copy, for a journal extension for instance. It is made once and then changes on its own; VersoFold lists how it differs from the conference version. |

Each card in the dialog shows the edition's entry file, when its PDF was last built, and **View**, **Build** and **Download**. **View** shows that edition, as the switcher does. The bin button deletes an edition: VersoFold stops building it and removes its small entry file. The marks in the paper stay, so the other editions are unchanged. A copy's own files always stay in the folder.

## Create an edition

Under **New edition**, choose **Preprint**, **Supplementary material** or **Copy as a new edition**, set its options, then **Preview the changes**. Nothing is written yet: the preview lists every change to the paper as a before and after, with the file and line it is in, the new files the edition adds, and anything to check yourself, each with a link to the place in the source. **Create** makes exactly what the preview showed. If the paper changed in the meantime, VersoFold shows the new preview instead and asks you to check it again.

The options:

- **Preprint.** Use the venue style's preprint mode; restore the real code and data links in place of anonymised ones (links VersoFold cannot match are listed in the preview); the named author block, when the paper's own is anonymous; acknowledgements that only the preprint prints.
- **Supplementary material.** Move the appendix out of the submitted paper; number its sections, figures and equations S1, S2… or continue the paper's numbering; refer to the paper's numbers; give it its own title and its own bibliography.
- **Copy as a new edition.** Its name, the edition it starts from (the submission, or the preprint when there is one) and where its main file goes.

## How the source is marked

The main file starts with a short block VersoFold writes. It defines one switch per edition, and each edition other than the submission has an entry file beside the main file (`paper-preprint.tex`, say) that names the edition and inputs the main file. Text that belongs to some editions only is wrapped in plain TeX conditionals, so the paper still builds anywhere, on Overleaf or on arXiv, and agents read it like any other source.

| In the source | Who prints it |
| --- | --- |
| `\ifpreprint … \fi` | The preprint only. |
| `\ifpreprint … \else … \fi` | The preprint prints the first part, the other editions the second. |
| `\ifsupplementary … \fi` | The supplementary material only. |
| `\ifsupplementary\else … \fi` | Everything but the supplementary material: the paper's body. |
| `\ifsubmission … \fi` | The submitted paper only. |
| `\ifanonymous … \else … \fi` | The anonymous editions, then the named ones. |
| `\anon{anonymous}{named}` | The same, inside a sentence. |

You can write these by hand; the editor helps with both reading and writing them.

Agents read the marks like any other LaTeX. Ask one to keep a sentence out of the preprint, to name the authors only once they are named, or to build an edition and run the checks: it marks the text the same way, and creating an edition follows the same approval setting as any other change to the paper.

## Marks in the editor

In the LaTeX editor, the lines of a marked passage get a coloured band, one colour per edition (faded for text an edition leaves out), and the markers themselves are dimmed. A small label after `\ifpreprint` and after `\else` says who reads what follows, such as **Preprint only** or **Not in the preprint**; hover it to see which editions print the text. A mark inside a sentence tints its words instead of the lines. `\anon{…}{…}` is underlined, and hovering it shows both wordings. A marker that is never closed with `\fi` is underlined as a warning, and the dialog lists it at the top with a link to its line.

To mark text, select it and choose the **Edition** button in the toolbar that appears over the selection:

- **Only in the preprint**, **Not in the preprint**, **Only in the supplementary material**, **Not in the supplementary material**, **Only in the submission**, **Only once the authors are named** or **Only while anonymous**. Whole lines get their markers on lines of their own; part of a line gets them inline, spaced so that no edition loses or doubles a space.
- **Anonymous wording…** keeps the selection as what the anonymous editions print and asks for what the named ones print instead.

To remove a mark, click its label in the editor, or select text inside it and open **Edition**. A mark with two versions offers to keep either one everywhere; a mark with one offers to keep the text everywhere or to delete it with its mark. Marking and removing are ordinary edits: **⌘Z** undoes them, co-authors see them live, and **Track changes** records them. Until the paper has the editions block, the menu offers **Set up the preprint…** instead.

These bands and labels are the **All editions** view (see below), where every edition's text is on screen with its marks. The Visual editor always shows every edition's text: the markers are small tags where they stand, and `\anon` shows the wording the paper prints now. Click a tag to edit the mark as LaTeX.

## Switch the view

The switcher next to the phase chooses what the PDF and the LaTeX below show. Its menu lists every edition with its build (when it was built, building, not built yet or failed), with **Build now** and **Download** beside each; **All editions** is at the bottom. Each window remembers its own view.

- **The PDF** shows the chosen edition's PDF, built first if it has none. While **Auto** is on, it is rebuilt once your edits pause, after the main PDF. When the view is not the paper, a small tag in the PDF toolbar names it; click the tag to open the switcher.
- **The LaTeX** shows the chosen edition's text. It is still the one source every edition shares, seen through that edition. Text the edition leaves out folds into a one-line placeholder, such as **Not in the preprint · 4 lines**; click it to show that text in place, and click **hide** on it to fold it again. The markers (`\ifpreprint`, `\else`, `\fi`) step aside, and of `\anon{…}{…}` you see the wording this edition prints, with a tiny chip for the other one. Line numbers skip the folded lines. The block of edition switches at the top of the main file folds into one line too. The **Paper** view does the same for the paper: what only the preprint or the supplement prints is folded.
- **Editing in a view** changes the shared source, so it reaches every edition unless the text is marked; when the view is not the paper, the tab bar says so with a small tag, such as **Preprint view**. Typing and deleting never touch folded text or hidden markers: a selection across them changes only what is shown, and Backspace next to them leaves them in place. A search hit, or a jump to a line, inside folded text shows it.
- **All editions** shows every edition's text with the bands and labels described above, for when you want to see and edit the marks themselves.

A copy has its own LaTeX: choosing it opens its main file.

## Colour the differences

**Colour the differences** in the switcher's menu colours what the edition on screen prints and the edition it is compared with does not: the paper's anonymous author block when you look at the paper, the named authors, acknowledgements and appendix when you look at the preprint. It colours the LaTeX (a tint in the edition's colour) and the PDF (the words the other PDF does not have, read from both PDFs, so text that only moved to another page is not coloured). The edition compared with is the paper, or the preprint when you look at the paper; choose another under **Compare side by side … with**. The switch is remembered with the view.

While it is on, these colours take the place of the changes since submission on that PDF; switch it off to see those again. Changes since submission (the highlights on the PDF and the marked PDF) always belong to the main edition.

## Compare side by side

**Compare side by side** in the switcher's menu shows the two PDFs next to each other, over the LaTeX and the PDF: the edition compared with on the left, the one on screen on the right. They scroll together. With the colours on, the right PDF shows what its edition adds and the left one what it leaves out, in a muted red (an "Anonymous" the preprint replaces, say). The bar above names both and lets you choose the edition on the left, swap the two, switch the colours, and leave (or press Escape). Your layout underneath stays as it was.

## Anonymity

The submission card says who is named. **Anonymous until camera-ready** hides the authors in the submission and the supplementary material while the preprint names them. **Named in every edition** names them everywhere, as the camera-ready version should. In the Camera-ready phase, the checklist checks this as **Name the authors in every edition** and fixes it in one click.

## Checks

**Run the checks** at the bottom of the dialog reads the editions' PDFs as last built: the submission and the supplementary material name no author, the preprint names them, and every mark is closed. Failed checks come first, with what was found and on which page.

## The preprint on arXiv

On the preprint's card, **arXiv package** opens the [arXiv tool](submission.md#prepare-an-arxiv-source-package) with the preprint: its marks are resolved in the package, so text meant for other editions does not reach arXiv. Once it is online, **Mark as posted on arXiv…** records the version, with its arXiv identifier if you give one. For the next version, **What changed since v1** lists the sections that changed and how many words were added or removed, and **Draft the arXiv comment with the agent** asks the agent for the comment that goes with the new version. In the Camera-ready phase, the checklist reminds you to update the preprint.

## A journal version

A copy changes on its own. On its card, **Differences from the conference version** lists the sections it added, removed or changed, and **Draft the list with the agent** asks the agent for the summary of differences journals ask for. See also [Paper phases](paper-phases.md).
