如何在latex中将列表拆分为页面?

如何在latex中将列表拆分为页面?,latex,listings,Latex,Listings,我正试图将我的列表分成几个页面,但不幸的是,它不起作用 我已经读过,如果设置特征线=true,它应该会自动工作。我不能。是否有其他不创建多个列表的选项 \lstset{numbers=left, columns=fullflexible, stepnumber=1, basicstyle=\footnotesize\ttfamily, numberstyle=\color{lineNumberColor}\tiny, inputencoding=u

我正试图将我的列表分成几个页面,但不幸的是,它不起作用

我已经读过,如果设置
特征线=true
,它应该会自动工作。我不能。是否有其他不创建多个列表的选项

    \lstset{numbers=left,
    columns=fullflexible,
    stepnumber=1,
    basicstyle=\footnotesize\ttfamily,
    numberstyle=\color{lineNumberColor}\tiny,
    inputencoding=utf8,
    showtabs=false,
    extendedchars=true,
    showstringspaces=false,
    showspaces=false,
    tabsize=4,
    postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{pred}\hookrightarrow\space}},
    commentstyle=\slshape\color{commentColor},
    keywordstyle=\color{keywordColor}\bfseries,
    stringstyle=\color{stringColor}\ttfamily,
    breaklines=true,
    breakatwhitespace=true,
}

假设要指定列表中新页面的起始位置,可以使用
escapeinside
选项进行指定。
特征线
选项可确保设置为true时,换行可以水平调整页面

通过指定
escapeinside=`
,可以在两个backtic(
`
)之间转义清单上下文。要断开一行,您可以在背景标记之间插入
\newpage
,如下所示:

\begin{lstlisting}[escapeinside=``]
第1页
`\新页`
第2页
\结束{lstlisting}

列表应分为两页,第一页
page
写在一页上,第二页
page
写在下一页上。

已设置,但页面未断开。