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

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

2 Likes

This is tricky, and the Scribble information is difficult to find, but there are some options described at the end of the table docs, 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.

@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")
)
]
1 Like

Thanks, option with parbox works