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.

i'm trying to rezise a longtable that contains itemize...can you help me? if i put \resizebox{0.8\textwidth}{!}{ I have error. My table start as:

\begin{centre}\resizebox{0.8\textwidth}{!}{
\begin{longtable}{|l|l|p{9cm}|p{5cm}|p{5cm}|}
\caption[Features]{Features} \label{features} \\
\hline 
\textbf{Study} & \textbf{Type} & \textbf{Feature}  &\textbf{Metrics} &\textbf{Classifier}\\ 
\hline 
\endfirsthead

\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline 
\textbfStudy} & \textbf{Type} & \textbf{Feature}  &\textbf{Metrics} &\textbf{Classifier}\\ 
 \hline 
\endhead

\hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\hline \hline
\endlastfoot


...
share|improve this question
    
Welcome to TeX.SE. –  Peter Grill Apr 2 '12 at 17:29
    
If the solutions below do not solve your issue, please keep in mind that it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. This will also serve as a test case and ensure that the solution actually works for you. Basically, show the problem instead of describing it. –  Peter Grill Apr 2 '12 at 17:31
    
One possible idea is to use features of the enumitem package but don't know if it will solve your issue without a test case. –  Peter Grill Apr 2 '12 at 17:33
add comment

2 Answers

\resizebox as its name implies makes a box so the result will never break, which defeats the point of longtable, If you reduce the numbers in

{|l|l|p{9cm}|p{5cm}|p{5cm}|}

then the table will fit on the width and will not need scaling. Or if you want smaller text don't use scaling, just put \small before the table.

share|improve this answer
    
the problem is the height not the width, beacusa with itemize the table is not split on pages... –  Cristina Apr 2 '12 at 11:11
    
I don't understand. (maybe you need to supply a full example). But the fact remains, that if you need to put it in a box, use a normal tabular, not longtable. –  David Carlisle Apr 2 '12 at 11:38
    
eheh table is long about 8 pages... –  Cristina Apr 2 '12 at 11:46
4  
This is why we ask people to put a MWE in the question (you can edit your question and add one) it is then much easier to see the constraints. Clearly the table is not 8 pages long in a \resizebox it will just be in one over-long table. The solution is likely to be do not use itemize but to put each item in a row of the table, so it can break, or to not use a table at all, and just use an itemize, which can also break. Impossible to say without a minimal working example (MWE) –  David Carlisle Apr 2 '12 at 11:52
add comment

a longtable cannot be resized with \resizebox when it has a page break. Use something like

\small
... your longtable ...

\normalsize

or use the package ltxtable which allows a longtable with X columns as possible for tabularx. Run "texdoc ltxtable" for the syntax.

share|improve this answer
    
the problem is the height not the width, beacusa with itemize the table is not split on pages... –  Cristina Apr 2 '12 at 11:11
1  
then the itemize is longer than a page and a longtable can have only a pagebreak between two tabular lines! Close the itemize environment and start a new one in a new tabular line, where a page break may make sense. –  Herbert Apr 2 '12 at 11:15
    
I've already tried but table then consider 2 itemize the same one... –  Cristina Apr 2 '12 at 11:45
1  
@Cristina: I second Herbert's suggestion on closing itemize when possible. Speaking of items, what if you use compactitem from the paralist package instead of itemize? It's the itemize environment with all the vertical skips set to zero, it might save some space. –  Paulo Cereda Apr 2 '12 at 12:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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