When hovering the cursor over the starting symbol of inline math mode, $
, or over \begin{equation}
, Texstudio gives a preview of the typeset math. I love this feature, but it only works in these two cases. Mostly I use \[
for math, or the align
environment, so I would like to add my own environments to trigger this preview.
Someone else felt the same way and opened this ticket on Sourceforge, and it was closed as "implemented". But then how does one do it?
Best Answer
TeXstudio provides preview images for math content inside of
$ … $
(while hovering over the first$
) andamsmath
environments while hovering over the\begin
or the\end
part. It won’t work when the mouse only hovers over the name of the environment or the formula itself.It won’t work with the display-math
\[ … \]
syntax, but as this is only a short cut to theequation*
environment whenamsmath
is loaded, you could replace the syntax\[ … \]
with\begin{equation*} … \end{equation*}
if you need the preview here as well.† The
alignat
environment produces a preview with misplaced sub-formula parts and (if activated) equation numbers.