# Newline in scribble/manual interaction

**URL:** <https://racket.discourse.group/t/newline-in-scribble-manual-interaction/1969>\
**Category:** Questions & Answers\
**Tags:** question\
**Created:** [May 30, 2023, 3:36pm UTC](https://racket.discourse.group/t/newline-in-scribble-manual-interaction/1969 "2023-05-30T15:36:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [May 30, 2023, 3:36pm UTC](https://racket.discourse.group/t/newline-in-scribble-manual-interaction/1969/1 "2023-05-30T15:36:10Z")

</div>

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

```

Yields:  
 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/b/b013ef6b90bc3006e4760ccb2dd1bf69de9a4407.png)

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

---

<div class="post-metadata">

**Author:** ![joeld](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joeld/32/38_2.png) [@joeld](https://racket.discourse.group/u/joeld)\
**Post date:** [May 30, 2023, 4:40pm UTC](https://racket.discourse.group/t/newline-in-scribble-manual-interaction/1969/2 "2023-05-30T16:40:09Z")

</div>

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](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/f/f9ca823fd32c8ca3017a8b7d5b45144bf348951a.png)

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.

---

<div class="post-metadata">

**Author:** ![joskoot](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/joskoot/32/1964_2.png) [@joskoot](https://racket.discourse.group/u/joskoot)\
**Post date:** [May 30, 2023, 5:38pm UTC](https://racket.discourse.group/t/newline-in-scribble-manual-interaction/1969/3 "2023-05-30T17:38:04Z")

</div>

Thanks, that clarifies the cause.

 ![49C29F22FA914E7CA5B25D35AE6EFB5F.png](https://global.discourse-cdn.com/free1/uploads/racket/original/1X/2e839751fd263c2803de1577258c08f5c6235600.png)
