Skip to content

Add new tag to have a collapsed code-block with ability to expand #272

Open
@mmcky

Description

@mmcky

Is your feature request related to a problem? Please describe.

For long code-block and code-cell it would be nice to have a collapsed feature with a line specification. So for example it would load with only 20 lines showing and an ability to expand the block.

https://myst-nb.readthedocs.io/en/latest/use/hiding.html#hiding-cell-contents

Describe the solution you'd like

Perhaps the tag could be collapse-n where n is the number of lines? (i.e. collapse-20 would have a cell with 20 lines (or less if content is less) showing.

Describe alternatives you've considered

Not really any

Additional context

Would support displaying code cells like the one in this section:

https://python.quantecon.org/linear_algebra.html#Vector-Operations
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions