Tags:
create new tag
, view all tags

Update: I realize that I should add some clarifications to this page to avoid misleading anyone. AbiWord has implemented a feature something like this, but actually quite different in that it focuses on list items and collapsing or expanding items in a list.  The behavior in Microsoft Word that I would like to see emulated in AbiWord is collapsing based on headings in the document (and other things, iirc).  It's been a long time since I've used Microsoft Word on any sort of regular basis--perhaps by now they've also implemented collapsing on list items, like AbiWord.  BTW, I'm not trying to imply that Microsoft may have copied that feature from AbiWord--it just seems like a potential natural enhancement that many might conceive.

Collecting notes and resources for implementing collapsible outlining in AbiWord. (For FJFranklin (?), re AbiWord RFE (bug) 4038).

For examples of collapsed outlines (of this page), see the Contents sections of this page. They are basically collapsed outlines of this page created automatically by the TWiki TOC command.

The first TOC could show all levels of headings (1 thru 6), but only levels 2 and 3 are used on this page. The second TOC is collapsed to Level 2 (using the syntax %TOC{depth="2"}%. See TWiki.TWikiVariables for more options on the TWiki TOC command including the ability to display a TOC for a different TWiki page.

This, IMHO, lends credence to my thought that when we count votes for RFEs of AbiWord, we should add the votes for "Automated Table of Contents" to those for "Collapsible Outlining" wink )

See AboutThesePages.

Contents

Contents as a Level 3 Collapsed Outline

In addition to being a Table of Contents, this is also an outline based on TWiki headings collapsed to level 3:
Notes:
  1. on most WikiLearn pages I exclude the "Contents" heading from the Table of Contents by using the TWiki "!!" syntax
  2. a "real" collapsed outline presents an alternate view of a document, this pseudo- collapsed outline is a little misleading because you see both the collapsed outline and the remainder of the document in its non-collapsed state. In an attempt to help visualize a "real" collapsed outline, I've added horizontal rules before and after the outlines below.

In other words: If you were in Word and switched to a collapsed outline view of this page (at a given level), you would see only what is between the horizontal rules.

Note that you can easily navigate from one place to another in the document by collapsing, moving to a different heading, and re-expanding. You can also easily rearrange the sections while in the collapsed state (I'd have to refresh my memory on the exact steps to do that, but, in general, IIRC, when you select a heading while in outline mode, you also select the text under that heading).



Contents as a Level 2 Collapsed Outline

Because this page is about collapsible outlining, I show the same outline collapsed to level 2 headings. (Note the syntax: %TOC{depth="2"}%):



Contents as a Level 1 Collapsed Outline

The degenerate case of an outline collapsed to Level 1 with no Level 1 headings present in the document (as displayed in TWiki):



Thoughts after Creating NmTWikiFold

After starting this page, I managed to create a set of macros for Nedit which fold (and unfold) "raw" TWiki text on TWiki headings (in Nedit). See NmTWikiFold.

Creating those macros in Nedit let me recognize two ways of accomplishing folding in AbiWord that require little or no "specific" programming. In other words, as long as the necessary infrastructure exists in AbiWord, I can make use of it to perform collapsible outlining without changing the AbiWord C++ program.

The two methods are both based on the approach developed in NmTWikiFold:

Method 1: AbiWord Macros

Create macros much like those in Nedit that simply apply (and remove) a hidden text attribute to all text except that at the desired heading levels (see NmTWikiFold for more details).

I think a new (additional) hidden text attribute should be created specifically for collapsible outlining so that hiding and unhiding text for the purpose of collapsible outlining does not incidentally unhide text hidden for other reasons.

I wrote to the abiword-dev list about this approach and was told (by Dom Lachowicz (sp?)) that the macro facility (scripting languages) was not currently "up to snuff" (my words) to accomplish this, and would not likely be until sometime after the 2.0 release. (I've since seen a roadmap for the 2.2 release, and I'm not sure whether the necessary improvements are planned — the roadmap talks about (IIRC) "external scripting" — I never considered that there might be both internal and external scripting — I think what is needed for this might be "internal scripting" — I will write to the mailing list to ask about that.)

Method 2: Multiple Stylesheets (Templates?)

Create a set of stylesheets (templates), one for each level of outline collapse.

For example, the one to collapse the document to Level 1 would redefine all styles except Level 1 headings to include the hidden text attribute, the one for Level 2 would redefine all styles except Level 1 and Level 2 headings to include the hidden text attribute, and so on.

If you haven't read the NmTWikiFold page, this is very analogous to what is done there using macros. I'm not as certain that we need a new hidden text attribute in this case -- for a while I thought we did not, now, writing a few weeks later, I'm not as sure.

I think there are other advantages to this approach (over the macro approach), including the thought that, in addition to stylesheets (templates) for the "natural" style and the collapsed styles of the page, there might be a "standardized" style of the page, which shows all text with a standard indentation to show the heading levels (instead of whatever the user may have defined -- font sizes and styles for different levels).

The disadvantages / roadblocks to this approach include:

    • I haven't investigated enough to find out how easy it is to apply different templates to a document in AbiWord (must I do it via the abiword profile?)
    • It takes quite a bit of discipline to use this approach — all formatting should be applied by the use of styles, and a large number of alternate stylesheets (approximately 10 to allow collapse at 9 different heading levels) must be created including each of the styles used in the document.

Still, this approach has some appeal, and might make good use of AbiWord's "lock styles" feature (IIRC, the feature that requires that all formatting be applied by the use of styles).

Concluding Remarks about these Approaches

Either approach could be utilized without changes to the AbiWord C++ program (after the necessary infrastructure is in place — internal scripting or the ability to apply different stylesheets).

Both approaches could benefit from changes to the C++ program to, for example, change the GUI to better support collapsible outlining. (For example, if the current method of applying a new template requires changes to the AbiWord profile, something could be done to allow such changes via a GUI method within AbiWord.)

Posts From abiword-dev

To start with, I'm looking back at posts I made in abiword-dev and responses to them.

Intro

From results of google searches on

  • [rhkramer word outline collapsible]
  • [rhkramer sevior]

Note: some of the other posts in the same thread (before or after those listed here) may also contain useful information)

Jesper Skov pointed out to me that what Word calls collapsible outlining has often been called "folding" in an editor. Folding can occur on a variety of criteria, including programming language keywords, user generated special marks, indentation, etc. You could describe Word's collapsible outlining as folding based on document headings.

Word's collapsible outlining is also hierarchical, in other words, there can be folds within folds. I'm not sure whether that's a typical capability of a folding editor or not -- I've not really used a folding editor -- after Jesper mentioned this I tried a few folding editors but not for very long. (Aside: I actually wrote a fairly long VB project using Word as the "editor" in order to make use of the collapsible outline feature.)

Potentially Useful Posts:

  • Re: Outlining (was Re: Version 0.9.0) -- more introductory / overview type stuff -- this highlights my desire for another enhancement over Word 97, the ability to have (body) text styles 1 thru 9 (for example) corresponding to heading styles 1 thru 9 -- as an aside, Word in the MSDos days had this feature, it got lost when they went to Windows.

  • Re: Commit: Various Lists UI improvements -- from a period when I (at least) was confused about the list work that Martin Sevior was doing and whether it was relevant / applicable to collapsible outlining -- sort of confusing to read out of context.

  • Re: outlines vs. lists (was Re: Commit: Various Lists UI improvements) -- from the same thread as above, Paul Rohr asserting (correctly, as usual) that "ASSERT(autonum not = list not = outline)" Restated in words because there should be an exclamation point in front of each of those equal signs (see end of line)--it is there in the "raw text" (seen when editing), but doesn't appear now. (Is it possible something in the TWiki templates changed such that the exclamation point is not rendered?) "ASSERT(autonum = list = outline)"

  • Re: normal and web modes -- an early version of what eventually became the document I sent to Dom trying to describe the different view modes available in Word97, including Outline View.

  • Re: Changing Built-in Styles -- touches on automatic promotion and demotion of heading styles, that works in Word97 only for the built-in heading styles -- would be nice if it also worked for user defined heading styles (but would need a convention of some sort) -- does not discuss when automatic promotion / demotion occurs -- would need to do some "recollecting"

Almost Duplicates

Some links with probably nothing new (beyond what's covered above)

Less Relevant Posts

  • Re: feature usage in my office -- some discussion about a small survey done by Ron Ross giving an indication of how rarely styles are used (in a logical fashion) by word processor users.

Contributors

  • () RandyKramer - 18 Dec 2002
  • <If you edit this page: add your name here; move this to the next line; and include your comment marker (initials), if you have created one, in parenthesis before your WikiName.>

Note to me: //Office6/d:\Abiword Documents\Word Screen Shots\WordView spec rev2.doc

Page Ratings

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2009-10-02 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look