Collapsible Headers In Word

Hide and unhide whitespace, headers and footers in Microsoft Word Dave Farquhar Office, Software October 30, 2012 November 19, 2018 microsoft word, office 2010, tooltip For now at least, I edit a lot of security documents as part of my job. Collapsible headings are a useful feature that can help since it breaks down large amounts of documents under headings that can be expanded whenever necessary, providing interactivity as well as a small break for the eyes. To create document outlines with a document as reference. Word 2013 introduced the ability to collapse text under headings, actually under any paragraph with an outline level set in the paragraph formatting. This works by the outline level of the heading. If your mouse pointer over any paragraph that has an outline level set, you will see a little triangle, either pointed to the right or angled down. When you create a table in Microsoft Word, by default Microsoft Word does not create a header row. However, if you create header rows in your Microsoft Word source documents, you.

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
Collapsible Headers In Word

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:

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.

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.

CollapsibleCollapsible

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

If you have Word 2013 or earlier versions in your computer you can use from this feature of Word.

By this, you can read or manage your text more easily.

Collapsible Headers In Word

In the following text, we will explain some of the benefits which collapsed heading has for us.

But before that, I want to explain why we can not see this capability in our text in some situations.

Why Can not See Collapsive Headings in The Document;

There are two reasons that you cannot see “collapsive headings” in your document.

1- The version of Word which you are using from it is later than 2013.

Only in Word 2013 or earlier version, you can see this feature.

2- You did not specify the heading for your document.

Before explaining how to specify heading, if you click on the heading in your text in the style window, you can see Normal Style is selected, it shows that you did not specify heading for your text.

For specifying the heading for your document you should follow these steps;

1- Click on the Heading.

2- Go to the Home tab.

3- In the Style part Click on the Heading.

According to the position of your heading in the text you can choose Heading 1 or 2 or 3.

4- Repeat these steps for other headings.

5- When you specify all headings in your text you can Right-click on one of them.

6- Choose Expand/Collapse.

7- Choose “Collapse All Headings”.

Here you can see all headings on one page. this features can bring for you some benefits like reading, moving, deleting and managing chapters in your text much easier.

I am going to explain some of them here.

How to Move Chapters in Collapsive Mode.

Here I want to move Chapters second and third and fourth to the end of the document.

If you want to move one or some chapters to the other place you can

1- Select them.

2- Hold Ctrl and then press X or right-click on them and click on the Cut key.

3- Place your cursor on the heading which is located after those chapters.

4- Hold Ctrl and then press V.

But here because we want to move these chapters to the end of the document, I recommend, paste them before the last chapter,

For that, you should place your mouse at the beginning of the last chapter line.

and paste them to that position and then move the last chapter to your desired position.

How to Delete Chapters in Collapsive Mode.

1- Select your desired chapters.

2- Press Delete key.

How to Collapse all the Headings by Default.

1- Select all Headings.

2- Click on the Home tab.

3- In the Paragraph section click on the launcher.

4- In the General section, select the “Collapse by default” box.

5- Click Ok.

Collapsible Headers In Word Form

After that when you open this file, all the headings will be collapsed.

How to Print Collapsive Document.

You should pay attention to this point that only expanded part in the document will be printed.

You should expand the sections which you want to print them before printing your document.

1- Right-click on one of the heading.

2- Choose “Expand All Heading” for printing all the pages in the document.

Collapsible Headers In Word Doc

  • If you want to print the only specific section you should click on them and select “Expand heading” option.
Headers

If you want to see how your file will appear before printing

3- Go to the File.

4- Click on Print.

Collapsible Headings In Word 2016

In the Print preview window, you can see the appearance of your text before printing.