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

Per-page commands #188

Closed
mrzv opened this issue Jun 7, 2018 · 7 comments
Closed

Per-page commands #188

mrzv opened this issue Jun 7, 2018 · 7 comments
Assignees

Comments

@mrzv
Copy link

mrzv commented Jun 7, 2018

It would be nice if it was possible to record Latex preamble commands for each page separately. It would make it much easier to copy-paste pages between presentations.

@otfried otfried self-assigned this Sep 16, 2018
@otfried
Copy link
Owner

otfried commented Sep 17, 2018

This looks very tricky. I would need separate Latex runs for each page.

@mrzv
Copy link
Author

mrzv commented Sep 17, 2018

I'm not sure I'm following. Why is that a bad/tricky thing?

@otfried
Copy link
Owner

otfried commented Mar 10, 2019

I think I misunderstood this ticket. You simply want each page to possibly carry preamble commands, and when Latex is run, Ipe would simply concatenate the commands from all pages to form the actual preamble?

@mrzv
Copy link
Author

mrzv commented Mar 10, 2019

No, I think I want it the other way around. I want pages compiled individually, where the commands they have are the global preamble commands, plus their local commands. I imagine having the same command repeated on many pages.

The point is that I want to make it easy to copy pages between presentations, something that's quite painful right now. This would be a step towards that.

@otfried
Copy link
Owner

otfried commented Mar 10, 2019

Compiling pages separately is not an option. One issue is that it would be super-slow - so I would have to add logic to only recompile the pages that could possibly have changed after some action, and most likely compiling in the background so the first page of a document would appear fast, but the main issue is that combining PDF resources from different PDF files would be much harder than taking them from a single file. (For instance, you would have multiple copies of the same font but with different character subsets - how do you merge these?)

@mrzv
Copy link
Author

mrzv commented Mar 10, 2019

I see. Then I suppose it's possible to make it work the way you suggest: concatenating all the commands. Actually, is it possible, instead of concatenated in the beginning, to paste commands before the page content? Then I'd use something like \providecommand to define the commands I care about locally. If there was something I could provide post-page, I could also undefine the commands, although it's probably more work than necessary. This would work well with sequences of slides. I'd \providecommands on the first slide for the entire sequence, and I wouldn't have to worry about the preamble.

It would require the user to be more careful than what I had in mind, but I suppose that's the general spirit of Ipe.

@otfried
Copy link
Owner

otfried commented Apr 30, 2020

Merged with #258

@otfried otfried closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants