# How to representation math text using latex or overleaf code?

I have written math-text with following latex code:

    \begin{align}
\emph{HPEI} = \{ \mathcal{H}_{1},\mathcal{H}_{2}, ...\mathcal{H}_{i},...  \mathcal{H}_{m}\}.
\end{align}


but the first element of the set looks different as:

How may I represent it as other elements?

You get a good deal of errors with the code. The problem is that \emph is a text command and cannot be used in math. Besides it is not for typesetting text in italics: its meaning is emphasis.

Use \mathit instead. Besides, don't use align for single equations. A couple of commas were missing and \dots is better than ....

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$$\mathit{HPEI} = \{ \mathcal{H}_{1},\mathcal{H}_{2},\dots,\mathcal{H}_{i},\dots,\mathcal{H}_{m} \}.$$

\end{document}


• I agree with everything you say, but I find myself wondering why we shouldn’t use align for single equations. If I replace equation with align do I not get the same output? There’s even a case for using align and &= for a single equation, so that you can cut/paste equations and things keep working. – Adam Chalcraft Aug 23 at 19:59