Newline in scribble/manual interaction

#lang scribble/manual
@(require scribble/eval)
@interaction['aap (newline) (printf " ~n") 'noot]

Yields:
image

No newline written. Not a big problem, I can write (printf " n").

Keep in mind (newline) is equivalent to (write-char #\newline). Both write-char and printf fail to produce an empty line in the HTML output unless the newline is preceded by at least one other character:

image

I think interaction uses newline characters in the output to delimit table rows in the HTML output (rather than, say, converting them to <br>). This means an expression whose only result is a newline character produces, in the HTML, essentially <tr><p><span></span></p></tr> (omitting attributes) which makes the table row 0px in height. The addition of a single space gives the row some content which in turn gives it non-zero height.

1 Like

Thanks, that clarifies the cause.