awx

← Blog

Walk-through · 17 November 2026

How to work on LaTeX with AwanBox

Write your thesis in LaTeX without fighting the installation. An agent sets up a small TeX install, builds a thesis you can start from, and shows what the common errors mean. This post follows a real run.

LaTeX is how many final-year theses are typeset. The maths looks right, the references and the contents page build themselves, and your supervisor may ask for it. The hard part is the start: a full install is several gigabytes, and the first error message can be a page of strange text.

On awx the install happens on a computer that is not your laptop, and you collect the PDF from the Files tab. We asked an agent to set it up on a Small computer, make a starter thesis and break it on purpose. The agent got a few things wrong on the way, and those are in here too.

Awi the cat agent typing on a laptop

The first message

I am a final-year student and I want to write my thesis in
LaTeX, but I do not want to fight the installation. Please set it
up on this computer. First tell me how much free disk space there
is, then install only what a normal thesis needs (not the full
multi-gigabyte TeX Live), and tell me how big the install was and
how long it took. Then, in /home/agent/thesis, make a small thesis
I can build on: a title page, an abstract, a table of contents,
two chapters, one table, one figure (draw it with TikZ so no image
file is needed), and a bibliography with three real references in
references.bib that are cited in the text. Compile it to
thesis.pdf with latexmk and tell me the page count and the file
size. Then break it on purpose in two typical ways (a missing
closing brace, and a citation key that does not exist), show me
what the error message looks like and how you find the real cause
in the log, and fix both. Finally list the commands I would type
to rebuild the PDF myself, and anything that did not work on the
first try.

Two parts of this message do the work. "Not the full multi-gigabyte TeX Live" stops the agent installing everything. "Anything that did not work on the first try" makes it list its own mistakes.

What it installed

The agent's list of what it installed: texlive-latex-base, texlive-latex-recommended, texlive-pictures, latexmk and lmodern, and the size of about 241 MB against 7.28 GB for the full TeX Live
Five packages. The agent's estimate for the full TeX Live was 409 packages and 7.28 GB.

The thesis it made

The agent wrote six files in /home/agent/thesis:

thesis.tex             packages, title page, abstract, contents
chapters/chapter1.tex  Introduction
chapters/chapter2.tex  Data and Methods: a table, a TikZ figure, two equations
references.bib         three references on principal component analysis
.latexmkrc             tells latexmk to use pdflatex and BibTeX
README.md              a short cheat sheet
Four pages of the built thesis side by side: a title page, a contents page, a page with a table, and a page with a bar chart drawn in TikZ
The title page, the contents, the table and the figure. The names and numbers are made up.

The thesis is 11 pages and 226,252 bytes, and latexmk rebuilt it in about four seconds. The figure is a bar chart drawn in TikZ, so there is no image file to lose.

All of the content is placeholder. The university, the student, the sensor network and every number in the table are invented. The three references are real papers (Pearson 1901, Hotelling 1933, Jolliffe and Cadima 2016). Check each reference entry against the source before you reuse it, because a model can get a year or a page number wrong.

Error 1: a missing brace

The agent removed one closing brace from a bold phrase in chapter 1 and built again. LaTeX stopped:

The agent's explanation of the missing-brace error: the Runaway argument message quoting the start of the broken text, the line number pointing at the main file, and three steps to find the real line
The error message, and how the agent traced it.

The line number in the message points at thesis.tex, which has nothing wrong with it. That is only where LaTeX ran out of file. The useful part is the "Runaway argument?" line above the error, which quotes the first words of the broken text. The agent searched the chapters for those words, found the line, and counted one opening brace and no closing one.

The rule to keep: "Runaway argument" followed by "File ended while scanning" means a brace was never closed. Ignore the line number and search for the quoted text.

Error 2: a citation that does not exist

The agent then misspelled a citation key, writing one l where the key has two. This time the build did not stop:

The agent's explanation of the undefined citation: the natbib warning, the BibTeX warning, the latexmk summary, and four ways to find the real cause
A wrong citation is only a warning.

latexmk finished with exit code 0 and made a PDF. The only sign in the PDF is a bare ? where the citation should be, for example "given by ?." That is easy to miss in a long document. The messages are in thesis.log (which says the page and line) and in thesis.blg, the BibTeX log, which says it found no entry with that key. Listing the keys with grep "^@" references.bib shows the right spelling.

Before your final submission, search the PDF for ? and [?], and look at the last lines latexmk prints. It says how many citations it could not resolve.

We checked it

We opened a terminal on the computer and looked at the result ourselves:

The terminal: the thesis folder with its files, 11 pages, 226252 bytes, five Type 1 embedded fonts, folder sizes of 155M, 45M, 42M and 31M, and zero undefined citations
The folder, the page count, the fonts and the sizes.

The page count and file size matched what the agent said, the fonts are embedded vector fonts, the log has no undefined references, and latexmk says everything is up to date. We did not read the thesis text itself closely, so that is the part we did not check.

What went wrong on the way

The agent listed these without being asked twice. They are the kind of thing that costs an evening on a laptop:

It also noticed that page 6 of the PDF holds only one short section. That is ordinary LaTeX page breaking and it changes when you add text.

Rebuilding it yourself

cd /home/agent/thesis
latexmk -pdf thesis.tex          # build after any edit
latexmk -pdf -pvc thesis.tex     # rebuild each time you save
latexmk -c                       # delete helper files, keep the PDF
latexmk -C                       # delete helper files and the PDF

If a build gets confused, run latexmk -C and then the build again. To get the PDF, open the Files tab, go to thesis and press Download beside thesis.pdf.

Your .tex and .bib files are plain text and small. Keep them in Git or on your own drive too, and read the backup post for how to save a copy outside the computer.

When Overleaf is the better choice

Overleaf is a website made for this, and it is the better choice in several cases:

A computer on awx suits you if you like working from files and a terminal, if your figures come from scripts that the same computer can run before the build (as in the survey post), or if you want to ask an agent to explain a log. It is also a way to learn what LaTeX is doing. Ask your supervisor which format they expect before you choose.

What it cost

The agent run was 71 steps over about 13 minutes on a Small computer, which is RM0.03 an hour while it runs. That came to around a sen of the welcome credit. One run is limited to 80 steps, so this one used most of its allowance, and a longer job is better split into two messages. The larger cost is storage, about 0.3 GiB of your allowance. How running time and credit work has the details.

Cautions

Keep reading

Getting started

Sign in with your Google account and open a chat on a Small computer. Paste the first message from this post, then replace the placeholder text with your own and your university's template.

Open the workbench

Awi the cat agent celebrates with confetti

Awi, signing off.

← All posts