{Jan \v{S}ustek} {On generating documented source code by blocks in \TeX} {In this talk I will focus on literate programming in \TeX\Dash writing source code and its documentation in a single file. Firstly I will show an easy modification of \OpTeX\ macros to allow literate programming. Then I will modify the macros to build the source code by nested blocks which can be built consecutively in the whole document\Dash quite similar to the file \texttt{tex.web}, but implemented completely in \TeX. Such documentation is more comprehensible to the reader. With a few more macros or hooks, one can apply this method in the following real situations. %\begin{itemize} \item Cross references make \texttt{goto} jumps easy in programming languages with line numbers. \item The abovementioned blocks can imitate subprograms with arguments in programming languages where they are not allowed. \item \TeX\ macros can define a metalanguage and generate the source code in two different programming languages simultaneously. %\end{itemize} \noindent Without the \TeX\ methods the solutions would be more complicated.}