Juergen Vigna wrote:
> Well I don't know :), I know for sure that inside tabulars they are not
> allowed because \\ is a special case for tabulars (end of this row).

There's always \newline (a robust command that expands to the \@normalcr
linebreak command). This is valid LaTeX code without a parbox or
minipage, and it does have two lines in a cell:

\begin{tabular}{|p{10cm}|c|}
\hline 
This is a Test \newline
Next line & Tab 2 \\
\hline 
\end{tabular}

LyX 1.1.5 currently exports the closest thing to this as

\begin{tabular}{|p{10cm}|c|}
\hline 
\parbox[t]{10cm}{\smallskip{}This is a Test \\
Next line\smallskip{}}&
Tab 2 \\
\hline 
\end{tabular}

The \smallskip{} at the start of the parbox inserts quite a large skip
there (really! - [t] means the first line is aligned with the other
lines, and the \smallskip{} is the first line of this parbox), why do
you do that?

I'm not all too happy with the current production table code, since
there are a lot of things you can do with LaTeX tables you can't do with
LyX (ok, there are some things with TeX tables you can't do with LaTeX
tables, either, like assigning a horizontal size to them instead of
letting them shrink down to their natural size). You can do almost
anything inside a table, once you are in a p table, like using
environments (itemize, enumerate), or putting tables in table cells.

I had some discussions with my sister, who complained that table editing
under LyX doesn't work good enough, and she threatened to use Word
instead if I can't find a solution ;-). I think she's right, the way
p{}-columns are presented now is well below LyX standard (you can do
everything you can do in a normal text also in a p{} environment, see
above; it should be presented as that, i.e. word-wrapped, with all the
environments active for the parbox LaTeX creates here).

While I'm on it, mixing longtables and rotated by 90 degree tables
doesn't work. This isn't a LyX bug, but a LaTeX bug (longtables uses
vsplit, while vertical tables would require a hsplit). Please make sure
the selection of both at a time doesn't work (or ask the LaTeX/longtable
maintainers to fix that bug).

I'm using LyX for quite a long time now, the only things I still have to
resort for direct LaTeX are own styles and tables. The first is natural,
the latter is a bit sad IMHO.

The two or three other things on my wishlist are (apart from using a
better GUI toolkit):

PDF generation out of the "Export" menu: ps2pdf works fine for Type1
fonts. pdflatex does a good job, too, but doesn't work well with the
default fontencoding (T1) LyX exports, and needs PDF graphics (requires
to convert all ps/eps figures to pdf first). I think the new graphic
inset would allow to use this approach.

The hyperref style is nice for PDF/LaTeX export; it's supported by
pdflatex, ps2pdf, and latex2html. It needs a few options (colors of
links, style+color of link, highlighted, backlighted, underlined), and
it would be nice if it could be selected from a LyX dialog.

And CVS version controlling from inside LyX would be nice, certainly.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/

Reply via email to