I have an equation to be written in latex with fraction and hat variable as follows

enter image description here

For this, I have used the following code with package \usepackage{mathtools}.

\begin{equation} \label{eq2}
\mathbb{E}\textsubscript{t} \bigg[\frac{$\pi${\textsubscript{\theta}}

Even though I have used \frac{}{} and \^{} in latex, I am still unable to get the output as stated in the equation. The output which I have got using this code is

enter image description here

Strangely I cannot even see the denominator part and also the hat variable. Could someone please help me if I have done some mistake or any suggestion is appreciated.

  • 4
    That is because it is compiling with errors. Sep 9, 2019 at 14:18

1 Answer 1


Don't use \textsubscript in math mode.

\begin{equation} \label{eq2}
\hat{\mathbb{E}}_t \biggl[\frac{\pi_{\theta}
(a_t\,|\,s_t)} \hat A_t\biggr]

enter image description here

You might also consider using \mid in lieu of \,|\,, depending on your spacing preference.

  • Thanks a million ton.. This helps me a lot :)
    – Priya
    Sep 9, 2019 at 14:55

You must log in to answer this question.

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