1

I would like to write the definition for P below in my document (centered, actually like in an equation). Unfortunately, I do not know yet how to do that. I tried it in the equation and in the align environment like so:

\begin{document}
    $$\P \coloneqq \textup{Klasse aller Entscheidungsprobleme, die durch deterministische Algorithmen in poly-}$$ nomialer Zeit lösbar sind.

    \begin{align*}
        \P \coloneqq \textup{Klasse aller Entscheidungsprobleme, die durch deterministische Algorithmen in polynomialer Zeit lösbar sind.}
    \end{align*}
    
    \begin{equation*}
        \P \coloneqq \textup{Klasse aller Entscheidungsprobleme, die durch deterministische Algorithmen in polynomialer Zeit lösbar sind.}
    \end{equation*}
\end{document}

... unfortunately that didn't work. Either the text goes beyond the page margin or when I manually insert a line break, the lines are too far apart and are no longer centered.

Can someone help me?

Greetings sp8cky

1 Answer 1

0

A simple solution would be to use a \parbox, of which you can manually set the width.

\documentclass{article}
\usepackage{mathtools}
\usepackage{lipsum}
\begin{document}
\lipsum[1][1-4]
    \[
        P \coloneqq \parbox[t]{88mm}{Klasse aller Entscheidungsprobleme, die durch deterministische Algorithmen in polynomialer Zeit lösbar sind.}
    \]
\lipsum[1][5-7]
\end{document}
1
  • Thank you very much, this works perfect!
    – sp8cky
    May 28, 2023 at 15:30

You must log in to answer this question.

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