I am writing an article and I need to write the fundamental group. For that we use $\pi_1\left(X,x_0\right)$. However I am arriving at the following error:

Use of \pi doesn't match its definition.
l.113 This shall be denoted by $ \pi_
                                     {1}(X,x_0)$ or simply $ \pi_1\left(X\right)$.

My Code is given below.




\newcommand {\sub}{\mbox{SB}}


Given a "nice" topological space $\left(X, x_0\right)$, we define the fundamental group to be $\left[S^1, (X, x_0)\right]_{\star}$. 
This shall be denoted by $ \pi_{1}(X,x_0)$ or simply $ \left(X\right)$.  

  • 3
    welcome to tex.sx. unfortunately, the brief snippet of code that you provide isn't enough to diagnose the problem. (other than the fact that \left and \right aren't needed, the math expression looks to be input correctly. all i can think of is that somehow, \pi has been redefined from its basic meaning. please provide a small compilable example (beginning with \documentclass and ending with \end{document}) that results in the error you have quoted. then people here will have the information they need to experiment. Commented Jul 28, 2017 at 20:07
  • Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). Commented Jul 28, 2017 at 20:27

2 Answers 2


Numbers are not allowed in macro names in LaTeX:


This defines macro \pi that expects the parameter text 1et. Use a name like \pioneet to follow the naming scheme of the previous operator:


BTW, \' is a text mode command that is invalid in math mode. Either use text if ét is used as word:


or math, if the accent has mathematical meaning:


Is it possible that you are looking for something like:



For that we use $\pi _1(X,x_0)$.

For that we use ${\pi}_1(X,x_0)$.

For that we use $\pi{}_1(X,x_0)$.

  • The error message shows that TeX has successfully parsed \pi as command name. The problem is the definition \DeclareMathOperator{\pi1et}{...}. 1et is now a mandatory parameter text and TeX expects 1 as next token after \pi. Commented Jul 28, 2017 at 20:36
  • Now, with the added example of the problem, your solution is obvious.
    – Typo
    Commented Jul 28, 2017 at 22:07

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