3

I have an issue with the numbering of my equations which overwrites in part them

\documentclass[12pt,leqno]{article}

\usepackage{amssymb,amsmath,amsthm}
\usepackage{accents}
\usepackage{tikz-cd}

\newcommand{\nc}{\newcommand}
\nc{\RR}{\mathrm{R}}
\newcommand{\roim}[1]{\RR{#1}_*}
\newcommand{\opb}[1]{#1^{-1}}
\newcommand{\ltens}[1][]{\mathbin{\otimes_{\raise1.5ex\hbox to-.1em{}#1}^{L}}}
\newcommand{\etens}{\mathbin{\boxtimes}}
\newcommand{\letens}{\overset{\mathrm{L}}{\etens}}


\begin{document}

\begin{equation}\label{eq:some_equation}
    \begin{array}{l}
        \roim{p_{14\pi}}\circ\opb{^{t}p_{1234}'}\circ\roim{^{t}j'}\circ\opb{j_{\pi}}\simeq\roim{p_{3\pi}}\circ\opb{^{t}p_{3}'}\circ\roim{p_{134\pi}}\circ\opb{^{t}p_{2}'}\circ\roim{^{t}h'}\circ\opb{h_{\pi}}\circ\roim{^{t}k'}\circ\opb{k_{\pi}}
    \end{array}%
    \end{equation}

\end{document}

here is how it looks like

enter image description here

Someone has an idea on how I can get rid of this ?

  • It seems your equation is just to long (53.98pt to wide when I compile it), so I guess the right way to do it would be to break it on multiple lines? Is that something you could do or do you really need every part of this equation to be on a single line? – Vinzza Jul 18 at 8:41
  • @Vinzza thank you for your answer, indeed I need that the equation lies in a single line. Is there a way to do that ? – user2478159 Jul 18 at 8:52
  • 1
    You can have no number with \[ ... \]! – Bernard Jul 18 at 8:52
  • @Bernard indeed, I just wrote this for short. I edited my post – user2478159 Jul 18 at 8:53
  • 1
    Can't you use slightly shorter margins? Just loading geometry solves the problem. – Bernard Jul 18 at 9:13
5

As explain @pgrass in his answer (+1), your equation is to long for your page layout and is enclosed into array which cause overwriting equation number.

For resolving your problem you have more possibilities:

  • write equation in two lines (the first example in image)
  • use smaller font for equation (the second example in image)
  • increase text width in your document
  • for equation locally increase text width (the third example in image)
\documentclass[12pt,leqno]{article}

\usepackage{amsmath,amssymb,amsthm}
\usepackage{accents}
\usepackage{tikz-cd}

\usepackage[strict]{changepage} % new

\newcommand{\RR}{\mathrm{R}}
\newcommand{\roim}[1]{\RR{#1}_*}
\newcommand{\opb}[1]{#1^{-1}}
\newcommand{\ltens}[1][]{\mathbin{\otimes_{\raise1.5ex\hbox to-.1em{}#1}^{L}}}
\newcommand{\etens}{\mathbin{\boxtimes}}
\newcommand{\letens}{\overset{\mathrm{L}}{\etens}}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}

\begin{document}

\begin{multline}
\label{eq:some_equation}
    \roim{p_{14\pi}}\circ\opb{^{t}p_{1234}'}\circ\roim{^{t}j'}\circ\opb{j_{\pi}}    \\
        \simeq\roim{p_{3\pi}}\circ\opb{^{t}p_{3}'}\circ\roim{p_{134\pi}}\circ\opb{^{t}p_{2}'}\circ\roim{^{t}h'}\circ\opb{h_{\pi}}\circ\roim{^{t}k'}\circ\opb{k_{\pi}}
\end{multline}

{\footnotesize
\begin{equation}
\label{eq:some_equation}
    \roim{p_{14\pi}}\circ\opb{^{t}p_{1234}'}\circ\roim{^{t}j'}\circ\opb{j_{\pi}}   
        \simeq\roim{p_{3\pi}}\circ\opb{^{t}p_{3}'}\circ\roim{p_{134\pi}}\circ\opb{^{t}p_{2}'}\circ\roim{^{t}h'}\circ\opb{h_{\pi}}\circ\roim{^{t}k'}\circ\opb{k_{\pi}}
\end{equation}
}

\begin{adjustwidth}{}{-5em}
\begin{equation}
\label{eq:some_equation}
    \roim{p_{14\pi}}\circ\opb{^{t}p_{1234}'}\circ\roim{^{t}j'}\circ\opb{j_{\pi}}
        \simeq\roim{p_{3\pi}}\circ\opb{^{t}p_{3}'}\circ\roim{p_{134\pi}}\circ\opb{^{t}p_{2}'}\circ\roim{^{t}h'}\circ\opb{h_{\pi}}\circ\roim{^{t}k'}\circ\opb{k_{\pi}}
\end{equation}
\end{adjustwidth}

\end{document}    

enter image description here

(red lines indicate page layout)

  • 1
    +1. Speaking for myself, I'd say that the multline-based solution is best. – Mico Jul 18 at 10:50
  • @Mico, thank you! For me too, so I put it on the first place :-) – Zarko Jul 18 at 11:16
3

The formula is too wide. Use multline, which is made just for such problems.

I also changed the definition of \opb adding a pair of braces, so not to risk an initial exponent is set to the \circ.

\documentclass[12pt,leqno]{article}

\usepackage{amssymb,amsmath,amsthm}
\usepackage{accents}
\usepackage{tikz-cd}

\newcommand{\RR}{\mathrm{R}}
\newcommand{\roim}[1]{\RR{#1}_*}
\newcommand{\opb}[1]{{}#1^{-1}}
\newcommand{\ltens}[1][]{\mathbin{\otimes_{\raise1.5ex\hbox to-.1em{}#1}^{L}}}
\newcommand{\etens}{\mathbin{\boxtimes}}
\newcommand{\letens}{\overset{\mathrm{L}}{\etens}}


\begin{document}

\begin{multline}\label{eq:some_equation}
\roim{p_{14\pi}}\circ\opb{^{t}p_{1234}'}\circ\roim{^{t}j'}\circ\opb{j_{\pi}} \\
\simeq\roim{p_{3\pi}}\circ\opb{^{t}p_{3}'}\circ\roim{p_{134\pi}}\circ
  \opb{^{t}p_{2}'}\circ\roim{^{t}h'}\circ\opb{h_{\pi}}\circ\roim{^{t}k'}\circ\opb{k_{\pi}}
\end{multline}

\end{document}

I'm still quite doubtful about the definition of \ltens.

enter image description here

By the way, \boxtimes is defined as a \mathbin, so you can simply do

\newcommand{\etens}{\boxtimes}

You can also remove \mathbin from the definition of \ltens (and the braces, of course).

1

Well your equation is too long for one line and the numbering. I don't quite understand why you use \begin{array} instead of \begin{equation}. If you don't want the number you could use \begin{equation*}. If you want your eaution split into two lines you can use the \begin{align} and then \begin{split}. But i'm quite new to latex and others probably have better ideas.

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.