Reputation: 181
I am trying to use mathjax in Jupyter Notebook, and trying to render the following
in Latex typesettings I can render only the followin:
\varepsilon-\text{greedy}(Q)$\
As you can see the dash
is very long and adds extra space around dash.
If i move the epsolon within the \text
expression the result will be:
\text{\varepsilon-greedy}(Q)$\
\
The dash
has no problem bu the epsilon is not rendered.
How can I render the epsilon as intend.
Resolved: UPDATE Resolved: UPDATE2
That is not the answer for rendering the same outout is just move the dash
into the \text
\varepsilon\text{-greedy}(Q)$\
Upvotes: 0
Views: 421
Reputation: 12260
Note that \text{\varepsilon-greedy}(Q)
is not valid LaTeX. The \varepsilon
macro is a math-mode macro, and is not allowed in text mode, as it appears here, so it would cause an error message in actual LaTeX.
MathJax is designed to process primarily math-mode material, so it does not process macros in text mode, so \varepsilon
will be displayed verbatim. If you want to use it in text mode, you could use \text{$\varepsilon$-greedy}(Q)
to temporarily enter math mode within text mode.
MathJax version 3 has a textmacros
extension that allows processing of some macros in text mode, but that is not available in version 2, which is what is used on StackExchange. (They are using a four-year-old version of MathJax here.)
Upvotes: 1