Skip to content

Files and images

Keep the main file small and include chapters:

#set page(paper: "a4")
#include "introduction.typ"
#include "methods.typ"

Create or upload files using the Files panel. Open a file there to edit it. When you rename or move a file, update the paths that refer to it.

Paths are relative to the source file containing the reference. Match capitalization exactly, including the extension.

When naming, uploading, or renaming a project file, use a project-relative name such as chapters/methods.typ. Stored file names and the main-file setting cannot contain absolute paths, backslashes, empty path segments, or . / .. segments. This restriction applies to stored names; Typst references such as ../images/figure.png can still refer to assets inside the project. If an older file has an invalid stored name, download its contents, remove it, and upload it again under a valid name before exporting.

Upload your image to the project, then choose Document → Insert figure… to prepare the insertion. You can also write it directly:

#figure(
image("images/experiment.png", width: 80%),
caption: [The experimental setup.],
) <experiment>
See @experiment for the setup.

The example requires an uploaded images/experiment.png. Change the path to match your file.

Use project files for assets you need to preserve with the document. A project ZIP can retain those assets alongside the source. Keep reusable definitions in a package when several documents share them.

If an image does not appear, check the diagnostic, the path, and whether the upload completed. See compilation problems.

The Main badge marks the default compilation file. Set as main file changes that default; the eye button previews a file temporarily and reports its selected state. Dashboard stars are favorites and do not affect compilation.