Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when both width and height are specified without pgfplots package loaded #7

Open
user202729 opened this issue Feb 24, 2024 · 0 comments

Comments

@user202729
Copy link

if tikz package is loaded without pgfplots package, and both width and height are specified in \includegraphics command, an error happens:

./a.tex:6: Undefined control sequence.
\tikzscale@preparePlot code ->\pgfplotsset
                                           {every axis/.append style={width=...

An example document:

\documentclass{article}
\usepackage{tikz}
\usepackage{tikzscale}
\begin{document}
\includegraphics[width=3cm, height=3cm]{image.tikz}
\end{document}

Where image.tikz contains:

\begin{tikzpicture}
\draw (0, 0) -- (1, 2);
\end{tikzpicture}

I think the desirable behavior here would be that the image is resized so that the width is at most 3cm and the height is at most 3cm, whichever is smaller.


Apart from that, do you have any plan to support inline tikzpicture environments?


Also, I think it's undesirable for the package to implicitly handle in addition relative import, that feels like the job of a separate package to me. The import package already handles that.STPH-FP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant