Closed quantumgolem closed 4 years ago
So to generate image previews, we rely on the LaTeX syntax file for ST, in particular, on the scopes you can see here. While it not impossible to support a custom syntax, you'd have to create your own copy of the LaTeX syntax that sets the appropriate scopes correctly.
The other possibility would be to define a LaTeX noop command and then include the corresponding \includegraphics
command, e.g.,
\newcommand{\nop}[1]{}
...
\img{width=5cm}{my_image}{My image}{fig:my_imae}
\nop{\includegraphics{my_image}}
Thanks for the reply! That no operation command seems to be the easiest way to get this done.
I usually wrap the
\includegraphics
command inside a different command, such as\img
, so that I can do things like centering them easily. Would it in any way be possible to show images when hovering over these custom commands that include the\includegraphics
command? Here is an example of how I define the\img
command:...