Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

Using LyX to create a Beamer presentation I used the TeX button to insert some ERT:

\begin{table}\caption{Regression table\label{tab1}}
\begin{center}
\begin{tabular}{l r l r l r l}
\hline
& \multicolumn{2}{c}{Model 1}&\multicolumn{2}{c}{Model 2}&\multicolumn{2}{c}{Model 3}\\
\hline
\hline
Variable 1 & 12.758 & * &  13.822 & *** & 2.123 & *\\
\hline
\textit{*p < 0.05, ** p < 0.01, *** p < 0.001}
\end{tabular}
\end{center}
\end{table}

I am using the beamer conference template. It reads the code fine but on the slide the table is 50 times too big. Is there a way to adjust the table size to put it in correct proportion?

share|improve this question

marked as duplicate by Kurt, Werner, Thorsten, zeroth, mafp Mar 18 '13 at 19:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
I hope you are referring to this ERT for people like me who have no experience with Lyx –  texenthusiast Mar 18 '13 at 6:06
    
@texenthusiast Yep, that is right. –  Chris J Mar 18 '13 at 6:12

1 Answer 1

use

\begin{table}
\caption{Regression table\label{tab1}}
\centering
\resizebox{\linewidth}{!}{%
\begin{tabular}{l r l r l r l}\hline
& \multicolumn{2}{c}{Model 1}&\multicolumn{2}{c}{Model 2}&\multicolumn{2}{c}{Model 3}\\\hline\hline
Variable 1 & 12.758 & * &  13.822 & *** & 2.123 & *\\\hline
\textit{*p < 0.05, ** p < 0.01, *** p < 0.001}
\end{tabular}}
\end{table}

which needs package graphicx

share|improve this answer
    
Thanks for the reply. I am getting the error "(job aborted, no legal \end found)". I have included the graphicx package in the preamble and I also have, booktabs array [justification=centering]{caption}. No error if I compile without your code. –  Chris J Mar 18 '13 at 18:20
    
send me your lyx file: herbert at dante.de –  Herbert Mar 18 '13 at 19:49

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