# How to insert a special page without conflict with lineo package

I need to be able to insert independent pages within a chapter. The goal is to be able to interrupting the reading a poem with the use of the 'lineno' package and its number the lines so that you can insert very long comments without going to the end of the chapter. At the end of the independent section,start again from the point where the poem was interrupted, also resuming the numbering of the lines previously stoping.

a minimal example that doesn't work:

\documentclass[a4paper,10pt]{book}
\usepackage[modulo]{lineno}
\usepackage{xcolor}
\usepackage{lipsum}
\newenvironment{SpecialPage}
{\clearpage\pagecolor{yellow!20!white}}{\clearpage\pagecolor{white}}
\begin{document}
\chapter{Example}
\linenumbers
\lipsum[1]

% here I would like to insert an independent section and lineno
%  interrupt the numbering of the lines
\begin{SpecialPage}
\lipsum[1]
\end{SpecialPage}
% end of independent section

% Now lineno resumes the numbering of the lines
\lipsum[1]

\end{document}

Thanks!

• Add \nolinenumbers to your environment (see the documentation 3.3 How to turn off line numbering), and better use \nopagecolor to stop the page color. Feb 15 '20 at 11:10
• Thanks @Ulrike Fischer everything works! Feb 15 '20 at 22:05
• You can accept the provided answer if it solves your problem. Feb 16 '20 at 23:51
• @ Dr. Manuel Kuehner what exactly should I do that I haven't already done for the voting system? Feb 17 '20 at 0:05

Use \nolinenumbers as described in section 3.3 How to turn off line numbering of the documentation.

\documentclass[a4paper,10pt]{book}
\usepackage[modulo]{lineno}
\usepackage{xcolor}
\usepackage{lipsum}
\newenvironment{SpecialPage}
{\clearpage\nolinenumbers\pagecolor{yellow!20!white}}{\clearpage\nopagecolor}
\begin{document}
\chapter{Example}
\linenumbers
\lipsum[1]

% here I would like to insert an independent section and lineno
%  interrupt the numbering of the lines
\begin{SpecialPage}
\lipsum[1]
\end{SpecialPage}
% end of independent section

% Now lineno resumes the numbering of the lines
\lipsum[1]

\end{document}