Caution: I haven’t tried your code yet. I think Scribble uses source location equipped with syntax objects to figure out spacing. Since you generate stuff on the fly, there’s no source location, so the rendered text is screwed up.
An idea I have (which might not work) is to use write / pretty-write on the generated code to a string port, and then read-syntax it back. That way, you get the source locations correctly. On Wed, Sep 23, 2020 at 4:17 PM Sage Gerard <s...@sagegerard.com> wrote: > I attached an image showing the rendered output of > https://github.com/zyrolasting/xiden/blob/master/docs/reference/settings.scrbl#L48 > > I create an application to `(defthing)` as a datum due to circumstances > in the surrounding code. The hacky part being `get-contract-datum`, which > tries to produce a datum usable as a contract expression. I'm assuming that > this leaves no whitespace to preserve, so how do I modify a syntax object > to include space in desired spots? > > *~slg* > > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/ulye9ZNaZmcspsE7fqy6ctobuGcF21jQvGQ4-PG2Eynt09KBU9AbF_kP9UZ_OgouhcvBOF8JLbaCJpVbnve-6RF_E752tVqp-xR9Va3oRsE%3D%40sagegerard.com > <https://groups.google.com/d/msgid/racket-users/ulye9ZNaZmcspsE7fqy6ctobuGcF21jQvGQ4-PG2Eynt09KBU9AbF_kP9UZ_OgouhcvBOF8JLbaCJpVbnve-6RF_E752tVqp-xR9Va3oRsE%3D%40sagegerard.com?utm_medium=email&utm_source=footer> > . > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CADcuegt9o08A1PV_f%3DKg2G_%3DAVYor5M%2BWm5pRJXA0Zdi_%2BMqHQ%40mail.gmail.com.