I use Tiddlywiki at work. I work with a
lot of documents of different types. Some are legal documents and
affidavits. Others are contracts and specifications. Some are well
structured while others seem to ramble pointlessly. Some are lengthy
while others are very short. I need to be able to figure out quickly
which document contains a particular requirement. I've found that
Tiddlywiki with its search function, and especially with Danielo's
context search plugin, is almost perfect for my task.Everyone I've shown my wikis to has been envious.
One key criteria in my line of work: for existing documents, I must have every word and character correct and in the right order. Most of these documents must not be edited. For example, I can't change any part of an existing contract. I can highlight portions of it but I must not change any word or word order or punctuation mark. Using a clause from one document in another is rare enough that simply copying is the obvious answer.
Consider the two alternate ways of doing things; the preferred Tiddlywiki method of breaking my documents into small pieces and my current method, the document dump.
I don't so much create tiddlers as dump documents into them. Dumping a document into a single tiddler is fast and easy. Open the word document. Copy the entire thing. Open the wiki. Create a new Tiddler. Paste the document into the tiddler. Name the tiddler to match the source document name. And I'm done. If I care to preserve the formatting, I add three quote marks at the beginning. Total time expended, perhaps a minute. If I really want to make it pretty, I can spend 10-15 minutes adding exclamation marks to mark headers or use Danielo's Keysnippet routine to convert some jumbles into neat tables.
This creates what can be a very large tiddler. The search function works as expected and rapidly identifies which document contains which phrase. It has every character and every word in exactly the right order. It accomplishes what I need to accomplish with a minimal amount of effort.
And the disadvantage? So far I haven't found one. If Tiddlywiki processes the tiddler more slowly, I haven't noticed.
By comparison, the Tiddlywiki preferred choice, lots of little tiddlers, is a good deal of work.
I've tried copying and pasting individual segments from the word document into individual tiddlers. Each smaller tiddler takes about the same amount of time to set up as my much larger single tiddler but after that I'm still not done. I still have to rebuild the original document from those individual tiddlers and I have to verify that I got all the material correctly. When that is done, I have to create a field and tagging system so that each smaller tiddler will reflect its source document and sort correctly so the table of contents will be right.
If I saw any real advantage to using a lot of little tiddlers to accomplish the same thing that can be done with one large tiddler, I might go ahead and spend the extra time. The last couple times I went through this exercise, it took me hours rather than minutes. And what did I get for my effort? As close as I can tell, nothing but older.
One thing that would make my life easier would be a table of contents that worked inside a single tiddler that was based on headers or some invisible marker. I know this has been requested more than once and now, perhaps, you can understand why I want one. A simple list of headers would be helpful. I could then use the browser's Find command to jump to the appropriate section.
\define regex-feature-header() (^!+.*)(?gmi)
<div class="TOC"<$list filter="[all[current]match:text<regex-feature-header>]"><li>{{!!title}}</li></$list></div>
!!!title!!!other title
.TOC h2 {
font-size:50%;
}
.TOC h3 {
font-size:25%;
}
<div class="TOC">
<$list filter="[all[current]match:text<regex-feature-header>]">
<li>{{!!title}}</li></$list></div>
Hello remove the <li> marks. That way the text will be wikified and you will keep the hicherachy of the document. Then all you have to do is to adapt the text size for h1..hn within the div TOC.
<div class="TOC">
<$list filter="[all[current]match:text<regex-feature-header>]">
{{!!title}}</$list></div>
<$view field="title"/>
{{!!title}}
Maybe I'm just exceptionally dense but making the code<div class="TOC"><$list filter="[all[current]match:text<regex-feature-header>]">{{!!title}}</$list></div>gives me
!!!title !!!other title
Some times small details drives us crazy.
Try adding some carriage returns so the text is wikified...
Glad you get it working. Let us know if you end up with something pretty and useful.
.TOC H1 {font-size:100%; font-weight: bold; line-height: 80%;}
.TOC H2 {font-size:100%; text-indent: 15px; line-height: 80%; }
.TOC h3 {font-size:100%; text-indent: 30px; line-height: 80%; }
.TOC h4 {font-size:100%;
text-indent: 45px;
line-height: 80%;
}
.TOC h5 {font-size:100%;
text-indent: 60px;
line-height: 80%;
}
.TOC h6 {font-size:100%; text-indent: 75px; line-height: 80%; }
I chose the font-size to force the wikified '!' headers into a constant size. Text-indent pushes the subheaders out to the right depending on their level while the line-height reduces the double spacing a bit. <$transclude tiddler="My ToC" mode="block"/>
The table of contents will appear wherever you put the $transclude line and ends up looking something like this:in a grey box with rounded corners.
Obviously this could use improvement and I'm certain some of our clever folks could code it much more tightly. Still, it accomplishes what I wanted.
Nice! The important thing is that it works for you. Anyway looks great and sure it looks greater on your wiki. Thanks for sharing it back.
Curiosity has me ask if that's anywhere to be seen. ^_^
Did you tried to make the toc smaller and float left ?
Very nice! I have to check it on my desktop computer to give you an opinion, but I like how it looks on my mobile too. Finally we gave a solution to all those people asking for a TOC.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
I understand why these requests are framed in terms of implementing sections but I'd really like more insight into the underlying needs. Is the desire for tiddlers with long, hierarchically structured content because they are easier to edit as a single run of text? Or easier to import? Or is it because the single tiddler is easier to read on screen than a sequence of tiddlers?
I'd really like more insight into the underlying needs.
It does look nice but I had one additional thought on this. At the moment, in my version, the background color for the box is hard coded in the CSS. It would be nice if it could automatically use the appropriate color from the selected palette. That seems like it ought to be as simple as knowing the right internal name to use...
.myClass{
background:<<colour page-background>>;
}
So, it would be nice, if tw5 would by default render tiddlers $:/tags/Stylesheet in a monospaced block rather than wikify the contents... or if one could easily make it so without modifying the ViewTemplate.
Best wishes, Tobias.--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
I think we need a mechanism for more flexibly configuring conditions under which the default body rendering should be hidden.
\define regex-feature-header() (^!+.*)(?gmi)
<div class="box">
<h3 style="text-align: center;"><u>Table of Contents</u></h3>
<div class="TOC">
<ul style="list-style-type:square">
<$list filter="[all[current]match:text<regex-feature-header>]">
<li>
<$button class="tc-btn-invisible" >
{{!!title}}
<$action-setfield $tiddler="$:/sk/new-find" text={{!!title}} />
</$button>
</li>
</$list>
</ul>
</div>
<$click/>
</div>
var lastfound=this.wiki.getTextReference('$:/sk/new-find');
lastfound = lastfound.replace(/!/gm, '');
var strFound=self.find(lastfound);
if (!strFound) {
strFound=self.find(lastfound,0,1);
while (self.find(lastfound,0,1)) continue;
}
I use Tiddlywiki at work. I work with a lot of documents of different types. Some are legal documents and affidavits. Others are contracts and specifications. Some are well structured while others seem to ramble pointlessly. Some are lengthy while others are very short. I need to be able to figure out quickly which document contains a particular requirement. I've found that Tiddlywiki with its search function, and especially with Danielo's context search plugin, is almost perfect for my task.Everyone I've shown my wikis to has been envious.
One key criteria in my line of work: for existing documents, I must have every word and character correct and in the right order. Most of these documents must not be edited. For example, I can't change any part of an existing contract. I can highlight portions of it but I must not change any word or word order or punctuation mark. Using a clause from one document in another is rare enough that simply copying is the obvious answer.
Consider the two alternate ways of doing things; the preferred Tiddlywiki method of breaking my documents into small pieces and my current method, the document dump.
I don't so much create tiddlers as dump documents into them. Dumping a document into a single tiddler is fast and easy. Open the word document. Copy the entire thing. Open the wiki. Create a new Tiddler. Paste the document into the tiddler. Name the tiddler to match the source document name. And I'm done. If I care to preserve the formatting, I add three quote marks at the beginning. Total time expended, perhaps a minute. If I really want to make it pretty, I can spend 10-15 minutes adding exclamation marks to mark headers or use Danielo's Keysnippet routine to convert some jumbles into neat tables.
This creates what can be a very large tiddler. The search function works as expected and rapidly identifies which document contains which phrase. It has every character and every word in exactly the right order. It accomplishes what I need to accomplish with a minimal amount of effort.
And the disadvantage? So far I haven't found one. If Tiddlywiki processes the tiddler more slowly, I haven't noticed.
By comparison, the Tiddlywiki preferred choice, lots of little tiddlers, is a good deal of work.
I've tried copying and pasting individual segments from the word document into individual tiddlers. Each smaller tiddler takes about the same amount of time to set up as my much larger single tiddler but after that I'm still not done. I still have to rebuild the original document from those individual tiddlers and I have to verify that I got all the material correctly. When that is done, I have to create a field and tagging system so that each smaller tiddler will reflect its source document and sort correctly so the table of contents will be right.
If I saw any real advantage to using a lot of little tiddlers to accomplish the same thing that can be done with one large tiddler, I might go ahead and spend the extra time. The last couple times I went through this exercise, it took me hours rather than minutes. And what did I get for my effort? As close as I can tell, nothing but older.
One thing that would make my life easier would be a table of contents that worked inside a single tiddler that was based on headers or some invisible marker. I know this has been requested more than once and now, perhaps, you can understand why I want one. A simple list of headers would be helpful. I could then use the browser's Find command to jump to the appropriate section.