{{ message }}

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

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

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

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

### lorenzhs commented Aug 27, 2019

 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. The text was updated successfully, but these errors were encountered:

### 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.

self-assigned this Sep 13, 2019

### 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<+>

mentioned this issue Apr 30, 2020

### 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.

 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 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.