Skip to content

Infinite loop when a tcolorbox spans more than one page using pdflatex and minted #480

Description

@ArneBab

I’ve been debugging an issue where one of my files runs into an infinite loop adding hundreds of thousands of pages until the pdflatex limits are reached.

I’ve now managed to trace it to minted: the minimal working example (created by removing everything whose removal did not stop the infinite loop) successfully compiles when I remove \usepackage{minted}.

The example text is from my files, it just needs to be long enough to make the tcolorbox longer than one page.

minted-version (from minted.sty \ProvidesPackage{minted}): [2025/05/14 v3.7.0 Yet another Pygments shim for LaTeX

latex compiler: pdflatex, version: pdfTeX 3.141592653-2.6-1.40.29 (TeX Live 2026/GNU Guix)
compiled with: rm example.{aux,toc} ; pdflatex -interaction=nonstopmode -shell-escape example

% Intended LaTeX compiler: pdflatex
\documentclass[a5paper]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{color}
\usepackage{minted}
\usepackage{tcolorbox}
\usepackage{xcolor}
\definecolor{cream}{rgb}{1.0, 0.99, 0.82}

\begin{document}
\begin{tcolorbox}[colback=cream, sharp corners]%
\medskip%
I agree that the value of art you create is the change it causes
within you, but I don’t think that its value is that you \emph{admire it}.

\textbf{Art is a crystallization of your path towards it}. It lets others
experience the essence of your life, of years of learning, in a much
shorter span of time.

That’s how it benefits society.

And that’s why AI Art often is hollow: regardless of its polish, it
represents far less learning.

And \emph{one more thing} in which I think Brandon Sanderson is wrong in his
talk:

Art isn’t useless.

\textbf{Art is code} that leverages our shared culture to \textbf{run on the human
brain and change our culture} -- the beliefs and values that drive
society. And art \textbf{builds the foundation for more art}.


But while art is not useless, it is at its best, when it is not \textbf{used}
as a tool or for producing something else. Paradoxically art is most
useful if it is created only for its own sake.


AI art can come from our culture, but it does not grow with the
changes it causes. It needs intermediary non-AI art to change.

If AI cannot ingest newly created non-AI art, it is stale.

Dead and hollow.

Developing prompts can actually give it more meaning, like a director
can cast actors to match a vision, but form creates its own meaning.

\textbf{Form created by human actors changes with their experiences.}

Form created by AI does not.

It is a dead end.

The only way to make AI art grow is to use less and less AI over time
and infuse creations with more and more human-made art.

But that human-made art has a hard time getting seen among
AI-decorated art.

\medskip\end{tcolorbox}%

\end{document}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions