Re: Longtable problem

2015-03-04 Thread Csikos Bela
Jacob Bishop bisho...@byui.edu írta:
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#39;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#39;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#39;t mind.

Thank you for the thorough answer.

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#39;s settings under 
quot;Row Settingsquot; 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.

OK, I see.

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#39;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.

I think this is not correct, it doesn't explain why I have the double lines. I 
also investigated this in the meantime. Note, that all my rows, except the 
header, have only bottom rule. 
That is, the row following the header has only bottom rule as well, it's top 
rule practically is the bottom rule that belongs to the header. What I think 
that the bottom rule of the last row in the previous page is pushed to the next 
page under the header. I also found that this occurs only when I use formal 
table: it seems booktabs and longtable packages do not work well together. This 
explains why I have only doubles on pages following missing bottom rules in the 
previous page.

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).

Yes, this is what I wrote above.

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 quot;Page break on 
current row.quot; That makes the behavior predictable, which is nice. 

Yes, manual page break can prevent pushing the last bottom rule to the next 
page if I specify the previous row for page breaking. 

Thanks again!

bcsikos



Re: Longtable problem

2015-03-04 Thread Csikos Bela
Jacob Bishop bisho...@byui.edu írta:
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#39;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#39;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#39;t mind.

Thank you for the thorough answer.

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#39;s settings under 
quot;Row Settingsquot; 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.

OK, I see.

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#39;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.

I think this is not correct, it doesn't explain why I have the double lines. I 
also investigated this in the meantime. Note, that all my rows, except the 
header, have only bottom rule. 
That is, the row following the header has only bottom rule as well, it's top 
rule practically is the bottom rule that belongs to the header. What I think 
that the bottom rule of the last row in the previous page is pushed to the next 
page under the header. I also found that this occurs only when I use formal 
table: it seems booktabs and longtable packages do not work well together. This 
explains why I have only doubles on pages following missing bottom rules in the 
previous page.

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).

Yes, this is what I wrote above.

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 quot;Page break on 
current row.quot; That makes the behavior predictable, which is nice. 

Yes, manual page break can prevent pushing the last bottom rule to the next 
page if I specify the previous row for page breaking. 

Thanks again!

bcsikos



Re: Longtable problem

2015-03-04 Thread Csikos Bela
Jacob Bishop  írta:
>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.
>Id 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 isnt 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 
>dont mind.

Thank you for the thorough answer.

>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 rows 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.

OK, I see.

>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. Thats 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.

I think this is not correct, it doesn't explain why I have the double lines. I 
also investigated this in the meantime. Note, that all my rows, except the 
header, have only bottom rule. 
That is, the row following the header has only bottom rule as well, it's top 
rule practically is the bottom rule that belongs to the header. What I think 
that the bottom rule of the last row in the previous page is pushed to the next 
page under the header. I also found that this occurs only when I use formal 
table: it seems booktabs and longtable packages do not work well together. This 
explains why I have only doubles on pages following missing bottom rules in the 
previous page.

>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).

Yes, this is what I wrote above.

>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. 

Yes, manual page break can prevent pushing the last bottom rule to the next 
page if I specify the previous row for page breaking. 

Thanks again!

bcsikos



Re: Longtable problem

2015-03-03 Thread Wolfgang Engelmann


Am 03.03.2015 um 18:55 schrieb Csikos Bela:

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 attached files were made by lyx 2.0.6 in linux.

Thanks,

bcsikos


Have you should check the tex source (viewlatex source) closely? Do 
you find any cue?

\midrule

\textsf{\small{}}  \textsf{\small{}I  I 
I III II


III  III  II II}  \textsf{\small{}I 
 I I III II


III  III  II II}  \textsf{\small{}}  
\textsf{\small{}}\tabularnewline


\midrule

\textsf{\small{}}  \textsf{\small{}J JJ JJJ JJ 
J JJJ J


J JJ JJ}  \textsf{\small{}J JJ JJJ JJ 
J JJJ J}  \textsf{\small{}}  
\textsf{\small{}}\tabularnewline


\midrule

Wolfgang



Re: Longtable problem

2015-03-03 Thread Csikos Bela
Wolfgang Engelmann írta:
   
Am 03.03.2015 um 18:55 schrieb Csikos
  Bela:


  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 attached files were made by lyx 2.0.6 in linux.

Thanks,

bcsikos


Have
  you should check the tex source (viewlatex source)
  closely? Do you find any cue? 
  \midrule
\textsf{\small{}}
  amp; \textsf{\small{}I  I I
  III II
III
   III  II II} amp;
  \textsf{\small{}I  I I III
  II
III
   III  II II} amp; \textsf{\small{}}
  amp; \textsf{\small{}}\tabularnewline
\midrule
\textsf{\small{}}
  amp; \textsf{\small{}J JJ JJJ JJ J
  JJJ J
J
  JJ JJ} amp; \textsf{\small{}J JJ JJJ
  JJ J JJJ J} amp; \textsf{\small{}} amp;
  \textsf{\small{}}\tabularnewline
\midrule

If I understand correctly the \midrule is moved to the next page beacuse it is 
after \tabularnewline, and it is placed below the header which must be on top. 
Is this correct? Or is it moved because there is not enough room for it on the 
page?

But how can I prevent this? When I make the table in lyx/latex I cannot predict 
how many
rows will fit a page.  I dont't see either how I can fix this. If I remove the 
bottom rule from row I, the duplicated rules won't show above row J. But I 
still won't have the rule below row I. How can I make the bottom rule stuck to 
row I?

Thanks,

bcsikos


Re: Longtable problem

2015-03-03 Thread Csikos Bela
Csikos Bela írta:
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.

Looking at the source I see that lyx specifies the first two rows as header; 
\endhead is inserted after row A. How can I set lyx to use only the first row 
as header? 

Thanks,

bcsikos




Re: Longtable problem

2015-03-03 Thread Jacob Bishop
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


Re: Longtable problem

2015-03-03 Thread Wolfgang Engelmann


Am 03.03.2015 um 18:55 schrieb Csikos Bela:

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 attached files were made by lyx 2.0.6 in linux.

Thanks,

bcsikos


Have you should check the tex source (viewlatex source) closely? Do 
you find any cue?

\midrule

\textsf{\small{}}  \textsf{\small{}I  I 
I III II


III  III  II II}  \textsf{\small{}I 
 I I III II


III  III  II II}  \textsf{\small{}}  
\textsf{\small{}}\tabularnewline


\midrule

\textsf{\small{}}  \textsf{\small{}J JJ JJJ JJ 
J JJJ J


J JJ JJ}  \textsf{\small{}J JJ JJJ JJ 
J JJJ J}  \textsf{\small{}}  
\textsf{\small{}}\tabularnewline


\midrule

Wolfgang



Re: Longtable problem

2015-03-03 Thread Csikos Bela
Wolfgang Engelmann írta:
   
Am 03.03.2015 um 18:55 schrieb Csikos
  Bela:


  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 attached files were made by lyx 2.0.6 in linux.

Thanks,

bcsikos


Have
  you should check the tex source (viewlatex source)
  closely? Do you find any cue? 
  \midrule
\textsf{\small{}}
  amp; \textsf{\small{}I  I I
  III II
III
   III  II II} amp;
  \textsf{\small{}I  I I III
  II
III
   III  II II} amp; \textsf{\small{}}
  amp; \textsf{\small{}}\tabularnewline
\midrule
\textsf{\small{}}
  amp; \textsf{\small{}J JJ JJJ JJ J
  JJJ J
J
  JJ JJ} amp; \textsf{\small{}J JJ JJJ
  JJ J JJJ J} amp; \textsf{\small{}} amp;
  \textsf{\small{}}\tabularnewline
\midrule

If I understand correctly the \midrule is moved to the next page beacuse it is 
after \tabularnewline, and it is placed below the header which must be on top. 
Is this correct? Or is it moved because there is not enough room for it on the 
page?

But how can I prevent this? When I make the table in lyx/latex I cannot predict 
how many
rows will fit a page.  I dont't see either how I can fix this. If I remove the 
bottom rule from row I, the duplicated rules won't show above row J. But I 
still won't have the rule below row I. How can I make the bottom rule stuck to 
row I?

Thanks,

bcsikos


Re: Longtable problem

2015-03-03 Thread Csikos Bela
Csikos Bela írta:
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.

Looking at the source I see that lyx specifies the first two rows as header; 
\endhead is inserted after row A. How can I set lyx to use only the first row 
as header? 

Thanks,

bcsikos




Re: Longtable problem

2015-03-03 Thread Jacob Bishop
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


Re: Longtable problem

2015-03-03 Thread Wolfgang Engelmann


Am 03.03.2015 um 18:55 schrieb Csikos Bela:

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 attached files were made by lyx 2.0.6 in linux.

Thanks,

bcsikos


Have you should check the tex source (>view>latex source) closely? Do 
you find any cue?

\midrule

\textsf{\small{}} & \textsf{\small{}I  I 
I III II


III  III  II II} & \textsf{\small{}I 
 I I III II


III  III  II II} & \textsf{\small{}} & 
\textsf{\small{}}\tabularnewline


\midrule

\textsf{\small{}} & \textsf{\small{}J JJ JJJ JJ 
J JJJ J


J JJ JJ} & \textsf{\small{}J JJ JJJ JJ 
J JJJ J} & \textsf{\small{}} & 
\textsf{\small{}}\tabularnewline


\midrule

Wolfgang



Re: Longtable problem

2015-03-03 Thread Csikos Bela
Wolfgang Engelmann írta:
>   
>Am 03.03.2015 um 18:55 schrieb Csikos
>  Bela:
>
>
>  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 attached files were made by lyx 2.0.6 in linux.
>
>Thanks,
>
>bcsikos
>
>
>Have
>  you should check the tex source (>view>latex source)
>  closely? Do you find any cue? 
>  \midrule
>\textsf{\small{}}
>   \textsf{\small{}I  I I
>  III II
>III
>   III  II II} 
>  \textsf{\small{}I  I I III
>  II
>III
>   III  II II}  \textsf{\small{}}
>   \textsf{\small{}}\tabularnewline
>\midrule
>\textsf{\small{}}
>   \textsf{\small{}J JJ JJJ JJ J
>  JJJ J
>J
>  JJ JJ}  \textsf{\small{}J JJ JJJ
>  JJ J JJJ J}  \textsf{\small{}} 
>  \textsf{\small{}}\tabularnewline
>\midrule

If I understand correctly the \midrule is moved to the next page beacuse it is 
after \tabularnewline, and it is placed below the header which must be on top. 
Is this correct? Or is it moved because there is not enough room for it on the 
page?

But how can I prevent this? When I make the table in lyx/latex I cannot predict 
how many
rows will fit a page.  I dont't see either how I can fix this. If I remove the 
bottom rule from row I, the duplicated rules won't show above row J. But I 
still won't have the rule below row I. How can I make the bottom rule stuck to 
row I?

Thanks,

bcsikos


Re: Longtable problem

2015-03-03 Thread Csikos Bela
Csikos Bela írta:
>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.

Looking at the source I see that lyx specifies the first two rows as header; 
\endhead is inserted after row A. How can I set lyx to use only the first row 
as header? 

Thanks,

bcsikos




Re: Longtable problem

2015-03-03 Thread Jacob Bishop
On Tue, Mar 3, 2015 at 10:55 AM, Csikos Bela  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