1

I didn't find a solution to this problem in the Lyx documentation.

I have created a table in Lyx (outside of a float), and it need to span multiple pages and posses a 2 line header on each subsequent page.

What is the best way to do this.

David

5
  • I'm not sure if the documentation covered your specific case, but longtables are discussed in the User Guide, Section 4.5.2 Multi-page Tables. (note that you can search all LyX manuals with Advanced Find).
    – scottkosty
    Sep 4, 2016 at 15:57
  • Indeed it discusses longtable, but never gives any details of how to use more than a single row to create a header. At the first instance it broke the presentation by placing the rows in the wrong order. It took a bit of experimentations and I guess I was just not correctly selecting the rows or something. Mostly I would like for other to know that this is possible so they would at least keep persevering. I expect it is easier to do directly in tex. But I found creating a table in tex into an ERT section created errors when trying to create the pdf.
    – DaveM
    Sep 5, 2016 at 10:05
  • Makes sense! If you ever have suggestions for improving the documentation (especially if you are willing to actually contribute proposed text, such as what you wrote in your answer), we are always interested in improving the documentation. If so, please write to [email protected] and mention specifically what you think is not clear and how it could be improved. Check in on the list like this before spending the time to write something (because there might be disagreement about your proposal).
    – scottkosty
    Sep 5, 2016 at 13:11
  • right now I don't have the time (but I'm still here on SO, go figure !), that and the need to register, log in, make a change... probably have a long email conversation about my change... <sigh>. But yes I agree I should. ;)
    – DaveM
    Sep 5, 2016 at 14:42
  • no problem at all. I understand it is a significant time commitment. In any case, thanks for detailing the solution to your problem so if anyone else comes across it and google's they will find this post.
    – scottkosty
    Sep 5, 2016 at 15:08

1 Answer 1

5

So this was much easier than I expected.

First you add the table outside of a 'float' environment (floats are made to only fit on a single page).

Then select all the cells in the table (otherwise it did't seem to work in my instance ?. Right click -> More -> Settings. This open the table dialog box, the 3rd tab is for longtable settings. Select it.

Now for each line that you would like to appear as a header on every page. Select the first cell in the row. Again go to the right click -> More -> Settings (longtable tab).

Select the 2 options for 'Header' and 'First row'. Now do the same for the next rows in that you want to have as a heading.

Unfortunately this isn't the obvious course of affairs. But is in fact fairly obvious... when you realise it.

I initially selected both the lines at a time (Which didn't work).

Hope this helps someone else.

David

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .