Re: Vertical alignment in tabulars...
Medon Decker wrote: I'd like to have all cells of a tabular aligned to the top, regardless of the content. The LyX options seem to allow this, but don't work. They're working -- they just don't do what you think they do. I'm pretty sure LaTeX interprets top alignment as the baselines of the first line of text in each column lining up. You want the tops of those first lines to align. AFAIK there's no easy way to do that, but then I'm no TeXpert. I'm attaching a hacked copy of your example that comes close. It uses the multirow package (which allows you to glue vertical cells together) and a bunch of dummy rows in the table. Your second row (first non-header row) now becomes four rows (because the nested table needs four lines). All three columns start at the top, but the middle cell extends two rows deep and the nested table cell extends four rows deep. I did something similar in your last row, but you'll see that I had to resort to some negative vertical space in the left cell and only one extra row (whereas the logical extension of what I did above would use two extra rows, so that the smallest text got one row, the medium text got two and the largest got three). The problem (I think) has to do with the fact that LaTeX inserts vertical space between rows of a table. Ideally, we'd like to turn off interrow gaps between the dummy rows but not between each real row (first row of a block) and its predecessor. You can redefine the spacing (I think by changing \arraystretch), but I don't know if \arraystretch can be set to zero without imploding the universe, and I don't know if you can change it within a table versus before/after the table. Good luck. /Paul newfile7a.lyx Description: application/lyx
Re: Vertical alignment in tabulars...
Medon Decker wrote: I'd like to have all cells of a tabular aligned to the top, regardless of the content. The LyX options seem to allow this, but don't work. They're working -- they just don't do what you think they do. I'm pretty sure LaTeX interprets top alignment as the baselines of the first line of text in each column lining up. You want the tops of those first lines to align. AFAIK there's no easy way to do that, but then I'm no TeXpert. I'm attaching a hacked copy of your example that comes close. It uses the multirow package (which allows you to glue vertical cells together) and a bunch of dummy rows in the table. Your second row (first non-header row) now becomes four rows (because the nested table needs four lines). All three columns start at the top, but the middle cell extends two rows deep and the nested table cell extends four rows deep. I did something similar in your last row, but you'll see that I had to resort to some negative vertical space in the left cell and only one extra row (whereas the logical extension of what I did above would use two extra rows, so that the smallest text got one row, the medium text got two and the largest got three). The problem (I think) has to do with the fact that LaTeX inserts vertical space between rows of a table. Ideally, we'd like to turn off interrow gaps between the dummy rows but not between each real row (first row of a block) and its predecessor. You can redefine the spacing (I think by changing \arraystretch), but I don't know if \arraystretch can be set to zero without imploding the universe, and I don't know if you can change it within a table versus before/after the table. Good luck. /Paul newfile7a.lyx Description: application/lyx
Re: Vertical alignment in tabulars...
Medon Decker wrote: I'd like to have all cells of a tabular aligned to the top, regardless of the content. The LyX options seem to allow this, but don't work. They're working -- they just don't do what you think they do. I'm pretty sure LaTeX interprets top alignment as the baselines of the first line of text in each column lining up. You want the tops of those first lines to align. AFAIK there's no easy way to do that, but then I'm no TeXpert. I'm attaching a hacked copy of your example that comes close. It uses the multirow package (which allows you to glue vertical cells together) and a bunch of dummy rows in the table. Your second row (first non-header row) now becomes four rows (because the nested table needs four lines). All three columns start at the top, but the middle cell extends two rows deep and the nested table cell extends four rows deep. I did something similar in your last row, but you'll see that I had to resort to some negative vertical space in the left cell and only one extra row (whereas the logical extension of what I did above would use two extra rows, so that the smallest text got one row, the medium text got two and the largest got three). The problem (I think) has to do with the fact that LaTeX inserts vertical space between rows of a table. Ideally, we'd like to turn off interrow gaps between the "dummy" rows but not between each real row (first row of a block) and its predecessor. You can redefine the spacing (I think by changing \arraystretch), but I don't know if \arraystretch can be set to zero without imploding the universe, and I don't know if you can change it within a table versus before/after the table. Good luck. /Paul newfile7a.lyx Description: application/lyx
Vertical alignment in tabulars...
Hi there, I know that this is a question which has been answered some times before, but somehow none of the hints work for me (1.5.4). So I would be very thankful if someone could point me to what I'm missing. I'd like to have all cells of a tabular aligned to the top, regardless of the content. The LyX options seem to allow this, but don't work. Any help is greatly appreciated, Medon newfile7.lyx Description: application/lyx
Vertical alignment in tabulars...
Hi there, I know that this is a question which has been answered some times before, but somehow none of the hints work for me (1.5.4). So I would be very thankful if someone could point me to what I'm missing. I'd like to have all cells of a tabular aligned to the top, regardless of the content. The LyX options seem to allow this, but don't work. Any help is greatly appreciated, Medon newfile7.lyx Description: application/lyx
Vertical alignment in tabulars...
Hi there, I know that this is a question which has been answered some times before, but somehow none of the hints work for me (1.5.4). So I would be very thankful if someone could point me to what I'm missing. I'd like to have all cells of a tabular aligned to the top, regardless of the content. The LyX options seem to allow this, but don't work. Any help is greatly appreciated, Medon newfile7.lyx Description: application/lyx