Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Export a subset of the outline as a text outline (Read 4779 times)
Jeff
Full Member
*
Offline



Posts: 3

Export a subset of the outline as a text outline
Aug 18th, 2010, 5:06pm
 
When I was a graduate student 20 some odd years ago my office mate told me that his father had bought a new computer and, after reading the manual, setup an appointment with his doctor to be checked for Alzheimers. I now understand the feeling.

I am preparing to teach a new class based on the TED talks. I have a lot of the talks entered as notes and agents to help me sort them out into various threads that I will try to weave through the class. I would like to print a simple indented version of my themes which is a container within my Tinderbox document.

I thought this would be easy but quickly found that the Print command doesn't work the way I thought it would ... OK.

I found the Export as text option under the File menu but couldn't get it to export just the subsection I want ... OK.

It looks like there are some formating options and I can set up a Template to export what I want. Then I found the Nakakoji view which seems much like the export command but it will allow me to export just the subsection I want but it looks like this:

     3.9 Themes
           3.9.1 Technology
     3.9.1.1 Clifford Stoll on ... everything
     3.9.1.2 David Pogue says "Simplicity sells"
     3.9.1.3 Lawrence Lessig: Re-examining the remix

edited to shorten the output ...

     3.9.1.12 Reed Kroloff on modern and romantic architecture
     3.9.1.13 Robin Chase on Zipcar and her next big idea
           3.9.1.14 David Merrill demos Siftables
           3.9.1.15 Margaret Gould Stewart: How YouTube thinks about copyright.
           3.9.1.16 Billy Graham on technology and faith
           3.9.2 Education
     3.9.2.1 Clifford Stoll on ... everything
     3.9.2.2 Sir Ken Robinson: Bring on the learning revolution!

Notice that in this output section 3.9 Themes is the container that I want to print. The first subsection of Themes is 3.9.1 Technology (good so far) and the first subsection of Technology is a note about Clifford Stoll's talk, 3.9.1.1. Good but not indented under 3.9.1 (and I do not know why ... it is the same in the export as text menu command). Could this be because Technology is an agent? Then notice that after the talk by Robin Chase (3.9.1.13) the following three talks are indented (but they are at the same outline level). What is going on here?

I tried writing my own templates (wasting more time than I will admit to in public) but with no success so far. However, that leads me to further questions ... When I select other template I have written in the Nakakoji view the output changes but the name on the drop down menu does not (this does not happen in the export text dialog box, it updates correctly). Also, when I click on the Edit button in the dialog box (expecting to perhaps edit the current template file) I get switched to my web browser with ^title^ ^text ^children inserted (it was at that point that I started thinking about my office mates father).

I am sure I am missing something. It cannot be this hard to get a print out of a simple indented outline from a program that has a built in outline view. What am I doing wrong?

Jeff
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Export a subset of the outline as a text outline
Reply #1 - Aug 18th, 2010, 6:03pm
 
Without seeing your templates and/or TBX it's hard to see where you're going wrong. Why not post a small TBX that shows the problem so we can see the problem and show you how to fix it? I'm sure it's not complex, but on the information given it's hard to do more than agree that you have a problem! If the data's sensitive, by all means use different example text - the point is to maintain the overall structure and - if pertinent - your user attributes.

Don't worry about exposing mistakes here, no one's going to ridicule your efforts. Rather, it's often instructive in understanding your approach and how to move from that approach to one that works.

Side note: the Nakakoji & HTML views are - for historical reasons - perhaps not bast named.  Nakakoji view - better described as Text Export view - is for exporting plain text (no bold, italics, font sizing, etc.). HTML view - perhaps better thought of as formatted text export view - is for exporting formatted text.  Most often this is HTML but it doesn't have to be.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Jeff
Full Member
*
Offline



Posts: 3

Re: Export a subset of the outline as a text outline
Reply #2 - Aug 18th, 2010, 7:22pm
 
Mark,

Thanks for the quick reply.
Here is a link to a zipped file of my TBX document:

http://www.math.montana.edu/~banfield/Classes/TestDoc.zip

When I look at the output from the Export as text command (choosing the "TestDoc and contents" radio button) the formatting problem is in Themes container (section 3.9). It also shows up in the Nakakoji view.

Thanks for taking the time to look at my problem.

Jeff
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Export a subset of the outline as a text outline
Reply #3 - Aug 19th, 2010, 6:10am
 
As surmised the example helps massively. I can't find a 'TestDoc' but, for those playing along at home, use the note 'Themes' in Nakakoji view to see the problem. Your view results can be alternately described as:

3.9 Root level container
    3.9.1 An agent
         3.9.1.1 alias
    3.9.1.2 alias
         3.9.1.3 alias
         3.9.1.4 alias
...etc.

So, why the incorrect indenting? You expect 3.9.1.2 to be indented the same as it's siblings, but it isn't. Let's look at the (built-in) 'outline' template. Here's the code:
Code:
^indent^^endIf^^sectionNumber^ ^title^
 

N.B line return at end of code line.

The problem is the ^indent^ code (syntax) as the aliases inside the agent are calculating their indentation based on the outline depth of the alias' original note. Indeed, that the Nakakoji output shows any of the agent's content at the right indentation is in fact sheer chance.  Move a few originals around in Outline depth and review the same Nakakoji view to see the effect. That's the problem. So how to fix?

We need a new template. Make a new note and on its Create/Rename dialog tick the 'can be a template' box. Call the note "text-outline". Into the template note's $Text paste this code:
Code:
^if($IsAlias)^^indent("\t",$OutlineDepth(parent))^^else^^indent^^endIf^^sectionNumber^ ^title^
 

N.B code all on one line with line return at end of the code line.

Now we're saying: "if I'm an alias, indent me one more than my parent agent, otherwise use default ^indent^. If your original Nakakoji view is still open, close and re-open - so the template list is refreshed. Now, from the template drop down (right side above the view's specimen output) choose the newly added 'text-outline' template. Your export should now indent as expected.

More notes. The new template will work regardless of whether the alias is inside an agent (i.e. created dynamically by the agent) or manually created and placed in the outline inside a normal container. You might also want to read up a bit more on aliases.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Export a subset of the outline as a text outline
Reply #4 - Aug 19th, 2010, 9:15am
 
In older versions of Tinderbox, an alias had little separate identity -- and hence ^indent for an alias was the ^indent for its original, just as the Name of the alias is the Name of the original.

It seems to me that, given the way aliases are used today, the result of ^indent should probably reflect the inherent properties of the alias, not its original.
Back to top
 
 
WWW   IP Logged
Jeff
Full Member
*
Offline



Posts: 3

Re: Export a subset of the outline as a text outline
Reply #5 - Aug 19th, 2010, 1:41pm
 
Thanks for the help. It solved the problem and gave me a bit more insight into the way Tinderbox works.

Jeff
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print