csv 字串到表,無需外部文件

csv 字串到表,無需外部文件

我正在嘗試從 CSV 字串建立 Latex 表。我看見類似的問題,之後我開始使用 csvsimple 套件(手動的)。

我不明白的是需要filecontents.當類似的事情

\usepackage{csvsimple}
\usepackage{filecontents}

\begin{filecontents*}{example.csv}
foo,bar,baz
zip,boom,bang
\end{filecontents*}

\csvautotabular{example.csv}

運行後,這會在磁碟上建立一個名為 example.csv 的檔案。有沒有辦法從字串本身解析 CSV?

\csvautotabular{\mymacro}

也不會飛。

相關內容