[Tex/LaTex] Custom alignment of text in itemized environment

horizontal alignmentitemize

I want to describe the variables involved in an equation in an itemized environment such that every item begins with the variable name and subsequently comes the description for it. I'd like to have all the descriptions left aligned.

Here is a MWE that of course does not produce what I am looking for.

\documentclass{standalone}
\begin{document}
$E[g(x)] = \int_{-\infty}^{+\infty} f_X(x) \, g(x) \, \mathrm{d}x$.
%
where,
%
\begin{itemize}
    \item $x$      \quad is a continuous random variable.
    \item $f_X(x)$ \quad is the PDF of $x$.
    \item $g(x)$   \quad is a function of $x$.
\end{itemize}
\end{document}

Best Answer

What about this

\documentclass{article}
\begin{document}
$E[g(x)] = \int_{-\infty}^{+\infty} f_X(x) \, g(x) \, \mathrm{d}x$.
%
where,
%
\begin{itemize}
    \item{\makebox[2cm]{$x$\hfill} is a continuous random variable.}
    \item{\makebox[2cm]{$f_X(x)$\hfill} is the PDF of $x$.}
    \item{\makebox[2cm]{$g(x)$\hfill} is a function of $x$.}
\end{itemize}
\end{document} 

Output

enter image description here

You can avoid using \hfill for each item if you specify the second optional argument of \makebox to be the letter l (for left):

\documentclass{article}
\begin{document}
$E[g(x)] = \int_{-\infty}^{+\infty} f_X(x) \, g(x) \, \mathrm{d}x$.
%
where,
%
\begin{itemize}
    \item{\makebox[2cm][l]{$x$} is a continuous random variable.}
    \item{\makebox[2cm][l]{$f_X(x)$} is the PDF of $x$.}
    \item{\makebox[2cm][l]{$g(x)$} is a function of $x$.}
\end{itemize}
\end{document} 
Related Question