Created
February 1, 2021 14:38
-
-
Save bstellato/ef82bd272bb1dcf37595c5c93f33042c to your computer and use it in GitHub Desktop.
Booktabs table from csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{booktabs} | |
\usepackage{csvsimple} | |
... | |
... | |
\begin{table} | |
\centering | |
\caption{Example table.} | |
\label{tab:tablelabel} | |
\begin{tabular}{ll} | |
\toprule | |
$A$ & $B$\\ | |
\midrule | |
% Add directly from csv reader | |
% the csv file has names colnameA, colnameB | |
\csvreader[head to column names, late after line=\\]{./data_file.csv}{ | |
colnameA=\colA, | |
colnameB=\colB | |
}{\colA & \colB} | |
\bottomrule | |
\end{tabular} | |
\end{table} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment