Re: width of table

2005-12-13 Thread mamato
i am already setting a fixed width. the problem is that using 100 with
text%, col%, page% and line% never uses the width i'd expect (ie the same as
the surrounding text).

mamato


On 12/8/05, Paul A. Rubin [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:
  how can i make a table who's width is the same as the surrounding text?
  i've tried setting column widths using text%, col%, page%, line% and its
  always larger than it should...
 
  mamato
 

 If the table is wider than what you want, possible fixes include using a
 smaller font in the table entries or making one or more columns
 fixed-width (enabling line wrapping).

 Paul





Re: width of table

2005-12-13 Thread mamato
sorry, it wasn't clear in the latter mails, i'm talking about tables...
(i'm currently not able to resize images since i dont have imagemagick...
even though it's possible with plain (pdf)latex and most file formats :/ )

 mamato

On 12/13/05, Johan Ingvast [EMAIL PROTECTED] wrote:

 Does it become larger or smaller? Sometimes the bounding box of the image
 is set
 to other than the actual painted area. Then it can differ.
 Particulary eps files have bounding box defined.
 /johan

 [EMAIL PROTECTED] wrote:
  i am already setting a fixed width. the problem is that using 100 with
  text%, col%, page% and line% never uses the width i'd expect (ie the
 same as
  the surrounding text).
 
  mamato
 
 
  On 12/8/05, Paul A. Rubin [EMAIL PROTECTED] wrote:
 
 [EMAIL PROTECTED] wrote:
 
 how can i make a table who's width is the same as the surrounding text?
 i've tried setting column widths using text%, col%, page%, line% and
 its
 always larger than it should...
 
 mamato
 
 
 If the table is wider than what you want, possible fixes include using a
 smaller font in the table entries or making one or more columns
 fixed-width (enabling line wrapping).
 
 Paul
 
 
 
 
 




Re: width of table

2005-12-13 Thread Helge Hafting

[EMAIL PROTECTED] wrote:


i am already setting a fixed width. the problem is that using 100 with
text%, col%, page% and line% never uses the width i'd expect (ie the same as
the surrounding text).
 


The problem is that you can't set the width of a table. You're setting
the width of a column, aren't you?  And a table consist of more than the
column, on each side of the column there is some space and possibly lines.

So, setting a 1-column table to 100 line% gives a table slightly
wider than the line due to the width of column separation.

Try the following in a tex box (or the preamble):
\setlength{\tabcolsep}{0pt}

This is kind of primitive, there is now no separation between columns,
but if all you have are single-column table without vertical lines, then
this may be all you need. Note that the command will affect all
following tables.

A more complicated example, that creates a table with the exact
width of the line, minus the column separation.  That way, the
table fits exactly on the line, with the contained single column being
slightly thinner than the table itself:

Put the following in a tex box:
\newlength{\tabwidth}
\setlength{\tabwidth}{\linewidth}
\addtolength{\tabwidth}{-2\tabcolsep}
(If your table has side lines, then you may have to subtract
the thickness of a line also, which I believe is 0.4pt)

This defines a new length \tabwidth that is as wide as a line
minus the column separation on either side.  Note that this doesn't
affect any tables as-is - you also have to modify tables to use this
new length:

For a single-column table, don't set the width.  Instead,
set the latex argument (in the same dialog) to:
|{\raggedright}p{1\tabwidth}

The key here is the use of \tabwidth, using the previously defined length.
The rest is stuff that has to be there. . .

It is easy to get this wrong, and then lyx won't produce output.
For more ideas, make a lyx file with tables and export as latex.
Then you see how I found the above mentioned latex argument.

Helge Hafting


Re: width of table

2005-12-13 Thread Enrico Forestieri
Helge Hafting [EMAIL PROTECTED] writes:
 
 [EMAIL PROTECTED] wrote:
 
 i am already setting a fixed width. the problem is that using 100 with
 text%, col%, page% and line% never uses the width i'd expect (ie the same as
 the surrounding text).
   
 
[...]
 For a single-column table, don't set the width.  Instead,
 set the latex argument (in the same dialog) to:
 |{\raggedright}p{1\tabwidth}

I have handy a lyx template I wrote some time ago. It was about a
custom layout so not all of it is relevant to this topic. However
there was something about tables that I think can be of help to
the OP. Please find that excerpt here:
http://barolo.pisa.cnit.it/ef/tables.lyx

--
Enrico




Re: width of table

2005-12-13 Thread mamato
i am already setting a fixed width. the problem is that using 100 with
text%, col%, page% and line% never uses the width i'd expect (ie the same as
the surrounding text).

mamato


On 12/8/05, Paul A. Rubin [EMAIL PROTECTED] wrote:

 [EMAIL PROTECTED] wrote:
  how can i make a table who's width is the same as the surrounding text?
  i've tried setting column widths using text%, col%, page%, line% and its
  always larger than it should...
 
  mamato
 

 If the table is wider than what you want, possible fixes include using a
 smaller font in the table entries or making one or more columns
 fixed-width (enabling line wrapping).

 Paul





Re: width of table

2005-12-13 Thread mamato
sorry, it wasn't clear in the latter mails, i'm talking about tables...
(i'm currently not able to resize images since i dont have imagemagick...
even though it's possible with plain (pdf)latex and most file formats :/ )

 mamato

On 12/13/05, Johan Ingvast [EMAIL PROTECTED] wrote:

 Does it become larger or smaller? Sometimes the bounding box of the image
 is set
 to other than the actual painted area. Then it can differ.
 Particulary eps files have bounding box defined.
 /johan

 [EMAIL PROTECTED] wrote:
  i am already setting a fixed width. the problem is that using 100 with
  text%, col%, page% and line% never uses the width i'd expect (ie the
 same as
  the surrounding text).
 
  mamato
 
 
  On 12/8/05, Paul A. Rubin [EMAIL PROTECTED] wrote:
 
 [EMAIL PROTECTED] wrote:
 
 how can i make a table who's width is the same as the surrounding text?
 i've tried setting column widths using text%, col%, page%, line% and
 its
 always larger than it should...
 
 mamato
 
 
 If the table is wider than what you want, possible fixes include using a
 smaller font in the table entries or making one or more columns
 fixed-width (enabling line wrapping).
 
 Paul
 
 
 
 
 




Re: width of table

2005-12-13 Thread Helge Hafting

[EMAIL PROTECTED] wrote:


i am already setting a fixed width. the problem is that using 100 with
text%, col%, page% and line% never uses the width i'd expect (ie the same as
the surrounding text).
 


The problem is that you can't set the width of a table. You're setting
the width of a column, aren't you?  And a table consist of more than the
column, on each side of the column there is some space and possibly lines.

So, setting a 1-column table to 100 line% gives a table slightly
wider than the line due to the width of column separation.

Try the following in a tex box (or the preamble):
\setlength{\tabcolsep}{0pt}

This is kind of primitive, there is now no separation between columns,
but if all you have are single-column table without vertical lines, then
this may be all you need. Note that the command will affect all
following tables.

A more complicated example, that creates a table with the exact
width of the line, minus the column separation.  That way, the
table fits exactly on the line, with the contained single column being
slightly thinner than the table itself:

Put the following in a tex box:
\newlength{\tabwidth}
\setlength{\tabwidth}{\linewidth}
\addtolength{\tabwidth}{-2\tabcolsep}
(If your table has side lines, then you may have to subtract
the thickness of a line also, which I believe is 0.4pt)

This defines a new length \tabwidth that is as wide as a line
minus the column separation on either side.  Note that this doesn't
affect any tables as-is - you also have to modify tables to use this
new length:

For a single-column table, don't set the width.  Instead,
set the latex argument (in the same dialog) to:
|{\raggedright}p{1\tabwidth}

The key here is the use of \tabwidth, using the previously defined length.
The rest is stuff that has to be there. . .

It is easy to get this wrong, and then lyx won't produce output.
For more ideas, make a lyx file with tables and export as latex.
Then you see how I found the above mentioned latex argument.

Helge Hafting


Re: width of table

2005-12-13 Thread Enrico Forestieri
Helge Hafting [EMAIL PROTECTED] writes:
 
 [EMAIL PROTECTED] wrote:
 
 i am already setting a fixed width. the problem is that using 100 with
 text%, col%, page% and line% never uses the width i'd expect (ie the same as
 the surrounding text).
   
 
[...]
 For a single-column table, don't set the width.  Instead,
 set the latex argument (in the same dialog) to:
 |{\raggedright}p{1\tabwidth}

I have handy a lyx template I wrote some time ago. It was about a
custom layout so not all of it is relevant to this topic. However
there was something about tables that I think can be of help to
the OP. Please find that excerpt here:
http://barolo.pisa.cnit.it/ef/tables.lyx

--
Enrico




Re: width of table

2005-12-13 Thread mamato
i am already setting a fixed width. the problem is that using 100 with
text%, col%, page% and line% never uses the width i'd expect (ie the same as
the surrounding text).

mamato


On 12/8/05, Paul A. Rubin <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED] wrote:
> > how can i make a table who's width is the same as the surrounding text?
> > i've tried setting column widths using text%, col%, page%, line% and its
> > always larger than it should...
> >
> > mamato
> >
>
> If the table is wider than what you want, possible fixes include using a
> smaller font in the table entries or making one or more columns
> fixed-width (enabling line wrapping).
>
> Paul
>
>
>


Re: width of table

2005-12-13 Thread mamato
sorry, it wasn't clear in the latter mails, i'm talking about tables...
(i'm currently not able to resize images since i dont have imagemagick...
even though it's possible with plain (pdf)latex and most file formats :/ )

 mamato

On 12/13/05, Johan Ingvast <[EMAIL PROTECTED]> wrote:
>
> Does it become larger or smaller? Sometimes the bounding box of the image
> is set
> to other than the actual painted area. Then it can differ.
> Particulary eps files have bounding box defined.
> /johan
>
> [EMAIL PROTECTED] wrote:
> > i am already setting a fixed width. the problem is that using 100 with
> > text%, col%, page% and line% never uses the width i'd expect (ie the
> same as
> > the surrounding text).
> >
> > mamato
> >
> >
> > On 12/8/05, Paul A. Rubin <[EMAIL PROTECTED]> wrote:
> >
> >>[EMAIL PROTECTED] wrote:
> >>
> >>>how can i make a table who's width is the same as the surrounding text?
> >>>i've tried setting column widths using text%, col%, page%, line% and
> its
> >>>always larger than it should...
> >>>
> >>>mamato
> >>>
> >>
> >>If the table is wider than what you want, possible fixes include using a
> >>smaller font in the table entries or making one or more columns
> >>fixed-width (enabling line wrapping).
> >>
> >>Paul
> >>
> >>
> >>
> >
> >
>
>


Re: width of table

2005-12-13 Thread Helge Hafting

[EMAIL PROTECTED] wrote:


i am already setting a fixed width. the problem is that using 100 with
text%, col%, page% and line% never uses the width i'd expect (ie the same as
the surrounding text).
 


The problem is that you can't set the width of a table. You're setting
the width of a column, aren't you?  And a table consist of more than the
column, on each side of the column there is some space and possibly lines.

So, setting a 1-column table to 100 line% gives a table slightly
wider than the line due to the width of column separation.

Try the following in a tex box (or the preamble):
\setlength{\tabcolsep}{0pt}

This is kind of primitive, there is now no separation between columns,
but if all you have are single-column table without vertical lines, then
this may be all you need. Note that the command will affect all
following tables.

A more complicated example, that creates a table with the exact
width of the line, minus the column separation.  That way, the
table fits exactly on the line, with the contained single column being
slightly thinner than the table itself:

Put the following in a tex box:
\newlength{\tabwidth}
\setlength{\tabwidth}{\linewidth}
\addtolength{\tabwidth}{-2\tabcolsep}
(If your table has side lines, then you may have to subtract
the thickness of a line also, which I believe is 0.4pt)

This defines a new length "\tabwidth" that is as wide as a line
minus the column separation on either side.  Note that this doesn't
affect any tables as-is - you also have to modify tables to use this
new length:

For a single-column table, don't set the width.  Instead,
set the "latex argument" (in the same dialog) to:
|>{\raggedright}p{1\tabwidth}

The key here is the use of \tabwidth, using the previously defined length.
The rest is stuff that has to be there. . .

It is easy to get this wrong, and then lyx won't produce output.
For more ideas, make a lyx file with tables and export as latex.
Then you see how I found the above mentioned "latex argument".

Helge Hafting


Re: width of table

2005-12-13 Thread Enrico Forestieri
Helge Hafting <[EMAIL PROTECTED]> writes:
> 
> [EMAIL PROTECTED] wrote:
> 
> >i am already setting a fixed width. the problem is that using 100 with
> >text%, col%, page% and line% never uses the width i'd expect (ie the same as
> >the surrounding text).
> >  
> >
[...]
> For a single-column table, don't set the width.  Instead,
> set the "latex argument" (in the same dialog) to:
> |>{\raggedright}p{1\tabwidth}

I have handy a lyx template I wrote some time ago. It was about a
custom layout so not all of it is relevant to this topic. However
there was something about tables that I think can be of help to
the OP. Please find that excerpt here:
http://barolo.pisa.cnit.it/ef/tables.lyx

--
Enrico




Re: width of table

2005-12-08 Thread Paul A. Rubin

[EMAIL PROTECTED] wrote:

how can i make a table who's width is the same as the surrounding text?
i've tried setting column widths using text%, col%, page%, line% and its
always larger than it should...

mamato



If the table is wider than what you want, possible fixes include using a 
smaller font in the table entries or making one or more columns 
fixed-width (enabling line wrapping).


Paul




Re: width of table

2005-12-08 Thread Paul A. Rubin

[EMAIL PROTECTED] wrote:

how can i make a table who's width is the same as the surrounding text?
i've tried setting column widths using text%, col%, page%, line% and its
always larger than it should...

mamato



If the table is wider than what you want, possible fixes include using a 
smaller font in the table entries or making one or more columns 
fixed-width (enabling line wrapping).


Paul




Re: width of table

2005-12-08 Thread Paul A. Rubin

[EMAIL PROTECTED] wrote:

how can i make a table who's width is the same as the surrounding text?
i've tried setting column widths using text%, col%, page%, line% and its
always larger than it should...

mamato



If the table is wider than what you want, possible fixes include using a 
smaller font in the table entries or making one or more columns 
fixed-width (enabling line wrapping).


Paul