With some help here I was able to import tables read from a csv file using this code:
\documentclass{article}
\usepackage{array,booktabs,longtable,csvsimple}
\usepackage{filecontents}
\begin{filecontents*}{NewTextDocument.csv}
name,job,age,profile
John,student,21,John has always been a very diligent student his marks always being among the best
Frederik,student,18,Frederik has not been a very diligent student
Johnson,professor,49,Johnson is just a professor ...
\end{filecontents*}
\makeatletter
\csvset{
my first column width/.style={after head=\csv@pretable\begin{longtable}{*{\csv@columncount}{p{#1}}}\csv@tablehead},
my second column width/.style={after head=\csv@pretable\begin{longtable}{|*{\csv@columncount}{p{#1}|}}\csv@tablehead},
}
\makeatother
\begin{document}
\csvautobooklongtable[
separator=comma,
my first column width=3cm,
late after line={\\\midrule},
late after last line={\end{longtable}}
]{NewTextDocument.csv}
\csvautobooklongtable[
separator=comma,
my second column width=3cm,
table head={\hline\csvlinetotablerow\\\hline},
late after line={\\\hline},
late after last line={\\\hline\end{longtable}}
]{NewTextDocument.csv}
\end{document}
However, now I'm trying to make a little change by centering and "bolding" the text of a whole row or column but I haven't had any luck yet. Can anyone help me modify the code above to do so?
EDIT: And I would also like to label and add a caption to the tables, which I'm also struggling with.
