%%
%% The LaTeX Companion, 3ed
%%
%% Example 4-2-24 on page I-310 in "Customization keys for typesetting".
%%
%% Copyright (C) 2022 Frank Mittelbach
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%% See https://www.latex-project.org/lppl.txt for details.
%%

\documentclass{tlc3exa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{183.0pt}
\def\thechapter{4}
%StartShownPreambleCommands
\usepackage{fancyvrb}
\renewcommand\theFancyVerbLine{\footnotesize
 \thechapter.\arabic{FancyVerbLine}}
%StopShownPreambleCommands

\begin{document}
\begin{Verbatim}[numbers=left,stepnumber=2,
                numberblanklines]
Normally empty lines in
a verbatim will not receive
numbers---here they do!

Admittedly using stepnumber
with such a redefinition of
FancyVerbLine looks a bit odd.
\end{Verbatim}
\end{document}