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 have below data.I would like to upload into latex doc in the below format.

Length Left Right Bottom Top Diagonal
214.8 131.0 131.1 9.0 9.7 141.0
214.6 129.7 129.7 8.1 9.5 141.7
214.8 129.7 129.7 8.7 9.6 142.2
214.8 129.7 129.6 7.5 10.4 142.0
215.0 129.6 129.7 10.4 7.7 141.8
214.4 130.1 130.3 9.7 11.7 139.8
214.9 130.5 130.2 11.0 11.5 139.5
214.9 130.3 130.1 8.7 11.7 140.2
215.0 130.4 130.6 9.9 10.9 140.3
214.7 130.2 130.3 11.8 10.9 139.7
...
...
...
...
...
...
share|improve this question
    
can you tell what you have tried and what the problem is? answer to many of your questions are just a google search away. –  mythealias Sep 9 '12 at 0:23
add comment

1 Answer

up vote 5 down vote accepted

Use pgfplotstable package.

\documentclass{standalone}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\pgfplotstableread{
Length Left Right Bottom Top Diagonal
214.8 131.0 131.1 9.0 9.7 141.0
214.6 129.7 129.7 8.1 9.5 141.7
214.8 129.7 129.7 8.7 9.6 142.2
214.8 129.7 129.6 7.5 10.4 142.0
215.0 129.6 129.7 10.4 7.7 141.8
214.4 130.1 130.3 9.7 11.7 139.8
214.9 130.5 130.2 11.0 11.5 139.5
214.9 130.3 130.1 8.7 11.7 140.2
215.0 130.4 130.6 9.9 10.9 140.3
214.7 130.2 130.3 11.8 10.9 139.7
}\mytable
\begin{document}
\pgfplotstabletypeset[fixed, %number format
zerofill, %remove if you don't want integers having .0 suffix
precision=1, %how many digits needed for decimal part
dec sep align %align at the decimal point
]{\mytable}

\end{document}

enter image description here

share|improve this answer
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.