I'm not sure if I'm the best one to answer these, but here are my attempts.
On Mon, Jul 15, 2019 at 4:38 PM Hendrik Boom <
hen...@topoi.pooq.com> wrote:
>
> I'm thinking of trying Scribble again now that I have a new computer.
> I found it unacceptably slow years ago when I tried it on a 80,000 word novel.
> I now, however, have a modern machine and it may be fast enough.
>
> I have a few questions before I convert *everything* I'm doing to scribble.
> Each of these questions are relevant to a particular planned use. The more of
> them have positive answers, the more projects I'll be able to
> scribblify.
>
> (1) How does scribble handle mathematical notation? Presumably there's a hack
> for when I'm generating TeX, but is there anything reasonable when generating
> HTML? Mathjax is somewhat tolerable, but mathML would be nice.
That is an area that could use some help in Scribble land for now.
Something that went into mathjax and latex would be great. Maybe
others have libraries that are useful here?
> (2) How can I produce category-theoretical diagrams, such as the one on top of
> page 29 in section 3.7 in the pdf file
>
https://www.logicmatters.net/resources/pdfs/GentleIntro.pdf
> Oh yes, category theorists also use different shapes of arrow
> heads and tails just to challenge us computer people.
Maybe a library on top of pict?
> (3) Are there practical ways of including images whose source code might be
> jpegs ot pngs?
Yes, sure. Any pict (or pict-convertible) can jus tbe dropped anywhere
in a scribble document that The Right Thing happens. They will be
either pngs or svg in the html output depending on how you call
scribble (e.g., via the command-line arguments).
Maybe Racket's `include`? You can also just call functions that return
text, of course.
x.rkt:
#lang at-exp racket
(define my-favorite-paragraph @{some text here})
y.rkt:
#lang scribble/base
@(require "x.rkt")
@my-favorite-paragaph
> (5) How can I make text conditional on the presence or absence of a
> command-line parameter of the value of a global variable?
Just use regular racket for this kind of thing.
> (6) How do I achieve precise, line-by-line control of indentation for poetry?
This might require you to set up a specific thing for Scribble to
generate in each of its backends and then call into it.
https://docs.racket-lang.org/scribble/config.html
I thin you probably want to make a very small thing at that layer and
then build an abstraction on top of it in Racket/scribble to use it.
Probably others have better experience here, tho.
Robby
> -- hendrik
>
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/20190715213817.ijeovk5hs5vifgs4%40topoi.pooq.com.