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

copy does not work with type TikzDocument #320

Open
rs7q5 opened this issue Jun 27, 2023 · 2 comments
Open

copy does not work with type TikzDocument #320

rs7q5 opened this issue Jun 27, 2023 · 2 comments

Comments

@rs7q5
Copy link

rs7q5 commented Jun 27, 2023

For some reason copy does not work with type TikzDocument, but does for something like TikzPicture and AxisLike objects. I think it is because the other axis elements are of OptionType. But was wondering if we could add a method so TikzDocument could be copied.

Edit: doing Base(td::TikzDocument) = deepcopy(td) seems to work. Let me know if this would be acceptable and I can cut a PR.

@tpapp
Copy link
Collaborator

tpapp commented Jun 27, 2023

yes, I think a PR with dispatching to deepcopy would be fine.

I am curious, what's the use case?

@rs7q5
Copy link
Author

rs7q5 commented Jun 28, 2023

Awesome thanks! I'll put one in.

I was using produce_or_load from DrWatson to save multiple figures in one pdf, hence the use of tikzDocument.

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