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

feature request: extensions recognized by tikzscale #23

Closed
tpapp opened this issue Jan 11, 2018 · 4 comments
Closed

feature request: extensions recognized by tikzscale #23

tpapp opened this issue Jan 11, 2018 · 4 comments

Comments

@tpapp
Copy link
Collaborator

tpapp commented Jan 11, 2018

tikzscale allows LaTeX to load Tikz/PGF graphics with

\includegraphics[width=0.5\linewidth]{some_path.tikz}

This is handy for scaling, also for using the same mechanism for including all graphics.

It recognizes extensions .tikz, .TIKZ, .TikZ, .pgf, .PGF. It would be nice to have PGFPlotX.save pick the tex backend for these extensions (without the preamble by default).

@KristofferC
Copy link
Owner

I've never used tikzscale but what you want to do is to be able to save to e.g. .tikz and then only the latex for the \begin{tikzpicture} ... \end{tikzpicture} is exported to the file? That way you can just include the .tikz file?

@tpapp
Copy link
Collaborator Author

tpapp commented Jan 11, 2018

Exactly. Currently I am using the workaround

function save_tikz(basename, plot)
    texname = basename * ".tex"
    save(texname, plot; include_preamble = false)
    mv(texname, basename * ".tikz", remove_destination = true)
end

Consider giving tikzscale a try, it simplifies my plots workflow considerably and it is included in TeX Live out of the box.

@tpapp
Copy link
Collaborator Author

tpapp commented Jan 11, 2018

Forgot to mention: happy to do a PR for this.

@tpapp
Copy link
Collaborator Author

tpapp commented Jan 18, 2018

Closed by #25.

@tpapp tpapp closed this as completed Jan 18, 2018
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

2 participants