Collapsible Headers In Word

Creating an Expanding/Collapsing Section

In online Help Targets, you can create sections that are expanded or collapsed by default. This is an ideal way to subdivide a long topic in online Help. The sections can be displayed as expanded or collapsed by default, and include “+” and “-” controls for end users next to each section and at the top of the topic.

Collapsible Headers In Word

Where to find the Collapsible Section button

Create a collapsible list in Microsoft Word. Use the program's Outline view to show and hide hierarchical lists of information, such as the names on a family tree entered as levels of headings. Collapsible headings Word 2013 is another tool for better navigation similar to the blog last month showing how to make Internal Links in a Word document as a means to simplifying navigation through longer documents. Collapsible headings Word 2013 is an excellent tool for shortening the overall length of an especially long document.

Doc-To-Help’s Content Editor: the Insert tab

Microsoft® Word: the Doc-To-Help toolbar or ribbon

Microsoft® FrontPage®, and Adobe® Dreamweaver®: the Doc-To-Help D2HML Styles toolbar or ribbon.

To create expanding/collapsing sections

1. Select the header and the text that you would like to make into a section. (An example header: 'Penn State' and then the text could be a description of the university.)

2. Click the Collapsible Section button. The Collapsible Section dialog box will open. The selected text will display in the Header and Text areas.

3. If you would like the section to be collapsed by default, select the Collapsed radio button in the Options area.

For text expanded by default, select the Expanded radio button.

4. Click OK.

5. Continue creating sections. Note that the Heading for each section now has the C1H Section Collapsed or C1H Section Expanded style applied to it.

Please Note: The Generate XHTML check box in the Help Targets dialog box must be selected to enable expanding/collapsing sections.

Collapsible Headers In WordCollapsible

The header will be displayed in the Target with a “+” and “-” control next to it. When the user clicks on the control, the text will be displayed or hidden. The 'Expand All' or 'Collapse All' control at the top of the topic will allow the user to expand/collapse all of the text at once.

This is an example of a topic with sections collapsed by default; Doc-To-Help automatically added the “Expand All” control at the top of the topic.

Please note: In EPUB Targets, all content in Collapsible Sections will be displayed (just as it would in Manual Targets).

How To Make A Collapsible Header In Word

Related Topics:

Allows notebook to have collapsible sections, separated by headings.

Any markdown heading cell (that is, one which begins with 1-6 # characters),becomes collapsible once rendered.

The collapsed/expanded status of the headings is stored in the cell metadata,and reloaded on notebook load.

Options¶

The extension offers a few options for how to display and toggle the collapsedstatus of headings, each of which can be enabled, disabled or configured fromthe nbextensions config page:

  • Command-mode keyboard shortcuts, (enabled by default, and set to left andright arrow keys to collapse/expand sections, or go to the previous/nextheading, plus shift-right to select a heading cell’s section, shift-a/b toinsert a heading above/below the current cell, ctrl-shift-left andctrl-shift-right to collapse/uncollapse all headings).Bindings are also configurable from the config page
  • A toggle control in the input prompt area of each heading cell (as seen inthe screenshot below, enabled by default)
    • Configurable icons and icon color for the toggle control (by default, greyright/down carets are used)
    • The option to make the toggle control into a button (by default it’s just aclickable icon)
  • Mathematica-style grouping brackets around each collapsible section on theright of the notebook. Single-clicking a bracket will select all cells in thesection (hold shift to extend existing selection), while double-clicking thebracket toggles the section’s collpased/expanded status (disabled by default)
    • Bracket width is configurable, defaults to 10 (px)
  • A gray bracketed ellipsis added to the end of each collapsed heading,indicating hidden content (disabled by default)
  • A toolbar button to collapse the nearest heading to the curently selectedcell (disabled by default)
  • Collapse/uncollapse sections when ToC2 sections are collapsed/uncollapsed
  • A toolbar button to collapse/uncollapse all headings (disabled by default)
  • Shift more-significant headings’ collapse controls further to the left

css¶

The extension add the css class collapsible_headings_collapsed to eachcollapsed heading cell, which you could use for custom css rules, such asadding a bottom border to collapsed headings, to visually distinguish them abit more.

The toggle controls’ icons currently spin by 360 degrees when the heading getscollapsed or uncollapsed, via a css transition property (not in IE).If this annoys you,you could turn it off using the following rule in your custom.css:

Collapsible Heading In Word

Internals¶

Heading cells which are collapsed have a value set in the cell metadata, sothat

The extension patches some Jupyter methods:

  • TextCell.prototype.execute is patched to add/remove the toggle buttons,as well as update the visibility of any cells below the new one.
  • Notebook.prototype.select is patched to make sure any collapsed headingswhich would be hiding the new selection get uncollapsed (expanded).
  • Notebook.prototype.undelete and Notebook.prototype.delete_cells arepatched to trigger an update of which cells should be visible or hidden.
  • Tooltip._show is patched to toggle the div.cell{position:relative;}css rule of while the tooltip displays, as otherwise it interferes with thetooltip’s position-determining logic. Since this method is not part of thepublic API (leading underscore), this may break in future, but it shoulddegrade in a non-catastrophic manner, with the result that the tooltip willappear at the top of the notebook document, rather than where the cursor iscurrently.

Headers In Word 2010

The extension also patches two existing Jupyter actions: those triggered incommand mode by the up/down arrow keys. Ordinarily, these select the cellabove/below the current selection. Once patched by collapsible_headings, theyhave the same behaviour, but skip over any cells which have been hidden (by acollapsed heading, or, in fact, by any other mechanism).

Finally, collapsible_headings registers two new actions, namelycollapsible_headings:collapse_heading andcollapsible_headings:uncollapse_heading, which are used by the keyboardshortcuts (if used), and can be called as with any other action.

The previously-provided preprocessor has been retired in favour of an exporterwhich embeds functionality correctly. See the [exporting section] for details.If you have questions, comments, or would like alterations (particularly fornbconvert support, of which I don’t have much experience), get in touch(@jcb91)and I’ll see what I can do :)

Exporting¶

It is possible to export most of the features of collapsible_headings to html.The process is to embed the relevant css & js files into the html output, withsuitable functionality for a non-live notebook.

Collapse Heading Word 2010

This is accomplished through use of the ExporterInliner class and itsassociated inliner.tpl template, provided as part of thejupyter_contrib_nbextensions.nbconvert_support module.To convert to html embedding collapsible headings functionality, use html_chexporter, with a command like