I suspect that tables are the curse of LaTeX/LyX at best.  I remember being 
horrified the first time I saw a LaTeX table layout.


I suppose it depends on where your original numbers for the table are coming 
from but there may be some help.  I am just a real beginner with LyX (and LaTex 
too for that matter) but in the stats environment R 
([url=http://www.r-project.org/][b]R[/b][/url]) there are a number of packages 
/ functions/ who-knows-what that can output some rather nice tables.  Whether 
or not they would do exactly the spanners that you need is another matter.


R integrates fairly smoothly with LyX through the Sweave or kintr packages (or 
so some people say) so if you can get the data in a reasonable format in R then 
it may not be too bad to simply produce the tables using knitr or Sweave. 

I suspect that something like Matlab , SAS or Stata can do something similar 
but I have never used them.


http://stackoverflow.com/questions/5465314/tools-for-making-latex-tables-in-r
http://www.r-statistics.com/2013/01/stargazer-package-for-beautiful-latex-tables-from-r-statistical-models-output/


________________________________
 From: Marshall Feldman <ma...@uri.edu>
To: John Kane <jrkrid...@yahoo.ca> 
Cc: "lyx-users@lists.lyx.org" <lyx-users@lists.lyx.org>; Scott Kostyshak 
<skost...@princeton.edu> 
Sent: Sunday, April 28, 2013 4:14:58 PM
Subject: Re: Spanners in tables
 


Tanks, John. The second table is almost what I want. The only change is to 
remove the bottom border from the cell to the left of the "Result" spanner.

This approach works, but I was hoping there's an easier way in
      LyX. The whole idea of keeping presentation separate from content
      would imply that tables can be formatted according to different
      styles at the push of a button.

Nonetheless, this works.

    Marsh

On 4/27/13 9:55 AM, John Kane wrote:

Hi Marshall,
>
>I think that it can be done fairly easily by inserting some
        extra columns and then using the multi-column approach. See the
        second table in the attached file. Is that what you wanted.?
>
>
>
>
>
>
>________________________________
> From: Marshall Feldman <ma...@uri.edu>
>To: lyx-users@lists.lyx.org 
>Cc: Scott Kostyshak <skost...@princeton.edu> 
>Sent: Friday, April 26, 2013 4:57:01 PM
>Subject: Re: Spanners in tables
> 
>
>
>
>
>On 4/26/13 4:12 PM, Scott Kostyshak wrote:
>
>On Fri, Apr 26, 2013 at 3:00 PM, Marshall Feldman <ma...@uri.edu> wrote: 
>>Hello, The standard format for formal tables uses spanners to indicate 
>>columns with
similar, related content. I am using LyX with the "formal" tables option set
to on. But I don't see how to introduce spanners into a table.. For example, 
suppose a table has two lines of headings. Suppose further that
row 1 has "Revenue" as a heading and that below this the table has two
headings, "Sales" and "Interest." So we would like the line beneath
"Revenue" to span two columns with a solid line, and for there to be enough
space at the edges of the spanned columns for the reader to make out that
the spanner is indeed separate from adjacent columns. See this page for
examples. So how does one handle spanners in LyX? 
>>Hi Marshall, If I understand correctly, what you refer to as "spanners" LyX 
>>would
refer to as "multi-column". In a table, select a couple of rows and
click on "multi-column" in the table toolbar (which is at the bottom
of the screen and is activated when the cursor is in a table). Best, Scott 
Thanks, Scott.
>
>Well it's not exactly multicolumn, at least not how I
                  understand this term. A cell that's multicolumn spans
                  more than one column. This relates to spanners, but
                  it's only part of the issue.
>
>A spanner is a line under the heading for the
                  multicolumn cell. The line does not run the full width
                  of the original columns that went into the multicolumn
                  cell. Since the spanner typically serves as a heading
                  indicating which columns fall under the heading, there
                  has to be some way to distinguish the columns falling
                  under the heading from other, adjacent columns. This
                  is why the spanner line is shorter than the combined
                  widths of the original columns: whitespace on either
                  side of the line separates it from lines in adjacent
                  cells.
>
>I'll try to draw a picture:
>
>                            Greetings                            Century
>Holiday            ---------------------------    --------------             
><= These dashed lines are "spanners"
>                        Coming                    Going            18    19    
>20    21
>Mardis Gras    Want beads?    Happy Mardi Gras       
                               X       X
>Xmas              Merry Xmas    Merry Xmas           
                              X     X       X
>
>
>Thanks for your help.
>
>    Marsh
>
>
>

Reply via email to