CorTeX DocsOpen CorTeX
Open CorTeX
Browse all topics

Write multiple papers in one project

Keep related LaTeX papers and their shared research material together while each paper retains its own source tree and PDF preview.

On this page

Use one CorTeX project as a workspace for a family of related LaTeX documents: for example, a methods paper and an applications paper, a manuscript and its supplement, or conference and journal versions that share a bibliography. Each paper keeps its own main file and preview, while the team can reuse sources and work from one file tree, one sharing configuration, and one version history.

Use separate projects instead when the papers need different collaborators or access boundaries, unrelated histories, or independent project limits. Anyone with access to the whole project can reach every paper and shared file in it.

Give each paper its own folder#

A CorTeX document is a .tex file that declares \documentclass. Put each paper and its included files below a distinct folder, then keep genuinely shared material in a sibling folder:

attention/
  main.tex
  sections/
    introduction.tex
scaling/
  main.tex
  sections/
    methods.tex
shared/
  refs.bib
  macros.tex
  figures/
    apparatus.pdf

Both attention/main.tex and scaling/main.tex must be complete document roots. From either paper, paths to shared material are relative to that paper's main file. For example:

\input{../shared/macros}
\bibliography{../shared/refs}
\includegraphics{../shared/figures/apparatus.pdf}

Keep paper-specific sections, figures, and submission files inside the paper's folder. Put a file under shared/ only when both documents intentionally use the same version; an edit there can change both PDFs.

Switch the active paper and preview#

Open attention/main.tex to compile the attention paper, or scaling/main.tex to compile the scaling paper. Opening an included file such as attention/sections/introduction.tex keeps the preview on the document in that folder. Opening shared/refs.bib does not choose a different paper: CorTeX keeps compiling the paper you were already working on.

When CorTeX finds two or more documents, the toolbar shows a document picker named after the current document's folder. Open it, or press Cmd/Ctrl+Shift+P, to jump directly to another paper's main file. On a phone, use the file tree instead. If the other paper was compiled earlier in this session, its previous PDF appears immediately while CorTeX builds the current source.

If notes/response.tex belongs only to the attention paper despite its location, declare that document explicitly near the top of the file. The path is relative to response.tex:

% !TEX root = ../attention/main.tex

Do not add a root declaration to a genuinely shared file merely to change the preview. That would make the file belong to one paper rather than stay neutral when you move between papers.

Choose the project's main document#

The paper in the editor and the project's main document answer different questions:

Setting What it controls
Current document The PDF preview, LaTeX diagnostics, and document-aware writing tools while you work
Set as main document The file opened by default, and the document a sharing link opens first

Use the file row menu to choose Set as main document for the paper visitors should encounter first. Switching documents with the picker changes your working preview; it does not silently change that project-wide default.

Check every paper before sharing or submitting#

Switch to each document and wait for PDF updated. Confirm that its title or another unmistakable marker appears, its references resolve, and its paper-specific files did not leak into the other output. Then open a shared file and confirm the same paper remains in the preview. Finally, check that the intended default paper is marked as the main document before creating a sharing link.

For a complex paper within this workspace, first split that LaTeX document into focused files.

Send one paper out#

Choose Download document from a paper's file row menu. CorTeX compiles that document, then packs the files it actually reads into a ZIP whose root is the paper's own folder, so a submission system can compile the paper's main file with its required engine. A shared file the paper cites from outside its folder travels with it and the references to it are rewritten, and the compiled .bbl is included so the bibliography appears without a BibTeX pass. Unrelated papers are excluded; a file used by the compile can still travel with the document even if it lives in another paper's folder. Inspect the packaged files. If the document does not compile, CorTeX downloads its folder as it stands and reports the fallback. That folder copy may omit outside dependencies and is not evidence of a self-contained submission archive.

Project actions → Export ZIP still downloads the whole project tree, which is what you want for a backup rather than a submission. Before submitting, run the submission-package checklist over the downloaded archive.