Re: 2.2 -- table problems

2016-06-07 Thread Helge Hafting



Den 06. juni 2016 12:57, skrev F M Salter:

Hi
 I am attaching a small table which  produces erroneous output.

 1.  mathematical symbol  m in headings
 2.  non-alignment of decimal points

Any suggestions?



Suggestion attached.

When looking at your table, I saw that you're using "multicolumn", which 
does not seem necessary for this table. (multirow is obviously necessary 
though.) I wrote the table from scratch without using multicolumn, and 
it seems to work. At least there is no strange "m".  I left-justified 
the last column to get the decimal points to line up, and put a half-em 
space in front of the "m" so looks like the heading is centered.


The result is attached.

There is clearly a lyx bug causing the extra "m". (Actually, an extra 
copy of whatever we put in that particular cell.) But it can be avoided 
here, by not using the "multicolumn" setting.)


Helge Hafting


table.lyx
Description: application/lyx


Re: 2.2 -- table problems

2016-06-06 Thread Paul A . Rubin
F M Salter  blueyonder.co.uk> writes:

> 
> 
> I had a table, with no apparent problems, but with vertical
> separators.  Publication requires a formal table!
> I have not found any way to set up a heading layout other than what
> is essentially the default.
>     Setting up a table, adding an extra row in the heading, setting
> "formal"
>   The order attempted produces different results.
>     (a) setting width for a multirow heading turns centred
> heading into left justified and unchangeable!
>     (b) after both rows of a column heading contain text and
> in-line maths, the bounding line cannot be removed. 
>   Any suggestions?

I wrangled something that looks plausible in PDF (looks horrible in the LyX
editor). I'm pasting everything between the body tags below. It has your
table on top, my version beneath it. WARNING: Examining this could be
hazardous to your mental health.

Paul

\begin_layout Standard
\begin_inset Tabular








\begin_inset Text

\begin_layout Plain Layout
base
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $a$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $\frac{a_{year}}{a_{1909}}$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $m$
\end_inset


\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
year
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
1909
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $0.25$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $1.00$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\lang english
0.08
\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
1929
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $0.35$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $1.40$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\lang english
0.09
\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
1939
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $0.49$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $1.96$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\lang english
0.085
\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
1949
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $0.87$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $3.48$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\lang english
0.12
\end_layout

\end_inset




\end_inset


\end_layout

\begin_layout Standard
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Standard
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Standard
\begin_inset space ~
\end_inset


\end_layout

\begin_layout Standard
\begin_inset Tabular








\begin_inset Text

\begin_layout Plain Layout
base year
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "c"
use_parbox 0
use_makebox 0
width "4ex"
special "none"
height "1in"
height_special "totalheight"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open

\begin_layout Plain Layout
\align center
\begin_inset Formula $a$
\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout
\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "c"
use_parbox 0
use_makebox 0
width "5ex"
special "none"
height "1in"
height_special "height"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor 

Re: 2.2 -- table problems

2016-06-06 Thread F M Salter


On 06/06/12:59-0700, Paul A. Rubin  wrote:
> > Hi
> > I am attaching a small table which  produces erroneous output.
> > 
> > 1.  mathematical symbol  m in headings
> > 2.  non-alignment of decimal points
> > 
> > Any suggestions?
> > 
> ===
> The second problem is easily fixed: enter the numbers in the table as plain
> text, not as inline math. I think the math insets prevent detection of the
> separator (decimal point).
Did as you said.  One problem solved.
> The first problem is harder, and might be a bug in LyX. If you turn on View
> > Source and set it to show the LyX source code, you'll see cells marked
> multirow="3" and multirow="4". I have no idea why. If you switch to LaTeX
> source, you will see the extra $m$ being inserted (again, no idea why).
>
> Paul
I had a table, with no apparent problems, but with vertical separators. 
Publication requires a formal table!
I have not found any way to set up a heading layout other than what is
essentially the default.

Setting up a table, adding an extra row in the heading, setting "formal"
  The order attempted produces different results.
(a) setting width for a multirow heading turns centred heading
into left justified and unchangeable!
(b) after both rows of a column heading contain text and in-line
maths, the bounding line cannot be removed.
> Any suggestions?
>
> Regards
> Frank Salter
Thanks for your help
Frank


Re: 2.2 -- table problems

2016-06-06 Thread Paul A . Rubin
F M Salter  blueyonder.co.uk> writes:

> 
> Hi
> I am attaching a small table which  produces erroneous output.
> 
> 1.  mathematical symbol  m in headings
> 2.  non-alignment of decimal points
> 
> Any suggestions?
> 

The second problem is easily fixed: enter the numbers in the table as plain
text, not as inline math. I think the math insets prevent detection of the
separator (decimal point).

The first problem is harder, and might be a bug in LyX. If you turn on View
> Source and set it to show the LyX source code, you'll see cells marked
multirow="3" and multirow="4". I have no idea why. If you switch to LaTeX
source, you will see the extra $m$ being inserted (again, no idea why).

Paul



Re: 2.2 -- table problems

2016-06-06 Thread John Kane
Ah, I had my pdf viewer at too low a magnification and missed that m .
Very weird. I wonder if it has anything to do with the two cells in "base
year"?  So far my experiments have not been useful so I may well be wrong

Re the 2 vs 3 digits, I am not sure but I suspect that using 2 & 3 digits
in the same column is bad practice.  Why is 1939 considered more accuate
than the other years?



On 6 June 2016 at 09:24, F M Salter  wrote:

>
>
> On 06/06/16 13:54, John Kane wrote:
>
> I don't think I understand the point about the "m".  It is a math symbol
> in the lyx file so one would expect it to be one in the output?
>
> Sorry, I was obviously too terse. An additional *m* appears in the 3rd
> column under the fraction
>
>
> I am not very good with LyX tables (I usually generate mine with R and
> knitr) but it looks to me that you need three numbers after the decimal in
> the last column of the table. Try sticking zeros after the values with only
> 2 numbers (characters?) and you get decimal alignment.
>
> The reason I need the decimal alignment is that I do not to suggest an
> undeserved precision to the othere numbers in the column.
>
>
> On 6 June 2016 at 06:57, F M Salter  wrote:
>
>> Hi
>> I am attaching a small table which  produces erroneous output.
>>
>> 1.  mathematical symbol  m in headings
>> 2.  non-alignment of decimal points
>>
>> Any suggestions?
>>
>> Regards
>> Frank Salter
>>
>
>
>
> --
> John Kane
> Kingston ON Canada
>
> Thanks for your comments
> Regards   FMS
>



-- 
John Kane
Kingston ON Canada


Re: 2.2 -- table problems

2016-06-06 Thread F M Salter


On 06/06/16 13:54, John Kane wrote:
> I don't think I understand the point about the "m".  It is a math
> symbol in the lyx file so one would expect it to be one in the output?
Sorry, I was obviously too terse. An additional /m/ appears in the 3rd
column under the fraction
>
> I am not very good with LyX tables (I usually generate mine with R and
> knitr) but it looks to me that you need three numbers after the
> decimal in the last column of the table. Try sticking zeros after the
> values with only 2 numbers (characters?) and you get decimal alignment.
The reason I need the decimal alignment is that I do not to suggest an
undeserved precision to the othere numbers in the column.
>
> On 6 June 2016 at 06:57, F M Salter  > wrote:
>
> Hi
> I am attaching a small table which  produces erroneous output.
>
> 1.  mathematical symbol  m in headings
> 2.  non-alignment of decimal points
>
> Any suggestions?
>
> Regards
> Frank Salter
>
>
>
>
> -- 
> John Kane
> Kingston ON Canada
Thanks for your comments
Regards   FMS


Re: 2.2 -- table problems

2016-06-06 Thread John Kane
I don't think I understand the point about the "m".  It is a math symbol in
the lyx file so one would expect it to be one in the output?

I am not very good with LyX tables (I usually generate mine with R and
knitr) but it looks to me that you need three numbers after the decimal in
the last column of the table. Try sticking zeros after the values with only
2 numbers (characters?) and you get decimal alignment.

On 6 June 2016 at 06:57, F M Salter  wrote:

> Hi
> I am attaching a small table which  produces erroneous output.
>
> 1.  mathematical symbol  m in headings
> 2.  non-alignment of decimal points
>
> Any suggestions?
>
> Regards
> Frank Salter
>



-- 
John Kane
Kingston ON Canada


2.2 -- table problems

2016-06-06 Thread F M Salter
Hi
I am attaching a small table which  produces erroneous output.

1.  mathematical symbol  m in headings
2.  non-alignment of decimal points

Any suggestions?

Regards
Frank Salter


table.lyx
Description: application/lyx