我有以下数据。我想以以下格式上传到乳胶文档中。
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
...
...
...
...
...
...
答案1
使用pgfplotstable
包裹。
\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}