[NTG-context] linebreaks and cell width in xtables

Rik rik at panix.com
Mon May 5 00:19:05 CEST 2014


On 2014-05-04 15:46, Pablo Rodriguez wrote:
> On 05/04/2014 08:27 PM, Rik Kabel wrote:
>> Any of the following will work here. Which is or are idiomatic I will
>> leave for others to say.
>>
>>      This cell has multiple lines.\\
>>
>>      This cell has multiple lines.\par
>>
>>      This cell has multiple lines.\blank[none]
> Many thanks for your reply, Rik.
>
> I’m afraid none of them works. Here is my sample:
>
> \starttext
>      \startxtable[option=stretch]
>          \startxrow
>              \startxcell
>                  aaa\blank[none]aaa
>              \stopxcell
>              \startxcell
>                  \ConTeXt\ \contextversion
>              \stopxcell
>          \stopxrow
>          \startxrow
>              \startxcell
>                  This cell has multiple lines.
>                  Vertical spacing is wrong.
>              \stopxcell
>              \startxcell
>                  What am I missing?
>              \stopxcell
>          \stopxrow
>      \stopxtable
> \stoptext
>
> I’m using latest beta (2014.04.28 23:24) and the issue happens when
> there is text before and after the break.
>
>
> Pablo
Pablo,

With your example, I get



which shows a problem in row 2. When I add \\ to the first line of text 
in row 2 column 1, as shown here

    \starttext
         \startxtable[option=stretch]
             \startxrow
                 \startxcell
                     aaa\blank[none]aaa
                 \stopxcell
                 \startxcell
                     \ConTeXt\ \contextversion
                 \stopxcell
             \stopxrow
             \startxrow
                 \startxcell
                     This cell has multiple lines.\\
                     Vertical spacing is wrong.
                 \stopxcell
                 \startxcell
                     What am I missing?
                 \stopxcell
             \stopxrow
         \stopxtable
    \stoptext


I get


which perhaps has some faults in the vertical spacing, but is much 
better than the original. The spacing can be improved by specifying 
[align=lohi] for that cell.

I get the same result with the other two methods I suggested. Is there a 
reason that you cannot use one of these methods in row 2 as you do in row 1?

Perhaps we would all benefit from an obeylines alignment option?

-- 
Rik Kabel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140504/5b6fec1b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fdbgicad.png
Type: image/png
Size: 7684 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140504/5b6fec1b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jajfgfjj.png
Type: image/png
Size: 7832 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140504/5b6fec1b/attachment-0003.png>


More information about the ntg-context mailing list