2

How to write the line:

(P) \sqrt{2} is irrational

In math mode, if the (P) is to be at the beginning of the line and \sqrt{2} is irrational is to be in the middle of the line (centered).

AndréC
  • 24,137

1 Answers1

4

You can use an equation environment and tag it with "P". To place the tag on the left, you can use amsmath's leqno option, as in the following example.

\documentclass{article}
\usepackage[leqno]{amsmath}
\begin{document}
\[
\tag{P}
\sqrt{2} \text{ is irrational}.
\]
\end{document}

If you want to use other equation environments in the same document and you want the tags placed on the right, you can use the method described in David Carlisle's answer here, as in the following example.

\documentclass{article}
\usepackage[leqno]{amsmath}
\makeatletter
\newcommand{\leqnomode}{\tagsleft@true\let\veqno\@@leqno}
\newcommand{\reqnomode}{\tagsleft@false\let\veqno\@@eqno}
\makeatother
\begin{document}
\reqnomode
\begin{equation}
E = mc^2. 
\end{equation}
\leqnomode
\[
\tag{P}
\sqrt{2} \text{ is irrational}.
\]
\reqnomode
\begin{equation}
E = mc^2.
\end{equation}
\end{document}

Vincent
  • 20,157