If some undergrad wanted a summer programming project... make a semi-WYSIWYG editor for Scribble documents.

You might have a long scrolling text window, in which things like boldface/italics/color/textsize that Scribble would render are editable text, and Scribble markup itself doesn't appear on-screen. Things like print pagination probably would not appear here, though, but you'll want to special-case what normally ends up as rendered Table of Contents, for navigation purposes. This can be tricky, especially if you're not closed-world to a particular set of Scribble primitives, but let the user extend it with arbitrary constructs layered atop those (but you could avoid intractability situations by always preserving the structure the user specifies, and only going to WYSIWYG-ish display&editing when you can determine (programmatically) how the text in the renderer relates to the text of the construct arguments.

Alternatively, and simpler: you might have two window panes, one in which the user writes Scribble source, and another that gives an almost-live semi-WYSIWYG view of how the source would render. Ideally have the semi-WYSIWYG one approximate UI cues like text cursor point and selection highlighting in the semi-WYSIWG view.

You could start with the latter, and then later implement the former as an alternative mode that user could switch to/from dynamically. This development path would certainly make your GUI-based selection of regions for arbitrary extensible Scribble constructs, and traceability of text between constructs and semi-WYSIWYG, easier to debug. :)

You might decide to implement this within the DrRacket framework, which includes a bunch of GUI and support stuff that you'll need anyway, beyond what the Racket `gui` packages provide.


Jos Koot wrote on 04/29/2017 05:00 PM:
[...]
Indeed I like WYSIWYG,
but nowadays I use scribble too (most scribble/manual)
(frequently rendering in order to see what I get and
looking into the docs in order to see how to get what I want)
A very nice thing of scribble is that you can make
elaborate procedures and syntax transformers,
much easier to write and more flexible and reliable
than Java macros in MS-word, I think.
And, of course, the @interaction[] and companions,
which I don't have in MS-word.
[...]

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to