[EMAIL PROTECTED] wrote:
>
> >> ...........................................
> >
> >">{\centering\hspace{0pt}}p{2cm}"
> >
>
> It almost works ! :
> As far as the last column is not
> set to this command, it is OK !
> But, if the last column is also set
> the horizontal lines between rows
> are misplaced !! I attach a lyx and
> dvi files with examples.
> Do you get the same problems ????
sorry, that was the wrong lyx-file :-(
HErbert
--
http://www.educat.hu-berlin.de/~voss/lyx/
#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 218
\textclass article
\begin_preamble
\usepackage{array}
\usepackage{tabularx}
\newcommand{\preserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\let\PBS=\preserveBackslash
\end_preamble
\language ngerman
\inputencoding default
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
Centering Fixed Size Columns with
\newline
>{
\backslash
centering
\backslash
hspace{0pt}}p{...}
\layout Section*
Two columns
\layout Subsubsection*
Only the first column is set to : >{
\backslash
centering
\backslash
hspace{0pt}}p{2cm} and the resulting dvi or ps looks OK.
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="2" rows="2" columns="2">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0"
endlastfoot="0">
<column alignment="left" valignment="top" leftline="true" rightline="false" width=""
special=">{\centering\hspace{0pt}}p{2cm}">
<column alignment="center" valignment="top" leftline="true" rightline="true" width=""
special="">
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="left" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
</row>
<row topline="false" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="left" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\layout Subsubsection*
Only the second column is set to : >{
\backslash
centering
\backslash
hspace{0pt}}p{2cm} and the resulting dvi or ps looks BAD : missing horizontal
line in the first column between
\begin_inset Quotes eld
\end_inset
a
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
c
\begin_inset Quotes erd
\end_inset
, and strange misplaced horizontal line between
\begin_inset Quotes eld
\end_inset
b
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
d
\begin_inset Quotes erd
\end_inset
in the 2nd column
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="2" rows="2" columns="2">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0"
endlastfoot="0">
<column alignment="left" valignment="top" leftline="true" rightline="true" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<column alignment="left" valignment="top" leftline="false" rightline="true" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="left" valignment="top" topline="false"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="2cm" special="c">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
</row>
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="left" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\layout Subsubsection*
Both columns are set to >{
\backslash
centering
\backslash
hspace{0pt}}p{2cm} and I have very strange result in dvi or ps with horizontal
lines between the rows.
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="2" rows="2" columns="2">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0"
endlastfoot="0">
<column alignment="left" valignment="top" leftline="true" rightline="false" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<column alignment="center" valignment="top" leftline="true" rightline="true" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="left" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
</row>
<row topline="false" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="left" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\layout Section*
More columns
\layout Standard
Different possibilities are tryied :
\layout Subsubsection*
Only the 2nd column is set : OK
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="2" rows="4" columns="4">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0"
endlastfoot="0">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special="">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special="">
<column alignment="center" valignment="top" leftline="true" rightline="true" width=""
special="">
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
e
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
f
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
g
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
h
\end_inset
</cell>
</row>
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
i
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
j
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
k
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
l
\end_inset
</cell>
</row>
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
m
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
n
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
o
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
p
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\layout Subsubsection*
The 2nd and the 3rd columns are set : OK
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="2" rows="4" columns="4">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0"
endlastfoot="0">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special="">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<column alignment="center" valignment="top" leftline="true" rightline="true" width=""
special="">
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
e
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
f
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
g
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
h
\end_inset
</cell>
</row>
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
i
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
j
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
k
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
l
\end_inset
</cell>
</row>
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
m
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
n
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
o
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
p
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\layout Subsubsection*
The 2nd and the last column are set : BAD
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="2" rows="4" columns="4">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0"
endlastfoot="0">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special="">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<column alignment="center" valignment="top" leftline="true" rightline="false" width=""
special="">
<column alignment="center" valignment="top" leftline="true" rightline="true" width=""
special=">{\PBS\centering\hspace{0pt}}p{2cm}">
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
e
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
f
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
g
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
h
\end_inset
</cell>
</row>
<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
i
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
j
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
k
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
l
\end_inset
</cell>
</row>
<row topline="true" bottomline="true" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
m
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
n
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
o
\end_inset
</cell>
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none"
width="" special="">
\begin_inset Text
\layout Standard
p
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\layout Section*
? Conclusion ?
\layout Standard
It seems that with my LyX 1.0.4 the setting :
\begin_inset Quotes eld
\end_inset
>{
\backslash
centering
\backslash
hspace{0pt}}p{2cm}
\begin_inset Quotes erd
\end_inset
for the last column of a table is problematic (or am I just doing something
wrong ?)
\the_end