Possibility of hiding / showing content within a chapter


#1

Hi There,

I’m trying to come up with a user-friendly way of showing the reader the structure of a chapter (i.e. the title of its various sections).

So far, my favourite implementation is the one done here:
http://www.core-econ.org/the-economy/book/text/04.html#42-equilibrium-in-the-invisible-hand-game
where section titles have a “plus sign” + on the right, which makes the content appear if it’s not showing, or a “minus sign”, which hides the content if it’s showing. Only one section is expanded at any time, so when you finish reading one section, and click on the title of the next, you can easily see where you are. (Also, the font size is changed to make all this even more user-friendly).

I think this would be a nice enhancement for Pressbooks. I also wonder how other writers solve this issue.

Thank you very much in advance,
Luis


#2

maybe is better if you wait a litle about that as a new theme is comming soon.


#3

Awesome, thank you so much for your reply and suggestion. Any further information you can disclose at the moment? (i.e. how soon is soon?)
Thank you so much!
Luis


#4

in the last call (each first monday of the month at 20:00 spanish time they speak about news) they spoke about the short time roadmap. In a few weeks, PB 5.0 would be out and the theme should be not so far of that release. I´m waiting also.


#5

Muchas gracias Antonio! :wink:


#6

Hi Luis,

This looks like an interesting feature and one that we could look into after Pressbooks 5.0 is out. A key consideration for us when adding new functionality to Pressbooks is how it will behave across different formats—web, EPUB, and PDF. My expectation would be that all blocks would be expanded on formats that don’t support this kind of interactivity—is that what you’d envision as well?


#7

Hi Ned,

Thanks a lot for your reply and for asking. Yes, like you, my expectation would be that all blocks would be expanded on formats that do not support this feature.

Thanks a lot for all your awesome work, Guys,
Luis


#8

Hi all–for web books only, there’s a hacky solution possible with this plugin: https://wordpress.org/plugins/wp-showhide/. It’s an admittedly imperfect solution, especially since I’m unsure how it behaves in various export formats, but it’s one example of a shortcode-based show/hide capability using javascript.


#10

oops ignore my (deleted) answer to this post. i didn;t read the original post correctly.


#11

Hi @lrizquierdo, pleased to announce that this will be shipping in Pressbooks 5.3/McLuhan 5.3 later this month:


#12

Absolutely fantastic!!! Thank you so much @ned,
You Guys are great!! :clap::clap::clap::clap::clap::clap:


#13

Ned–we love the new collapsible section feature and have authors who are happily beginning to use it. We were also imagining something more granular and less all-or-nothing; i.e. setting a block that might not begin with a H1 element and allowing a user to let it be collapsed or expanded. Is that still planned for development or on the roadmap for a future core release?


Formatting of titles of collapsed sections