我需要能够在章节内插入独立页面。目标是能够使用“lineno”包及其行号来中断诗歌朗读,以便您可以插入非常长的评论而不必转到章节末尾。在独立部分的末尾,从诗歌被中断的地方重新开始,同时恢复先前停止的行号。
一个不起作用的最小示例:
\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}
谢谢!
答案1
按照 3.3 节中所述使用\nolinenumbers
如何关闭文档的行号。
\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}