Tags:
create new tag
view all tags

Folding / Collapsible Outlining / Twisties

See:

Contents

Introduction

< most of the links in the text area are not working because I have "noautolink" set -- I need to remind myself of why I thought that was a good idea, and if it is still a good idea, and consider changing it or fixing the links by adding the URL within double square brackets>

I learned about collapsible outlining when I used Microsoft Word a long time ago (could it have been as early as 1985?? I should see when it came out). When started to make the switch from Microsoft to Linux (ca. 2000) one of the features I looked for was the equivalent of collapsible outlining. I eventually came to find out that it was more commonly called folding in Linux (but folding is an overloaded term, some people used it to mean word wrap (soft or hard) of text to the width of a page). (I should discuss some terminology related to text, maybe I will, below.)

Anyway when I first encountered the "twisty" in TWiki I had trouble understanding that it was the equivalent of folding or collapsible outlining. (I realized only in the last month or two where the term twisty comes from, it relates to the typical arrowhead icons that are used to mark foldable sections -- pointing horizontally (to the right) for folded (collapsed) sections and vertically (down) to mark unfolded (expanded sections).

I'm rambling now, but at one point I developed a set of macros for Nedit to implement what I called pseudofolding. I later mostly switched to Kate because it had built in folding capabilities. (I'd like to switch to a Scintilla based editor for reasons I might discuss here later or somewhere else (I have discussions in my offline TWiki-like thing (which I currently call askRhk as a code name, to eventually be changed).

Recently, I've been trying to get ready to rekindle my use of TWiki, and in working toward that end, I dug deeper into twisties (see [TwistyPlugin). I was going to revise the [WebTopicEditTenplate] for this web (the [WikiLearn | Wikilearn web) to have all the headings be the start of folding sections (i.e., twisties), but I found a bug in the implementation of twisties which gives me pause. The bug is described below.

In preparation for that, I created quite a few notes in askRhk describing what I've learned about folding in TWiki -- I was going to move all of those to this page, now I'm less eager to do that -- I might do it later (for some value of later).

Findings / Learnings

<later>

Folding of list items

I would also like to fold list items, but my first thought / desire on how to do that doesn't seem like it is workable with what I know so far about how twisties work. I'm going to experiment some on FoldingTestPage1.

Bug

Bug: Heading in twisty does not show up in TOC.

I tried 3 ways to get it into the TOC:

  • prefix="<h2>" without trailing !!
  • prefix="---++ "
  • No prefix, added ---++ to link (i.e."---++ A Level 2 Heading (#2)")

Justification / discussion: The fact that the documentation of the TWistyPlugin (:Twisty Headers) says to add the !! to keep the heading out of the TOC implies that without the TOC it should go into the TOC, and that was the intention of the authors of the TWistyPlugin.

I could argue (with myself) that if I make all the headings collapsible and initially collapsed, the page itself will look like a TOC, and it will sort of, but having both the TOC and the collapsed headings is (to me) more useful.

Anomaly / Minor Bug

I don't want to take the time to describe this in detail atm. When I created this page, I put links on it to two nonexistent pages, expecting that (1) and (2), but that seems to be no longer the case.

But, more than that, those links continued to point to the edit version of those pages even after the pages were created. Maybe if I had totally closed this page and re-opened it the links might have switched to point to the view version of those pages. Requires more testing and a decision about whether I want to complain about it.

Contributors

  • () RandyKramer - 2025-07-11
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Revision Comment

%SECTION{last_revision}%

  • %DATE% —

Page Ratings

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2025-07-12 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright � 1999-2024 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