2

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}
\begin{split}
\mathbb{E}\textsubscript{t} \bigg[\frac{$\pi${\textsubscript{\theta}}
(a\textsubscript{t}\,|\,s\textsubscript{t})}
{$\pi${\textsubscript{\theta}\textsubscript{old}}
(a\textsubscript{t}\,|\,s\textsubscript{t})}\bigg]\^{A}
\end{split}
\end{equation}

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.

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

1 Answer 1

4

Don't use \textsubscript in math mode.

\documentclass{scrreprt}
\usepackage{amsmath,amsfonts}
\begin{document}
\begin{equation} \label{eq2}
\hat{\mathbb{E}}_t \biggl[\frac{\pi_{\theta}
(a_t\,|\,s_t)}
{\pi_{\theta_{\mathrm{old}}}
(a_t\,|\,s_t)} \hat A_t\biggr]
\end{equation}
\end{document}

enter image description here

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

1
  • 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 .