
나는 거기에 있다는 것을 안다다른 옵션도.
그러나 나는 궁금했다: 루프에서 한 행 테이블을 생성한 다음 이전 전체 테이블에 추가하려면 어떻게 해야 합니까?
다음 시도에서는 현재 루프 값만 허용됩니다.
이 문제를 어떻게 해결할 수 있나요?
나는 특히 \pgfplotstablevertcat
이 기능을 사용하는 데 관심이 있습니다.
이것이 가능한가?
\documentclass{article}
\usepackage{pgfplotstable}
\pgfplotsset{compat=newest}
\begin{document}
\section{Create following Table row by row}
\pgfplotstabletypeset[header=true, col sep=comma]{
k, 2k
1, 2
2, 4
3, 6
}
\section{Try}
\pgfplotstableread[header=false, col sep=comma]{
k, 2k
}{\main}
Startsituation: \pgfplotstabletypeset[string type]{\main}
\subsection{Loop}
\pgfplotsforeachungrouped \k in {1,2,3} {%%
\pgfmathsetmacro\Double{2*\k}
\pgfplotstableread[header=false, col sep=comma,
row sep=\\ % <--- seems that he wants that............
]{
\k, \Double \\
}{\temp}
\noindent Temprow (good!): \pgfplotstabletypeset[]{\temp}
\pgfplotstablevertcat{\main}{\temp}
\noindent Tempsituation (bad!): \pgfplotstabletypeset[string type]{\main}
}%%
\end{document}