You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autodetect whether pgf can use \includegraphics[interpolate].
This is done by reusing the same LatexManager instance as the one used
for measuring text extents.
As an aside, this exposes an awkwardness in the implementation of
LatexManager -- after an error occurs, the instance needs to be
discarded (ideally, the instance would auto-create a new subprocess).
This is why _get_image_inclusion_command manually discards the cached
instance in such a case.
For recent setups where \includegraphics[interpolate=true] is available,
the cost of this PR is essentially just an additional
\usepackage{graphicx} executed once; for older setups, an additional
instantiation of a latex subprocess (only once).
This can't be tested on CI because Travis' version of latex is too old,
but can be manually tested by inspecting a resulting pgf output, and
possibly changing `interpolate=true` by a nonexistent option (e.g.
`foobar` and checking that there's fallback to \pgfimage in that case.
0 commit comments