Example:
\documentclass{article}
\begin{document}
\section{Power series}\label{ps}
\begin{equation} \label{eq}
\sum_{i=0}^\infty a_i x^i.
\end{equation}
The equation \ref{eq} is a typical power series.
\section{Conclusion}
Look at Section~\ref{ps}.
\end{document}
In order to get the references, latex must be run twice, and an auxiliary file is created.
Whereas, look at the following analogous (less verbose) OpTeX example:
\sec[ps] Power series
$$
\sum_{i=0}^\infty a_i x^i. \eqmark[eq]
$$
The equation \ref[eq] is a typical power series.
\sec Conclusion
Look at Section~\ref[ps].
\bye
We need to run optex only once to get the references. Moreover, no auxiliary (.ref) file is created, because in this example references can be already resolved in one pass.
So, I don't understand why LaTeX always forces a two pass approach even when a single pass can work as well, and can deal with the most common kinds of references (future references are rarer).
optexhandles also the case of future references, when they are present, with a two pass job. – User Mar 20 '21 at 08:08optexexample, of course I am aware that forward references need two passes. The example was meant to show that when the references can be resolved in a single pass, thenoptexdoes it, whilelatexuses the second pass in any case. – User Mar 20 '21 at 12:24\citecommands (which is very common) then you need only two passes:optex,optexwithout calling external program. LaTeX user needs four calls:latex,biber,latex,latex. Or, when creating Index, you needoptex,optex(without calling any external program), but LaTeX user needslatex,makeindex,latex. :) – wipet Mar 20 '21 at 13:06