3

This is a follow-up question of: What is the right way to set predetermined column widths with tabularx?

As seen in the code below,

\begin{landscape}
\renewcommand*{\arraystretch}{2}
\begin{table}\tiny
\centering
\caption{Summary of Elders' Fall Assessment Articles tabularx}
\label{tab:FallRiskAssessmentArticles}

\newcolumntype{Y}{>{\raggedright\arraybackslash}X}
\begin{tabularx}{\linewidth}{>{\raggedright}p{15mm}>{\centering}p{13mm}>{\centering}p{10mm}<{\centering\arraybackslash}XYYYYYY}

\toprule

\textbf{Author} & \textbf{Sensor} & \textbf{Placement} & \textbf{Subject \newline count (M:F)} & \textbf{Movement} & \textbf{Signal Processing} & \textbf{Advantages} & \textbf{Dis\-ad\-van\-tages} & \textbf{Outcome} & \textbf{Reference Measure} \\    
\midrule

\noindent\citet{najafi_measurement_2002}&
Gyroscope&
Chest&
11 (5:6)&
STS transitions& 
Wavelet transform& 
Uses normal postural transition.  Can be used during ADL&
Gyroscope must be worn on chest& 
Extracted parameters show significant differences between high/low risk groups&
Fall risk using Tinetti tests, cognitive and vision tests, plus history of falls\\    
\bottomrule

\end{tabularx}

\end{table}

\end{landscape}

I get the following output:

enter image description here

Where you can see there is a big space between column 4 and 5. Why if I'm using predefined widths I get this result? How do I fix it?

UPDATE

David Carlisle suggested to use tabulary package, but it seems there is a compatibility issue with arydshln, which is one of the packages I'm loading.

  • Calling David Carlisle! There's been a spill in aisle, I mean column, 4. – Steven B. Segletes May 17 '13 at 15:04
  • @StevenB.Segletes HAHAHAHAHAHAHAHAHAHAHAHA – Mario S. E. May 17 '13 at 15:05
  • Your fourth column is as wide as the ones following it, because you just required so, specifying it as X. – egreg May 17 '13 at 15:20
  • @egreg So how can I "draw a line" where to stop them doing this? I just want the first four forced to a certain width and the rest to be free to be set as appropriate by any other algorithm – Mario S. E. May 17 '13 at 15:22
  • 1
    Please read these instructions and make a more reasonable example – David Carlisle May 17 '13 at 16:22
4

X columns are just p columns which are all set to the same width, where the width is calculated to make the total table width the specified size. So all the X and Y columns in your table are the same width,

All the entries in that column are single line so you could just use c so the column is set to the natural width of its content.

Or use \tabulary instead of tabularx The algorithm used there does allocate wider columns to columns with more data.

enter image description here

A complete document:

\documentclass{article}

\usepackage{pdflscape,tabulary,booktabs}

\begin{document}

\begin{landscape}
\renewcommand*{\arraystretch}{2}
\begin{table}\tiny
\centering
\caption{Summary of Elders' Fall Assessment Articles tabularx}
\label{tab:FallRiskAssessmentArticles}


\begin{tabulary}{\textwidth}{*{10}{C}}

\toprule

\textbf{Author} & \textbf{Sensor} & \textbf{Placement} & \textbf{Subject \newline count (M:F)} & \textbf{Movement} & \textbf{Signal Processing} & \textbf{Advantages} & \textbf{Dis\-ad\-van\-tages} & \textbf{Outcome} & \textbf{Reference Measure} \\    
\midrule

\noindent citet{najaf2002}&
Gyroscope&
Chest&
11 (5:6)&
STS transitions& 
Wavelet transform& 
Uses normal postural transition.  Can be used during ADL&
Gyroscope must be worn on chest& 
Extracted parameters show significant differences between high/low risk groups&
Fall risk using Tinetti tests, cognitive and vision tests, plus history of falls\\    
\bottomrule

\end{tabulary}

\end{table}

\end{landscape}

\end{document}
  • Unfortunately, I'm having some kind of conflict with tabulary, it gives me a lot of errors. I'm loading these "table packages" (in order of appearance): multirow, array, tabularx, longtable, arydshln, float, adjustbox, tabulary, booktabs. Are there any known compatibility issues? – Mario S. E. May 17 '13 at 16:12
  • @MarioS.E. As always a question with a complete small document showing the problem is more likely to get a useful answer. – David Carlisle May 17 '13 at 16:14
  • I know, I just don't want create a mess by posting a huge list of packages I'm using... but well, I'll copy it on the question – Mario S. E. May 17 '13 at 16:16
  • @MarioS.E. don't post a huge list delete all unused packages and text that uses them (eg \citet grrrrr) while still showing the error. That is what anyone trying to answer has to do it is better if you do it. – David Carlisle May 17 '13 at 16:21
  • I found the guilty package! it is arydshln – Mario S. E. May 17 '13 at 16:29

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.