chirun-ncl / chirun

A Python package providing the command line interface for building flexible and accessible content with Chirun.
https://chirun.org.uk/
Other
29 stars 4 forks source link

includegraphics in math mode #226

Open wrushworth opened 4 months ago

wrushworth commented 4 months ago

includegraphics does not appear to render if used in math mode. E.g.

For \( g ( x , y ) = x^2+y^2  \) the level sets are circles of varying radius:
\begin{equation*}
    \begin{matrix}
        \includegraphics[scale=0.3]{g2_levels.png} &  \includegraphics[scale=0.4]{contours_1.png}
    \end{matrix}
\end{equation*}

renders as

graphics_math_mode
pkra commented 4 months ago

Just FYI https://github.com/pkra/mathjax-img/ provides an \img macro which might help -- though it won't do scale (I suppose it could but a lot of includegraphic in the wild depends on print dimensions which just won't work).

christianp commented 4 months ago

Fab, thanks @pkra!