3

I converted a workplace form to ConTeXt. It requires a lot of text in some tables, not making much sense, as they are hard to read.

In converting though, it is even harder to read in ConTeXt than in Word, as the words start overlapping into the other columns of the tabulate. Here is a minimum working problem demonstrating the issue:

\starttext
    \starttabulate[|p|p|p|p|p|p|]
        \VL \input knuth \VL \input knuth \VL \input knuth \VL \input knuth \VL \input knuth \VL \input knuth \VL\NR
        \HL
    \stoptabulate
\stoptext

Once compiled, words start overlapping into the wrong column, making it unreadable. The result is my boss can't understand what I wrote.

I use a large hyphenation list, but even the hyphenated words sometime go over the line before being split to the next line. I tried all of the solutions in How to prevent words from running off the edge in ConTeXt?, including trying to adapt the commands to \setuptabulate, etc., yet nothing I attempted would work.

How can I make sure the words never go outside of their column, even if that means ugly typesetting?

5

It is possible to inject setups at the start of each column using the s column specifier:

\starttext

    \startsetups[A]
        \setupalign[verytolerant,extremestretch,morehyphenation]
    \stopsetups
    
    \starttabulate[|ps{A}|ps{A}|ps{A}|ps{A}|ps{A}|ps{A}|]
        \VL \input knuth \VL \input knuth \VL \input knuth \VL \input knuth \VL \input knuth \VL \input knuth \VL\NR
        \HL
    \stoptabulate

\stoptext

enter image description here

3

When you have small columns in a table the default alignment options aren't suitable. To set the alignment in each cell you can use the A keyword and pass a list of options to it. The option accepts all keywords of the \setupalign command.

\starttext

\starttabulate[|*{3}{pA{flushleft,broad}|}]
\VL \input knuth \VL \input knuth \VL \input knuth \VL\NR
\stoptabulate

\stoptext

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.