maxonthegit / PPspliT

A PowerPoint add-in that splits slides according to slideshow-time animation effects
https://www.maxonthenet.altervista.org
292 stars 6 forks source link

Slide numbers fail to be preserved #22

Closed ozsu closed 5 months ago

ozsu commented 6 months ago

I am having a problem with PPspliT (currently running 2.6). It does split the animated sides correctly, but assigns consecutive page numbers to each animation slide rather than maintaining the same slide number. I have been using PPslIT for some time and it worked properly. This problem exists in the older version 1.24, and after I upgraded to 2.6 and happens on both MacOS (Ventura) and on Windows versions of Powerpoint. I am not sure if a recent update of Powerpoint broke things or whatever, but it is an issue.

By the way, I have tried both Preserve slide numbers and Preserve slide numbers and add a subindex and it is the same problem.

==Tamer

maxonthegit commented 6 months ago

Thank you very much @ozsu for reporting this issue. I have made a few tests with the regression test suite as well as with other complex presentations from former academic contributions, both in Windows and in macOS. Oddly enough, despite the presence of many elaborate animations, slide numbering has always been preserved as expected. My PowerPoint release is the latest available in the Microsoft 365 subscription as of today.

Could you please submit a minimal sample of slide deck where you have observed preservation of slide numbers to predictably fail?

As a side note consider that, in the (unlikely) case in which PPspliT raises an error while splitting, all its settings in the ribbon are lost (i.e., Split on click-triggered animations and Preserve slide numbers) and need to be reset before attempting to split again (i.e., by disabling and re-enabling Split on click-triggered animations or by turning Preserve slide numbers to a different setting and then switching it back to the desired one). I am not sure this is your case anyway.

ozsu commented 6 months ago

Thank you Massimo. I have done the resetting -- changed the setting to something else and then changing it back -- but that did not fix things for me.

Perhaps the size of the presentation makes a difference? This one has 120+ slides. My earlier ones where everything worked were smaller. I'll try a smaller one to see. I will also send you my slide deck backchannel. Perhaps there is something in my system setup that got screwed.

maxonthegit commented 6 months ago

Thank you @ozsu. I have received your sample slide deck. Despite being impressive, its size should not be an issue for PPspliT, and this is confirmed by the fact that the add-in fulfils its task without fatal errors. In your specific case, failure to preserve slide numbers is due to a slide master structure that impacts known limitation 13. Further details, as well as a workaround, follow.

Issue breakdown

Background

Slide numbers appearing in slide footers are actually text boxes containing a special dynamically updated field that can be inserted in any text paragraph using a specific button: image Adjusting slide numbers so that each slide resulting from splitting has the same number of the original slide it derives from requires replacing every occurrence of this special field with a statically assigned value. Due to the lack of PowerPoint VBA primitives to detect the presence of this field in a generic text paragraph, at its best PPspliT can only "bake" the contents of text boxes that are most likely to contain this field, namely all the 3 footer placeholders found in the slide master: image In other words, PPspliT can only adjust slide numbers that appear in such special text boxes in the slide master (also see this code fragment).

Evidence of the issue

Your slide deck breaks the above assumption because slide numbers are not framed in any of the aforementioned special text boxes. As further evidences and consequences:

Workaround

While the purpose of displaying slide numbers is still accomplished in your deck, working around this issue requires a slight adjustment to your slide master to make it more compliant with the standard expected structure. Here are the required steps:

  1. Switch to the slide master view.

  2. Select the first template in the left-side list (i.e., the slide master).

  3. Select the text box containing the slide number in the lower right and delete it. image

  4. Click on the Master Layout button and enable Slide number. A new text box will be created in the lower right, and this time it will be recognized as a standard slide number placeholder.

  5. For each slide layout in the left-side list:

    • select the layout
    • if the current layout does not contain a slide number, then just skip to the next slide layout
    • otherwise, select the text box containing the slide number in the lower right and delete it
    • click on the Footer checkbox (it should be already checked and will remain checked): this will create a new text box containing the slide number which, being inherited from the slide master, will be treated as a standard slide number placeholder
  6. Close the slide master view and switch back to the normal view.

  7. Click on Insert/Header and Footer and enable numbers for all slides.

Despite the above screenshots being from PowerPoint for macOS, the same procedure applies to PowerPoint for Windows as well.


Your slide deck should now split successfully with slide numbers preserved as expected.

maxonthegit commented 5 months ago

As mentioned in the previous comment and documented in known limitation 13, adjustment of slide numbers can only be carried out when these are put in standard slide number footers. Since the slide master of presentations that break this assumption can be edited to comply with it, I am closing the issue.