0

I am having the worst luck with a table I am trying to create. The problem occurs when I want to have multiple lines in a column, I use the trick posted on here (and I think Lyx's wiki) and set a column width, I can then just use a simple return to get each item on the next row. However the column in the table where I have fixed the width appears as though I have put space above it, and it appears as though nothing I try can get it to work. I have tried reproducing the strange occurrence with another table, and the same thing happened.

If you copy and paste the table into another tab, the same thing happens. Whereas, if you delete the table and then make it again, the effect doesnt occur. I honestly have no idea what is going on, I feel as though I have tried everything.

% Preview source code for paragraph 0

\begin{table}
\noindent \centering
\begin{threeparttable}

\noindent %
\begin{tabular}{|c|>{\centering}p{3cm}|c|}
\hline 
test & test & test\tabularnewline
\hline 
\hline 
test & test & test\tabularnewline
\hline 
test & test\\
test\\
test & test\tabularnewline
\hline 
test & test\\
test & test\tabularnewline
\hline 
\end{tabular}

\noindent \protect\caption{This is what I want it to look like}


\end{threeparttable}
\end{table}
\begin{table}
\centering
\begin{threeparttable}

\begin{tabular}{|c|>{\centering}p{3cm}|c|}
\hline 
\selectlanguage{australian}%
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\selectlanguage{english}%
\tabularnewline
\hline 
\hline 
\selectlanguage{australian}%
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\selectlanguage{english}%
\tabularnewline
\hline 
\selectlanguage{australian}%
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\\
test\\
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\selectlanguage{english}%
\tabularnewline
\hline 
\selectlanguage{australian}%
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\\
test\selectlanguage{english}%
 & \selectlanguage{australian}%
test\selectlanguage{english}%
\tabularnewline
\hline 
\end{tabular}\protect\caption{This is copied over from my 'effected' document}


\end{threeparttable}

\end{table}

Please help, it would be more than greatly appreciated.

Tylerdesired table and bad table

1

The function(?) \selectlanguage appeared to be the cause of the issue.

All I did was go to Tools > Preferences > Language Settings > Language > Command start and delete \selectlanguage.

After spending all day experimenting with aligning certain cells in the top, middle and bottom, and making some columns multi-columns, it appeared to be an easy fix! Hopefully this helps someone.

  • It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The StackExchange staff can merge them together for you. – Paul Gessler Mar 11 '15 at 5:38
  • That would be great! I couldnt work out what I was doing wrong. – Tyler Mar 12 '15 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.