Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Line numbers are not properly rendered on the last paragraph of a proof when using the lecture notes in computer science class llncs.

Here's a minimal working example.

\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}
share|improve this question
add comment

1 Answer 1

I'm not entirely sure why, but it's the \qed that breaks the line numbers. Here's an easy fix: just wrap it in math mode, i.e. $\qed$.

Replacing the lines as follows fixes it:

\let\doendproof\endproof
\renewcommand\endproof{~\hfill$\qed$\doendproof}
share|improve this answer
    
To that end, you could also just use \squareforqed, which is a overlapping \sqcap and \sqcup. –  Werner Feb 5 '13 at 3:19
    
@Werner I'm pretty sure the class I'm using uses those overlapping symbols anyway. I think putting it in math mode puts you in a different if branch in the class definition. So I think it might actually be a bug in the class? But it's a commonly required class for submitting to computer science conferences. –  Joe Feb 6 '13 at 0:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.