5

I have this:

\begin{lemma}
 \begin{equation} 
   L_b \circ L_a = L_{L_b(a)} \circ L_b.
 \end{equation}
\end{lemma}

and I would like the equation to be on the same line as the lemma, with a number label.
Adding \vspace{-\abovedisplayskip} doesn't work.
How can it be solved?

  • Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 May 29 '14 at 14:07
  • 1
    I would avoid such a layout: a statement consisting of an equation only is incomplete. Either add some words about the hypotheses, or just state the equation without calling it “Lemma”. You can refer to it by the equation number. – egreg May 29 '14 at 14:29
3

You can manually set this very specific requirement:

enter image description here

\documentclass{article}
\usepackage{amsmath,amsthm}
\newtheorem{lemma}{Lemma}
\begin{document}
Some regular text.
\begin{lemma}
This is a lemma.
\end{lemma}
Here is a break of some more text.
\begin{lemma}
\begin{equation}
  L_b \circ L_a = L_{L_b(a)} \circ L_b.
\end{equation}
\end{lemma}
Another break of regular text.

\medskip
\refstepcounter{lemma}%
\noindent\leavevmode\rlap{\textbf{Lemma~\thelemma.}}\hfill%
$L_b \circ L_a = L_{L_b(a)} \circ L_b.$\hfill%
\refstepcounter{equation}%
\llap{(\theequation)}\par%
\medskip

Some final text.
\end{document}

\medskip seemed sufficient in terms of the spacing. However, if need be, one can dig through the code and find the exact vertical spacing above/below the lemma to make it identical to the rest.

The overlapping (\rlap and \llap) is to make sure the equation is eventually centred when using \hfill.

  • Fine, it works. But how complicated has all this become... – Gerard May 30 '14 at 8:52
  • 1
    @Gerard: I don't know what to say... you want something out of the ordinary... then expect something out of the ordinary. – Werner May 30 '14 at 16:35
3

One can also define a centredequ environment that centres the equation in the remaining free part of the current line. It works with the cleveref package:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}

\usepackage{amsmath,amsthm}
\newtheorem{lemma}{Lemma}

\usepackage{cleveref} 
\newcounter{centredequ}
\newenvironment{centredequ}{\refstepcounter{equation}\hfill\begin{math}}{\end{math}\hfill$(\theequation)$\par\noindent}
\crefname{centredequ}{eq.}{eqs. }
\Crefname{centredequ}{Eq.}{Eqs. }

\begin{document}

First a displayed equation: 
\begin{equation}\label{disp}
  a = b
\end{equation}
Some regular text with a centred equation: \begin{centredequ}\label{taut}
  a' = b'.
\end{centredequ}
\Cref{taut} is almost the same as \cref{disp}. 

\begin{lemma}
This is a lemma.
\end{lemma}
Here is a break of some more text.

\begin{lemma}\label{lem2}
\begin{centredequ}L_b \circ L_a = L_{L_b(a)} \circ L_b.\label{com}\end{centredequ}%
\end{lemma}
As we can see from \cref{taut} and \cref{lem2}, \cref{com} …

\end{document} 

enter image description here

  • Technically the equation won't be centered using this method, as is displayed in equation (2). But that may be sufficient for the OP. It's noticeable when you have the same equation just above/below Lemma 2. – Werner May 29 '14 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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