Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Scott Kostyshak wrote:
 On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons varro@nodomain.invalid wrote:
 I have a table in which I wish some cells to contain multiple
 paragraphs.  I can apparently create separate paragraphs by the normal
 method of hitting Enter, at least as far as it appears within LyX, but
 when I attempt to export to PDF I get a series of errors beginning
 with:

   Paragraph ended before \@item was complete.

 and the last three words of the first paragraph are highlighted.

 This is with LyX 2.1.0 under FreeBSD.

 I'm including a stripped down version of the problem LyX file below.

 Hi Will,

 Thanks for reporting this. I tried your example and indeed I get an
 error when compiling. However if I change the layout from
 Description to Standard (place the cursor in front of the table,
 and do alt + p, s) then the file compiles fine. Note that the reason
 you can enter lines is because in that column you have a fixed width.

 I don't know enough about tables or long tables in LaTeX to know if
 there is a LyX bug here.

Thanks, that seems to have partially solved the problem.  Partially,
because although I can now export to PDF without an error, the
paragraphs are not separated by a space as they are in the main body
of the text.  (The stripped down test file I posted doesn't have any
text outside the table, but it's apparent in the real document.)

Although my preferred style for separating paragraphs is by using a
blank line, I changed it to the default way of using indentation to
see what would happen, and indeed the paragraphs inside the table cell
are displayed the same, i.e., no separation or indentation.  Is there
a fundamental problem with using paragraphs inside a table?  (I notice
that while the main text outside the table shows up as Standard
style, the text inside the table shows as Plain Layout, and
Standard does not seem to be available.)

I suppose it might be possible to get around this by placing
individual paragraphs in separate table cells and selectively
suppressing cell boundary lines, but that sounds awfully fiddly.

Anyway, I don't think I'd have figured out how to get this far from the
error messages, so whether there's a bug or not in LyX, I think there
is room for improvement in error handling.  Thanks for the pointer.

-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 3:28 PM, Will Parsons varro@nodomain.invalid wrote:
 Scott Kostyshak wrote:
 On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons varro@nodomain.invalid wrote:
 I have a table in which I wish some cells to contain multiple
 paragraphs.  I can apparently create separate paragraphs by the normal
 method of hitting Enter, at least as far as it appears within LyX, but
 when I attempt to export to PDF I get a series of errors beginning
 with:

   Paragraph ended before \@item was complete.

 and the last three words of the first paragraph are highlighted.

 This is with LyX 2.1.0 under FreeBSD.

 I'm including a stripped down version of the problem LyX file below.

 Hi Will,

 Thanks for reporting this. I tried your example and indeed I get an
 error when compiling. However if I change the layout from
 Description to Standard (place the cursor in front of the table,
 and do alt + p, s) then the file compiles fine. Note that the reason
 you can enter lines is because in that column you have a fixed width.

 I don't know enough about tables or long tables in LaTeX to know if
 there is a LyX bug here.

 Thanks, that seems to have partially solved the problem.  Partially,
 because although I can now export to PDF without an error, the
 paragraphs are not separated by a space as they are in the main body
 of the text.  (The stripped down test file I posted doesn't have any
 text outside the table, but it's apparent in the real document.)

 Although my preferred style for separating paragraphs is by using a
 blank line, I changed it to the default way of using indentation to
 see what would happen, and indeed the paragraphs inside the table cell
 are displayed the same, i.e., no separation or indentation.  Is there
 a fundamental problem with using paragraphs inside a table?  (I notice
 that while the main text outside the table shows up as Standard
 style, the text inside the table shows as Plain Layout, and
 Standard does not seem to be available.)

 I suppose it might be possible to get around this by placing
 individual paragraphs in separate table cells and selectively
 suppressing cell boundary lines, but that sounds awfully fiddly.

Another idea is to use a minipage. Go to Insert  Box  Frameless.
Then try putting vertical space in (Insert  Formatting  Vertical
Space).


 so whether there's a bug or not in LyX, I think there
 is room for improvement in error handling.

Sounds good. Please post any bug or feature request on http://www.lyx.org/trac
and if you are interested in contributing a patch, that would of
course be welcome too.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Scott Kostyshak wrote:
 On Tue, Jul 15, 2014 at 3:28 PM, Will Parsons varro@nodomain.invalid wrote:
 Thanks, that seems to have partially solved the problem.  Partially,
 because although I can now export to PDF without an error, the
 paragraphs are not separated by a space as they are in the main body
 of the text.  (The stripped down test file I posted doesn't have any
 text outside the table, but it's apparent in the real document.)

 Although my preferred style for separating paragraphs is by using a
 blank line, I changed it to the default way of using indentation to
 see what would happen, and indeed the paragraphs inside the table cell
 are displayed the same, i.e., no separation or indentation.  Is there
 a fundamental problem with using paragraphs inside a table?  (I notice
 that while the main text outside the table shows up as Standard
 style, the text inside the table shows as Plain Layout, and
 Standard does not seem to be available.)

 I suppose it might be possible to get around this by placing
 individual paragraphs in separate table cells and selectively
 suppressing cell boundary lines, but that sounds awfully fiddly.

 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

Well, it sounded promising, but...

Yes, it does succeed in separating the paragraphs, but the text of the
paragraph in the box spills out of the bounds of the table when
converted to PDF.  Ouch!

 so whether there's a bug or not in LyX, I think there
 is room for improvement in error handling.

 Sounds good. Please post any bug or feature request on http://www.lyx.org/trac
 and if you are interested in contributing a patch, that would of
 course be welcome too.

I will if I can come up with a reasonable formulation.  Please
improve error handling seems to be a bit too vague to expect anyone
to act on :)

As for contributing a patch, well, I do have extensive experience with
C, and to a lesser extent C++ (though my C++ is a bit rusty now), but
I know nothing about LaTeX, and have never looked at the LyX code base.

-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Scott Kostyshak writes:
 
 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

No, this will not work because in a tabular environment \parskip is
reset (actually, even \par is redefined). You have to insert
\setlength{\parskip}{\bigskipamount}
in ERT at the start of the cell.

-- 
Enrico




Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Will Parsons writes:
 
 Yes, it does succeed in separating the paragraphs, but the text of the
 paragraph in the box spills out of the bounds of the table when
 converted to PDF.  Ouch!

You have to adjust the width of the minipage.

-- 
Enrico



Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Enrico Forestieri wrote:
 Scott Kostyshak writes:
 
 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.

I can't say I'm delighted at this solution, since it seems like a bit
of magic (I didn't even know what ERT was), but it *does* work.  So,
thank you - I think my problem is solved (even if in not quite the
straightforward way I would have liked).


-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Enrico Forestieri writes:
 
 Scott Kostyshak writes:
  
  Another idea is to use a minipage. Go to Insert  Box  Frameless.
  Then try putting vertical space in (Insert  Formatting  Vertical
  Space).
 
 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.
 

Sorry, I should have read until the end and not simply stopping at the
minipage suggestion. Yes, that would be another way, but reestablishing
the parskip is more handy.

-- 
Enrico



Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 5:37 PM, Will Parsons varro@nodomain.invalid wrote:

 Sounds good. Please post any bug or feature request on 
 http://www.lyx.org/trac
 and if you are interested in contributing a patch, that would of
 course be welcome too.

 I will if I can come up with a reasonable formulation.  Please
 improve error handling seems to be a bit too vague to expect anyone
 to act on :)

Good point. That's the hard part of a good bug report.

 As for contributing a patch, well, I do have extensive experience with
 C, and to a lesser extent C++ (though my C++ is a bit rusty now), but
 I know nothing about LaTeX, and have never looked at the LyX code base.

Well, if you are ever interested, please feel free to ask any
questions on the developer's list (lyx-de...@lists.lyx.org).

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:22 PM, Will Parsons varro@nodomain.invalid wrote:
 Enrico Forestieri wrote:
 Scott Kostyshak writes:

 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.

Thanks for the correction, Enrico.

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Scott Kostyshak writes:
 
 Thanks for the correction, Enrico.

Actually, it's me who should stand corrected ;)

-- 
Enrico





Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Will Parsons varro at nodomain.invalid writes:
 
 Enrico Forestieri wrote:
  Scott Kostyshak writes:
  
  Another idea is to use a minipage. Go to Insert  Box  Frameless.
  Then try putting vertical space in (Insert  Formatting  Vertical
  Space).
 
  No, this will not work because in a tabular environment \parskip is
  reset (actually, even \par is redefined). You have to insert
  \setlength{\parskip}{\bigskipamount}
  in ERT at the start of the cell.
 
 I can't say I'm delighted at this solution, since it seems like a bit
 of magic (I didn't even know what ERT was), but it *does* work.  So,
 thank you - I think my problem is solved (even if in not quite the
 straightforward way I would have liked).

If you are concerned about the open ERT, you could close it or, if you
don't want to even see it, I can suggest some other dark magic ;)
Place the cursor in the cell and open the table settings.
In the text field of the LaTeX argument entry, insert
  {\setlength{\parskip}{\bigskipamount}}p{4in}
and then apply.
Change \bigskipamount and 4in (this is the cell width) as you like.
This has the added advantage that you paragraphs will also be justified.

-- 
Enrico





Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:24 PM, Enrico Forestieri for...@lyx.org wrote:
 Enrico Forestieri writes:

 Scott Kostyshak writes:
 
  Another idea is to use a minipage. Go to Insert  Box  Frameless.
  Then try putting vertical space in (Insert  Formatting  Vertical
  Space).

 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.


 Sorry, I should have read until the end and not simply stopping at the
 minipage suggestion. Yes, that would be another way, but reestablishing
 the parskip is more handy.

Yes, that seems better.

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:53 PM, Enrico Forestieri for...@lyx.org wrote:
 Will Parsons varro at nodomain.invalid writes:

 I can't say I'm delighted at this solution, since it seems like a bit
 of magic (I didn't even know what ERT was), but it *does* work.  So,
 thank you - I think my problem is solved (even if in not quite the
 straightforward way I would have liked).

In addition to what Enrico said for this specific solution, more
generally I would like to add that you will likely need ERT sooner or
later. LaTeX is such a powerful and flexible language and LyX only
uses part of it.

You might be interested in reading the LyX manuals. You can access
them in Help  ... They explain ERT and get into further details if
you're interested.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Scott Kostyshak wrote:
 On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons varro@nodomain.invalid wrote:
 I have a table in which I wish some cells to contain multiple
 paragraphs.  I can apparently create separate paragraphs by the normal
 method of hitting Enter, at least as far as it appears within LyX, but
 when I attempt to export to PDF I get a series of errors beginning
 with:

   Paragraph ended before \@item was complete.

 and the last three words of the first paragraph are highlighted.

 This is with LyX 2.1.0 under FreeBSD.

 I'm including a stripped down version of the problem LyX file below.

 Hi Will,

 Thanks for reporting this. I tried your example and indeed I get an
 error when compiling. However if I change the layout from
 Description to Standard (place the cursor in front of the table,
 and do alt + p, s) then the file compiles fine. Note that the reason
 you can enter lines is because in that column you have a fixed width.

 I don't know enough about tables or long tables in LaTeX to know if
 there is a LyX bug here.

Thanks, that seems to have partially solved the problem.  Partially,
because although I can now export to PDF without an error, the
paragraphs are not separated by a space as they are in the main body
of the text.  (The stripped down test file I posted doesn't have any
text outside the table, but it's apparent in the real document.)

Although my preferred style for separating paragraphs is by using a
blank line, I changed it to the default way of using indentation to
see what would happen, and indeed the paragraphs inside the table cell
are displayed the same, i.e., no separation or indentation.  Is there
a fundamental problem with using paragraphs inside a table?  (I notice
that while the main text outside the table shows up as Standard
style, the text inside the table shows as Plain Layout, and
Standard does not seem to be available.)

I suppose it might be possible to get around this by placing
individual paragraphs in separate table cells and selectively
suppressing cell boundary lines, but that sounds awfully fiddly.

Anyway, I don't think I'd have figured out how to get this far from the
error messages, so whether there's a bug or not in LyX, I think there
is room for improvement in error handling.  Thanks for the pointer.

-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 3:28 PM, Will Parsons varro@nodomain.invalid wrote:
 Scott Kostyshak wrote:
 On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons varro@nodomain.invalid wrote:
 I have a table in which I wish some cells to contain multiple
 paragraphs.  I can apparently create separate paragraphs by the normal
 method of hitting Enter, at least as far as it appears within LyX, but
 when I attempt to export to PDF I get a series of errors beginning
 with:

   Paragraph ended before \@item was complete.

 and the last three words of the first paragraph are highlighted.

 This is with LyX 2.1.0 under FreeBSD.

 I'm including a stripped down version of the problem LyX file below.

 Hi Will,

 Thanks for reporting this. I tried your example and indeed I get an
 error when compiling. However if I change the layout from
 Description to Standard (place the cursor in front of the table,
 and do alt + p, s) then the file compiles fine. Note that the reason
 you can enter lines is because in that column you have a fixed width.

 I don't know enough about tables or long tables in LaTeX to know if
 there is a LyX bug here.

 Thanks, that seems to have partially solved the problem.  Partially,
 because although I can now export to PDF without an error, the
 paragraphs are not separated by a space as they are in the main body
 of the text.  (The stripped down test file I posted doesn't have any
 text outside the table, but it's apparent in the real document.)

 Although my preferred style for separating paragraphs is by using a
 blank line, I changed it to the default way of using indentation to
 see what would happen, and indeed the paragraphs inside the table cell
 are displayed the same, i.e., no separation or indentation.  Is there
 a fundamental problem with using paragraphs inside a table?  (I notice
 that while the main text outside the table shows up as Standard
 style, the text inside the table shows as Plain Layout, and
 Standard does not seem to be available.)

 I suppose it might be possible to get around this by placing
 individual paragraphs in separate table cells and selectively
 suppressing cell boundary lines, but that sounds awfully fiddly.

Another idea is to use a minipage. Go to Insert  Box  Frameless.
Then try putting vertical space in (Insert  Formatting  Vertical
Space).


 so whether there's a bug or not in LyX, I think there
 is room for improvement in error handling.

Sounds good. Please post any bug or feature request on http://www.lyx.org/trac
and if you are interested in contributing a patch, that would of
course be welcome too.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Scott Kostyshak wrote:
 On Tue, Jul 15, 2014 at 3:28 PM, Will Parsons varro@nodomain.invalid wrote:
 Thanks, that seems to have partially solved the problem.  Partially,
 because although I can now export to PDF without an error, the
 paragraphs are not separated by a space as they are in the main body
 of the text.  (The stripped down test file I posted doesn't have any
 text outside the table, but it's apparent in the real document.)

 Although my preferred style for separating paragraphs is by using a
 blank line, I changed it to the default way of using indentation to
 see what would happen, and indeed the paragraphs inside the table cell
 are displayed the same, i.e., no separation or indentation.  Is there
 a fundamental problem with using paragraphs inside a table?  (I notice
 that while the main text outside the table shows up as Standard
 style, the text inside the table shows as Plain Layout, and
 Standard does not seem to be available.)

 I suppose it might be possible to get around this by placing
 individual paragraphs in separate table cells and selectively
 suppressing cell boundary lines, but that sounds awfully fiddly.

 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

Well, it sounded promising, but...

Yes, it does succeed in separating the paragraphs, but the text of the
paragraph in the box spills out of the bounds of the table when
converted to PDF.  Ouch!

 so whether there's a bug or not in LyX, I think there
 is room for improvement in error handling.

 Sounds good. Please post any bug or feature request on http://www.lyx.org/trac
 and if you are interested in contributing a patch, that would of
 course be welcome too.

I will if I can come up with a reasonable formulation.  Please
improve error handling seems to be a bit too vague to expect anyone
to act on :)

As for contributing a patch, well, I do have extensive experience with
C, and to a lesser extent C++ (though my C++ is a bit rusty now), but
I know nothing about LaTeX, and have never looked at the LyX code base.

-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Scott Kostyshak writes:
 
 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

No, this will not work because in a tabular environment \parskip is
reset (actually, even \par is redefined). You have to insert
\setlength{\parskip}{\bigskipamount}
in ERT at the start of the cell.

-- 
Enrico




Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Will Parsons writes:
 
 Yes, it does succeed in separating the paragraphs, but the text of the
 paragraph in the box spills out of the bounds of the table when
 converted to PDF.  Ouch!

You have to adjust the width of the minipage.

-- 
Enrico



Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Enrico Forestieri wrote:
 Scott Kostyshak writes:
 
 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.

I can't say I'm delighted at this solution, since it seems like a bit
of magic (I didn't even know what ERT was), but it *does* work.  So,
thank you - I think my problem is solved (even if in not quite the
straightforward way I would have liked).


-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Enrico Forestieri writes:
 
 Scott Kostyshak writes:
  
  Another idea is to use a minipage. Go to Insert  Box  Frameless.
  Then try putting vertical space in (Insert  Formatting  Vertical
  Space).
 
 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.
 

Sorry, I should have read until the end and not simply stopping at the
minipage suggestion. Yes, that would be another way, but reestablishing
the parskip is more handy.

-- 
Enrico



Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 5:37 PM, Will Parsons varro@nodomain.invalid wrote:

 Sounds good. Please post any bug or feature request on 
 http://www.lyx.org/trac
 and if you are interested in contributing a patch, that would of
 course be welcome too.

 I will if I can come up with a reasonable formulation.  Please
 improve error handling seems to be a bit too vague to expect anyone
 to act on :)

Good point. That's the hard part of a good bug report.

 As for contributing a patch, well, I do have extensive experience with
 C, and to a lesser extent C++ (though my C++ is a bit rusty now), but
 I know nothing about LaTeX, and have never looked at the LyX code base.

Well, if you are ever interested, please feel free to ask any
questions on the developer's list (lyx-de...@lists.lyx.org).

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:22 PM, Will Parsons varro@nodomain.invalid wrote:
 Enrico Forestieri wrote:
 Scott Kostyshak writes:

 Another idea is to use a minipage. Go to Insert  Box  Frameless.
 Then try putting vertical space in (Insert  Formatting  Vertical
 Space).

 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.

Thanks for the correction, Enrico.

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Scott Kostyshak writes:
 
 Thanks for the correction, Enrico.

Actually, it's me who should stand corrected ;)

-- 
Enrico





Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Will Parsons varro at nodomain.invalid writes:
 
 Enrico Forestieri wrote:
  Scott Kostyshak writes:
  
  Another idea is to use a minipage. Go to Insert  Box  Frameless.
  Then try putting vertical space in (Insert  Formatting  Vertical
  Space).
 
  No, this will not work because in a tabular environment \parskip is
  reset (actually, even \par is redefined). You have to insert
  \setlength{\parskip}{\bigskipamount}
  in ERT at the start of the cell.
 
 I can't say I'm delighted at this solution, since it seems like a bit
 of magic (I didn't even know what ERT was), but it *does* work.  So,
 thank you - I think my problem is solved (even if in not quite the
 straightforward way I would have liked).

If you are concerned about the open ERT, you could close it or, if you
don't want to even see it, I can suggest some other dark magic ;)
Place the cursor in the cell and open the table settings.
In the text field of the LaTeX argument entry, insert
  {\setlength{\parskip}{\bigskipamount}}p{4in}
and then apply.
Change \bigskipamount and 4in (this is the cell width) as you like.
This has the added advantage that you paragraphs will also be justified.

-- 
Enrico





Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:24 PM, Enrico Forestieri for...@lyx.org wrote:
 Enrico Forestieri writes:

 Scott Kostyshak writes:
 
  Another idea is to use a minipage. Go to Insert  Box  Frameless.
  Then try putting vertical space in (Insert  Formatting  Vertical
  Space).

 No, this will not work because in a tabular environment \parskip is
 reset (actually, even \par is redefined). You have to insert
 \setlength{\parskip}{\bigskipamount}
 in ERT at the start of the cell.


 Sorry, I should have read until the end and not simply stopping at the
 minipage suggestion. Yes, that would be another way, but reestablishing
 the parskip is more handy.

Yes, that seems better.

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:53 PM, Enrico Forestieri for...@lyx.org wrote:
 Will Parsons varro at nodomain.invalid writes:

 I can't say I'm delighted at this solution, since it seems like a bit
 of magic (I didn't even know what ERT was), but it *does* work.  So,
 thank you - I think my problem is solved (even if in not quite the
 straightforward way I would have liked).

In addition to what Enrico said for this specific solution, more
generally I would like to add that you will likely need ERT sooner or
later. LaTeX is such a powerful and flexible language and LyX only
uses part of it.

You might be interested in reading the LyX manuals. You can access
them in Help  ... They explain ERT and get into further details if
you're interested.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Scott Kostyshak wrote:
> On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons  wrote:
>> I have a table in which I wish some cells to contain multiple
>> paragraphs.  I can apparently create separate paragraphs by the normal
>> method of hitting Enter, at least as far as it appears within LyX, but
>> when I attempt to export to PDF I get a series of errors beginning
>> with:
>>
>>   Paragraph ended before \@item was complete.
>>
>> and the last three words of the first paragraph are highlighted.
>>
>> This is with LyX 2.1.0 under FreeBSD.
>>
>> I'm including a stripped down version of the problem LyX file below.
>
> Hi Will,
>
> Thanks for reporting this. I tried your example and indeed I get an
> error when compiling. However if I change the layout from
> "Description" to "Standard" (place the cursor in front of the table,
> and do ) then the file compiles fine. Note that the reason
> you can enter lines is because in that column you have a fixed width.
>
> I don't know enough about tables or long tables in LaTeX to know if
> there is a LyX bug here.

Thanks, that seems to have partially solved the problem.  Partially,
because although I can now export to PDF without an error, the
paragraphs are not separated by a space as they are in the main body
of the text.  (The stripped down test file I posted doesn't have any
text outside the table, but it's apparent in the real document.)

Although my preferred style for separating paragraphs is by using a
blank line, I changed it to the default way of using indentation to
see what would happen, and indeed the paragraphs inside the table cell
are displayed the same, i.e., no separation or indentation.  Is there
a fundamental problem with using paragraphs inside a table?  (I notice
that while the main text outside the table shows up as "Standard"
style, the text inside the table shows as "Plain Layout", and
"Standard" does not seem to be available.)

I suppose it might be possible to get around this by placing
individual paragraphs in separate table cells and selectively
suppressing cell boundary lines, but that sounds awfully fiddly.

Anyway, I don't think I'd have figured out how to get this far from the
error messages, so whether there's a bug or not in LyX, I think there
is room for improvement in error handling.  Thanks for the pointer.

-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 3:28 PM, Will Parsons  wrote:
> Scott Kostyshak wrote:
>> On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons  wrote:
>>> I have a table in which I wish some cells to contain multiple
>>> paragraphs.  I can apparently create separate paragraphs by the normal
>>> method of hitting Enter, at least as far as it appears within LyX, but
>>> when I attempt to export to PDF I get a series of errors beginning
>>> with:
>>>
>>>   Paragraph ended before \@item was complete.
>>>
>>> and the last three words of the first paragraph are highlighted.
>>>
>>> This is with LyX 2.1.0 under FreeBSD.
>>>
>>> I'm including a stripped down version of the problem LyX file below.
>>
>> Hi Will,
>>
>> Thanks for reporting this. I tried your example and indeed I get an
>> error when compiling. However if I change the layout from
>> "Description" to "Standard" (place the cursor in front of the table,
>> and do ) then the file compiles fine. Note that the reason
>> you can enter lines is because in that column you have a fixed width.
>>
>> I don't know enough about tables or long tables in LaTeX to know if
>> there is a LyX bug here.
>
> Thanks, that seems to have partially solved the problem.  Partially,
> because although I can now export to PDF without an error, the
> paragraphs are not separated by a space as they are in the main body
> of the text.  (The stripped down test file I posted doesn't have any
> text outside the table, but it's apparent in the real document.)
>
> Although my preferred style for separating paragraphs is by using a
> blank line, I changed it to the default way of using indentation to
> see what would happen, and indeed the paragraphs inside the table cell
> are displayed the same, i.e., no separation or indentation.  Is there
> a fundamental problem with using paragraphs inside a table?  (I notice
> that while the main text outside the table shows up as "Standard"
> style, the text inside the table shows as "Plain Layout", and
> "Standard" does not seem to be available.)
>
> I suppose it might be possible to get around this by placing
> individual paragraphs in separate table cells and selectively
> suppressing cell boundary lines, but that sounds awfully fiddly.

Another idea is to use a minipage. Go to Insert > Box > Frameless.
Then try putting vertical space in (Insert > Formatting > Vertical
Space).


> so whether there's a bug or not in LyX, I think there
> is room for improvement in error handling.

Sounds good. Please post any bug or feature request on http://www.lyx.org/trac
and if you are interested in contributing a patch, that would of
course be welcome too.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Scott Kostyshak wrote:
> On Tue, Jul 15, 2014 at 3:28 PM, Will Parsons  wrote:
>> Thanks, that seems to have partially solved the problem.  Partially,
>> because although I can now export to PDF without an error, the
>> paragraphs are not separated by a space as they are in the main body
>> of the text.  (The stripped down test file I posted doesn't have any
>> text outside the table, but it's apparent in the real document.)
>>
>> Although my preferred style for separating paragraphs is by using a
>> blank line, I changed it to the default way of using indentation to
>> see what would happen, and indeed the paragraphs inside the table cell
>> are displayed the same, i.e., no separation or indentation.  Is there
>> a fundamental problem with using paragraphs inside a table?  (I notice
>> that while the main text outside the table shows up as "Standard"
>> style, the text inside the table shows as "Plain Layout", and
>> "Standard" does not seem to be available.)
>>
>> I suppose it might be possible to get around this by placing
>> individual paragraphs in separate table cells and selectively
>> suppressing cell boundary lines, but that sounds awfully fiddly.
>
> Another idea is to use a minipage. Go to Insert > Box > Frameless.
> Then try putting vertical space in (Insert > Formatting > Vertical
> Space).

Well, it sounded promising, but...

Yes, it does succeed in separating the paragraphs, but the text of the
paragraph in the box spills out of the bounds of the table when
converted to PDF.  Ouch!

>> so whether there's a bug or not in LyX, I think there
>> is room for improvement in error handling.
>
> Sounds good. Please post any bug or feature request on http://www.lyx.org/trac
> and if you are interested in contributing a patch, that would of
> course be welcome too.

I will if I can come up with a reasonable formulation.  "Please
improve error handling" seems to be a bit too vague to expect anyone
to act on :)

As for contributing a patch, well, I do have extensive experience with
C, and to a lesser extent C++ (though my C++ is a bit rusty now), but
I know nothing about LaTeX, and have never looked at the LyX code base.

-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Scott Kostyshak writes:
> 
> Another idea is to use a minipage. Go to Insert > Box > Frameless.
> Then try putting vertical space in (Insert > Formatting > Vertical
> Space).

No, this will not work because in a tabular environment \parskip is
reset (actually, even \par is redefined). You have to insert
\setlength{\parskip}{\bigskipamount}
in ERT at the start of the cell.

-- 
Enrico




Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Will Parsons writes:
> 
> Yes, it does succeed in separating the paragraphs, but the text of the
> paragraph in the box spills out of the bounds of the table when
> converted to PDF.  Ouch!

You have to adjust the width of the minipage.

-- 
Enrico



Re: multiple paragraphs in a table cell

2014-07-15 Thread Will Parsons
Enrico Forestieri wrote:
> Scott Kostyshak writes:
>> 
>> Another idea is to use a minipage. Go to Insert > Box > Frameless.
>> Then try putting vertical space in (Insert > Formatting > Vertical
>> Space).
>
> No, this will not work because in a tabular environment \parskip is
> reset (actually, even \par is redefined). You have to insert
> \setlength{\parskip}{\bigskipamount}
> in ERT at the start of the cell.

I can't say I'm delighted at this solution, since it seems like a bit
of magic (I didn't even know what ERT was), but it *does* work.  So,
thank you - I think my problem is solved (even if in not quite the
straightforward way I would have liked).


-- 
Will



Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Enrico Forestieri writes:
> 
> Scott Kostyshak writes:
> > 
> > Another idea is to use a minipage. Go to Insert > Box > Frameless.
> > Then try putting vertical space in (Insert > Formatting > Vertical
> > Space).
> 
> No, this will not work because in a tabular environment \parskip is
> reset (actually, even \par is redefined). You have to insert
> \setlength{\parskip}{\bigskipamount}
> in ERT at the start of the cell.
> 

Sorry, I should have read until the end and not simply stopping at the
minipage suggestion. Yes, that would be another way, but reestablishing
the parskip is more handy.

-- 
Enrico



Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 5:37 PM, Will Parsons  wrote:

>> Sounds good. Please post any bug or feature request on 
>> http://www.lyx.org/trac
>> and if you are interested in contributing a patch, that would of
>> course be welcome too.
>
> I will if I can come up with a reasonable formulation.  "Please
> improve error handling" seems to be a bit too vague to expect anyone
> to act on :)

Good point. That's the hard part of a good bug report.

> As for contributing a patch, well, I do have extensive experience with
> C, and to a lesser extent C++ (though my C++ is a bit rusty now), but
> I know nothing about LaTeX, and have never looked at the LyX code base.

Well, if you are ever interested, please feel free to ask any
questions on the developer's list (lyx-de...@lists.lyx.org).

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:22 PM, Will Parsons  wrote:
> Enrico Forestieri wrote:
>> Scott Kostyshak writes:
>>>
>>> Another idea is to use a minipage. Go to Insert > Box > Frameless.
>>> Then try putting vertical space in (Insert > Formatting > Vertical
>>> Space).
>>
>> No, this will not work because in a tabular environment \parskip is
>> reset (actually, even \par is redefined). You have to insert
>> \setlength{\parskip}{\bigskipamount}
>> in ERT at the start of the cell.

Thanks for the correction, Enrico.

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Scott Kostyshak writes:
> 
> Thanks for the correction, Enrico.

Actually, it's me who should stand corrected ;)

-- 
Enrico





Re: multiple paragraphs in a table cell

2014-07-15 Thread Enrico Forestieri
Will Parsons  nodomain.invalid> writes:
> 
> Enrico Forestieri wrote:
> > Scott Kostyshak writes:
> >> 
> >> Another idea is to use a minipage. Go to Insert > Box > Frameless.
> >> Then try putting vertical space in (Insert > Formatting > Vertical
> >> Space).
> >
> > No, this will not work because in a tabular environment \parskip is
> > reset (actually, even \par is redefined). You have to insert
> > \setlength{\parskip}{\bigskipamount}
> > in ERT at the start of the cell.
> 
> I can't say I'm delighted at this solution, since it seems like a bit
> of magic (I didn't even know what ERT was), but it *does* work.  So,
> thank you - I think my problem is solved (even if in not quite the
> straightforward way I would have liked).

If you are concerned about the open ERT, you could close it or, if you
don't want to even see it, I can suggest some other dark magic ;)
Place the cursor in the cell and open the table settings.
In the text field of the "LaTeX argument" entry, insert
  >{\setlength{\parskip}{\bigskipamount}}p{4in}
and then apply.
Change \bigskipamount and 4in (this is the cell width) as you like.
This has the added advantage that you paragraphs will also be justified.

-- 
Enrico





Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:24 PM, Enrico Forestieri  wrote:
> Enrico Forestieri writes:
>>
>> Scott Kostyshak writes:
>> >
>> > Another idea is to use a minipage. Go to Insert > Box > Frameless.
>> > Then try putting vertical space in (Insert > Formatting > Vertical
>> > Space).
>>
>> No, this will not work because in a tabular environment \parskip is
>> reset (actually, even \par is redefined). You have to insert
>> \setlength{\parskip}{\bigskipamount}
>> in ERT at the start of the cell.
>>
>
> Sorry, I should have read until the end and not simply stopping at the
> minipage suggestion. Yes, that would be another way, but reestablishing
> the parskip is more handy.

Yes, that seems better.

Scott


Re: multiple paragraphs in a table cell

2014-07-15 Thread Scott Kostyshak
On Tue, Jul 15, 2014 at 6:53 PM, Enrico Forestieri  wrote:
> Will Parsons  nodomain.invalid> writes:

>> I can't say I'm delighted at this solution, since it seems like a bit
>> of magic (I didn't even know what ERT was), but it *does* work.  So,
>> thank you - I think my problem is solved (even if in not quite the
>> straightforward way I would have liked).

In addition to what Enrico said for this specific solution, more
generally I would like to add that you will likely need ERT sooner or
later. LaTeX is such a powerful and flexible language and LyX only
uses part of it.

You might be interested in reading the LyX manuals. You can access
them in Help > ... They explain ERT and get into further details if
you're interested.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-14 Thread Scott Kostyshak
On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons varro@nodomain.invalid wrote:
 I have a table in which I wish some cells to contain multiple
 paragraphs.  I can apparently create separate paragraphs by the normal
 method of hitting Enter, at least as far as it appears within LyX, but
 when I attempt to export to PDF I get a series of errors beginning
 with:

   Paragraph ended before \@item was complete.

 and the last three words of the first paragraph are highlighted.

 This is with LyX 2.1.0 under FreeBSD.

 I'm including a stripped down version of the problem LyX file below.

Hi Will,

Thanks for reporting this. I tried your example and indeed I get an
error when compiling. However if I change the layout from
Description to Standard (place the cursor in front of the table,
and do alt + p, s) then the file compiles fine. Note that the reason
you can enter lines is because in that column you have a fixed width.

I don't know enough about tables or long tables in LaTeX to know if
there is a LyX bug here.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-14 Thread Scott Kostyshak
On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons varro@nodomain.invalid wrote:
 I have a table in which I wish some cells to contain multiple
 paragraphs.  I can apparently create separate paragraphs by the normal
 method of hitting Enter, at least as far as it appears within LyX, but
 when I attempt to export to PDF I get a series of errors beginning
 with:

   Paragraph ended before \@item was complete.

 and the last three words of the first paragraph are highlighted.

 This is with LyX 2.1.0 under FreeBSD.

 I'm including a stripped down version of the problem LyX file below.

Hi Will,

Thanks for reporting this. I tried your example and indeed I get an
error when compiling. However if I change the layout from
Description to Standard (place the cursor in front of the table,
and do alt + p, s) then the file compiles fine. Note that the reason
you can enter lines is because in that column you have a fixed width.

I don't know enough about tables or long tables in LaTeX to know if
there is a LyX bug here.

Best,

Scott


Re: multiple paragraphs in a table cell

2014-07-14 Thread Scott Kostyshak
On Sat, Jul 12, 2014 at 5:30 PM, Will Parsons  wrote:
> I have a table in which I wish some cells to contain multiple
> paragraphs.  I can apparently create separate paragraphs by the normal
> method of hitting Enter, at least as far as it appears within LyX, but
> when I attempt to export to PDF I get a series of errors beginning
> with:
>
>   Paragraph ended before \@item was complete.
>
> and the last three words of the first paragraph are highlighted.
>
> This is with LyX 2.1.0 under FreeBSD.
>
> I'm including a stripped down version of the problem LyX file below.

Hi Will,

Thanks for reporting this. I tried your example and indeed I get an
error when compiling. However if I change the layout from
"Description" to "Standard" (place the cursor in front of the table,
and do ) then the file compiles fine. Note that the reason
you can enter lines is because in that column you have a fixed width.

I don't know enough about tables or long tables in LaTeX to know if
there is a LyX bug here.

Best,

Scott