I would like to have the equation number on odd pages to the right and on even pages to the left. I found this How to put equation numbers on the left or the right, depending on whether the page is odd or even but it does not seem to work with the scrbook class. Any ideas on how to modify this?

Here is a MWE:



  \expandafter\gdef\csname eqn@#1\endcsname{#2}%
\newcommand\@reqnnum{\hb@[email protected]\p@{}%
                        \hskip -\displaywidth(\theequation)}}
     {\expandafter\ifodd\csname eqn@\theequation\endcsname\hbox{\@reqnnum}%
    \ifcase\@eqcnt \def\reserved@a{& & &}\or \def\reserved@a{& &}%
     \or \def\reserved@a{&}\else%
       \@latex@error{Too many columns in eqnarray environment}\@ehc\fi%
     \reserved@a \if@eqnsw\eqnWrite%
     {\expandafter\ifodd\csname eqn@\theequation\endcsname\@reqnnum%


   y = ax + b

   a^n + b^n = c^n


Replacing scrbook with report works fine.

  • 5
    How about helping us with the basics... can you set up a minimal document that starts with \documentclass and ends with \end{document} so we don't have do build everything from scratch? Can you do that? Using a package like blindtext or lipsum to build text around some equations. Also whether one should consider multi-line aligns that may span the page boundary.
    – Werner
    Commented Sep 24, 2019 at 19:18

1 Answer 1


I don't know about the scrbook class but perhaps the following will help, based on the changepage package provision of odd/even page checking.

\usepackage{changepage} \strictpagecheck
  % code for right eqno (which depends on your class and packages)
  % code for left eqno (which depends on your class and packages)
% ...
\begin{equation} \leftright
% ...
% ...

If you don't want to keep adding \leftright after each \begin{equation} you can add it to the equation definition like:

\renewcommand*{\equation}{\oldequation \leftright}

and then just use \begin{equation} instead of \begin{equation} \leftright.

  • What code would you use for the if part? Not sure if I like the solution because it requires to change the whole (very large) document. Commented Sep 26, 2019 at 11:54
  • @diophantus7 I have extended my answer. It is up to you to decide on the code for the \if... as it will depend on the class you are using and also any maths-related packages you might be using. Perhaps you need to ask a separate question about that. Commented Sep 27, 2019 at 17:33
  • Thanks! While it looks promising and works most times, it does not work with a split environment inside a equation environment and also not with an align environment. Ideas on why this might not work? Commented Oct 1, 2019 at 11:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .