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: something like \onslide and \only in text objects #258

Open
lorenzhs opened this issue Aug 27, 2019 · 5 comments
Open

Feature request: something like \onslide and \only in text objects #258

lorenzhs opened this issue Aug 27, 2019 · 5 comments
Assignees

Comments

@lorenzhs
Copy link

Let me begin with saying that this might have some overlap with #135.

When working on presentations, I sometimes want to modify a text object between views. Currently, the way to do this is to duplicate the object onto a second layer, which is only shown in the second view (or to cover the bits that should only appear later with an opaque box). But this quickly gets cumbersome when revealing the contents over multiple views.

Beamer solves this by providing the \only and \onslide commands along with a syntax for specifying the desired views, supporting both manual ranges like <2-> or <3-5> and automatic ones like \item<+>.

The expedience of such reveals in general notwithstanding, I'd love to be able to have something like it in Ipe. Would you say that this is something that Ipe could support (cf #135) or that should be solved in a LaTeX package? In the latter case, does Ipe evaluate the text element for each view that it is visible on, or once and then place it on each page of the resulting pdf? For the former behaviour would be needed to make this work, requiring at least the option to have an object rendered separately for each view it appears on.

I hope I didn't miss an answer to why this is complicated / not supported when searching for existing issues and mailing list discussions.

@otfried
Copy link
Owner

otfried commented Aug 28, 2019

Yes, I wanted to have something like this for a long time.

As you noticed, it's not so easy, because Ipe reuses the same PDF for the text object on each view where it is present. To make this possible, a somewhat more complicated mechanism is needed that runs latex for each view in which the text object appears (so this is somewhat more complicated than #135, which I plan to implement soon).

By the way, the \item<+> of beamer is rather easy to simulate by simply making separate text boxes (using F10) with style item. So my use case for this is rather where you have a text that will be modified on the next slide, or perhaps highlighted in a different color.

@otfried otfried self-assigned this Sep 13, 2019
@otfried
Copy link
Owner

otfried commented Apr 30, 2020

This will require Ipe translating text objects once for each occurrence, and keeping track on which page and view it appears.

That will also make possible implementing #188:

We write out text objects page by page, and insert preamble commands for each page before the text objects are processed.

Inside each text object, the current view number and name would be known, so we can make some macros to imitate beamer.

I guess one should have:

  • the current view number and view name
  • the number of the first view and the index number in the subsequence of those views, where the text object is indeed visible (this would make it possible to make something like \item<+>

@otfried
Copy link
Owner

otfried commented May 3, 2020

A bit tricky: How do you avoid that every operation that changes the view or page sequence of the document invalidates the last Latex run?

If pdf resources are indexed by page number and view number, then at least adding views and pages at the end should not invalidate Latex.

@lorenzhs
Copy link
Author

lorenzhs commented May 4, 2020

One option would be to give each view a persistent randomly generated (UU)ID that doesn't change upon reordering, and indexing based on that. But that wouldn't fit into the design of ipe very well as far as I understand it, and wouldn't be very elegant.

@otfried
Copy link
Owner

otfried commented May 4, 2020

It wouldn't work: if you want to write macros that work like \item<+>, Latex needs to be run whenever the order of views changes.

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