# How to make automatic line break in scribble tabular for latex target?

**URL:** <https://racket.discourse.group/t/how-to-make-automatic-line-break-in-scribble-tabular-for-latex-target/597>\
**Category:** Questions & Answers\
**Tags:** scribble\
**Created:** [January 19, 2022, 1:12pm UTC](https://racket.discourse.group/t/how-to-make-automatic-line-break-in-scribble-tabular-for-latex-target/597 "2022-01-19T13:12:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![venartas](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@venartas](https://racket.discourse.group/u/venartas)\
**Post date:** [January 19, 2022, 1:12pm UTC](https://racket.discourse.group/t/how-to-make-automatic-line-break-in-scribble-tabular-for-latex-target/597/1 "2022-01-19T13:12:35Z")

</div>

Hi,

How to enforce line breaks using scribble tabular in order to fit table content into pdf page?

@tabular[  
#:column-properties '(left)  
#:row-properties '(border)  
(list (list @bold{ColName1} @bold{ColName2} @bold{ColName3} @bold{ColName4})  
(list "AAAAAAAAAAAAAAAA\_BBBBBBBBBBBBBBBBB\_CCCCCCCCCCCCCCCCC\_DDDDDDDDDDDDDD\_ETC" "Value2" "Value3" "Value4")  
)  
]

Thanks,  
Arturas

---

<div class="post-metadata">

**Author:** ![mflatt](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/mflatt/32/6_2.png) [@mflatt](https://racket.discourse.group/u/mflatt)\
**Post date:** [January 19, 2022, 2:20pm UTC](https://racket.discourse.group/t/how-to-make-automatic-line-break-in-scribble-tabular-for-latex-target/597/2 "2022-01-19T14:20:20Z")

</div>

This is tricky, and the Scribble information is difficult to find, but there are some options described at the end of the [`table` docs](https://docs.racket-lang.org/scribble/core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._table%29%29), where `tabular` creates a `table`.

If your cell content has places where LaTeX is willing to break lines, the easiest option is propbably to use "parbox{_width_}" (with some measurement in place of _width_) as a style name string, because that's treated as a LaTeX macro for PDF output.

```scheme
@tabular[
#:column-properties '(left)
#:row-properties '(border)
(list (list @bold{ColName1} @bold{ColName2} @bold{ColName3} @bold{ColName4})
(list (elem #:style "parbox{3in}" "AAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCC DDDDDDDDDDDDDD ETC")
      "Value2" "Value3" "Value4")
)
]

```

---

<div class="post-metadata">

**Author:** ![venartas](https://avatars.discourse-cdn.com/v4/letter/v/e19adc/32.png) [@venartas](https://racket.discourse.group/u/venartas)\
**Post date:** [January 20, 2022, 3:03pm UTC](https://racket.discourse.group/t/how-to-make-automatic-line-break-in-scribble-tabular-for-latex-target/597/3 "2022-01-20T15:03:35Z")

</div>

> [@mflatt](#):
>
> `elem #:style "parbox{3in}" `

Thanks, option with parbox works
