1

Is there a way to coordinate the space here?

\documentclass[a4paper, 12pt, oneside, titlepage]{scrbook}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{colortbl}

\begin{document}

\begin{align*}
P\textcolor{red}{_n} &= 1000 - {q_S} - q_{M\textcolor{red}{_n}} \\
\intertext{\center{bzw.}} \
P\textcolor{blue}{_h} &= 1000 - {q_S} - q_{M\textcolor{blue}{_h}}
\end{align*}

\end{document}

enter image description here

  • 2
    What should \center do? The \center command should never be used in the body of the document, but, if ever, only for defining new environments. – egreg Mar 7 '16 at 18:23
  • rather than \intertext (which is intended to start the text at the left margin), why not just make this another line in the aligned display, coded as &\qquad\text{bzw.}\\ ? – barbara beeton Mar 7 '16 at 18:28
4

You have discovered that \center is a very dangerous command that can be only used, if ever, in definitions of other environments.

What you need is \centering (or a different method altogether). With \shortintertext (requires mathtools) you get less space.

\documentclass[a4paper, 12pt, oneside, titlepage]{scrbook}

\usepackage{amsmath,mathtools}
\usepackage{xcolor}

\begin{document}

\begin{align*}
P_{\textcolor{red}{n}} &= 1000 - {q_S} - q_{M_{\textcolor{red}{n}}} \\
\intertext{bzw.}
P_{\textcolor{blue}{h}} &= 1000 - {q_S} - q_{M_{\textcolor{blue}{h}}}
\end{align*}

\begin{align*}
P_{\textcolor{red}{n}} &= 1000 - {q_S} - q_{M_{\textcolor{red}{n}}} \\
\intertext{\centering bzw.}
P_{\textcolor{blue}{h}} &= 1000 - {q_S} - q_{M_{\textcolor{blue}{h}}}
\end{align*}

\begin{align*}
P_{\textcolor{red}{n}} &= 1000 - {q_S} - q_{M_{\textcolor{red}{n}}} \\
\shortintertext{\centering bzw.}
P_{\textcolor{blue}{h}} &= 1000 - {q_S} - q_{M_{\textcolor{blue}{h}}}
\end{align*}

\end{document}

enter image description here

Note that with _{\textcolor{red}{n}} instead of \textcolor{red}{_n} the subscript is properly kerned.

The different method altogether uses array:

\documentclass[a4paper, 12pt, oneside, titlepage]{scrbook}

\usepackage{amsmath,array}
\usepackage{xcolor}

\begin{document}

\begin{equation*}
\renewcommand{\arraystretch}{1.2}
\begin{array}{r@{}>{{}}l}
P_{\textcolor{red}{n}} &= 1000 - {q_S} - q_{M_{\textcolor{red}{n}}} \\
\multicolumn{2}{c}{\text{bzw.}}\\
P_{\textcolor{blue}{h}} &= 1000 - {q_S} - q_{M_{\textcolor{blue}{h}}}
\end{array}
\end{equation*}

\end{document}

enter image description here

| improve this answer | |
1

Here you are:

\documentclass[a4paper, 12pt, oneside, titlepage]{scrbook}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{colortbl}

\begin{document}

\begin{align*}
\P\textcolor{red}{_n} &= 1000 - {q_S} - q_{M\textcolor{red}{_n}} \\
\intertext{\hfill{bzw.}\hfill\mbox{}}
P\textcolor{blue}{_h} &= 1000 - {q_S} - q_{M\textcolor{blue}{_h}}
\end{align*}

\end{document} 

enter image description here

| improve this answer | |

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.