Upload images to your Coauthor LaTeX folder and include them with graphicx: the figure environment, captions, labels, placement specifiers, sizing, and side-by-side subfigures with subcaption.
Figures and Images
Images in a LaTeX project are separate files that the compiler reads when it builds the PDF. In Coauthor those files live in the same folder (or a subfolder) as your main .tex file, and the compiler receives everything in that folder. This page shows how to get an image into the folder and onto the page.
Step 1: Upload the Image to the Project Folder
- In the workspace panel, hover over your project folder, open its menu, and choose Import (or click Import document at the top of the panel and pick the folder as the destination).
- Drag your image files into the drop area or use Choose files. To keep things tidy, drag a whole
figuresfolder; its relative path is preserved. - Click Import. Images are listed as supporting files in the folder; clicking one opens a preview.
Supported formats for pdfLaTeX are PDF, PNG, and JPG/JPEG. Prefer PDF for vector plots (from matplotlib, R, or Inkscape) and PNG for screenshots. EPS and SVG files are not accepted by the compiler; convert them before uploading. See Importing Files and Folders and Supported File Types.
Step 2: Load graphicx and Include the Image
% preamble
\usepackage{graphicx}
\graphicspath{{figures/}} % optional: search this subfolder first
% body
\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{results-accuracy}
\caption{Test accuracy as a function of training set size. Shaded areas are one standard deviation over five seeds.}
\label{fig:accuracy}
\end{figure}
Notes:
- Leave out the extension (
results-accuracyinstead ofresults-accuracy.pdf) and pdfLaTeX picks the best available file. Including it is also fine. - Paths are relative to the main file:
figures/plot.pngif the image is in afiguressubfolder. - File names are case-sensitive and should not contain spaces.
Plot 1.pngfails;plot-1.pngworks. \labelmust come after\caption, otherwise\refgives the section number instead of the figure number.
Sizing
| Option | Effect |
|---|---|
width=0.8\linewidth | 80% of the current column width; the usual choice |
width=\textwidth | Full text width (in two-column documents, use inside figure* to span both columns) |
height=5cm | Fixed height, aspect ratio kept |
width=6cm,height=4cm,keepaspectratio | Fit inside a box |
scale=0.5 | Half the native size |
angle=90 | Rotate |
trim=1cm 0 1cm 0,clip | Crop (left bottom right top) |
Placement
The optional argument of figure tells LaTeX where it may put the float:
| Specifier | Meaning |
|---|---|
h | Here, if it fits |
t | Top of a page |
b | Bottom of a page |
p | On a separate page of floats |
! | Relax LaTeX's internal limits |
H | Exactly here, no floating (needs \usepackage{float}) |
[t] or [tb] gives the most journal-like result. Figures are numbered in the order of their \caption commands, not their position on the page, and LaTeX may move them past the paragraph that mentions them; always refer to them by number (Figure~\ref{fig:accuracy}), never as "the figure below". \clearpage forces all pending floats to be printed.
Side-by-Side Subfigures
\usepackage{subcaption} % preamble
\begin{figure}[t]
\centering
\begin{subfigure}[b]{0.48\linewidth}
\centering
\includegraphics[width=\linewidth]{loss-train}
\caption{Training loss}
\label{fig:loss-train}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.48\linewidth}
\centering
\includegraphics[width=\linewidth]{loss-val}
\caption{Validation loss}
\label{fig:loss-val}
\end{subfigure}
\caption{Loss curves for both splits.}
\label{fig:loss}
\end{figure}
\ref{fig:loss-train} produces "1a" and \subref{fig:loss-train} produces just "a". Some venue templates ship their own subfigure package; if you get Option clash or Command already defined, remove your \usepackage{subcaption} and use what the template provides.
Wrapping Text and Tables of Figures
\listoffiguresin the front matter prints every caption; use the optional short caption to keep it readable:\caption[Accuracy vs. data]{Long descriptive caption...}.- Figures inside
minipageenvironments give you fine control over layout whensubcaptionis not available.
Troubleshooting
| Message | Cause | Fix |
|---|---|---|
File 'plot.png' not found | Wrong name, wrong folder, or the file was not imported | Check the exact file name in the workspace panel and the path relative to the main file |
Cannot determine size of graphic | Usually an EPS or corrupt file | Convert to PDF or PNG and re-import |
Unknown graphics extension: .svg | pdfLaTeX cannot read SVG | Export the drawing as PDF |
| Figure appears on a later page | Normal float behavior | Refer to it by number, or use [H] with the float package |
LaTeX Warning: Float too large | Image wider than the page | Reduce width |
Errors of this kind have no line number in the Compilation Results panel because they are reported by the graphics driver; the raw log line names the missing file. See Fixing Common LaTeX Errors. For diagrams you would rather draw in code than upload, see Diagrams with TikZ.
Related articles
Prefer to ask?
Inside Coauthor, ask the AI coauthor how any feature works — it answers from these same help articles. For anything else, use the ? button in the top-right corner of the app.