清单包装行号有错误吗?

清单包装行号有错误吗?

亲爱的 TeX 奇才:LaTeX

\documentclass[12pt]{article}

\usepackage{xcolor}

\usepackage{listings}

%%
%% Julia definition (c) 2014 Jubobs
%%

\lstdefinelanguage{Julia}%
  {morekeywords={abstract,begin,break,case,catch,const,continue,do,else,elseif,%
      end,export,false,for,function,immutable,import,importall,if,in,%
      macro,module,otherwise,quote,return,switch,true,try,type,typealias,%
      using,while},%
   sensitive=true,%
   alsoother={$},%
   morecomment=[l]\#,%
   morecomment=[n]{\#=}{=\#},%
   morestring=[s]{"}{"},%
   morestring=[m]{'}{'},%
}[keywords,comments,strings]%

\lstset{%
    language         = Julia,
    basicstyle       = \ttfamily\scriptsize,
    numbers          = left,
    stepnumber       = 1,
    tabsize          = 4,
    formfeed         = \newpage,
    keywordstyle     = \bfseries\color{blue},
    stringstyle      = \color{magenta},
    commentstyle     = \color{ForestGreen},
    showstringspaces = false
}

\begin{document}

\section{Remove This SECTION Line To Reinvigorate Your Line Numbers}

\lstinputlisting{test.jl}

\end{document}

和(julia)源代码

"""

I love line numbers

"""

"""

where have my numbers gone?

"""

排版后,第 2 页上的数字会消失。删除后,\section数字会在第二页上恢复。这是一个已知错误吗?

相关内容