# Format: When is there "no more room on a line"

**URL:** https://discuss.ocaml.org/t/format-when-is-there-no-more-room-on-a-line/12083
**Category:** Learning
**Created:** [May 3, 2023, 9:24am UTC](https://discuss.ocaml.org/t/format-when-is-there-no-more-room-on-a-line/12083 "2023-05-03T09:24:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sid](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/sid/32/1476_2.png) [@sid](https://discuss.ocaml.org/u/sid)
#### Post date: [May 3, 2023, 9:24am UTC](https://discuss.ocaml.org/t/format-when-is-there-no-more-room-on-a-line/12083/1 "2023-05-03T09:24:01Z")

</div>

I’ve been reading [OCaml library : Format\_tutorial](https://v2.ocaml.org/api/Format_tutorial.html) to understand some finer details.

The documentation says in a few places “break hints are used to cut the line when there is no more room on the line”.

How does `Format` know when there is no more room on the line? I’m printing some stuff on the terminal. I’m trying to change the width of the terminal on my desktop, trying to set the terminal width by using `stty cols 40` etc. but I always get stuff on one line for normal box, hov box, hv box.

How do I tell `Format` what width it should assume for a line?

---

<div class="post-metadata">

### Author: ![dbuenzli](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dbuenzli/32/18_2.png) [@dbuenzli](https://discuss.ocaml.org/u/dbuenzli)
#### Post date: [May 3, 2023, 9:44am UTC](https://discuss.ocaml.org/t/format-when-is-there-no-more-room-on-a-line/12083/2 "2023-05-03T09:44:06Z")

</div>

> [@sid](#):
>
> How do I tell `Format` what width it should assume for a line?

Set the right margin with [Format.set\_margin](https://v2.ocaml.org/api/Format.html#1_Margin).
