On Tue, Mar 3, 2015 at 10:55 AM, Csikos Bela <bcsikos...@freemail.hu> wrote:
> Hello: > > I would like to make a landscape longtable in Lyx. > I'd like to make a formal table with header, but I want only one separator > line between the header and the following row. I attached an example table > (MWE) in lyx and the pdf output. > > This table has the following problems: > > 1. On some pages the bottom line of the last row isn't shown, eg. below > rows I and P. > 2. Row A is repeated on every page. > 3. Row A has double bottom lines on pages 2 and 3. In table settings all > rows are set the same: bottom line is on, top line is off; except for the > very first row which has both top and bottom lines on. > > How can I fix these? > > The separators go where you tell them to...maybe it will make more sense if I try to explain this in the context of your example, and how to fix the problems you outlined. I will answer them out of order, though so I hope you don't mind. 2) LyX sets the rows as headers that you tell it to. This is done by going into a row, and right-clicking. You can see the row's settings under "Row Settings" in the longtable tab. In your case, you had both the first and second rows set as header rows. When I downloaded your example, and deselected the header row checkbox for the second row, it only uses the first row as a header. Problem 2 solved. 3) Once we understand the above, that should help here. The reason you have two separator lines is because on the header row, you have the row set to have a border below the row. So, everywhere the header row appears, it sets a border below. That's why you see a border below for that, and also the border for the row it was displaying anyway. So, remove the border below on the the header row, and only use a border above on your other rows, and that will fix things. 1) This one is the most complicated, and it has to do with something about how the rows behave. For some reason which makes no sense to me, the page breaking behaves such that a row may print the contents on one page, but the border below on another (or print the border above on the previous page, but the contents on the next). Fortunately, this (strange) behavior can be controlled by manually telling the table where to break pages. This is done by right-clicking in a row, and within the table settings, selecting the checkbox by "Page break on current row." That makes the behavior predictable, which is nice. Then, you have to put two borders, one below the current row, and one above the next (so there is a separation between the row header and the first row that appears under that on the page). There are other combinations of specifying where the cell borders go to get what you want, but once one understands how LyX and longtable treat things, it becomes possible. > The attached files were made by lyx 2.0.6 in linux. > > Thanks, > > bcsikos Please see attached files for revised LyX input and .pdf output...produced by LyX 2.0.8.1 in Linux Mint 17.1. I hope this helps...I learned most of it by examining the longtable in LyX's Embedded Objects manual, and experimenting with the settings. Jacob
Longtable-example.lyx
Description: application/lyx
Longtable-example.pdf
Description: Adobe PDF document