在计算机科学课程 llncs 中使用讲义时,证明最后一段的行号无法正确呈现。
这是一个最小的工作示例。
\documentclass[oribibl]{llncs}
\usepackage [pagewise]{lineno}
% Halmos box at the end of proofs.
\let\doendproof\endproof
\renewcommand\endproof{~\hfill\qed\doendproof}
\linenumbers
\title{testing}
\author{tester}
\institute{University of Breaking Things}
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\pagestyle{plain}
\section{Introduction}
Some lines of text
more text
\begin{lemma}
Here lies a meaty lemma.
\end{lemma}
\begin{proof}
Bacon ipsum dolor sit amet hamburger flank enim, ut filet mignon beef meatloaf tempor chicken frankfurter tri-tip occaecat consequat dolor. Reprehenderit consequat tongue est, duis prosciutto voluptate ham hock ut chicken ribeye. Sint consectetur bacon tenderloin. Fatback nisi pork loin excepteur sed ut turducken cow pastrami. Labore adipisicing laboris fugiat short loin.
Sunt boudin et shankle esse. Sint in ut esse tempor tongue tri-tip chicken strip steak biltong ullamco consectetur. Sed ex magna voluptate esse. Meatball sirloin ea pariatur short loin pig sint shoulder. Fugiat doner qui ea ribeye shankle ex tri-tip deserunt ullamco nulla jowl. Bresaola sint brisket andouille. Dolore in aliqua labore in mollit boudin corned beef officia fugiat incididunt sirloin.
\end{proof}
And now some more text.
\end{document}
答案1
我不太清楚为什么,但正是这个\qed
导致行号中断。这里有一个简单的解决方法:只需将其包装在数学模式中,即 $\qed$。
按照如下方式替换这些行可以修复此问题:
\let\doendproof\endproof
\renewcommand\endproof{~\hfill$\qed$\doendproof}