On Thu, Aug 01, 2019 at 11:13:53AM -0400, David Storrs wrote:
> tl;dr
>
> When writing prose, what are the 'killer features' of Scribble that make
> people choose it over any other tool? (Specifically in the context of
> prose -- Scribble is unbeatable when writing Racket documentation.)
>
> Learning scribble seems like a big investment, and when writing prose I'm
> not convinced that it has more batteries-included expressive power than
> HTML. For one thing, according to the docs you need to physically replace
> the scribble.css file to change the appearance of the HTML output and I
> haven't seen an option to inline it.
>
> For point of example, I would describe the 'killer features' of HTML+CSS to
> be: separation of presentation and semantics; easily perform complete
> transformations on appearance just by changing the CSS; store presentation
> commands externally or internally in a discrete segment; rich ecosystem for
> modification, publication, translation to other formats; and universal
> availability of the viewer.
I too am evaluating Scribble. I realised years ago that my writing had
suffered from the use of too many word processors as technology kept
changing, and even though there were lots of conversion tools, they
didn't always work properly. I didn't want to spend time tracking down
missing italics eternally.
Also, sometimes files got edited on different systems independently.
(Blame my attantion deficit for this) I spent time doing format
conversions *and* reconciling differences by eyeball and typing.
It was plain I needed a new tool. One that could handle plain Ascii
text input (that's what my alphasmart did -- it was great for raw text
input not not so great for editing) and still handle markup for italics
and such. And one that was compatible with computer-programmer-style
revision control. (I dopted monotone as my revision control system back
then.) Word processor file formats seem to go out of their way to make
this impossible.
I ended up writing three generations of document compilers that could
accept plain Ascii text and markup, producing whatever output I wanted
at the time.
The third one, mt3, produces HTML and slightly sick TeX. And it doesn't
handle things I'm not currently using in my writing, such as tables, and
mathematical notation, and category-theoretical diagrams.
It does do markdown-style nested bullet points, which are invaluable for
planning and outlining. But that's not writing prose either.
And it's getting complicated. Each generation of my document compiler
was written as I learned what it wsa that I *reallt* needed. Each was
largely incompatible in its markup with the previous ones, but since the
bulk of what I wrote was a bunch of ordinary paragraphs containing plain
text, that wasn't much of a problem. Searchnig and change=ing by hand
in emacs was not a big deal.
But I want to do mathematics, have charts and diagrams, and so forth.
So before starting on a fourth generation, I decided to ook around.
An obvious candidate is TeX. It does not generate HTML.
Another was, of course, scribble.
You may have read my difficulties with that in a few other threads on
this mailing list in the past week or two.
First, there was excessive slowness. That was fixed a week or two ago,
making the whole project feasible. I;m now using a recent snapshot of
the development version.
Second there are problems with include-section. I can't wrap an
@include-section with anything, so it can't be conditional on a
command-line flag or anything else. This is apparently because it used
Racket's (require ...) internally, which has always to be top-level. I
gather that pollen uses the same technique, so I suspect it has the same
problem. (There do appear to be clumsy-looking workarounds involving
changes in both the included and including files)
Third, Scribble takes all my included sections and moves them to the end
of the document. I don't know why, and I've been flat-out told it
doesn't do that. I'm waiting for a fix or explanation.
Finally, there are minor notational issues. I like to start my
paragraph with indentation instead of blank lines, just so that my input
resembles the output. Easier when editing.
Of course, I could start to rewrite scribble ... But I've looked at the
codebase before (trying to figure out how to make text red), and I find
it hard to get into.
I've noticed Pollen can take markdown-stye input. (which seems
useful for my bullet-point planning and point-form sections) But
I wonder ... is that just preprocessing markdown and producing markdown?
Or is it indeed a surface syntax for pollen that gets absorbed into the
same internal notation pollen uses for non-markdown text in the dame
document.
Or is all this compatibility engineering and output generation the job
of the document author, providing ultimate flexibility with little
convenience. I'm already writing document compilers, and don't want the
equivalent of doing it yet again.
-- hendrik
> A) Could conditionally include sections depending on environment variables
> or command-line switches
Yes, this is essential so I can have author-only material interspersed
in the document.
> B) Could seamlessly generate PDF, MOBI, EPUB, and clean and valid HTML that
> either inlines the CSS or links to a specified CSS file as specified at
> publication time. (The inline option is important for when publishing on
> Amazon.)
So far I'm targetting html and pdf. Epub would be delightful.
> C) Handles UTF-8 correctly
Not essential, but easy to do sort of passably. I just recognise all
the bytes with the high but set as characters that can be in words.
Every non-Ascii Unicode character is represented as such bytes.
No, it's not perfect. It's just good enough for now.
>
> I see that other people have used Scribble for non-technical purposes, so
> I'm curious to find out more. Is Scribble the right tool for the job and
> why?
I'm not ready to use Scribble for all my writing yet. And I suspect
that Pollen has problems too, since it seems to use the same basic
architecture as Scribble. But Pollen's two-screen approach
looks quote valuable, and could mitigate difficulties with input
notation.
-- hendrik