Using TiddlyWiki to write a book, in this case non-fiction

Do you know of or have you used tiddlywiki to write a book?

I am looking for “prior art” on this before I start writting my own book :nerd_face:

I have just done a fairly extensive search here in talk.tiddlywiki to find if there was examples of wiki editions for a book author to use. Although I have often responded to authors asking about using tiddlywiki for this purpose, I have not found any substantial examples, although there are a few plugins and tools with an honerable mention to clsturgeon.github.io/MemoryKeeper/ and https://groktiddlywiki.com as an example but also refnotes and a few others.

I hope to avoid starting from scratch, but will if I must, because writting a book is a substantial effort that could really benifit from TiddlyWiki support. Dont count on ever seeing my book, this is my first attempt and I dont even know if I can do it.

I am seeking information about actual book authorship if possible.

Thanks in Advance.

1 Like

I know @xcazin was (is?) very involved in how to make TW useful for professional book publishing.

I also know I saw a TW based book (in a TW, not on paper) perhaps 10 years ago but I don’t recall who or where to find it. It was a book about… was it love or self-help? Something in that direction. Poetically written if I recall. Of course, it is pretty much up to the author to define what exactly qualifies as a “book in TW”.

From a technical viewpoint, I’d say that creating a book with TW is very much a matter of CSS (!) It would be wonderful if there was a generic “book writing theme” or “book writing edition”. Alternatively, a route without CSS might be some setup to export the tiddler content into some dedicated book authoring software.

Thanks @twMat for your responce, in this case I plan to keep the book private and eventually publish on paper and/or and ebook. I assume your focus on CSS relates to putting it online?

No no, regardless if the plan is online or paper, I’d say it is very much a styling matter - or how would you otherwise control the appearance of the output from the html document? If you print, or even just use the browsers preview print tool, the necessity for special styling of a TW is immediately obvious… typography, color schemes, text alignment, line spacing, margins, page element layout, …

…but if it is a merely a book for yourself then, obviously, I can’t say what matters :slight_smile:

1 Like

BTW, I’ve by now co-written several books for use in my elementary school science classes. I wish I could do this in TW, especially considering how low the standards are for my use case, but it has not been practically possible because of the complexity of the pages. Here’s a sample page… it is just totally impractical to create in TW:

image

But maybe your use case will not be image heavy and with special formatting needs like this.

1 Like

Interestingly here I do not think of those aspects of writing a book, to me its all about text, content and its structure. Perhaps wrongly, but I thought the details of layout and appearance would be decided in the end, by the publisher, I think of it more as using a type writer, perhaps showing my age. During my youth I marveled at the golf ball IBM electric type writer.

Of course it is different if you are going from writing to publish online when the author is likely responsible for the beginning to end. Including diagrams, layout and “type setting”.

  • I am all for doing what you say but feel I first need to focus on the text.

I did expect to spend some time in diagrams or images to illustrate some concepts, as I do when writing instructions, as I have done for manuals. But that is an example of when it goes from my head to the reader. My book idea is more of a text based book. :thinking:

[Edited] For example would streams, and later the related fusion be a good way to wwrite a book, allowing sections to be written in chapter (tiddlers) allowing sections to be reordered as needed, although initialy heirachical they are collapsed at the end of the day into a linear text.

  • Perhaps one could author a whole book in streams but view and read it is a consolodated view?
  • In understand there are a number of bible implementations but that has a lot of references and labling I am not interested in.

No, but I’ve done a legal document that runs to a few dozen pages, with very small content tiddlers recursively transcluded into longer and longer ones, until the chapters are wrapped in one main tiddler. Similar structures should be useful for non-fiction books. But I don’t know if it breaks down at scale. And to @twMat’s point, there is no complex formatting required for this. That might be a deal-breaker.

There has been a fair bit of discussion recently on print css. I think we’re getting close to the point where we can print substantial documents with a small amount of CSS. I don’t know if that extends to book length. I can think of several gaps. For instance, I can’t find any way to ensure that chapters start on odd-numbered pages. Nor can I find a good way to make a reference to a dynamic page number. (For example, “See Table 3.1 on page 74”). But we can go pretty far at this point.

As to the complex layout, we should be able to create fairly sophisticated layouts in CSS, and most of those will work well when printed. As to your sample page, we can do paragraphs, headers, tables, and centered images easily. (The off-center bottom one might take more work.) It would be easy enough to create a blank-lines procedure. Perhaps surprisingly, the most challenging thing I see on that page are the bottom-right floating question numbers, [1] and [2]. I can’t immediately see how to do those, although I’m sure it’s possible.

1 Like

Oops, I guess that’s already there:

break-before: right ensures that a chapter begins on the right-hand page. Off to test this!

Update: This didn’t work in a naive test. I’ll try again when I have more time.

I have a hunch I have seen something about this. I think you can use a CSS calc to get the number of pages to do page X of Y, given that you can test if the page number for being odd or even. Then force a page break if needed, which adds another page and places the content on that next page ie the odd or even one. But I am not sure.

Printing

I would like to reserve the possibility to generate a final book, but it is not yet my intention, however I may need to “give the book away” :laughing: in the end. Not that this necessarily stops me achieving what I want to do with this book, but that is another story :nerd_face:

The main thing I want is tools to help write and organise.

Also tools to assist with draft sections, ensuring I revisit and take them out of preliminary draft, then later out of draft altogether. Similarly with their placement in the book.

  • Of course I need footnotes, links, book and authors references etc… so need them to work with streams. This may be the hard part.

I am currently thinking I may base the book on a tiddler for each chapter, then using streams divide it into sections and smaller units as desired, however ultimately collapsing the resulting hierarchy into a flatter one (primarily Chapters and Sections).

I think I would like to see the automatic streams tiddlers get renamed into searchable titles, allowing me to search based on title only, and/or content. Then if something does not belong, pulling it out of the heirachy, and keeping it for placement elsewhere if needed.

Like essays, I think I need to later present introduction and conclusions on chapters and sections that telegraphs what is to come, or summarises susinctly (yes I must fix my spelling and grammer checker) as I am prolific with typos.

At the moment I need ideas about how brainstorm then to write and structure a book.

You might find this thread interesting. It describes a flexible way of combining block/outline tiddlers into larger components.

However, I’m still in the early stages of designing an edit UI for the components that uses. It’s not proving particularly easy. The closest analogy would be to Streams, but my use-case is different enough that I can’t use it, nor likely even hack my own choices atop it. I may go back to adding content instead, for a while and mull this over some more; the edit UI is something I don’t really need myself. But eventually this would be taken over by someone with no prior TW experience, and it would have to be simple to use, and fairly self-explanatory. That’s hard work! :slight_smile:

1 Like

IIRC @CodaCoder uses TW for long-form writing. I think he’s discussed his approach in various threads here over the years, but perhaps he can give you some more targeted advice?

2 Likes