A Text Construction Set -- or -- How I use TW5

Now that I have benefited greatly from this project, for years, it is a need for me to give back my experiences.

This tool has allowed me to document repetitive processes, I have to do in my daily work, … in a more effective, legally secure and time-saving way. Perhaps someone else will take advantage of this. Perhaps it could also be a business model.

I call it ‘‘Texter’’: https://texter.tiddlyhost.com/

One thing in advance: Please, let me express my absolute appreciation to all those involved in this project. Since I’m only familiar with the basics of HTML and JavaScript, I can only imagine how ingenious TiddlyWiki is. I am very impressed by the energy and straightforwardness with which the project is managed. I would like to name names from whose posts and published TWs I have benefited massively. But there would be too many. So: Thank you all.

Background

At work, I have to document certain procedures and activities. These reports always have the same structure, but consist of different text blocks depending on the situation and the interventions carried out. Certain text passages and the way people are addressed vary - according to grammatical gender for example. Similar requirements are conceivable for legal contracts or medical findings. Why not also for appraisals or certificates.

The Path

For a long time, PhraseExpress was my preferred tool to generate a document from several boilerplates. However, over time requirements grew and I was no longer able to create a good structure. The nesting in the text modules became confusing, expansions, editings and corrections became more and more time-consuming and I felt increasingly trapped in proprietary stays. It was time to look for a better solution. I tested many alternatives. There was no one that made it better.

It took some effort to understand how TW works. To select the plugins, create macros, transfer the snippets, I spent several days. It was fascinating and I enjoyed it – a bit like a logic game. However, I wouldn’t have been able to do it without the discussions in the community. It can’t be said often enough: it’s a brilliant tool supported by a constructive and knowledgeable community.

Implementation or "How I use it"

Feeding in

The individual text modules and snippets are stored in tiddlers in split units. With the help of tags and a ToC-tab “Contents” tree, an expandable structure of all alternative text snippets for every part of each sub of the report is quickly created.

Workflow

The document is put together from the individual tiddlers in the story river. Therefore //Navigation from outside the story river// in //control panel>settings>Tiddler Opening Behaviour// must be changed to //Open at the bottom of the story river//. The texts are supplemented or completed within the tiddler. Macros tagged as “Textkit” are used for this. It is important that you have access to all parts of the text at any time if correction of spelling mistakes or additions are required. If errors or improvements cannot be corrected or implemented immediately, there is a high risk that they will be forgotten. Plugins and macros help ensure that this is also possible with transcluded text passages and text insertions.

Plugins

The only plugin I have to use is “Link-to-Tabs” or “Edit-Tabs” by Mario Pietsch. A perfect extension for my purpose. “Tiddler Commander” by Mohammad will make your life easier when you need to work on the structure of your text collection.

Macros

You can find my macros under the “Plugin” tab. Very simply written (I did all my programming within TW - not so easy without syntax highlighting). Everything is very rudimentary, but sufficient for my purpose.

To avoid making me think, I can run any text construction (text kit) with the same command structure with double ankle brackets: <<macroname>> or <<macroname VariableName>> or <<macroname "Parameter Name">>.

to gender: you can switch between male and female forms with the combination of the [[m/f]] button and the [[mf]] macro all over the story river. <<mf he/she>> or <<mf his/her>> is set in the text or if spaces are needed within the phrase within rectangl brackets: <<mf [[his wife / her husband]]>>.

which side: congruent with the gender mechanism, Specify whether left or right side:
[[rl]]. Example of the call of the macro: <<side right/left>> or perhaps <<side up/down>>.

@@switch@@ is the checkbox to kill all non-text elements after all is set. A fuctional but pobably not the most elegant solution (more in the text below).

My Macros in detail

The most important thing for me is that I have access to every part of the text in the story river at any time to correct mistakes immediately. The macros are programmed accordingly.

<<bed Tiddler>> - transclusion with a template named [[edit]] - a mini script for a better access I found in the forum, thanks EricShulman. (How to quickly navigate to a transcluded tiddler?)

<<check TiddlerName>> - a checkbox to expand some optional text saved in the Tiddler TiddlerName

<<input FieldName>> - an input box, e.g. for names or parameters

<<select TagName>> - a dropdown menu with Tiddlers tagged with TagName

<<tab>> - easier creation of tabs, can be used only once per tiddler

<<text TextName>> - a multiline textarea input form

<<title>> - I use to title a paragraph with the current tiddler-title, not to repeat it

<<space>>: Most macros work with the “\whitespace trim” pragma, therefore, for some sentence insertions it is necessary also to insert a fixed space for correct punctuation.

The @@switch@@

Once the document is assembled, it must be put into a form that allows copy and paste to any editor like Word, Pages, SAP, … The tool developed for this is called @@switch@@ in the form of a checkbox just to the right of the save button - not very pretty, but functionally sufficient. The checkbox switches off all structures in the story river that are irrelevant to the running text. This is achieved by setting the “hidden parameter” in a stylesheet tiddler, which is toggled by this checkbox. You can now select and copy the text. I would prefer not to have to take a detour. A copy button to copy the plain text to the clipboard would be more elegant. But my programming knowledge is not good enough.

Limitations

I have to be careful when naming the text modules. The name or title must not be repeated - sometimes I have to think about the best way to do it. Using more explicit names and avoiding titles that are too short seems to help.

Parameter or variable names in macros and tags (in some cases also titles) should be one word.

My tab macro <<tab>> only works once in a tiddler, because it is automatically tagged with the title of the tiddler.

Final Thoughts

I have been using this system very successfully for 7 years now. In times when the documentation of any kind of work is indispensable, I see a good potential to use TW for this. It is flexible, it is easy to use and reliable. I’m sure that someone who has better programming skills than me could develop a perfect tool for managers, doctors, scientists, lawyers, salespeople…, all those who could save a lot of time with text modules.

best wishes
96eron

8 Likes

Hi 96eron,
Welcome to the forum. Very nice write up and thanks for sharing your work.


I did change the ALL CAPS (which means shouting) in the title to Title Case for consistency.